Page 1 of 2 12 LastLast
Results 1 to 20 of 25

Thread: Changing faction standing through events

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 Changing faction standing through events

    As the title says: I would like to change the faction standings when a certain condition is given and then announce this via event.
    My scripting is somewhat basic so if someone can run this by me slowly?

    I have some half cooked ideas after looking around in the descr_faction_standing file, but can this be done the way I described above?


    Like:
    One out of five factions (common religion) captures a defined settlement that is held by one of five other factions (common religion)
    All of the first factions should then be at war with all of the other five factions
    Which should be then announce by an event.










  2. #2
    Swagger's Avatar Imperial Coffee-Runner
    Join Date
    Apr 2007
    Location
    Portugal
    Posts
    12,453

    Default Re: Changing faction standing through events

    my humble attempt (and example):


    Code:
    monitor_event GeneralCaptureSettlement CharacterReligion catholic
       and FactionIsLocal
    ;  and TargetFactionReligion catholic ;not sure if this works to check the enemy religion
          
        historic_event tolerancia_egypt_sim factions { egypt, }
        set_faction_standing england france -0.1 ;or other value up to 1.0 the higher the lower relations
        console_command diplomatic_stance england france, war ;england declares war on france
    ;   console_command diplomatic_stance france england, war ; makes sure france declares war back to england
    
      terminate_monitor
    end_monitor
    Under the Patronage of the Dreadful cedric37!
    Ancs Guide, Emergent Factions , Yes/No Events |L'Outremer for Modders| Swagger's Skymod


  3. #3
    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: Changing faction standing through events

    That sounds promising. Thanks.










  4. #4
    Swagger's Avatar Imperial Coffee-Runner
    Join Date
    Apr 2007
    Location
    Portugal
    Posts
    12,453

    Default Re: Changing faction standing through events

    about this:

    ; console_command diplomatic_stance france england, war ; makes sure france declares war back to england

    if you see france (or the other faction) is too passive towards the 1st faction, delete the '';''
    Under the Patronage of the Dreadful cedric37!
    Ancs Guide, Emergent Factions , Yes/No Events |L'Outremer for Modders| Swagger's Skymod


  5. #5
    Swagger's Avatar Imperial Coffee-Runner
    Join Date
    Apr 2007
    Location
    Portugal
    Posts
    12,453

    Default Re: Changing faction standing through events

    ups sorry
    Last edited by Swagger; September 05, 2009 at 01:08 PM.
    Under the Patronage of the Dreadful cedric37!
    Ancs Guide, Emergent Factions , Yes/No Events |L'Outremer for Modders| Swagger's Skymod


  6. #6
    Swagger's Avatar Imperial Coffee-Runner
    Join Date
    Apr 2007
    Location
    Portugal
    Posts
    12,453

    Default Re: Changing faction standing through events

    i made a few mistakes in the last script


    Code:
    monitor_event GeneralCaptureSettlement CharacterReligion catholic
        and FactionIsLocal
        and TargetFactionReligion catholic ;not sure if this works to check the enemy religion
          
           historic_event gigantus_script factions { england, }
           set_faction_standing england france -0.1 ;or other value up to 1.0 the higher the lower relations
           set_faction_standing france_england -0.1 ;or other value up to 1.0 the higher the lower relations
           console_command diplomatic_stance england france, war ;england declares war on france
           console_command diplomatic_stance france england, war ; makes sure france declares war back to england
    
        terminate_monitor
    end_monitor
    Under the Patronage of the Dreadful cedric37!
    Ancs Guide, Emergent Factions , Yes/No Events |L'Outremer for Modders| Swagger's Skymod


  7. #7
    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: Changing faction standing through events

    faction_standing is script
    diplomatic_stance is console

    Got it!

    Last step: when this event fires I want to give the leader of a particular faction an ancillary.
    Does the trigger for the ancillaries accept a counter? Or how does that work?










  8. #8
    konny's Avatar Artifex
    Join Date
    Jul 2007
    Location
    Germania Inferior
    Posts
    3,631

    Default Re: Changing faction standing through events

    Quote Originally Posted by gigantus View Post
    Does the trigger for the ancillaries accept a counter?
    Yes, it does.

    Team member of: Das Heilige Römische Reich, Europa Barbarorum, Europa Barbarorum II, East of Rome
    Modding help by Konny: Excel Traitgenerator, Setting Heirs to your preference
    dHRR 0.8 beta released! get it here
    New: Native America! A mini-mod for Kingdoms America

  9. #9
    Swagger's Avatar Imperial Coffee-Runner
    Join Date
    Apr 2007
    Location
    Portugal
    Posts
    12,453

    Default Re: Changing faction standing through events

    Last step: when this event fires I want to give the leader of a particular faction an ancillary.
    you can't add ancillaries, but you can add traits, as long as you know the name of the leader

    i can't remember the correct command, but it was something like this: give_character_trait "Character Name" " Trait name"
    Under the Patronage of the Dreadful cedric37!
    Ancs Guide, Emergent Factions , Yes/No Events |L'Outremer for Modders| Swagger's Skymod


  10. #10
    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: Changing faction standing through events

    I was more thinking along the line:

    the event creates a counter like 'the_world_is_round'
    using that event counter as a condition for a special ancillary










  11. #11
    Swagger's Avatar Imperial Coffee-Runner
    Join Date
    Apr 2007
    Location
    Portugal
    Posts
    12,453

    Default Re: Changing faction standing through events

    i don't understand sorry
    Under the Patronage of the Dreadful cedric37!
    Ancs Guide, Emergent Factions , Yes/No Events |L'Outremer for Modders| Swagger's Skymod


  12. #12
    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: Changing faction standing through events

    campaign_script
    ;-- World is round --
    monitor_event EventCounter EventCounterType world_is_round
    and EventCounter > 0

    ; unhide America
    restrict_strat_radar false
    terminate_monitor
    end_monitor
    descr_events:
    ; ------------ CORE GAME EVENT --------------
    event historic world_is_round
    date 320 328
    Only in this case the event is 'caused' in the script










  13. #13
    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: Changing faction standing through events

    I am excited! Must try that immediately!










  14. #14
    Swagger's Avatar Imperial Coffee-Runner
    Join Date
    Apr 2007
    Location
    Portugal
    Posts
    12,453

    Default Re: Changing faction standing through events

    did my script worked?
    Under the Patronage of the Dreadful cedric37!
    Ancs Guide, Emergent Factions , Yes/No Events |L'Outremer for Modders| Swagger's Skymod


  15. #15
    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: Changing faction standing through events

    Still tweaking and testing.










  16. #16
    Swagger's Avatar Imperial Coffee-Runner
    Join Date
    Apr 2007
    Location
    Portugal
    Posts
    12,453

    Default Re: Changing faction standing through events

    don't forget to rep me
    Under the Patronage of the Dreadful cedric37!
    Ancs Guide, Emergent Factions , Yes/No Events |L'Outremer for Modders| Swagger's Skymod


  17. #17
    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: Changing faction standing through events

    I have to start from scratch:

    The conditions to test:
    - one of three factions captures a settlement
    The effects to be achieved:
    - an event gets displayed in game
    - a counter gets created (for use in an ancillary condition)
    - one faction gets money and the leader an ancillary
    - the second faction only gets an ancillary fro the leader
    Effects on standby:
    - declarations of war
    - change in relations


    It obviously doesn't work - (why else would I post?) anyone with great ideas?

    Edit: it appears that I have a problem with the 'or FactionType' lines. If I comment them out the whole thing works. So, how do I get this to work the way I intended?

    campaign_script
    Spoiler Alert, click show to read: 
    ; ---------------------- The Fall of Prag -----------------
    monitor_event GeneralCaptureSettlement SettlementName Prag ; Prag gets captured
    and FactionType portugal ; by portugal
    or FactionType hre ; or hre
    or FactionType milan ; or milan


    historic_event weisser_berg ; event gets displayed in game
    set_event_counter fall_von_prag 1 ; event counter for ancillaries

    console_command add_money portugal, 5000 ; 5000 florins for portugal

    ; set_faction_standing england france -0.1
    ; set_faction_standing france england -0.1

    ; console_command diplomatic_stance england france, war
    ; console_command diplomatic_stance france england, war

    terminate_monitor

    end_monitor


    export_descr_ancillaries
    Spoiler Alert, click show to read: 
    Ancillary wenzel_krone
    Type 1648_special
    Transferable 0
    Image wenzel_krone.tga
    Unique
    Description wenzel_krone_desc
    EffectsDescription wenzel_krone_effects_desc
    Effect Authority 10
    Effect Loyalty 1
    -----------------
    Trigger wenzel_krone
    WhenToTest CharacterTurnStart
    Condition FactionType hre
    and IsFactionLeader
    and I_EventCounter fall_von_prag > 0 ; the trigger from above
    AcquireAncillary wenzel_krone chance 100
    Last edited by Gigantus; September 07, 2009 at 04:35 AM.










  18. #18
    konny's Avatar Artifex
    Join Date
    Jul 2007
    Location
    Germania Inferior
    Posts
    3,631

    Default Re: Changing faction standing through events

    Quote Originally Posted by gigantus View Post
    Trigger wenzel_krone
    WhenToTest CharacterTurnStart
    Condition FactionType hre
    and IsFactionLeader
    and I_EventCounter fall_von_prag > 0 ; the trigger from above
    AcquireAncillary wenzel_krone chance 100

    Try: CharFactionType hre



    Team member of: Das Heilige Römische Reich, Europa Barbarorum, Europa Barbarorum II, East of Rome
    Modding help by Konny: Excel Traitgenerator, Setting Heirs to your preference
    dHRR 0.8 beta released! get it here
    New: Native America! A mini-mod for Kingdoms America

  19. #19
    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: Changing faction standing through events

    thanks konny, but that part works fine. My problem is somewhere else: I want to put three different factions in the conditions -
    and FactionType portugal
    or FactionType hre
    or FactionType milan

    but that doesn't work, only the first line is correct\working. Is there a way to get around it?










  20. #20
    konny's Avatar Artifex
    Join Date
    Jul 2007
    Location
    Germania Inferior
    Posts
    3,631

    Default Re: Changing faction standing through events

    Quote Originally Posted by gigantus View Post
    thanks konny, but that part works fine.
    I am rather certain it is not because FactionType is not recognized by EDA ;-)


    My problem is somewhere else: I want to put three different factions in the conditions -
    and FactionType portugal
    or FactionType hre
    or FactionType milan

    but that doesn't work, only the first line is correct\working. Is there a way to get around it?
    Should be no problem: make it three identical monitors, one for each faction.

    Team member of: Das Heilige Römische Reich, Europa Barbarorum, Europa Barbarorum II, East of Rome
    Modding help by Konny: Excel Traitgenerator, Setting Heirs to your preference
    dHRR 0.8 beta released! get it here
    New: Native America! A mini-mod for Kingdoms America

Page 1 of 2 12 LastLast

Posting Permissions

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