         Total Annihilation Skirmish AI Profiler

                  Version Beta 0.6, 
                  14 November 1997

                  By Andrew Griffin 
             (andrew_griffin@bigfoot.com)

"Yep, this is most certainly a beta! Expect some crashes."


Please do not email me if you cannot get this to work
on your computer - there isn't anything that I can do
about it. 
However, some feedback on whether this is useful or not
would be appreciated :) If there is lots of positive feedback
and you are finding this useful, then I could probably get
motivated to add in stuff like handling the different difficulty
levels. But I won't if people don't use this - I'll be keeping
my eye on annihilated.com to see what gets done :)


============
= Java 1.1 =
============
This is a Java 1.1 program, and hence you need the Java 1.1
(or later) runtime environment to use it. Go to the Javasoft
website:
  http://www.javasoft.com/products/jdk/1.1/jre/index.html
and download the JRE package and install that (the latest version
is something like 1.1.4), or the JDK if you are into developing
your own Java stuff.
(Java 1.1 has a much nicer event model than 1.0)
Java 1.1 is definitely worth the download.


Using This Program
==================
If you want to find out about writing skirmish AI's, read the
ai.txt file I've created.

The initial GUI should appear pretty much straight away. Then the
sub-GUIs will load - as they have loaded, their buttons will become
active. You can click on one of the active buttons and start editing,
even if the others haven't finished laoding yet.
On my computer, it takes about 15 seconds all up for everything
to come on line, although only a couple before the first button is
enabled (hopefully Sun's upcoming Hotspot will speed this up a lot).

Each item you can edit has 3 parts - a checkbox, the name of the
item, and a text input box. If you want an item to appear in the .txt
file, you have to check the checkbox. Unchecked items will not appear
in the .txt file even if they have had their values changed.
See below for a more detailed description of the interface.


Wanted - person with SuperCede
==============================
If you have got SuperCede, then I'd be willing to send you over the
source code for you to compile into an executable. Email me if
you can do this. Thanks.


Known Problems:
===============
I am pretty sure that the large number of GUI components (over 300)
is causing some wierd behaviour. However, this only happens on
occasion - this program is a lot more stable than a couple of days
ago. 9 times out of 10 it will work perfectly. From the error
messages when it does crash, it is telling me about a 
NullPointerException: invalid peer. This has changed from being about
a menu item to a frame item, and is pretty wierd. For some
reason I can't run jdb so can't narrow this down - I don't think
it is a problem with my code, but all programmers think that,
right? :)

That said, it is likely that you won't run into any problems
with the program, so forget what I just wrote. Since I wrote this
a couple of days ago, I haven't had a problem since :)


Starting this program
=====================
What you run depends on whether you have the JRE or the JDK.
If you have the JDK, then you run this program like:
java skirmai
or
javaw skirmai

If you have the JRE, you run it like:
jre skirmai
or
jrew skirmai

I would recommend making a batch file for this.

This is CasE insensitive (it doesn't matter if you use skirmai
or SkiRMaI or whatever).



The Interface
=============
The Main Interface
******************
  There are 6 buttons on the main interface: ARM Unit Weights,
CORE Unit Weights, ARM Unit Limits, CORE Unit Limits, Special
Weights, and Special Limits. As the program loads up the various
GUIs used by each of these, the buttons will become active, and
you can click on them to open that editing screen.
  You can have all of the 6 editing screens open at the same time
if you like. If a screen is already open, and you click on it's
button again, that screen will be brought to the front. This is
an easy way to navigate the screens.

File Menu
---------
  There are also 3 commands available under the 'File' menu on
the main interface. These are: New AI Profile, Save AI Profile
and Exit.

- New AI Profile: When chosen, all of the currently opened screens
  are closed. Not only this, but all values are set back to 0 and
  all checkboxes are unchecked. This allows you to create multiple
  AI profiles in the single session. Make sure that you don't select
  this by mistake when going to save your work :)
- Save AI Profile: This will bring up a dialog where you can change
  the directory and select a filename you want to use. This is just
  the basic Save dialog that comes with windows programs, and behaves
  the same.
  Remember that it will only write those values to the text file that
  have been Stored from the respective editing screens. Make it a
  habit to Store the values each time you are done with a screen.
- Exit: Closes the program.


Editing Screen Interface
************************
  This should be fairly intuitive to use. Beside (to the left) of
each name is a checkbox. If you want this item to appear in the
AI profile file, then you have to check this box (a little tick will
appear in it). You can uncheck it as well. Below the name is an
input box. This works the same - simply click in it with the mouse,
and enter the amount. Although you can enter anything into these
input areas (including letters), I trust that you are intelligent
enough to keep it to numbers.
  The Weight editing screens can accept non-integer numbers, like
2.5 or 3.75. The Limit editing screens only accept integer numbers
like 3, 5 or 12.
  When an editing screen is opened, it will display the last Stored
values.

File Menu
---------
  The 'File' menu has 4 options: Store Values, Store and Close,
Reload Values, and Close Screen.

- Store Values: This Stores the values of the editing screen, so they
  can be written out when the profile is saved.
- Store and Close: This Stores the values of the screen, but also closes
  it. This is useful when you have finished editing with that screen.
- Reload Values: This is used to reload all of the values (including
  for the checkboxes) since you last Stored that screen. It can be used
  to get rid of any changes you made to that screen since your last
  store.
- Close Screen: Closes the screen without Storing the values. If you do
  this, all changes made since the last Store will be lost.


Edit Menu
---------
  The 'Edit' menu has 7 options: Select All, Invert Selection, Increase
selected values by 1, Increase all values by 1, Decrease selected values
by 1, Decrease all values by 1, and Set selected to 0.

- Select All: All of the checkboxes become marked.
- Invert Selection: All marked checkboxes become unmarked, and all
  unmarked checkboxes become marked.
- Increase selected values by 1: Increases the value of all of the 
  currently marked items by 1.
- Increase all values by 1: Increases every value (even unmarked) by 1.
- Decrease selected values by 1: Decreases the value of all of the
  currently marked items by 1 to a minimum of 0 (it will never be
  negative).
- Decrease all values by 1: Decreases every value by 1.
- Set selected to 0: Sets the value of all selected items to 0.



Hopefully it should all be pretty straight-forward to understand.
Read the 'ai.txt' file for a better understanding of this all.


Including New Items
===================
A really cool ability of this program is that it can easilly be
expanded to allow the use of more unit names (for when the new
units start coming out), simply by changing the skrmai.ini
file. You can add (or delete) stuff from each of the section
quite easilly. You can even, to some extent, modify how the
editing screens will look.
Read the skrmai.ini file to see how to do this.



blackmane 
(Andrew Griffin)
http://www.geocities.com/TimesSquare/5458


History
-------
v0.5   Initial release
v0.6   Fixed bug causing .null file to get created when the
       Cancel button is hit on the save dialog.



Note on Java layout managers:
(if you are interested, probably not)
I originally used GridBagLayout for everything, but after doing
a profile, changed over to GridLayout. This has probably sped the
initialisation up by a factor of 3 or 4. And it looks much better
now, as well.

