Results 1 to 5 of 5

Thread: Influencing AI Enemy/Ally Choices.

  1. #1

    Default Influencing AI Enemy/Ally Choices.

    Sooooo....

    From what I've read of diplomacy (plus common sense), I've established that among a multitude of smaller different factors, the two broad things which define the chances of the AI attacking a certain faction are faction standings between the two, and overall global reputation of the target.

    The problem I'm having while trying to modify the AI's instinctive invasion patterns isn't solved by changing these two values though, it would seem.
    In descr_strat.txt, I've given Spain and Portugal both a -0.8 standing towards the moors (which the moors reciprocate), along with a +0.4 with each other.
    Yet in every campaign I play, the Spanish and Portuguese fight each other, rather than the Moors, which seems pretty difficult to believe both historically and sensibly, and since the Moors start off more powerful, they simply get to sweep up the weakened remnants of the clash.

    I'm aware that region borders also place a big role, however Spain and Portugal both border the Moors, not just each other.
    Any ideas on why they act in this way?
    Thanks.

  2. #2
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: Influencing AI Enemy/Ally Choices.

    Because Portugal is trying to claim the Spain-owned region that is splitting Portugal in two?

    Because both think that the other is a smaller faction and therefore easier target than Moors?

    Because both share two borders with the other but only one with Moors?

    I don't know. descr_campaign_ai_db.xml controls how the AI will behave in terms of invading other factions and for any given faction there might be rules that override the 'broad' factors you mentioned.

  3. #3
    Kiliç Alì's Avatar Domesticus
    Artifex

    Join Date
    Feb 2011
    Location
    Italy
    Posts
    2,114

    Default Re: Influencing AI Enemy/Ally Choices.

    Also descr_diplomacy.txt can be useful to ensure their starting relations values do not drop immediately to negative, so you can make the 2 factions to love each other a bit more and a bit longer.

    It does work like triggers for traits\ancs so you can modulate it with event counter conditions set in campaign_script also.

    Member of the Imperial House of Hader, proud client of The only and sole Ferrit

  4. #4

    Default Re: Influencing AI Enemy/Ally Choices.

    @Withwnar

    What I should have mentioned is that this map has been tweaked by myself. Portugal only start with 1 region (Oporto, similiar positioning as in Stainless Steel), whereas Spain's starting position is unaltered.
    The Moors have 5 regions instead of 4 (through the addition of Fez), so perhaps making Portugal slightly weaker and the Moors slightly stronger has upset the balance...
    However, it is always the Portugese that seem to be the aggressor. Despite Spain having lost no ground on the original game, they seem to sit around more docile than the Pope (even when giving them a ridiculously inflated king's purse they don't do that much).

    @Kiliç Alì

    Ok, good to know. I'll have a look at file and see if I can alter faction attitudes towards each other then (assuming the file is mostly self-explanatory or if I can find good guides for it anyway).


    Thanks for the feedback, if I find out anything useful I'll keep you updated.

  5. #5

    Default Re: Influencing AI Enemy/Ally Choices.

    Withwinar's post contains a link to an AI modification guide. It focuses on the campaign_ai_db, but dose get into diplomacy some. I think Kilic actually meant the descr_faction_standing.txt which deals more with relations where the descr_diplomacy.xml actually involves the actual diplomacy function and not relations directly.

    Easiest way to achieve what you want would be to increase the effect religion has on determining who to attack in the descr_campaign_ai_db.xml. You may also want to increase the effects of faction standing, but that's getting into pretty drastic modding. IMO youre best bet would be to take a pre-existing AI mod, such as XAI and just increase the religion effects, unless you intend to do a complete AI mod.

    You could put a trigger in descr_faction_standing.txt specific to Portugal and Spain, but that would limit the AI's options and allow easier player exploits.
    Last edited by CavalryCmdr; April 14, 2014 at 11:13 AM.

Posting Permissions

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