A thought on scripting, just in case you haven't thought of it.
To script countering, you can do the followings:
- Each unit has counter1-3
- Same with building/tech: counterbuilding1-3 OR countertech1-3
Detection:
IF detect UnitX THEN {
build CounterUnitX until CounterUnitX*minerals/gas > enemy unitX's minerals/gas
then attack
}
Of course it's going to overflow with so many counters, so just pick the top 3 counters, ie. giving each counter an index value as in CounterUnitX_Index = CounterUnitX+Index + 1;
During battle:
IF army's size < 0.5 enemy's army size Then {
retreat
}
This way you can let the AI deviate from the initial build orders.
To script countering, you can do the followings:
- Each unit has counter1-3
- Same with building/tech: counterbuilding1-3 OR countertech1-3
Detection:
IF detect UnitX THEN {
build CounterUnitX until CounterUnitX*minerals/gas > enemy unitX's minerals/gas
then attack
}
Of course it's going to overflow with so many counters, so just pick the top 3 counters, ie. giving each counter an index value as in CounterUnitX_Index = CounterUnitX+Index + 1;
During battle:
IF army's size < 0.5 enemy's army size Then {
retreat
}
This way you can let the AI deviate from the initial build orders.