Results 1 to 13 of 13

Thread: How to Make AI More Aggressinve

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default How to Make AI More Aggressinve

    Hello all,

    Could someone please help me out. I was interested in making the AI more aggressive both towards me and other factions. The reason being I prefer an all out war type game and I am also looking to encourage late game empires by giving some factions (i.e rome, selcucids) a cash boost at the start of the game.

    Which tables, fields and variables do I need to change?

    Many thanks for any advice

  2. #2

    Default Re: How to Make AI More Aggressinve

    im trying to do this as well but havent really been able to test my changes very much. Assuming you know where to find the tables, heres what i did:

    find cai_personality_deal_evaluation_deal_component_values_table and go to the deal_component rows for WAR.

    As i understand it there are 2 types of values that influence if the ai declares war, opinion (for example friendly_value is when the ai is friendly towards you) and balance of power depending on what situation the ai is in (for example total_war_balance_factor which is when the ai is at war with more than 1 other faction). These values are added together and if the number is positive then the ai is likely to declare war.

    By default the ai really only declares war if they are stronger, most of the opinion values are negative. So if you want them to be more aggressive then make the opinion values matter more relative to balance of power values. Positive opinion values will make them declare war even if they're weaker than you if they hate you enough. I also put negative values for some of the balance of power values for mine to keep the ai from warmongering too much and getting themselves killed (im trying to get them to only fight one other faction at a time).


    so try these changes out and please post here what happens, this is just my guess at how the table values work.

  3. #3

    Default Re: How to Make AI More Aggressinve

    oh and also 1 more thing, you may want to increase the amount of money the cai is allowed to spend on units in cai_budget_allocations_tables. with the default values and unmodded upkeep for units most factions can only "afford" 1 or 2 armies at most. This isnt increasing the actual amount of money the ai has, but is telling the cai that it is allowed to spend more on units. I've set mine to 90% of income and 10k denari on unit upkeep (dropping to 60% during peace time). It worked for me so far and its much harder to conquer the world with only 2 armies (most factions in vanilla only had at most, 1 full stack of units).

  4. #4

    Default Re: How to Make AI More Aggressinve

    Some say that adding cash doesn't do much, but I've had some limited success with it. In my last campaign (using All Factions Playable and a tweaked version of Radious mod), I gave all major factions, and some minor ones, a massive cash boost at the start of the game - I think it was 50,000 each. I also had Fog of War switched off so I could observe. Unfortunately, I had to abandon the campaign after around 60-70 turns because of the new patch 7 release, which made it incompatible. However, in that time, I saw some interesting developments:

    Rome and Carthage both expanded rapidly and had what appeared to be a Punic War. At one point, they both held around 8 settlements and were evenly matched. Etruscans and Syracuse were also involved, but both ended up getting wiped out, despite some initial successes. The Romans then got the upper hand and wiped Carthage out. By the time I abandoned the campaign, Carthage was totally obliterated and the Romans held at least 12 settlements, including all of Italy, most if not all of the nearby islands, and a couple of settlements on the North African coast.

    The Seleucids were at one point an unstoppable force. At their height, they held about 12-13 settlements and were threatening to overrun the whole of Asia Minor. I then allied with Pontus, Pergamon, Galatia, etc. and orchestrated the counter-attack by telling my allies which Seleucid settlements to attack. As a result, Seleucids were finally wiped out, but had I just let the AI defenders do as they wanted (i.e. screw it up), I think the Seleucids could have established a major empire (I couldn't afford to let them do this because I was playing as Thracians and last thing I needed was the Seleucids invading me from the east). As a result of my guidance, Pontus ended up with around five settlements scattered all around Asia Minor.

    Egyptians didn't expand much, but they did hold steady until around turn 50, at which point they imploded very quickly. An African faction to the south of Egypt, not sure which, took them out and ended up holding about 8-10 settlements by the time I quit the campaign.

    In the east, Parthia, Armenia, Persia, and Parvavia (sp?) all expanded steadily - ironically, Parthia, the only one that received the cash boost, was the slowest to expand. By the time I ended the campaign, they all held 4-8 settlements. Baktria initially did quite well, about 6 settlements, but then suddenly imploded.

    In Iberia, only the Lusitani received a cash bonus. Ironically, they were the first Iberian faction to get wiped out. By around turn 60, half the Iberian factions were gone and the survivors each held 2 provinces.

    In Gaul, Arverni expanded quickly - 4 or 5 settlements - then stopped expanding, though they showed no signs of weakening and held form as the major power in western Gaul.

    In Britain, the Caldones formed a Celtic Confederation and seized around 4 settlements, before being invaded and defeated by one of the coastal Gallic tribes.

    In Germany, the Suebi expanded to around 6 settlements, then suddenly imploded. The Lugii (?) seized most of their lands, and the last time I looked, held 5-6 settlements.

    The Helvetii did nothing for 60 odd turns, then expanded very rapidly. Just before I had to abandon the campaign, they went from I think 1 settlement to around 6 in the space of just a few turns. Their empire spanned all the way from southern/central Gaul right into Germany.

    I didn't give any cash bonuses to the Greeks, given that they were right on my doorstep and I didn't want to get blitzed too early on. Instead, I allied with Spartans and Athenians against Epirotes and Macedonians. The latter two were wiped out in the ongoing war. Athens ended up with its home city plus one Epirote settlement. Sparta held several provinces - Sparta, the other Epirote settlement, Crete, and a couple of North African settlements.

    It's a shame that I had to quit the game. It was looking really interesting. There were certainly some promising mini-empires. Whether or not they would have held for any length of time, I cannot say. It may also be necessary to continue giving cash bonuses to the AI, say every 50 turns. I was contemplating doing this with the Helveti just prior to quitting the campaign, just to see if they could expand yet further into Germania and across Gaul.

  5. #5
    baradona's Avatar Libertus
    Join Date
    Jul 2013
    Location
    USA
    Posts
    83
    Tournaments Joined
    1
    Tournaments Won
    0

    Default Re: How to Make AI More Aggressinve

    How do you add cash to factions?

  6. #6

    Default Re: How to Make AI More Aggressinve

    Quote Originally Posted by baradona View Post
    How do you add cash to factions?
    Baradona: I KNOW THIS ONE:-) Look in effects bundles to effects junctions table. Look for enty "rom_building_gdp_subsistence_faction_capital_hidden". This is the bonus cash the factions get each turn. This is what I am led to believe anyway:-)
    and / or
    Look in startpos for the faction entry under faction array ( I cant remember the exact path put takes some getting too) edit economics entry. I believe there is an add money tutorial somewhere for save game editing but add the start pos to a mod and edit away.

  7. #7

    Default Re: How to Make AI More Aggressinve

    @baradona, feeblechimp is right, to add a single lump sum, you need to edit the startpos file.

    1. Download and install the EditSF at http://www.twcenter.net/forums/showthread.php?623719.
    2. Use EditSF to open your saved game (either a new campaign or an existing one). You should find your saved games along the following path:
    C:/Users/[user name]/AppData/Roaming/The Creative Assembly/Rome2/save_games
    3. Once you have opened the saved game, open the following file path:
    Campaign_Save_Game/Compressed_Data/Campaign_Env/Campaign_Model/World/Faction_Array.
    4. When you open Faction_Array, you will find a long list of factions. Whichever faction you are playing in the campaign will be listed as Faction_Array_0. After that come all the big factions, such as Rome and Carthaginians. Then come the minor factions in alphabetical order. To find out which faction is which, just click on an individual Faction_Array entry. Immediately beneath it, you will see "Faction" - click on that and on the right hand side of the window, the name of that faction should be listed. Then go down to "Faction_Economics", which is the third or fourth entry in each Faction_Array. Click on it. The first entry that appears on the right hand side of the window is the amount of money that that faction currently has. For a new campaign, it will probably be something like 4000 or 5000, depending on whether you're playing vanilla or Radious mod, etc. Just change that number to whatever you want - 50000, 100000, etc. and it will update it in the campaign. Also don't forget to save before exiting EditSF.

    Sounds complicated, but once you've done it, you'll see how simple it really is.

  8. #8
    baradona's Avatar Libertus
    Join Date
    Jul 2013
    Location
    USA
    Posts
    83
    Tournaments Joined
    1
    Tournaments Won
    0

    Default Re: How to Make AI More Aggressinve

    Baradona: I KNOW THIS ONE:-) Look in effects bundles to effects junctions table. Look for enty "rom_building_gdp_subsistence_faction_capital_hidden". This is the bonus cash the factions get each turn. This is what I am led to believe anyway:-)
    and / or
    Look in startpos for the faction entry under faction array ( I cant remember the exact path put takes some getting too) edit economics entry. I believe there is an add money tutorial somewhere for save game editing but add the start pos to a mod and edit away.

    oh ok Thank you!

  9. #9

    Default Re: How to Make AI More Aggressinve

    Catsup & Crawe1 Many, many thanks for the advice.

    Catsup: This is obviously quite complicated. The deal evaluation appears to be spread over a number of related tables.

    If I understand this correctly a decision for war is made on the basis of the strength of positive numbers relative to each of the fields across the top (fiends, enemies, neutral etc). I assume that the relationship of one faction to another can be expressed on every one of the fields. I will try editing some of the values across the "WAR" records to make a positive total more likely.

    I had already been fiddling with the budget allocation tables to reduce the cap on agents but will also try upping both the cap and % allocation to armies.

    crawe1. Yes I had also given more money to AI... A huge amount. But I am trying out giving it to just 2 factions making the advantage more obvious. Rome and Selucids. Playing as Sparta and I like the idea of a late game between 2 massive empires on either side:-). I'm not sure if the AI will actively look to spend all this money it has saved so I have also increased the income per turn rome gets (can't remember where I did this off the top of my head)

    Many thank for the advice. I will let you know how I get on

  10. #10

    Default Re: How to Make AI More Aggressinve

    Quote Originally Posted by feeblechimp View Post
    Catsup & Crawe1 Many, many thanks for the advice.
    If I understand this correctly a decision for war is made on the basis of the strength of positive numbers relative to each of the fields across the top (fiends, enemies, neutral etc). I assume that the relationship of one faction to another can be expressed on every one of the fields.
    its more simple than that, at least thats what i think. Only one opinion value out of all of them and one balance value will be used for the calculation (note that it is NOT organized well, or in order; the table that is).

    the opinion value will be the ai's opinion of you. The balance values will take into account other factions the ai is interacting with (i assume tension is possible war in the near future, war is that the faction is already at war with someone else, total war is if that faction is at war with more than 1 other faction, and last stand means that they are about to lose their last settlement).

  11. #11

    Default Re: How to Make AI More Aggressinve

    @feeblechimp, One interesting thing I noticed was that often the factions that did well were not the recipients of the cash bonuses. Some recipients, such as Rome, fought hard and thrived. Others either held steady or expanded too rapidly and then imploded. The nice thing was that the implosion allowed a neighboring faction to rush in and claim lots of lands. This added a certain unpredictability to the game - I got the results I was hoping for but not necessarily in the way I expected.

    Also, choose your factions very carefully. Ideally, you want a faction that starts off with quite a few settlements. This way, it can use the additional cash to good effect, without being restricted by all the army limits that effect a one-region faction. Alternatively, you want a faction that may start off small, but has plenty of room to expand. Seleucids and Rome are probably two of the best choices. The only problem with you choosing those two factions is that if you're playing Sparta, given that they're both Mediterranean factions, you may find yourself coming into conflict with them sooner rather than later. I had that problem with the Seleucids while playing as Thracians, which meant I had to step in and help undermine their fledgling empire far earlier than I had originally intended. You basically need to give them space to expand, so that you can have that mega-showdown that you're looking for in the second half of the campaign. For Sparta, I think the ideal guys, geographically, would be the Iberians. The problem there is that Iberia is one of the most competitive parts of the map - eight or nine small factions all slogging it out, not to mention Massalia (sp?)and the Gauls to the north and the Carthaginians moving in from the south.

    Anyway, if Rome and Seleucid don't work out, maybe try a Celtic faction (I'd go with Helvetti or Arverni). I wouldn't bother with Britons, who don't seem to expand much. Of the Germans, I'd go with Suebi. You might also want to consider an Eastern power such as Pontus, Armenia, Persia or Parthia. If you're worried that the Eastern factions won't provide a challenge for your Spartan heavy infantry, then maybe just download a unit pack to expand their roster?

    Either way, I'm really interested to hear how it all works out for you.

  12. #12

    Default Re: How to Make AI More Aggressinve

    any of you guys found out what determines the ai's army movements and actions in general? i find the ai is very bad at defending their homelands and expanding outwards. The ai will often seemingly move in random directions, especially across channels of water and set their armies out at sea to patrol for no apparent reason, attacking enemy armies and cities randomly if they happen to run into them. When they do attack, they neglect to defend their established positions and homelands.

    This is a screenshot of my latest game, 56 turns in as masaeyli:

    http://oi44.tinypic.com/2mrz72b.jpg

    Chimera ended up base razing with pontus and swapping lands with them so that pontus now owns chimera's original regions in bosporus while chimera expanded into anatolia. The seleucids are an even better (worse?) example of this as they let armenia, gerhhea (the arab faction that expanded into mesopotamia), and media atrophane invade and razed syria while they were randomly moving their armies back and forth in the lands of their former vassals (all of seleucid's former vassals either died or turned on them, the ones that are alive are at war with them when i finally met seleucid) territory juggling regions with them.

    this ai behavior is good for certain factions, specifically the nomadic factions that i removed regionless desertion attrition from, as they are supposed to migrate away if a much stronger enemy threatens them (they have no fix homeland). But it makes most other factions extremely derpy in warfare, with the player and with each other. If anyone knows (or finds out) what controls cai campaign map behavior, please share.

  13. #13

    Default Re: How to Make AI More Aggressinve

    Sorry Catsup, that's not one I know. I do remember reading a long thread a few days ago concerning resetting the AI's priorities with regards to who they attack, etc. I really can't remember where it was though on the forums and it may have been part of an even longer thread. As I understand it, one of the problems is the easy access to transport ships, which results in the AI treating land and sea as one and the same, hence the huge numbers of fleets sailing aimlessly around.

    With regards to building up individual AI empires, I did have another idea. Right now, in order to access the best units, the AI has to navigate through both the technology tree and the construction tree. It may be worth giving those factions that you want to see growing into big empires, earlier and easier access to superior units, i.e. via the tier 1 or 2 bronze workshop rather than having to build some obscure tier 3 religious building. This would be particularly easy for factions that have a large number of unique units, such as Rome, Sparta, maybe Egypt.

Posting Permissions

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