Several AI bugs

Siesta Guru

Prince
Joined
Dec 2, 2007
Messages
498
Location
The Netherlands
These are some of the more major/fixable AI bugs I came across while modding the AI

- Frequently ranged units will end their turn instead of shooting a target while they have remaining movement points. Based on my tests, it seems ranged units will sometimes even fail to attack if the ranged unit is executing an "Operation Attack Units" or "Operation Attack" node in a BehaviorTree with the target set

- The settle spot evaluation system seems to not use its fresh water calculation correctly What appears to be going on is that instead of checking whether the city will be on fresh water, it instead calculates the amount of nearby fresh water tiles. The result is lots of cities one tile away from fresh water.

- Some of the Operations don't have their OperationType set. What ends up happening is that for some reason these operations when active end up contribution to the operation limit of CITY_ASSAULT. This means that when these operations without type are active, CITY_ASSAULT operations no longer run. This is a major reason behind the lack of late game city attack activity.

- Some BehaviorTrees can get stuck in Operation Move nodes when units cannot get in range of the target. With a minimum range of 2 on some important BehaviorTrees like Siege City Assault this happens somewhat frequently. For example, if an operation with 10 units tries to reach a city between mountains that doesn't even have 10 free tiles around it, it'll cause the units to stand around/dance around until enough units have died.

- Some choices are clearly suboptimal. Some of the more glaring ones are: The AI heavily favors bad policies, settles cities that'll flip instantly due to loyalty and doesn't take 0 health cities with adjacent melee units

- The diplomacy AI frequently accepts some requests like friendship/alliance without regard for the relationship. It seems especially buggy on the turn you first meet them.

- The era based strategies such as STRATEGY_MEDIEVAL_CHANGES are all cumulative, they don't stop when the era ends. This seems unintentional. Additionally, STRATEGY_MEDIEVAL_CHANGES is activated in the Classical era, not the Medieval era
 
Top Bottom