Results 1 to 6 of 6

Thread: Triggering reforms earlier

  1. #1
    Cleomenes III's Avatar Civis
    Join Date
    Jun 2013
    Location
    Mare Nostrum
    Posts
    185

    Default Triggering reforms earlier

    I'm not prepared to wait 600+ turns to get new units. Can I trigger the reforms earlier by editing documents. I want to at least get polybian units.


    Ego sum Attila flagellum Dei

  2. #2

    Default Re: Triggering reforms earlier

    Nope, you can't pre-empt the script without editing it. You don't need to wait 600 turns for Polybian units, only 150.

  3. #3
    Rosbjerg's Avatar Tiro
    Join Date
    Nov 2008
    Location
    The State, in which something is rotten.
    Posts
    227

    Default Re: Triggering reforms earlier

    It's easy enough to edit the script

    Find \\ebii\data\world\maps\campaign\imperial_campaign\campaign_script.txt

    Find this section and edit the turn number for the events. Here I've edited the events to occur somewhat earlier automatically, but you can set them even earlier. So you get the Marian reforms by turn 50, if you want
    Spoiler Alert, click show to read: 

    ;; TO DO: Augustan reforms (Traits required)


    set_event_counter ecCamillanEra 1


    declare_counter cisalpine_battles
    declare_counter carthage_battles
    declare_counter marian_possible
    declare_counter augustan_possible
    declare_counter large_battle


    monitor_event PostBattle FactionType f_rome ;;; Check large battles in Cisalpine - not necessarily victorious ones
    and IsRegionOneOf region_037 region_035 region_031 region_036 region_030 region_073 region_081 ;;; Felsina 88, Segesta 87, Medilanon 75, Patavium 76, Massalia 96, Segestica 77, Dalminion 95 (in this order)
    and I_CompareCounter large_battle > 0 ;;; Include only large battles
    if I_IsFactionAIControlled f_rome ;;; AI doesn't fight battles
    terminate_monitor
    end_if
    if I_EventCounter ecPolybianEra > 0 ;;; Terminate monitor once reforms happened
    terminate_monitor
    end_if
    if I_EventCounter ecCamillanEra > 0
    inc_counter cisalpine_battles 1
    set_counter large_battle 0
    end_if
    end_monitor


    monitor_event PostBattle FactionType f_rome ;;; Check large battles against Carthage - not necessarily victorious ones
    and GeneralFoughtFaction f_carthage
    and not I_ConflictType Naval ;;; Exclude naval battles - reforms are about line infantry only
    and I_CompareCounter large_battle > 0 ;;; Include only large battles
    if I_IsFactionAIControlled f_rome ;;; AI doesn't fight battles
    terminate_monitor
    end_if
    if I_EventCounter ecPolybianEra > 0 ;;; Terminate monitor once reforms happened
    terminate_monitor
    end_if
    if I_EventCounter ecCamillanEra > 0
    inc_counter carthage_battles 1
    set_counter large_battle 0
    end_if
    end_monitor


    monitor_event FactionTurnStart FactionType f_rome
    if I_EventCounter ecPolybianEra > 0 ;;; terminate monitor once no longer needed
    terminate_monitor
    end_if
    if I_TurnNumber > 100 ;;; to prevent the reforms happening almost off-the-bat
    and I_CompareCounter cisalpine_battles > 3
    and I_CompareCounter carthage_battles > 4
    set_event_counter ecCamillanEra 0
    set_event_counter ecPolybianEra 1
    historic_event HE_POLYBIAN_REFORM factions { f_rome, }
    terminate_monitor
    end_if
    if I_TurnNumber > 150
    and I_SettlementOwner sett_035 = f_rome ;;; Segesta
    and I_SettlementOwner sett_036 = f_rome ;;; Patava
    and I_SettlementOwner sett_037 = f_rome ;;; Felsina
    and I_SettlementOwner sett_047 = f_rome ;;; Syrakousai
    and I_SettlementOwner sett_046 = f_rome ;;; Messana
    and I_SettlementOwner sett_045 = f_rome ;;; Lilibeo
    set_event_counter ecCamillanEra 0
    set_event_counter ecPolybianEra 1
    historic_event HE_POLYBIAN_REFORM factions { f_rome, }
    terminate_monitor
    end_if
    if I_IsFactionAIControlled f_rome ;;; automatic reforms for AI Rome
    and I_TurnNumber > 200
    and I_EventCounter ecCamillanEra > 0
    set_event_counter ecCamillanEra 0
    set_event_counter ecPolybianEra 1
    terminate_monitor
    end_if
    if not I_IsFactionAIControlled f_rome ;;; fall-back automatic reforms for player-controlled Rome
    and I_TurnNumber > 105
    and I_EventCounter ecCamillanEra > 0
    set_event_counter ecCamillanEra 0
    set_event_counter ecPolybianEra 1
    historic_event HE_POLYBIAN_REFORM factions { f_rome, }
    terminate_monitor
    end_if
    end_monitor


    ;
    ; Check conditions for the Marian reform
    ;
    monitor_event PreFactionTurnStart FactionType f_rome
    and I_TurnNumber > 300 ;;; 147 BC - earliest possible date
    set_counter marian_possible 0 ;;; reset counter every turn
    if I_EventCounter ecMarianEra > 0 ;;; terminate monitor once no longer needed
    terminate_monitor
    end_if
    if I_TurnNumber > 305 ;;; If there is 107 BC when Marian reforms happened IRL...
    and I_EventCounter ecPolybianEra > 0 ;;; ...and reforms had not happened already...
    set_event_counter ecPolybianEra 0 ;;; ...trigger the reforms as fall-back for AI and unlucky player.
    set_event_counter ecMarianEra 1
    historic_event HE_MARIAN_REFORM event\Marian_Reform.bik factions { f_rome, }
    terminate_monitor
    end_if
    end_monitor


    monitor_event SettlementTurnStart FactionType f_rome
    and I_TurnNumber > 500 ;;; 147 BC - earliest possible date
    and IsRegionOneOf region_038 region_039 region_040 region_041 region_042 region_044 region_043 ;;; Etruria 99, Umbria 97, Latium 112, Apulia 124, Campania 128, Kalabria 131, Brettia 140 - count only those in Italy
    and SettlementBuildingExists > farms_six ;;; count Latifundia and land reforms as sources of social tension and dispossession leading to reform
    if I_EventCounter ecMarianEra > 0 ;;; terminate monitor once no longer needed
    terminate_monitor
    end_if
    if I_EventCounter ecPolybianEra > 0
    inc_counter marian_possible 1
    end_if
    if I_CompareCounter marian_possible > 5
    set_event_counter ecMarianPossible 1 ;;; Once the social/agricultural development reaches the threshold switch-on EDCT condition...
    terminate_monitor ;;; ... and terminate monitor
    end_if
    end_monitor


    monitor_event CharacterTurnStart FactionType f_rome
    and Trait Reformator > 1 ;;; First level enabled by ecMarianPossible, second one by being a consul.
    if I_EventCounter ecMarianEra > 0 ;;; terminate monitor once no longer needed
    terminate_monitor
    end_if
    set_event_counter ecPolybianEra 0
    set_event_counter ecMarianEra 1
    historic_event HE_MARIAN_REFORM event\Marian_Reform.bik ; might as well let the world know about the reform
    terminate_monitor
    end_monitor

  4. #4
    Cleomenes III's Avatar Civis
    Join Date
    Jun 2013
    Location
    Mare Nostrum
    Posts
    185

    Default Re: Triggering reforms earlier

    Quote Originally Posted by Rosbjerg View Post
    It's easy enough to edit the script

    Find \\ebii\data\world\maps\campaign\imperial_campaign\campaign_script.txt

    Find this section and edit the turn number for the events. Here I've edited the events to occur somewhat earlier automatically, but you can set them even earlier. So you get the Marian reforms by turn 50, if you want
    Spoiler Alert, click show to read: 

    ;; TO DO: Augustan reforms (Traits required)


    set_event_counter ecCamillanEra 1


    declare_counter cisalpine_battles
    declare_counter carthage_battles
    declare_counter marian_possible
    declare_counter augustan_possible
    declare_counter large_battle


    monitor_event PostBattle FactionType f_rome ;;; Check large battles in Cisalpine - not necessarily victorious ones
    and IsRegionOneOf region_037 region_035 region_031 region_036 region_030 region_073 region_081 ;;; Felsina 88, Segesta 87, Medilanon 75, Patavium 76, Massalia 96, Segestica 77, Dalminion 95 (in this order)
    and I_CompareCounter large_battle > 0 ;;; Include only large battles
    if I_IsFactionAIControlled f_rome ;;; AI doesn't fight battles
    terminate_monitor
    end_if
    if I_EventCounter ecPolybianEra > 0 ;;; Terminate monitor once reforms happened
    terminate_monitor
    end_if
    if I_EventCounter ecCamillanEra > 0
    inc_counter cisalpine_battles 1
    set_counter large_battle 0
    end_if
    end_monitor


    monitor_event PostBattle FactionType f_rome ;;; Check large battles against Carthage - not necessarily victorious ones
    and GeneralFoughtFaction f_carthage
    and not I_ConflictType Naval ;;; Exclude naval battles - reforms are about line infantry only
    and I_CompareCounter large_battle > 0 ;;; Include only large battles
    if I_IsFactionAIControlled f_rome ;;; AI doesn't fight battles
    terminate_monitor
    end_if
    if I_EventCounter ecPolybianEra > 0 ;;; Terminate monitor once reforms happened
    terminate_monitor
    end_if
    if I_EventCounter ecCamillanEra > 0
    inc_counter carthage_battles 1
    set_counter large_battle 0
    end_if
    end_monitor


    monitor_event FactionTurnStart FactionType f_rome
    if I_EventCounter ecPolybianEra > 0 ;;; terminate monitor once no longer needed
    terminate_monitor
    end_if
    if I_TurnNumber > 100 ;;; to prevent the reforms happening almost off-the-bat
    and I_CompareCounter cisalpine_battles > 3
    and I_CompareCounter carthage_battles > 4
    set_event_counter ecCamillanEra 0
    set_event_counter ecPolybianEra 1
    historic_event HE_POLYBIAN_REFORM factions { f_rome, }
    terminate_monitor
    end_if
    if I_TurnNumber > 150
    and I_SettlementOwner sett_035 = f_rome ;;; Segesta
    and I_SettlementOwner sett_036 = f_rome ;;; Patava
    and I_SettlementOwner sett_037 = f_rome ;;; Felsina
    and I_SettlementOwner sett_047 = f_rome ;;; Syrakousai
    and I_SettlementOwner sett_046 = f_rome ;;; Messana
    and I_SettlementOwner sett_045 = f_rome ;;; Lilibeo
    set_event_counter ecCamillanEra 0
    set_event_counter ecPolybianEra 1
    historic_event HE_POLYBIAN_REFORM factions { f_rome, }
    terminate_monitor
    end_if
    if I_IsFactionAIControlled f_rome ;;; automatic reforms for AI Rome
    and I_TurnNumber > 200
    and I_EventCounter ecCamillanEra > 0
    set_event_counter ecCamillanEra 0
    set_event_counter ecPolybianEra 1
    terminate_monitor
    end_if
    if not I_IsFactionAIControlled f_rome ;;; fall-back automatic reforms for player-controlled Rome
    and I_TurnNumber > 105
    and I_EventCounter ecCamillanEra > 0
    set_event_counter ecCamillanEra 0
    set_event_counter ecPolybianEra 1
    historic_event HE_POLYBIAN_REFORM factions { f_rome, }
    terminate_monitor
    end_if
    end_monitor


    ;
    ; Check conditions for the Marian reform
    ;
    monitor_event PreFactionTurnStart FactionType f_rome
    and I_TurnNumber > 300 ;;; 147 BC - earliest possible date
    set_counter marian_possible 0 ;;; reset counter every turn
    if I_EventCounter ecMarianEra > 0 ;;; terminate monitor once no longer needed
    terminate_monitor
    end_if
    if I_TurnNumber > 305 ;;; If there is 107 BC when Marian reforms happened IRL...
    and I_EventCounter ecPolybianEra > 0 ;;; ...and reforms had not happened already...
    set_event_counter ecPolybianEra 0 ;;; ...trigger the reforms as fall-back for AI and unlucky player.
    set_event_counter ecMarianEra 1
    historic_event HE_MARIAN_REFORM event\Marian_Reform.bik factions { f_rome, }
    terminate_monitor
    end_if
    end_monitor


    monitor_event SettlementTurnStart FactionType f_rome
    and I_TurnNumber > 500 ;;; 147 BC - earliest possible date
    and IsRegionOneOf region_038 region_039 region_040 region_041 region_042 region_044 region_043 ;;; Etruria 99, Umbria 97, Latium 112, Apulia 124, Campania 128, Kalabria 131, Brettia 140 - count only those in Italy
    and SettlementBuildingExists > farms_six ;;; count Latifundia and land reforms as sources of social tension and dispossession leading to reform
    if I_EventCounter ecMarianEra > 0 ;;; terminate monitor once no longer needed
    terminate_monitor
    end_if
    if I_EventCounter ecPolybianEra > 0
    inc_counter marian_possible 1
    end_if
    if I_CompareCounter marian_possible > 5
    set_event_counter ecMarianPossible 1 ;;; Once the social/agricultural development reaches the threshold switch-on EDCT condition...
    terminate_monitor ;;; ... and terminate monitor
    end_if
    end_monitor


    monitor_event CharacterTurnStart FactionType f_rome
    and Trait Reformator > 1 ;;; First level enabled by ecMarianPossible, second one by being a consul.
    if I_EventCounter ecMarianEra > 0 ;;; terminate monitor once no longer needed
    terminate_monitor
    end_if
    set_event_counter ecPolybianEra 0
    set_event_counter ecMarianEra 1
    historic_event HE_MARIAN_REFORM event\Marian_Reform.bik ; might as well let the world know about the reform
    terminate_monitor
    end_monitor
    Thanks. I presume I have to start a new game for this to work?


    Ego sum Attila flagellum Dei

  5. #5

    Default Re: Triggering reforms earlier

    Quote Originally Posted by Cleomenes III View Post
    Thanks. I presume I have to start a new game for this to work?
    Yes.

  6. #6
    Rosbjerg's Avatar Tiro
    Join Date
    Nov 2008
    Location
    The State, in which something is rotten.
    Posts
    227

    Default Re: Triggering reforms earlier

    Just to be clear, with my edit the Polybian reforms are at turn 105 - and the Marian reforms hit at turn 305.

    If you want it earlier edit these two:

    if not I_IsFactionAIControlled f_rome ;;; fall-back automatic reforms for player-controlled Rome
    and I_TurnNumber > 105

    if I_TurnNumber > 305 ;;; If there is 107 BC when Marian reforms happened IRL...

Posting Permissions

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