Results 1 to 15 of 15

Thread: Unofficial Bactria tribute and independence script fix . . . . EB2.01

  1. #1
    Seljuq Prince's Avatar Civis
    Join Date
    Feb 2014
    Location
    Trabzon/Turkey
    Posts
    166

    Default Unofficial Bactria tribute and independence script fix . . . . EB2.01

    I dont know if the team fixed it already for the next patch but I wanted to play this faction out with a working script, though its just little errors that made script broken here is my fix to it..Altough it seems now its works fine, I cannot promise Its not %100 bug free and I would like hear from you guys if its works for you too like mine..

    Here is the link to the to the fix..just download and put it under ---- mods\EBII\data\world\maps\campaign\imperial_campaign when asked to replace the file, say yes..


    here is the vanilla script
    Spoiler Alert, click show to read: 
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Baktria
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;
    set_event_counter ecBaktriaSatrapy 1
    set_event_counter ecBaktriaRebellion 0
    set_event_counter ecBaktriaKingdom 0
    ;
    ; * COUNCILLORS EVENT
    ;
    monitor_event FactionTurnStart FactionType f_baktria
    if I_IsFactionAIControlled f_baktria ;;; set Baktria as already kingdom if controlled by the AI
    set_event_counter ecBaktriaSatrapy 0
    set_event_counter ecBaktriaRebellion 0
    set_event_counter ecBaktriaKingdom 1
    terminate_monitor
    end_if

    if I_LocalFaction f_baktria
    historic_event HE_BAKTRIA_COUNCILLORS factions { f_baktria, }
    terminate_monitor
    end_if
    end_monitor
    ;
    ; * TRIBUTE EVENT
    ;
    declare_counter baktria_tributeunpaid

    monitor_event FactionTurnStart FactionType f_baktria
    and I_EventCounter ecWinter = 1

    if I_EventCounter ecBaktriaKingdom = 1
    terminate_monitor
    end_if

    if I_EventCounter ecBaktriaSatrapy = 1
    and I_CompareCounter baktria_tributeunpaid = 1
    historic_event HE_PAY_INDEMNITY_TO_SELEUKIDS true factions { f_baktria, }

    while I_EventCounter HE_PAY_INDEMNITY_TO_SELEUKIDS_accepted = 0 ;;; while-loop to pause the script until a decision is made
    and I_EventCounter HE_PAY_INDEMNITY_TO_SELEUKIDS_declined = 0
    end_while

    if I_EventCounter HE_PAY_INDEMNITY_TO_SELEUKIDS_accepted = 1
    console_command add_money -9000
    set_faction_standing f_baktria f_seleukid 0.5
    set_faction_standing f_seleukid f_baktria 0.5
    set_counter baktria_tributeunpaid 0
    end_if

    if I_EventCounter HE_PAY_TRIBUTE_TO_SELEUKIDS_declined = 1
    set_faction_standing f_baktria f_seleukid -0.6
    set_faction_standing f_seleukid f_baktria -0.9
    console_command diplomatic_stance f_seleukid f_baktria war
    set_event_counter ecBaktriaSatrapy 0
    set_event_counter ecBaktriaRebellion 1
    historic_event HE_BAKTRIA_INDEPENDENCE_WAR factions { f_baktria, }
    end_if
    end_if

    if I_EventCounter ecBaktriaSatrapy = 1
    and I_CompareCounter baktria_tributeunpaid = 0
    historic_event HE_PAY_TRIBUTE_TO_SELEUKIDS true factions { f_baktria, }

    while I_EventCounter HE_PAY_TRIBUTE_TO_SELEUKIDS_accepted = 0 ;;; while-loop to pause the script until a decision is made
    and I_EventCounter HE_PAY_TRIBUTE_TO_SELEUKIDS_declined = 0
    end_while

    if I_EventCounter HE_PAY_TRIBUTE_TO_SELEUKIDS_accepted = 1
    console_command add_money -3000
    set_faction_standing f_baktria f_seleukid 0.5
    set_faction_standing f_seleukid f_baktria 0.5
    end_if

    if I_EventCounter HE_PAY_TRIBUTE_TO_SELEUKIDS_declined = 1
    set_faction_standing f_baktria f_seleukid -0.3
    set_faction_standing f_seleukid f_baktria -0.6
    inc_counter baktria_tributeunpaid 1
    end_if

    end_if
    end_monitor
    ;
    ; * DECLARATION OF WAR EVENT
    ;
    monitor_event FactionWarDeclared FactionType f_baktria
    and TargetFactionType f_seleukid

    if I_EventCounter ecBaktriaKingdom = 1
    terminate_monitor
    end_if

    if I_EventCounter ecBaktriaSatrapy = 1
    set_event_counter ecBaktriaSatrapy 0
    set_event_counter ecBaktriaRebellion 1
    historic_event HE_BAKTRIA_INDEPENDENCE_WAR factions { f_baktria, }
    end_if
    end_monitor
    ;
    ; * WAR UNTIL RECOGNITION CHECK
    ;
    monitor_event FactionTurnStart FactionType f_seleukid
    and DiplomaticStanceFromFaction f_baktria != AtWar
    and I_EventCounter ecBaktriaRebellion = 1
    console_command diplomatic_stance f_seleukid f_baktria war

    if I_EventCounter ecBaktriaKingdom = 1
    terminate_monitor
    end_if
    end_monitor

    monitor_event FactionTurnStart FactionType f_baktria
    and DiplomaticStanceFromFaction f_seleukid != AtWar
    and I_EventCounter ecBaktriaRebellion = 1
    console_command diplomatic_stance f_seleukid f_baktria war

    if I_EventCounter ecBaktriaKingdom = 1
    terminate_monitor
    end_if
    end_monitor
    ;
    ; * FORGIVENESS OR RECOGNITION EVENTS
    ;
    declare_counter baktria_battlewon
    declare_counter baktria_regionstaken
    ;
    monitor_event PostBattle FactionType f_baktria
    and not I_ConflictType Naval
    and not I_ConflictType Withdraw
    and GeneralFoughtFaction f_seleukid
    and WonBattle
    inc_counter baktria_battlewon 1

    if I_EventCounter ecBaktriaIsAI = 1 ;;; save monitor if Baktria is AI-controlled
    terminate_monitor
    end_if

    if I_CompareCounter baktria_battlewon = 9
    terminate_monitor
    end_if
    end_monitor
    ;
    monitor_event GeneralCaptureSettlement FactionType f_baktria
    and TargetFactionType f_seleukid
    inc_counter baktria_regionstaken 1

    if I_EventCounter ecBaktriaIsAI = 1 ;;; save monitor if Baktria is AI-controlled
    terminate_monitor
    end_if

    if I_CompareCounter baktria_regionstaken = 2
    terminate_monitor
    end_if
    end_monitor
    ;
    monitor_event FactionTurnStart FactionType f_baktria

    if I_EventCounter ecBaktriaKingdom = 1
    terminate_monitor
    end_if

    if I_EventCounter ecBaktriaRebellion = 1
    and I_CompareCounter baktria_battlewon > 2
    and I_CompareCounter baktria_regionstaken > 0
    historic_event HE_BAKTRIA_FORGIVEN true factions { f_baktria, }

    while I_EventCounter HE_BAKTRIA_FORGIVEN_accepted = 0 ;;; while-loop to pause the script until a decision is made
    and I_EventCounter HE_BAKTRIA_FORGIVEN_declined = 0
    end_while

    if I_EventCounter HE_BAKTRIA_FORGIVEN_accepted = 1
    console_command diplomatic_stance f_seleukid f_baktria alliance
    set_faction_standing f_baktria f_seleukid 0.5
    set_faction_standing f_seleukid f_baktria 0.5
    set_event_counter ecBaktriaSatrapy 1
    set_event_counter ecBaktriaRebellion 0
    set_counter baktria_tributeunpaid 0
    end_if

    if I_EventCounter HE_PAY_TRIBUTE_TO_SELEUKIDS_declined = 1
    set_counter baktria_tributeunpaid 0
    end_if
    end_if

    if I_EventCounter ecBaktriaRebellion = 1
    and I_CompareCounter baktria_battlewon > 8
    and I_CompareCounter baktria_regionstaken > 1
    historic_event HE_BAKTRIA_KINGDOM factions { f_baktria, }
    console_command diplomatic_stance f_seleukid f_baktria neutral
    set_faction_standing f_baktria f_seleukid 0.0
    set_faction_standing f_seleukid f_baktria 0.0
    set_event_counter ecBaktriaKingdom 1
    set_event_counter ecBaktriaRebellion 0
    terminate_monitor
    end_if
    end_monitor

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


    This is my fixed script

    Spoiler Alert, click show to read: 
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Baktria
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;
    set_event_counter ecBaktriaSatrapy 1
    set_event_counter ecBaktriaRebellion 0
    set_event_counter ecBaktriaKingdom 0
    ;
    ; * COUNCILLORS EVENT
    ;
    monitor_event FactionTurnStart FactionType f_baktria
    if I_IsFactionAIControlled f_baktria ;;; set Baktria as already kingdom if controlled by the AI
    set_event_counter ecBaktriaSatrapy 0
    set_event_counter ecBaktriaRebellion 0
    set_event_counter ecBaktriaKingdom 1
    terminate_monitor
    end_if

    if I_LocalFaction f_baktria
    historic_event HE_BAKTRIA_COUNCILLORS factions { f_baktria, }
    console_command diplomatic_stance f_seleukid f_baktria allied
    set_faction_standing f_baktria f_seleukid 0.5
    set_faction_standing f_seleukid f_baktria 0.5

    terminate_monitor
    end_if
    end_monitor
    ;
    ; * TRIBUTE EVENT
    ;
    declare_counter baktria_tributeunpaid

    monitor_event FactionTurnStart FactionType f_baktria
    and I_EventCounter ecWinter = 1

    if I_EventCounter ecBaktriaKingdom = 1
    terminate_monitor
    end_if

    if I_EventCounter ecBaktriaSatrapy = 1
    and I_CompareCounter baktria_tributeunpaid = 1
    historic_event HE_PAY_INDEMNITY_TO_SELEUKIDS true factions { f_baktria, }

    while I_EventCounter HE_PAY_INDEMNITY_TO_SELEUKIDS_accepted = 0 ;;; while-loop to pause the script until a decision is made
    and I_EventCounter HE_PAY_INDEMNITY_TO_SELEUKIDS_declined = 0
    end_while

    if I_EventCounter HE_PAY_INDEMNITY_TO_SELEUKIDS_accepted = 1
    console_command add_money -9000
    set_faction_standing f_baktria f_seleukid 0.5
    set_faction_standing f_seleukid f_baktria 0.5
    set_counter baktria_tributeunpaid 0
    set_event_counter HE_PAY_INDEMNITY_TO_SELEUKIDS_accepted = 0
    set_event_counter HE_PAY_TRIBUTE_TO_SELEUKIDS_declined = 0

    end_if

    if I_EventCounter HE_PAY_TRIBUTE_TO_SELEUKIDS_declined = 1
    set_faction_standing f_baktria f_seleukid -0.6
    set_faction_standing f_seleukid f_baktria -0.9
    console_command diplomatic_stance f_seleukid f_baktria war
    set_event_counter ecBaktriaSatrapy 0
    set_event_counter ecBaktriaRebellion 1
    historic_event HE_BAKTRIA_INDEPENDENCE_WAR factions { f_baktria, }
    end_if
    end_if

    if I_EventCounter ecBaktriaSatrapy = 1
    and I_CompareCounter baktria_tributeunpaid = 0
    historic_event HE_PAY_TRIBUTE_TO_SELEUKIDS true factions { f_baktria, }

    while I_EventCounter HE_PAY_TRIBUTE_TO_SELEUKIDS_accepted = 0 ;;; while-loop to pause the script until a decision is made
    and I_EventCounter HE_PAY_TRIBUTE_TO_SELEUKIDS_declined = 0
    end_while

    if I_EventCounter HE_PAY_TRIBUTE_TO_SELEUKIDS_accepted = 1
    console_command add_money -3000
    set_faction_standing f_baktria f_seleukid 0.5
    set_faction_standing f_seleukid f_baktria 0.5
    set_event_counter HE_PAY_TRIBUTE_TO_SELEUKIDS_accepted = 0
    end_if

    if I_EventCounter HE_PAY_TRIBUTE_TO_SELEUKIDS_declined = 1
    set_faction_standing f_baktria f_seleukid -0.3
    set_faction_standing f_seleukid f_baktria -0.6
    set_counter baktria_tributeunpaid 1
    end_if

    end_if
    end_monitor
    ;
    ; * DECLARATION OF WAR EVENT
    ;
    monitor_event FactionWarDeclared FactionType f_baktria
    and TargetFactionType f_seleukid

    if I_EventCounter ecBaktriaKingdom = 1
    terminate_monitor
    end_if

    if I_EventCounter ecBaktriaSatrapy = 1
    set_event_counter ecBaktriaSatrapy 0
    set_event_counter ecBaktriaRebellion 1
    historic_event HE_BAKTRIA_INDEPENDENCE_WAR factions { f_baktria, }
    end_if
    end_monitor
    ;
    ; * WAR UNTIL RECOGNITION CHECK
    ;
    monitor_event FactionTurnStart FactionType f_seleukid
    and DiplomaticStanceFromFaction f_baktria != AtWar
    and I_EventCounter ecBaktriaRebellion = 1
    console_command diplomatic_stance f_seleukid f_baktria war

    if I_EventCounter ecBaktriaKingdom = 1
    terminate_monitor
    end_if
    end_monitor

    monitor_event FactionTurnStart FactionType f_baktria
    and DiplomaticStanceFromFaction f_seleukid != AtWar
    and I_EventCounter ecBaktriaRebellion = 1
    console_command diplomatic_stance f_seleukid f_baktria war

    if I_EventCounter ecBaktriaKingdom = 1
    terminate_monitor
    end_if
    end_monitor
    ;
    ; * FORGIVENESS OR RECOGNITION EVENTS
    ;
    declare_counter baktria_battlewon
    declare_counter baktria_regionstaken
    ;
    monitor_event PostBattle FactionType f_baktria
    and not I_ConflictType Naval
    and not I_ConflictType Withdraw
    and GeneralFoughtFaction f_seleukid
    and WonBattle
    inc_counter baktria_battlewon 1

    if I_EventCounter ecBaktriaIsAI = 1 ;;; save monitor if Baktria is AI-controlled
    terminate_monitor
    end_if

    if I_CompareCounter baktria_battlewon = 9
    terminate_monitor
    end_if
    end_monitor
    ;
    monitor_event GeneralCaptureSettlement FactionType f_baktria
    and TargetFactionType f_seleukid
    inc_counter baktria_regionstaken 1

    if I_EventCounter ecBaktriaIsAI = 1 ;;; save monitor if Baktria is AI-controlled
    terminate_monitor
    end_if

    if I_CompareCounter baktria_regionstaken = 2
    terminate_monitor
    end_if
    end_monitor
    ;
    monitor_event FactionTurnStart FactionType f_baktria

    if I_EventCounter ecBaktriaKingdom = 1
    terminate_monitor
    end_if

    if I_EventCounter ecBaktriaRebellion = 1
    and I_CompareCounter baktria_battlewon > 5
    and I_CompareCounter baktria_regionstaken > 1
    historic_event HE_BAKTRIA_FORGIVEN true factions { f_baktria, }

    while I_EventCounter HE_BAKTRIA_FORGIVEN_accepted = 0 ;;; while-loop to pause the script until a decision is made
    and I_EventCounter HE_BAKTRIA_FORGIVEN_declined = 0
    end_while

    if I_EventCounter HE_BAKTRIA_FORGIVEN_accepted = 1
    console_command diplomatic_stance f_seleukid f_baktria alliance
    set_faction_standing f_baktria f_seleukid 0.5
    set_faction_standing f_seleukid f_baktria 0.5
    set_event_counter ecBaktriaSatrapy 1
    set_event_counter ecBaktriaRebellion 0
    set_counter baktria_tributeunpaid 0
    set_event_counter HE_PAY_TRIBUTE_TO_SELEUKIDS_declined = 0
    end_if

    if I_EventCounter HE_PAY_TRIBUTE_TO_SELEUKIDS_declined = 1
    set_counter baktria_tributeunpaid 0
    set_event_counter HE_PAY_TRIBUTE_TO_SELEUKIDS_declined = 0
    end_if
    end_if

    if I_EventCounter ecBaktriaRebellion = 1
    and I_CompareCounter baktria_battlewon > 10
    and I_CompareCounter baktria_regionstaken > 3
    historic_event HE_BAKTRIA_KINGDOM factions { f_baktria, }
    console_command diplomatic_stance f_seleukid f_baktria neutral
    set_faction_standing f_baktria f_seleukid 0.0
    set_faction_standing f_seleukid f_baktria 0.0
    set_event_counter ecBaktriaKingdom 1
    set_event_counter ecBaktriaRebellion 0
    terminate_monitor
    end_if
    end_monitor

    monitor_event FactionTurnEnd FactionType f_baktria
    and I_EventCounter ecBaktriaRebellion = 1
    and I_LocalFaction f_baktria
    and I_EventCounter ecBaktriaKingdom = 0
    and not DiplomaticStanceFromFaction f_seleukid = AtWar
    console_command diplomatic_stance f_seleukid f_baktria allied
    set_event_counter HE_BAKTRIA_FORGIVEN_accepted = 1

    set_event_counter ecBaktriaRebellion 0
    set_event_counter ecBaktriaSatrapy 1
    end_monitor

    monitor_event FactionTurnEnd FactionType f_baktria
    and I_EventCounter HE_BAKTRIA_FORGIVEN_accepted = 1

    and I_EventCounter ecBaktriaSatrapy = 1
    set_event_counter HE_BAKTRIA_FORGIVEN_accepted = 0
    end_monitor





    Blue lines means they are replaced.. Red lines means they are added..


    Now you start the campaign allied with seleukids.. I have increased the battles you have win and settlements you have to capture to be recognized as a kingdom.. The same applied to be forgiven..
    Now its possible for to you ceasefire with seleukids before forgiven or kingdom events popups.After ceasefire you become his satrap again and an alliance is forged automaticly just afterwards to make sure you are his pupet..
    Compatible with EB2.01
    Last edited by Seljuq Prince; September 13, 2014 at 04:30 PM.

  2. #2

    Default Re: Unofficial Bactria tribute and independence script fix

    I tested it and it seems to work. Others confirmations would be usefull. Thanks to Seljuq Prince for making this fix.

  3. #3
    Seljuq Prince's Avatar Civis
    Join Date
    Feb 2014
    Location
    Trabzon/Turkey
    Posts
    166

    Default Re: Unofficial Bactria tribute and independence script fix

    Compatible with 2.01 and added some more features..

  4. #4

    Default Re: Unofficial Bactria tribute and independence script fix

    Thanks! Not sure if this was one of the scripts we fixed in 2.01, but even if it is, I'll post this for internal review by our scripters. I'll keep you posted as to what we do - could easily become a part of the "base mod".
    EBII Council

  5. #5
    Seljuq Prince's Avatar Civis
    Join Date
    Feb 2014
    Location
    Trabzon/Turkey
    Posts
    166

    Default Re: Unofficial Bactria tribute and independence script fix

    Yw Kull. I am ameteur, Hope to see this factions script expanded and developed, really enjoyed playing it

  6. #6
    Antiokhos Euergetes's Avatar Protector Domesticus
    Join Date
    Sep 2011
    Location
    Antiokheia
    Posts
    4,274

    Default Re: Unofficial Bactria tribute and independence script fix

    Thank you, nice to see people helping out, instead of complaing. I am tempted to start a Baktria campaign asap.

  7. #7
    b0Gia de Bodemloze's Avatar Europa Barbarorum Dev
    Join Date
    Dec 2012
    Location
    Makedonia, Greece
    Posts
    1,927

    Default Re: Unofficial Bactria tribute and independence script fix

    Hi nice change, please make this official.

  8. #8

    Default Re: Unofficial Bactria tribute and independence script fix . . . . EB2.01

    Replaced the file, but the fix seems not working By clicking on "yes" button being asked about the tribute to Arche, I don't lose 3.000 mnai. Any idea what's going wrong?

  9. #9
    Seljuq Prince's Avatar Civis
    Join Date
    Feb 2014
    Location
    Trabzon/Turkey
    Posts
    166

    Default Re: Unofficial Bactria tribute and independence script fix . . . . EB2.01

    Quote Originally Posted by Legion_IX View Post
    Replaced the file, but the fix seems not working By clicking on "yes" button being asked about the tribute to Arche, I don't lose 3.000 mnai. Any idea what's going wrong?
    well after you said this i give it a try again, and all worked well on my game.. I even rrefuded and pay fine then continued to pay 3000 again for 24 turns.. I used eb2.01 without any submods.. Its most probably you did sth wrong. But confirmations from more people if the fix working for them or not would be cool..

  10. #10

    Default Re: Unofficial Bactria tribute and independence script fix . . . . EB2.01

    Quote Originally Posted by Seljuq Prince View Post
    well after you said this i give it a try again, and all worked well on my game.. I even rrefuded and pay fine then continued to pay 3000 again for 24 turns.. I used eb2.01 without any submods.. Its most probably you did sth wrong. But confirmations from more people if the fix working for them or not would be cool..
    ok, thank you. The only submod that I'm using besides this one is "positive traits". Do you know if the baktrian reform trigger (sucessful war against Arche) will be somehow affected by such a broken tribute script.

  11. #11
    b0Gia de Bodemloze's Avatar Europa Barbarorum Dev
    Join Date
    Dec 2012
    Location
    Makedonia, Greece
    Posts
    1,927

    Default Re: Unofficial Bactria tribute and independence script fix . . . . EB2.01

    If you use the 2.01 version the old "positive traits" sub mod is no longer compatible.

  12. #12
    Seljuq Prince's Avatar Civis
    Join Date
    Feb 2014
    Location
    Trabzon/Turkey
    Posts
    166

    Default Re: Unofficial Bactria tribute and independence script fix . . . . EB2.01

    Quote Originally Posted by Legion_IX View Post
    ok, thank you. The only submod that I'm using besides this one is "positive traits". Do you know if the baktrian reform trigger (sucessful war against Arche) will be somehow affected by such a broken tribute script.
    I dont use this submod, but it touches another file, not mine.. And I dont think both mod would affect each other.. As Bogia said if you are not using latest version of that mod with EB2.01 that may cause errors.. Try using the mods seperately.. If nothing works out, best solution would be to uninstall the mod completely and use these mods on a fresh install by backing up your files.

  13. #13

    Default Re: Unofficial Bactria tribute and independence script fix . . . . EB2.01

    Quote Originally Posted by b0Gia View Post
    If you use the 2.01 version the old "positive traits" sub mod is no longer compatible.
    Oh, I didn't know this. Thanks.

  14. #14

    Default Re: Unofficial Bactria tribute and independence script fix . . . . EB2.01

    Quote Originally Posted by Seljuq Prince View Post
    I dont use this submod, but it touches another file, not mine.. And I dont think both mod would affect each other.. As Bogia said if you are not using latest version of that mod with EB2.01 that may cause errors.. Try using the mods seperately.. If nothing works out, best solution would be to uninstall the mod completely and use these mods on a fresh install by backing up your files.
    OK. Thank you

  15. #15
    b0Gia de Bodemloze's Avatar Europa Barbarorum Dev
    Join Date
    Dec 2012
    Location
    Makedonia, Greece
    Posts
    1,927

    Default Re: Unofficial Bactria tribute and independence script fix . . . . EB2.01


Posting Permissions

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