I read about the AI not doing things people are expecting it to do and I would have to say it sure is acting weird.
My first screen shot shows the German stack that came to attack me with their Great General.
View attachment 325993
The next two screen shots show what the AI had in and around Berlin at the same time the stack was attacking me.
View attachment 325994 View attachment 325995.
It really doesn't want to use anything but hunters and yet the units I had next to Berlin were attacked on two occaisions by Stone Axemen & Atl-atl's.
I expect this would be a real simple fix but I don't like messing with anything except xml which I'm not too bad with.
Is this an xml problem with AI types or is their a Python or C++ bit of code looking after this?
To find out more do the following:
1) Enable chipotle (debug mode) in your INI file if you haven't already
2) When you see this sort of thing ctrl-hover (or is it shift - I forget) ovr the unit stack in question - with chipotle enabled that will show you extra debugginh info, including the UNITAI_type in use by that stack which is highly pertenant here
3) Enable level 3 BBAI logging in teh BUG options. To do this go to the bug screen and select the 'Logging' tab, and change the dropdown for BBAI log level to 3. This will cause BBAI_log.txt to be written each time you run (it will be overwritten each run so preserve inersting ones), which has a LOT of AI debugginh info in it.
In regard to the situation you have here:
i) The stack of 2 hunters + a GG actually attackign a city is a bit weird. Debugguing info as above may reveal more
ii) The AI hasbn't got a clue in regard to great commanders, so all bets are off on its use of them (it's on my list to address)
iii) There is NO global intelligence in the AI which would tell it to move units from defense to attack. Each stack acts essentially independently. In the case of attack stacks they are suposed to sit in a staging city until they get large enough to make an attack worthwhile (which they consider to be around 150% of defender strength). This is why the 2-hunter attack is odd (it shouldn't have passed the strength threshold relative to the visible defense). When a stack with non-city-attck AI, but still a combat AI doesn't have urgent work to do it looks for nearby city attack stacks to join (that's how they grow).
The whole stacks-act-autonomously thing is quite limitting, and I've been adding mechanisms to move away from it in recent versions (uniot contarcting system being the main one), but as yet those new mechanisms are only VERY sparsley used. One use that I have on my to-do list is to have city attack stacks proactively contract for extra force instead of relying on combat units nearby to decide to join them.
If anyone who feels competant in C++ wants to dabble an help out with the AI there is a massive amount to do...