Good report, Kinnon.
Had 2 lonely days at work so i thought i'd better design my basic AI structure. (I'll try to solve this project with object orientated software design, that's a good way to train programming project skills for my job)
So far i think i've identified 4 object classes that will do the job (in Opf this could mean there are 4 main scripts running i suppose, not sure yet):
ThreatEvaluator:
This object/script oversees all friendly units and mainly deals with the question: if something happened, what was sighted, where and when was it reported ? Then it classifies the (maybe potential) threat and reports the threattype, position and time to other scripts.
GameplanManager:
Its main job is to generate/update/delete threat symbols on the map. Every symbol is connected with the time it was generated. To use the advantage of the Opf engine, i decided the GameplanManager will only work with the gamegrid (50mx50m). To my Manager the world of opf should 'look' like a big tictactoe game where certain fields are neutral, friendly or a threat.
Also, i want it to handle mixed threat symbols, that means a field could also be occupied by an infantry-threat and a tank-threat symbol.
TroopManager:
Its main job is to spawn troops of various types and numbers, give them orders and waypoints and takes care that a group is called back after a certain threat is 'dealed' with (in various ways). It's a dumb script that isn't decisive, it just follows orders of the SituationAnalyser.
SituationAnalyser:
This is the decisive routine, sorta 'The Brain' - it depends on / works with infos / events from the other objects/scripts.
It takes resource levels, threat symbols and his 'personal' behaviour settings into account and decides what the TroopManager should do next.
It only reacts to changes of resources and threat symbols. A new threat will trigger an order to the TroopManager, who will spawn&command the appropiate troops. If resources drop, the Analyser will take appropiate steps to get more resources (reinforcements/supplies). If resources raise beyond a certain level the Analyser will take steps to built a new base. Once this base is finished the Analyser starts the new AI script, therefore creating a 'living' copy of its own.
By the way this works, the players will have to deal with lots of independant bases if they wait too long.
Ideas/Comments/whatever welcome