Results 1 to 6 of 6

Thread: Changing the strategy of AI nations

  1. #1

    Default Changing the strategy of AI nations

    Anyone know how I can change the strategy of AI nations? I remember reading one thread relating to this awhile ago but cannot find it again.

    I would like a AI-army to attack me but they always move in the opposite direction and attack a rebel town????


    Thanks
    Rorarii


    Camillus, Savior of Rome.


  2. #2

    Default Re: Changing the strategy of AI nations

    Increasing the garrison of the rebel city should do the trick.
    It's not a map.

  3. #3

    Default Re: Changing the strategy of AI nations

    Quote Originally Posted by nikolai1962
    Increasing the garrison of the rebel city should do the trick.
    Nope, didn't work. I maxed out the garrison and gave the rebel city commander huge command bonuses etc. I'm at war with roaming army and I even tried to ally the army and the rebels, to no effect. Genghis has no effect either.

    I think the AI will attack all rebel cities surrounding their territory first ... so no deep raids to attack a player character.
    Rorarii


    Camillus, Savior of Rome.


  4. #4

    Default Re: Changing the strategy of AI nations

    They do have a very strong preference for attacking available rebel regions first.

    How big is your original starting army? My theory is they treat each rebel settlement seperately when judging military strength. If your starting army is bigger than the rebel stack then the size of the rebel stack won't count. You could try reducing the starting army of the faction you want them to attack.

    (Also, probably obvious but they need an adjacent border and the path-finding between the ai region and your region needs to work.)

    Other things you can do:

    1) Set the core-attitude of the ai faction to be relatively hostile to you e.g 400 and set the core-attitude of that faction to the faction_creator of the rebel region less hostile e.g 200. So for example if your faction was romans and you wanted the gauls to attack and not go after a rebel region make sure the gaul's core-attitude to romans more hostile (higher number) than their core-attitude to the faction_creator of the rebel region.

    2) Start the ai faction at war with your faction.

    3) Set the nearest of your faction's regions to be one of the victory conditions for the ai faction. I think this makes the ai *see* that settlement from the beginning without spying/exploring.

    4) Check there aren't any large starting rebel stacks on the path to the faction you want them to attack. If they are in woods at the start of the game you won't see them but they can effect the ai's decisions. (If they are in the faction's terriotory they'll attack but if their spy spots them on the path to a region but in that region's terriotory it can sometimes put them off.)

    5) In some situations moving settlements a bit further away or a bit closer together can just tip the ai's preferences when it is deciding who to attack. In situations where you can make the adjoining settlements very far away this has a big effect.

    5) The starting positions of the ai stacks can sometimes tip the balance too.

    6) You can fix it by messing up the path-finding between the ai faction and the rebel region, removing a ford over a river for example. (This could lead the ai faction to stall completely however if it still wants to attack the rebel region but can't find the path so it is a last resort.)


    Basically it seems there is a weighting system when the ai is deciding who to target that takes a lot of factors into account with a heavy preference for rebels (either specifically or because of the military strength thing). You have to juggle all the factors to get them to go where you want.

    (edit: genghis makes them build more cavalry. This means some of their stacks will be all cavalry and therefore they'll move faster. Also higher MP has some beneficial effects with ai path-finding problems so those cavalry stacks will get stuck less often. I don't think it changes their basic aggressiveness.)
    Last edited by nikolai1962; 05-07-2006 at 20:16.
    It's not a map.

  5. #5

    Default Re: Changing the strategy of AI nations

    Thanks for the detailed help, Nik, but what do you mean by Core-attitude 400? Do you mean Character Trait - HatesRomans? I've tried that with no effect on strategic thinking.

    I've actually changed the rebel town to a greek town, and setup an alliance between gauls and greeks, which stopped the wandering army from attacking it.

    Now the wandering army moves towards me but first leaves their commander insitu then when the army gets close to my army, they stop and refuse to fight??? Why they leave their command hiding in the forest I don't know? And why their leaderless army refuses to fight, I don't know. I think they're trying to move past me but cannot. Their army is larger than mine, and we're at war, and their leader was far superior to mine, so I cannot understand it?

    strange AI. Pity the AI isn't scripted, I'm sure Modders would have it fixed 5 days after CI released RTW! Pride is terrible thing!
    Rorarii


    Camillus, Savior of Rome.


  6. #6

    Default Re: Changing the strategy of AI nations

    The core_attitudes thing is in 1.5. A set of numbers that set how much each faction like/dislike each other.

    (edit:

    I've actually changed the rebel town to a greek town, and setup an alliance between gauls and greeks, which stopped the wandering army from attacking it.
    this is effectively the same thing as manipulating core-attitudes.)

    Just in case I'm confused here - the roman region is adjacent to a gaul region? If this is a wandering army you may be a bit stuck as the ai only seems to pick target regions if they are adjacent to one of their regions. The exception is naval landings where they discount the sea which makes some island/coast regions effectively adjacent. I must admit I've never actually tried to make a roaming army attack a region that isn't adjacent to one of theirs.

    The ai is very settlement focused and only attacks automatically when you're on their territory. It does sound like they are trying to attack your city though or at least find it. Could try adding your city to their victory conditions or add a gaul spy next to it in the strat file. Could try just putting one unit to block them to see if it is an odds thing (doubt it, though it might fit with their general hanging back - mercenaries?)

    Another thing to try is comment out all the roman armies except the leader general in the strat file just to check the gauls don't have a path-finding problem to the roman city. If they move directly and take it when there is no garrison then that is one possibility ticked off.
    Last edited by nikolai1962; 05-08-2006 at 02:40.
    It's not a map.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO