Results 1 to 30 of 68

Thread: Diplomacy, I wonder...

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Confiscator of Swords Member dopp's Avatar
    Join Date
    Jun 2005
    Posts
    702

    Default Re: Diplomacy, I wonder...

    Erm some more quick questions:

    1. What's a shadow faction and why does the code make it never ask for peace or protectorate?

    2. What do the AI invasion priorities do?

    3. What's the difference between invade_opportunistic and invade_immediate?

    4. Looking over SW's mod I noticed that she replaces all these lines:

    can_force_invade="false"

    With:

    can_force_invade="false" invade="invade_none"

    What's the difference?

  2. #2
    Village special needs person Member Kobal2fr's Avatar
    Join Date
    Nov 2006
    Location
    Paris, France
    Posts
    914

    Default Re: Diplomacy, I wonder...

    - Not sure 100% what a shadow faction is, but my guess would be "those factions you have to destroy in a short campaign", or perhaps "the factions that need to destroy you to win a short campaign". They don't want peace with you because you're out to get them anyway.

    - Invasion priorities do squat per se. It's just higher and higher values so that a given condition overrules other conditions further down the checks, that is to say that when there are two "valid" conditions, but one more threatening that the other, the AI acts only on the threatening one.

    - Not sure, again. That's not something you can test as easily. I'd say invade_immediate is "attack with what you got, no matter what", while invade_opportunistic is "attack if you're stronger and he's weak", or "attack if you find yourself in a position to do so right now, without taking long term problems into account", but that's just conjecture at this point.

    4 - nothing. Invade=none is the default so you never need to specify it. Well, it should be, only the default is just commented-on empty faction-decision. My guess would be that the AI reverts to invade_none whenever it's not specifically told to do something, but I put invade_none invade_priority=50 in the default, just in case. The default was also clear in RTW.

    Rhedd : it's about done, but I'm trying to deal with the naval invasion problem post-patch, as it seems to defy logic a little bit : it invades, but still wants peace because it doesn't share borders. Only when said invasion captures its target does the AI become sensible again, and naval invasions don't seem to be triggered by the same stuff as land ones (ie borderstrength balance etc... don't apply obviously).
    Plus the antitrait thing derailed my campaign testing and got me back into modding... again :)

    I'll probably end up posting my file and asking you guys to test it for me.
    Last edited by Kobal2fr; 12-24-2006 at 17:25.
    Anything wrong ? Blame it on me. I'm the French.

  3. #3
    Confiscator of Swords Member dopp's Avatar
    Join Date
    Jun 2005
    Posts
    702

    Default Re: Diplomacy, I wonder...

    Quote Originally Posted by Kobal2fr
    Rhedd : it's about done, but I'm trying to deal with the naval invasion problem post-patch, as it seems to defy logic a little bit : it invades, but still wants peace because it doesn't share borders. Only when said invasion captures its target does the AI become sensible again, and naval invasions don't seem to be triggered by the same stuff as land ones (ie borderstrength balance etc... don't apply obviously).
    The dangers of wish-fulfillment; we asked to see more of it, CA obliged, but since the original team has most likely been broken up to work on other projects, the integration was not seamless.

    EDIT: Maybe this line says something?

    can_force_invade="true" :: can naval or forced invasion settings overwrite invade parameters
    Last edited by dopp; 12-25-2006 at 05:12.

  4. #4
    Member Member Re Berengario I's Avatar
    Join Date
    Nov 2003
    Location
    Italy
    Posts
    336

    Default Re: Diplomacy, I wonder...

    Quote Originally Posted by Kobal2fr
    - Not sure 100% what a shadow faction is, but my guess would be "those factions you have to destroy in a short campaign", or perhaps "the factions that need to destroy you to win a short campaign". They don't want peace with you because you're out to get them anyway.
    I'm pretty sure a shadow faction is a faction flagged so in descr_sm_factions.txt. If you have BI you could find factions flagged this way like Eastern Empire Rebels and so on. Basically it made a faction acquire every settlement which rebels from the shadowed faction plus other side effects.

  5. #5

    Default Re: Diplomacy, I wonder...

    Do you think we can download a fixed dipomacy for cherry vanilla like with your Traits file?


  6. #6
    Member Member Alexander the Pretty Good's Avatar
    Join Date
    Jun 2004
    Location
    New Jersey, USA
    Posts
    4,979

    Default Re: Diplomacy, I wonder...

    I'll second that bump.

  7. #7

    Default Re: Diplomacy, I wonder...

    This sounds like really good stuff - I've been peering around the forums for a week or so now (just recently registered to post though) - trying to make the game run as efficiently as possible.

    So, what your saying here is - it sounds like the alliance part of the code was /turned off/ during development (at least effectively turned off) and they forgot to switch it back on?

    And all I have to do to fix it is go into the .xml file and change those 9999 values to the reccomended ones? I've been peering around, but I'm not much of a coder type - I just want to make the switch as quickly and easily as possible. I have the xml file opened right now, and I'm looking around but well, once more - not much of a coder type. I see the part at the beginning where...


    Actually, as I type this I've figured it out - I think. I'll explain what I'm doing for any other "stupid newbies" like me reading this. I searched through the file and found:

    <!--
    ///////////////////////////////////////////////////////////
    // GLOBAL AI PARAMS (currently disabled, i.e. range = [-1.0, 1.0]) //
    ///////////////////////////////////////////////////////////
    -->

    <trusted_ally_fs_threshold float="0.8"/>
    <trusted_ally_target_fs_threshold float="0.8"/>
    <trusted_ally_gs_threshold float="0.2"/>


    All of the above were set to 9's, like you mentiond - and like the code notes, the values of 999 effectively disabled them.

    So, hopefully my alliances should hold now. I was getting rather annoyed...I had 2 marriage alliances with Byzantium, was assisting them against Venice in a war, and was giving them tribute and they still broke the alliance. I'll see how this goes.


    BTW: You guys here are awesome, doing all this research. KUDOS KUDOS KUDOS!!!

  8. #8
    Village special needs person Member Kobal2fr's Avatar
    Join Date
    Nov 2006
    Location
    Paris, France
    Posts
    914

    Default Re: Diplomacy, I wonder...

    Quote Originally Posted by Re Berengario I
    I'm pretty sure a shadow faction is a faction flagged so in descr_sm_factions.txt. If you have BI you could find factions flagged this way like Eastern Empire Rebels and so on. Basically it made a faction acquire every settlement which rebels from the shadowed faction plus other side effects.
    Hmmm, then it's probably just a leftover, because that's the first place I checked and there's no shadow factions defined in there.


    Quote Originally Posted by Valentine82
    Do you think we can download a fixed dipomacy for cherry vanilla like with your Traits file?
    My comp's still somewhat on the fritz, so I can't test it yet, but it's in the works !

    Quote Originally Posted by lastofthelight
    So, what your saying here is - it sounds like the alliance part of the code was /turned off/ during development (at least effectively turned off) and they forgot to switch it back on?
    Something like that, yes. Or maybe they deliberately turned it off to make the AI more challenging/aggressive/treacherous.

    And to answer the question : well, fixing the variables is a big step forward in and of itself, because with it on you can finally expect long standing alliances to mean something, but the AI will still not be all that sensical, which is where my upcoming fix will come in, hopefully.

    To make it more clear : with the default values, an alliance will become trusted (that is to say, meaningfull even when not in a common war against a third faction) if your global standing is above 0.2 (which is "Inconstant" in the French version, so probably something like "Wavering" in English); and your relations with said faction are above 0.8, which is between "Very Good" and "Excellent". 0.75 is probably better than 0.8, since it's the "Very Good" threshold, meaning you'll know more precisely when the alliance is trusted or not.
    Anything wrong ? Blame it on me. I'm the French.

  9. #9
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: Diplomacy, I wonder...

    Just a short info: when you set the can_force_invade attribute to false for all invasion decisions, the AI won't do those silly attacks on the player anymore that are dependent on peace time, etc.

    You probably already figured that out, but I thought it might help somebody.

  10. #10

    Default Re: Diplomacy, I wonder...

    What exactly are you talking about?

  11. #11
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: Diplomacy, I wonder...

    You know where it says that a special case exists in code to force an attack on the player if he is at peace with everybody? That's what I'm talking about.

  12. #12
    Village special needs person Member Kobal2fr's Avatar
    Join Date
    Nov 2006
    Location
    Paris, France
    Posts
    914

    Default Re: Diplomacy, I wonder...

    @alpaca : if I understand the code correctly, if you set "can_force_invade = false" in all invasion decisions, then the AI won't invade, period. Ever. Doesn't it ?

    As to the special case for attacking if at peace thingy, I'm convinced it's nonexistent, it's just the original coder saying "if you want to do this, this is the place in the file to do it so that it'll work". The phrase itself is commented, and there's no actual code to go with it, while for instance the "Special case exists here in code for not allowing invasion of trusted allies" which existed in the "mapping of old AI params" at the end of the file was replaced in the actual code by a line doing just that. I believe those are instructions about how to do something specific, rather than descriptions of stuff happening elsewhere or somehow hardcoded.
    Anything wrong ? Blame it on me. I'm the French.

  13. #13
    Guardian of the Fleet Senior Member Shahed's Avatar
    Join Date
    Oct 2002
    Location
    Leading the formation!
    Posts
    7,918

    Question Re: Diplomacy, I wonder...

    Quote Originally Posted by alpaca
    Just a short info: when you set the can_force_invade attribute to false for all invasion decisions, the AI won't do those silly attacks on the player anymore that are dependent on peace time, etc.

    You probably already figured that out, but I thought it might help somebody.
    Hi Alpaca, I just checked my file, it's 1.1 and all can_force_invade are already false. Am I looking in the right file ? It's descr_campaign_ai_db.xml
    If you remember me from M:TW days add me on Steam, do mention your org name.

    http://www.steamcommunity.com/id/__shak

  14. #14
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: Diplomacy, I wonder...

    What I meant back then was that you have to put can_force_invade=false into every invasion decision.
    As of 1.2 that's not necessary anymore because we can override the default by using the continue faction_standing, but since you're using 1.1...

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