Results 1 to 4 of 4

Thread: setting diplomatic_stance peace

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default setting diplomatic_stance peace

    I have been trying to use this command in my script, but somehow it doesn't work:

    Code:
        console_command diplomatic_stance faction1 faction2, peace
    It is conjunction with these two lines:

    Code:
        set_faction_standing faction1 faction2 0.8
        set_faction_standing faction2 faction3 0.8
    I want to achieve a peace agreement at the first outbreak of war between those two factions. This is how it looks (the historic_event fires):

    Code:
    declare_counter peace_to_all
    ;----
    monitor_event............
    
    set_counter peace_to_all 1
    historic_event peace_everybody
    
        terminate_monitor
    end_monitor
    ;---
    monitor_event EventCounter EventCounterType peace_to_all
            and EventCounter > 0
    
        console_command diplomatic_stance faction1 faction2, peace
        set_faction_standing faction1 faction2 0.8
        set_faction_standing faction2 faction3 0.8
    
        terminate_monitor
    end_monitor
    Any ideas?










  2. #2
    Userpro's Avatar =RAE= HostedMod Creator
    Join Date
    Jul 2008
    Location
    regno germanicum, teutonical forest
    Posts
    1,673

    Default Re: setting diplomatic_stance peace

    set_faction_standing faction1 faction2 0.8
    Try to add the other direction too! It works "bi-directional" like the descr.strat relations entries!

    set_faction_standing faction1 faction2 0.8
    set_faction_standing faction2 faction1 0.8

    ... same for the other factions. I'm not 100% sure about the diplomatic_stance, but try the same procedure.
    Last edited by Userpro; October 04, 2009 at 07:28 AM.
    Visit our TWC M2TW-Kingdoms Hosted Mods Forum for...

    !!! RAE Development stopped --- read last Statement here !!!
    M2TW-Kingdoms Mod Creator REDEO AD EXORDIUM ( RAE )
    Progress: 95% internal final beta release - 85% official release
    RAE TWC-Wiki Eagle Standard interview ... RAE.net Homepage ... RAE TWZ-Germany
    Proudly Sega & Steam Boycotter since ETW! See why here or this petition
    Sorry for bad english here, there and in my tutorials > advanced horde invasion & hide/unhide stratmap-ui & Beginners modding



  3. #3

    Icon1 Re: setting diplomatic_stance peace

    Try This:

    Code:
    declare_counter peace_to_all
    ;----
    monitor_event............
    
    set_counter peace_to_all 1
    historic_event peace_everybody
    
        terminate_monitor
    end_monitor
    ;---
    monitor_event EventCounter EventCounterType peace_to_all
            and EventCounter > 0
    
        console_command diplomatic_stance faction1 faction2 neutral
        set_faction_standing faction1 faction2 0.8
        set_faction_standing faction2 faction3 0.8
    
        terminate_monitor
    end_monitor
    And this:
    The Great Diplomacy Modification By Scripting Research Thread
    http://www.twcenter.net/forums/showthread.php?t=295898
    Last edited by TNZ; October 04, 2009 at 07:24 AM.

  4. #4
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: setting diplomatic_stance peace

    Seems the problem was actually this line:
    set_counter peace_to_all 1

    It should have been:
    set_event_counter peace_to_all 1

    Had to do with the monitor:
    EventCounter EventCounterType

    Something curious:
    diplomatic_stance does not seem to work for some factions. At least in this case there was no peace (tried allied as well) between the attacker and defender.
    It worked for other factions that did not have allied relationship at that point.

    Edit: It appears that it is not possible to change the diplomatic stance twice (starting a war, making peace) during a turn. I solved the matter by taking the diplomatic_stance monitor to the next turn:
    Code:
    monitor_event FactionTurnStart I_EventCounter peace_to_all > 0
                   console_command diplomatic_stance faction1 faction2 neutral
                     set_faction_standing faction1 faction2 0.8
                     set_faction_standing faction2 faction1 0.8
              terminate_monitor
    end_monitor
    Last edited by Gigantus; October 05, 2009 at 01:08 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
  •