More progress on the scripting-front:
The AI is split up in SCRIPTS and TASKS
So far I have 10 different SCRIPTS, including "building units in order to occupy a neutral base",
"harassing the player" , "fortifying main base" , and a few other "surprises"
Each SCRIPT has a PRIORITY-number and a pre-determined number of TASKS.
PRIORITY ranges from 1 to 10 , with 1 being the highest priority and 10 the lowest priority.
Some SCRIPTS are activated by an AI-helper function.
This function issues a number of SCRIPTS based on GAMETIME.
Other SCRIPTS are activated on EMERGENCY , including : "low on energy",
"player attacks main base" , "player has more bases than AI".
Like I said , each script has a number of tasks.
Every task has its own ID-number and another number which basically is the same ID-number of the script it belongs to.
Each script also has a counter. This counter holds the number of the task that is currently running.
If a task is finished, then the counter points to [the ID-number of] the next task on the list.
A script is deleted when its tasks are finished.
"Why use a system of scripts and tasks ?"
I did it this way because it's possible to abandon a script that is currently running,
and to start another script with a higher PRIORITY.
Each time a script is added to the list, all scripts are (re-)shuffled according to their PRIORITY,
and the avatar only executes the first script it comes across.
So, when a script is deleted, the next one on the list could very well be the abandoned one I told you about.
Each script can only exist once , when its on the list. It's therefore possible that the AI-helper function wants
to activate a certain script which is already running.
In this case, the script is set aside as long as the previous one is running.
And now the tasks:
These range from "build a certain unit with a certain order" , "check a location" , "replenish avatar" ,
"replenish unit" to "attack player" , "move to main base" and "move to nearest friendly keep"
I'm trying to write AI that doesn't cheat , because that wouldn't be fair. ( "O rly ?")
It is possible that the first time you get trashed by the computer on later missions,
because , let's face it, the AI always knows exactly what to do (to a certain degree).
Elvenfyre has written very good story-material, but I'm not explaining the story here,
because that would ruin the surprise(s).

Aaaand,
For those of you , who follow the progress of Dark Resurrection: I've written a new post about its progress.

Stay tuned peeps.