Just one thing to say about RTW script engine: It's crap. It can't store variables (other than numbers), it doesn't have any functions returning values etc.

Regarding to that, I had an idea

What if one would make a proggy that'd use the information from the battle and would constantly write script commands to a file to be executed every second?

Example: A battle script calls the console command output_unit_positions, saving the positons of all units to a file. The proggy checks this file for positions. The proggy then uses the information to figure out what's going on, for exampl, flanking manouvers. When it recognises a flanking manouver it will write a command (unit_order_attack_unit plr_unit_3) to a separate script file (show_me) that is run by rome regularly.

Benefits: We can have all the commands, calculus, variables we want and need to make the AI smart.

Problems: output-command doesn't output unit status, for example, men left/ammo status/engagement status. If we can work around these there's possibly no limits.

Any thoughts?