Results 1 to 18 of 18

Thread: Tentative "fix" for homicidal AI

  1. #1

    Default Tentative "fix" for homicidal AI

    Based on this excellent post by z3n at http://www.twcenter.net/forums/showt...XML-and-the-AI, there is indeed a way to "fix" or at least revert the campaign AI behavior.

    1. Navigate to your 2.35a folder and make a backup of descr_campaign_db.xml and descr_campaign_ai_db.xml.
    2. Download the previous 2.35 (NOT 2.35a) version and locate that previous version's descr_campaign_db.xml and descr_campaign_ai_db.xml.
    3. Replace the current 2.35a's descr_campaign_db.xml and descr_campaign_ai_db.xml with the previous ones.

    These changes are most likely NOT save-compatible, so keep the 2.35a descr_campaign_db.xml and descr_campaign_ai_db.xml handy if thing's don't improve. The best way to test if this works is to boot up a Pahlava campaign, disband your entire non-free upkeep army, and buy up AS settlements one by one. If they declare war on you even once before turn 100, then the changes don't work. If the AI goes bonkers and forms an international coalition against Gigantus, the patch didn't work. If the game straight up crashes, need I say more?

    However, if the AI now declares war only with nowhere else to expand to, and certain factional relationships return (AS never, and I mean NEVER, declaring war on human Hayastan, Pahlava, or Pergamon), then this fix worked. Do this only if you want 2.35's mellow campaign AI, instead of 2.35a's backstabbing GoT AI.

    If time permits, I'll learn this scripting myself and find a way to balance 2.35's AI's rationality with 2.35a's AI's proactiveness

  2. #2

    Default Re: Tentative "fix" for homicidal AI

    Might have to revert descr_diplomacy.xml back to 2.35 as well

  3. #3

    Default Re: Tentative "fix" for homicidal AI

    Quote Originally Posted by Shoebopp View Post
    Might have to revert descr_diplomacy.xml back to 2.35 as well
    Thanks for this!

    So does just changing those three files, descr_campaign_db.xml, descr_campaign_ai_db.xml, and descr_diplomacy.xml, work?

  4. #4

    Default Re: Tentative "fix" for homicidal AI

    Can someone send me those 3 files + the campaign script file? I want to make a simple submod with that fix + some other things.

    By the way, for this new AI the team also changed the descr_strat file regarding factional behaviour but I actually think that it got better thanks to that, the problem is in the other files.

  5. #5

    Default Re: Tentative "fix" for homicidal AI

    Quote Originally Posted by Aodh Mór Ó Néill View Post
    Thanks for this!

    So does just changing those three files, descr_campaign_db.xml, descr_campaign_ai_db.xml, and descr_diplomacy.xml, work?
    I'm not certain. I booted up a Hayastan campaign, but the Seleucids didn't try to negotiate an alliance with me before turn 4 as they did in 2.35. Maybe the scripted alliance is configured elsewhere. I haven't played enough to gauge the aggression of the AI. Some other behavior to note to distinguish between versions

    2.35
    Rome has a terrible time trying to take over Rhegion and Cisalpine Gaul.
    As human Pergamon, Pahlava, or Hayastan, the Seleucids rarely, if ever, attack you.

    2.35a
    Factions expand very rapidly. Rome conquers Rhegion, Pontos conquers Trapezous, Hayastan conquers Egrisi
    Factions attempt some rather silly naval invasions. Every Pontic faction (Getai, Bosphorus, Sauromatians, Pontus, Hayastan, Pergamon) goes after Sinope and Nikaia.

    I wouldn't bank a new campaign on this fix just yet.

  6. #6

    Default Re: Tentative "fix" for homicidal AI

    Quote Originally Posted by Lusitanio View Post
    Can someone send me those 3 files + the campaign script file? I want to make a simple submod with that fix + some other things.

    By the way, for this new AI the team also changed the descr_strat file regarding factional behaviour but I actually think that it got better thanks to that, the problem is in the other files.
    The files can be found from this download like of 2.35

    https://www.moddb.com/mods/europa-ba...taller-version

    If you do try to incorporate these older files, please let us know in this thread if the AI became less homicidal

  7. #7
    z3n's Avatar State of Mind
    took an arrow to the knee

    Join Date
    Aug 2011
    Posts
    4,640

    Default Re: Tentative "fix" for homicidal AI

    If people want to, they can beta test this version of the CAI.

    1) Just download it
    2) Open it up
    3) Then copy the file
    4) Paste the file into your M2TW/EBII/data folder
    5) Say yes to replacing the file

    https://drive.google.com/file/d/1Xi1PQLhkddl2RV9Nf5JNE_--Y7EXyoVJ/view?usp=sharing


    Also keep in mind that previous versions like the one Shoebopp referenced aren't very good for long campaigns. The idea with ceasefires being more frequent is to prevent larger factions from gobbling up all the small factions too quickly. Some of the previous versions had these issues e.g. the grey death or the red swarm.
    Last edited by z3n; November 18, 2021 at 01:28 PM. Reason: v1
    The AI Workshop Creator
    Europa Barbaroum II AI/Game Mechanics Developer
    The Northern Crusades Lead Developer
    Classical Age Total War Retired Lead Developer
    Rome: Total Realism Animation Developer
    RTW Workshop Assistance MTW2 AI Tutorial & Assistance
    Broken Crescent Submod (M2TW)/IB VGR Submod (BI)/Animation (RTW/BI/ALX)/TATW PCP Submod (M2TW)/TATW DaC Submod (M2TW)/DeI Submod (TWR2)/SS6.4 Northern European UI Mod (M2TW)

  8. #8

    Default Re: Tentative "fix" for homicidal AI

    Quote Originally Posted by z3n View Post
    If people want to, they can beta test this version of the CAI.

    1) Just download it
    2) Open it up
    3) Then copy the file
    4) Paste the file into your M2TW/EBII/data folder
    5) Say yes to replacing the file

    https://drive.google.com/file/d/1Xi1PQLhkddl2RV9Nf5JNE_--Y7EXyoVJ/view?usp=sharing


    Also keep in mind that previous versions like the one Shoebopp referenced aren't very good for long campaigns. The idea with ceasefires being more frequent is to prevent larger factions from gobbling up all the small factions too quickly. Some of the previous versions had these issues e.g. the grey death or the red swarm.
    I volunteer myself as tribute. I'll start with a Pergamon campaign to see if AI Seleucids tolerate my buying Sardeis on turn 1 for a measly 8k mnai

  9. #9

    Default Re: Tentative "fix" for homicidal AI

    Rome conquered Rhegion, and Pontus conquered Trapezous immediately. KH pulled off the herculean feat of conquering Demetrias. Seleucids and Ptolemies evacuated Anatolia without incident after I purchased all their settlements there using the "disband everything and execute DollarDiplomacy.exe." No one declared war on me yet, but I sure did declare war on KH for their crime of existing.

  10. #10

    Default Re: Tentative "fix" for homicidal AI

    Started a Carthage game with the beta AI, on the very first turn Rome broke its alliance with me and Numidia besieged one of my settlements.

  11. #11

    Default Re: Tentative "fix" for homicidal AI

    Quote Originally Posted by Aodh Mór Ó Néill View Post
    Started a Carthage game with the beta AI, on the very first turn Rome broke its alliance with me and Numidia besieged one of my settlements.
    When you're playing as Carthage, Rome is scripted to cancel your alliance right as the campaign starts. As for Numidia backstabbing you immediately - that is concerning.

  12. #12

    Default Re: Tentative "fix" for homicidal AI

    Yeah, I had the Numidians backstab me on the second or third turn, though that was on Very hard.

    How much does each CA difficultly affect diplomacy? What’s the best difficulty for this version?

  13. #13

    Default Re: Tentative "fix" for homicidal AI

    Quote Originally Posted by Hirtius View Post
    Yeah, I had the Numidians backstab me on the second or third turn, though that was on Very hard.

    How much does each CA difficultly affect diplomacy? What’s the best difficulty for this version?
    Normal difficulty. Most would say Hard instead because roaming rebel can siege your settlement and enemy can buy mercenary. However in EB2 rebel early game are very strong and mercenaries has large pool that ai could exploit which will cause the enemy army to disgustingly bloated.

    It also helps with diplomacy it seems because i only get backstabbed by Numidia usually around 250 bc and Koinon Hellenon if i own Crete.

  14. #14

    Default Re: Tentative "fix" for homicidal AI

    I am extremely unaware on how to mod m2tw ai...but it seems for this version the problem has to be tackled in three ways (don't know how): a)prevent settlements from ever being exchanged for money, b)lengthen the "minimum" time before an ai faction accepts a ceasefire and c)greatly increase the monetary threshold to "buy" ceasefires. The devs have to make having two or three enemies AT THE SAME TIME a greater factor for the ai to accept peace rather than bribes from rival factions. Not allowing settlements to be exchanged for money prevents player exploitation of the game. This might make it more likely that smaller factions get gobbled up, but in the near (Most likely far future) small factions or factions down to their last settlement WITH enemy armies on their soil or besieging said town could get some reinforcement script that spawns 2-3 "last breath" stacks that could have generals with very limited movement that only stay in last province. *Shrugs" kind of like Rohan in Third age total war. EB2 mainstays might hate this idea, but it seems the original m2tw ai is very singleminded in its desire to grab certain number of settlements and these halfhearted patches to make them more amenable to ceasefire only very temporarily do so, and induce this insane cycle of pointless wars and fragile peaces. Then, these are all just my opinions...

  15. #15

    Default Re: Tentative "fix" for homicidal AI

    Why are the people so much concerned if Ai backstabs the player? It is a total war not a total diplomacy.

    Previous AI was bad, it would declare war one turn and then sue for the peace the next one. In the meantime you could milk it for cash with the offer of ceasefires. I am of the opinion that campaign script should check which faction is the player, if player is an one settlement faction then perhaps the slower expansion of AI is well though out. However, if the player is a big faction (Rome, Seleucids, Carthage etc), the auto expansion of the AI at turn 2 should be considered, so as to make big factions not too easy.

  16. #16

    Default Re: Tentative "fix" for homicidal AI

    Because it is predictable. In the end this leads to the player either fighting an endless war against everybody or just conquer everything because the ai will attack you like a rabid dog which was bitten by a zombie.

  17. #17

    Default Re: Tentative "fix" for homicidal AI

    Quote Originally Posted by z3n View Post
    If people want to, they can beta test this version of the CAI.

    1) Just download it
    2) Open it up
    3) Then copy the file
    4) Paste the file into your M2TW/EBII/data folder
    5) Say yes to replacing the file

    https://drive.google.com/file/d/1Xi1PQLhkddl2RV9Nf5JNE_--Y7EXyoVJ/view?usp=sharing


    Also keep in mind that previous versions like the one Shoebopp referenced aren't very good for long campaigns. The idea with ceasefires being more frequent is to prevent larger factions from gobbling up all the small factions too quickly. Some of the previous versions had these issues e.g. the grey death or the red swarm.
    Just tested 60+ turns as seleucids with this CAI version. Still far too many ceasefire proposals from Ptolomies, multiple declaration of war by Armenia and Parthia followed by immediate ceasefire offers next turns, even though settlements that they have sieged were poorly defended. Only Nabata attacked twice, with whom I had two fun siege defences. Ptolomies never launched a campaign against me, if the turn one scripted siege of Damascus is excluded.

    The end result is disappointing, if fought mostly spawned rebels and very few battles against Ptolomies and only when I attacked their settlements plus those two Nabata siege defenses.

  18. #18

    Default Re: Tentative "fix" for homicidal AI

    Quote Originally Posted by z3n View Post
    If people want to, they can beta test this version of the CAI.

    1) Just download it
    2) Open it up
    3) Then copy the file
    4) Paste the file into your M2TW/EBII/data folder
    5) Say yes to replacing the file

    https://drive.google.com/file/d/1Xi1PQLhkddl2RV9Nf5JNE_--Y7EXyoVJ/view?usp=sharing


    Also keep in mind that previous versions like the one Shoebopp referenced aren't very good for long campaigns. The idea with ceasefires being more frequent is to prevent larger factions from gobbling up all the small factions too quickly. Some of the previous versions had these issues e.g. the grey death or the red swarm.
    is this save game compatible?

    also, is there a way to change when 'eligible for office' notifications trigger for Romans? started my first ever Roman campaign and while it is rather fun, it is pain checking who needs to be send back to Rome every year. with the extended movement points it is rather easy to reach Rome in one turn, especially in early game, so autumn is the most convenient season for notification to appear but unfortunately it triggers in spring and by autumn im way past the point when i remember who was identified in spring as 'eligible' (hence the need to go manually over all FMs, which become very tedious very quickly).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •