Results 1 to 30 of 68

Thread: Diplomacy, I wonder...

Hybrid View

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

    Default Diplomacy, I wonder...

    I've noticed that at the beginning of the desc_campaing_ai_db.xml file, there is this declaration/explanation of variables :

    <trusted_ally_fs_threshold float="0.8"/> // min threshold for how much we like the target faction to consider them a trusted ally
    <trusted_ally_target_fs_threshold float="0.8"/> // min threshold for how much does the target faction like us to consider them a trusted ally
    <trusted_ally_gs_threshold float="0.2"/> // min threshold for how trustworthy is the target faction to consider them a trusted ally


    But in the actual code, these thresholds are all set to 999.0. Yet, the trusted ally status is checked a bunch of times, in triggers such as :

    <decision_entry>
    <!--
    If trusted ally, use defaults
    -->
    <min_entry trusted_ally="true"/>
    <faction_attitude can_force_invade="false"/>
    </decision_entry>

    If I am correct, I think this means the AI does not care for alliances AT ALL in its invasion decisions, or rather that the triggers checking for trusted alliances are effectively neutered. Which would account for much of the diplo grief and non-sensical aggressions.

    Has anyone tried setting these variables to the suggested declaration defaults (0.8, 0.8, 0.2) ?
    Last edited by Kobal2fr; 12-19-2006 at 08:17.
    Anything wrong ? Blame it on me. I'm the French.

  2. #2
    Clan Takiyama Senior Member R'as al Ghul's Avatar
    Join Date
    Jan 2003
    Location
    ignores routers who aren't elite
    Posts
    2,554

    Default Re: Diplomacy, I wonder...

    It seems it isn't used. The only time it appears after the initial commentary it says:
    // GLOBAL AI PARAMS (currently disabled, i.e. range = [-1.0, 1.0]) //
    R'as

    Singleplayer: Download beta_8
    Multiplayer: Download beta_5.All.in.1
    I'll build a mountain of corpses - Ogami Itto, Lone Wolf & Cub
    Sometimes standing up for your friends means killing a whole lot of people - Sin City, by Frank Miller

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

    Default Re: Diplomacy, I wonder...

    I think the "currently disabled" comment is intended to make explicit the fact that 999.0 values disable the variable, not that the variable itself is disabled. There are a number of checks along the lines of "if trusted ally = true then can_force_invasion = false". Maybe the trusted ally part is coded elsewhere, but if it does use the thresholds, then the checks will always come out false because they're set to 999.0 instead of working parameters.

    I set them to 0.8 0.8 0.2 in my current campaign, and the game hasn't gone ker-klunk because of it, which tells me it's not an unfinished feature like the armour upgrade is.

    I'll see wether my stronger alliances really last this time around. If they do... well then we'll have a very good basis for a CherryVanilla Diplomacy mod, using subtle tweaks here and there instead of Shaba Wangy's ten-ton hammer .
    Last edited by Kobal2fr; 12-19-2006 at 17:27.
    Anything wrong ? Blame it on me. I'm the French.

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

    Default Re: Diplomacy, I wonder...

    SUCCESS !!!

    Not only are these floats implemented, they do just what they say they do : if you are above the thresholds and allied, AI will not invade, period (exceptions listed below).

    Here's how I tested it :

    - set the floats to -1 -1 -1. Meaning : whatever relations are, all factions consider everyone as trusted allies.
    - start a campaign as the HRE, notorious for being gangbanged very fast.
    - Made a lot of diplos, and allied with as many factions as possible ASAP (could probably have modded descr_strat.txt to make me start as allied to everyone right off the bat now that I think about it)
    - proceeded to destroy my own faction from within. Turned every single city into castle to ruin economy and pop growth. Destroyed every single unit save for family members, whom I pooled in Nurnberg (furthest from any frontline). Gave all treasury to Pope and neighbours. Destroyed every single troop-producing building. In other words, hoisted a big "I'M WEAK ! CRUSH ME !" flag.

    Results :
    - I end-turned mindlessly through 72 turns before calling it quits.
    - I only suffered 3 total attacks: one from Milan on Staufen, one from Venice on Bologne, one from Hungary on Vienna.
    - all these settlements were free of troops, so they took them without a fight, but in 2/3 cases I had a diplomat nearby. Told them I'd give ceasefire+trade for the province back, and since I was trusted they accepted, then re-allied next turn. I don't know what caused these invasions at all but I surmise they were mission-driven, as they all happened in the 30th-32th turn, and I know from the .xml that the AI proper only kicks in at turn 30. I waited a few turns before sending a diplomat to Venice in third case, and my "give bologne + peace + trade" was demanding (not very demanding though - they still trusted me) and they wouldn't give it back. I suppose I could have bought it back, but I was very, very bankrupt at that time.
    - In those 3 cases, every single other faction I was allied with instantly DoWed the offender, and the pope insta-excommed them. I was their trusted ally, some bugger attacked me, they attacked it as true allies would. The second I re-allied with them, every single other faction declared cease-fire.
    - After that, for the next 40 turns, I was not attacked once, even though I was listed as number 17 in all power curves (my treasury was a whopping -57.000 at one point ) and my settlements were all defenseless. The AI did pass armies through my lands without mil rights, but they were only on their way to battle with another faction, they never paid me any attention. Hungary actually chased rebels in my lands.
    - Save for diplomatic tangles occuring during said 3 assaults and power blocks forming themselves, AI factions have never betrayed each other. They only DoWed the enemies of their allies.

    --------------

    So there you have it : to fix diplomacy, all you have to do it twiddle with three integers, no more, no less. All you have to do is, in fact, make it possible to have trusted allies.

    A trusted alliance means "we'll help him at any cost, no matter what, and never betray our friendship". This is what we players expect from an alliance, or understand the word "allied" to mean. To the AI, a non-trusted alliance only means "if his borders are lightly guarded and we're not the weakest faction around, no need to garrison either", plus the occasional help, and the overtime boost to relations eventually leading to trusted alliance, but it will still consider its allies lands as possible targets of opportunity in the meantime.

    An alliance will be trusted if all three standings are above the floats (global reliability, faction A friendliness to faction B, faction B friendliness to faction A).

    I'd say 0.2 for global standing is OK : that stands for "Reliable or better", it takes some work/peacetime to get there, and any betrayal sends you down big time

    0.8 for faction standing is perhaps a bit steep - it takes a lot to get relations to Excellent/Perfect, and it also takes some work to keep them there... And while the player could probably get and keep trusted allies through florin and maps, the AI factions wouldn't between themselves, if that is a real concern at all. But then again, AI factions tend to be untrustworthy (on the global standing scale I mean) on the whole, so they probably wouldn't get trusted alliances anyway...

    What I do not know is how the player faction is treated regarding faction standing, that is to say : since "trusted ally" checks both "do we like them" and "do they like us", what is the setting for the player, and how does the AI determine wether the player's faction like them or not ?

    My uninformed guess would be that in the specific case of the player, then their own like/dislike is mirrored. That's what I would have done in any case, had I written the code. But I don't know if there is a way to make sure of it.

    Is there a console command you can input that will return fs values ?
    Last edited by Kobal2fr; 12-19-2006 at 23:57.
    Anything wrong ? Blame it on me. I'm the French.

  5. #5

    Default Re: Diplomacy, I wonder...

    hmmm wonder what this change will do using Shaba's mod

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

    Default Re: Diplomacy, I wonder...

    Good research Kobal2fr

  7. #7

    Default Re: Diplomacy, I wonder...

    what's the location for this file? I'm having trouble finding it

  8. #8
    Member Member KnightErrant's Avatar
    Join Date
    Jan 2007
    Location
    Huntsville, Alabama USA
    Posts
    458

    Default Re: Diplomacy, I wonder...

    If you have unpacked your files it should be in your /data directory.
    If not then go to this thread and you can download
    a subset of the /data directory files that includes the file
    you're interested it.
    https://forums.totalwar.org/vb/showthread.php?t=73971

  9. #9

    Default Re: Diplomacy, I wonder...

    Quote Originally Posted by KnightErrant
    If you have unpacked your files it should be in your /data directory.
    If not then go to this thread and you can download
    a subset of the /data directory files that includes the file
    you're interested it.
    https://forums.totalwar.org/vb/showthread.php?t=73971
    Man I must've been blind. ty

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