Hi Siesta,
I ran several games on the autoplay mod (island plates, 8-10 players, Emperor/Deity difficulties) after the fall patch mainly without AI+ and noticed the following:
1. Settling team behaviour:
a) on Island maps AI settles quite far from the original homeland. This sometimes leads to crazy situations when AI set a city right next to another AI on the opposite end of the world, despite having several empty islands next to it. (I think this can be corrected easily by changing preferences to closer settlements)
b) AI sometimes takes most of its army to accompany a settler - I think there is no limit on number of max combat units in settlement operations)
2. Military behaviour:
Naval assaults: I also haven't seen any city being taken by ships (I thought maybe I missed it as I don't monitor closely autoplay games).
At the moment there are two naval actions in the game: Naval_superiority operation with its own behaviour tree and team name "City Naval Attack Force" which uses normal siege operations with condition that target should be coastal (seems that someone in Firaxis reads this thread).
AI certainly does run Naval_Superiority operation - it builds number of ships and moves them across the oceans as coordinated groups but rarely use them in sieges, using them more as an escort formation.
When it comes to sieges AI prefers to use land units, I see several reasons for it:
* Naval teams have a condition of min percentage of ships just 1%. I don't know why it is so low - if AI can't get ships to the target of Naval assault, it can always use normal siege operation (there is no condition for it)
* AI always prefers to use normal city siege operation rather than the Naval attack (not sure why)
* Min odds of success and new unit requirement ("Must Have Units" condition) are too high - AI just can't get that many units in a close proximity to the city (this is more a general observation for both land and naval operations - I started seeing AI amassing large groups and moving them close to the border but not attacking opponent at all).
To be honest I am not sure about this Naval Superiority thing - it is good that Firaxis tries to make AI think about escorting transport ships but this might be also preventing AI from using naval units in Naval city siege operation. I will try to change some of these parameteres to see if this will result in better naval attacks. It seems that now we got some tools for Naval AI, we just need to use them to tune the AI.
Where can I find the file that has ("Must Have Units" condition) and others as I would like to mess with them myself, please?
Thanks Lion King!
What you describe sounds very similar to what I've seen in the couple of games I've ran with AI+. So I suppose that, and the fact that the logs do show that the City Naval Attack Force operation is still running with AI+ sounds like a pretty good confirmation that they still work.
Original data is stored in Base/Assets/Gameplay/Data. The two most relevant files will be Operations.xml and Behaviortrees.xml. Operations is quite easy to mess up.
However, I wouldn't recommend changing BehaviorTrees without good understanding of how the tree works - it is quite easy to break. Also don't change original files - you better use Siesta's mod and delete all files apart from military.xml. This file contains a lot of similar information on operations and teamrequirements.
Hmm, it is possible, but because of minpercentage=1 I hardly saw any ships attacking cities in the unmodded game. I tried to amend naval superiority tree to force ships to attack cities, however it didn't work. I decided to choose another path and create minimod with additional Naval operation, also amending teamrequirements to increase presence of naval units. Now I clearly see AI building mixed naval/land forces and successfully taking cities by using ships. Would be good to try it with AI+ to see the results.
Thanks! I'll give it a shot to see what happens.
I noticed your comment that "Max is set because the AI cant handle logistics above a certain number of units"
While that comment is generally true, there's an important setting to control this you may not have found yet. So just in case:
In the behaviortrees there's a value set to 2 on the move units node right before they get into the attack city part (the name of the variable escapes me). This variable controls the minimum distance that units need to be at before the game allows moving past that node. It so happens that since it's set to 2, if armies get too big or if there are many mountains, it very frequently fails to get all of its units within that distance of 2. So it never moves past that node and it ends up just standing around the city with its armies while not doing anything. If you set this one to 3, it's much less likely to get stuck and ends up handling big armies a bit better.
I also noticed you haven't included a particular fix to operations which ends up making it significantly less likely that enemies attack in the lategame. Some of the operations (the city defense and the return worker operations IIRC) dont have an operation type set. This seems to end up interfering with the maximum limit of operation types. If you slap operationtypes on them it ends up launching more city attack operations late game.
Thanks for the info. Okay, so I have not look at that yet since I really do not know what I am doing yet... I wanted to know if you or Siesta Guru were planning to update the changes in one of these mods?
One other thing I have never seen the AI players make any carriers all game long, are the AI players able to use carriers and can the AI players be made to at least look into getting one or two carriers?
Regarding behavior tree issue - how did you spot this in the game? I saw so many times AI not doing anything because of this issue and was always wondering whether they are trying to hire more units.
One other thing I have never seen the AI players make any carriers all game long, are the AI players able to use carriers and can the AI players be made to at least look into getting one or two carriers?
I am sorry to keep asking for help but where in the “BehaviorTrees.xml” and “Operations.xml” files or just wherever files would I go to fix the AI players units getting stuck around a city and late game wars not getting launched by the AI players? I have really looked and just do not know what I need to change.
Operations not being launched took me much longer and was one of the last genuinely impactful changes I did. For a while I had noticed that in late game, civs would build very few units. Later on I noticed in the logs that city attack operations would frequently just not start whatsoever, even if the civ in question has a sizeable army through upgrading medieval units. If operations don't even start, they never get to the recruiting phase, nor to the building contracts, which is their prime way of building military units. So the operations not starting seemed like the key, but I couldn't find a solution. For the longest time I thought it was that they simply felt too weak to attack cities lategame, possibly because of the large walls. Eventually though it became obvious that no matter what tweaks I did to minoddsofsucces, to min troop requirements, to unit combat strengths; the issue wouldn't disappear. Civs would also miss possible attacks on incredibly weak backwards civs.
After lots of looking through logs, I noticed one civ in particular that had 2 'return civilian' operations running, which for some reason didn't end for hundreds of turns. During the entire time, not a single city attack operation was launched. The pattern showed up in more games, so I had a look if there was anything special about the return civilian operation, and there was, no opeartiontype was set. The same ended up being true for the city defense operation, which was also frequently present in lategame. Adding proper operationtypes to both of them basically instantly did the trick and civs became way more active late.