That's a pretty easy one. Here's part of our script. I recommend just changing some of the names for your own use. I can't remember if this has been tested, though...
Code:
;;;;;;;;;;;;;;;;;;;;;
; 6.0 --Reforms-- ;
;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; 6A - Roman Reforms ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;
;Roman Reforms:
;Roman_Reforms 0 = Camillan
;Roman_Reforms 1 = Polybian
;Roman_Reforms 2 = Marian
;Roman_Reforms 3 = They're done.
declare_counter Roman_Reforms
;;;;;;;;;;;;;;;;;;;;;;;;
;;; Polybian Reforms ;;;
;;;;;;;;;;;;;;;;;;;;;;;;
declare_counter PolybianCondition
monitor_event FactionTurnEnd FactionType romans_julii
and I_TurnNumber > 99
; Player gets the reforms after 200 B.C. regardless.
if I_TurnNumber > 239
and I_LocalFaction romans_julii
set_counter Roman_Reforms 1
set_counter PolybianReformsMessage 1
terminate_monitor
end_if
; AI reforms automatically after 238BC
if I_TurnNumber > 168
and not I_LocalFaction romans_julii
set_counter Roman_Reforms 1
terminate_monitor
end_if
; Player-triggered reforms
if I_SettlementOwner Mediolanium = romans_julii
inc_counter PolybianCondition 1
end_if
if I_SettlementOwner Patavium = romans_julii
inc_counter PolybianCondition 1
end_if
if I_SettlementOwner Bononia = romans_julii
inc_counter PolybianCondition 1
end_if
if I_SettlementOwner Iuvavum = romans_julii
inc_counter PolybianCondition 1
end_if
if I_SettlementOwner Moudon = romans_julii
inc_counter PolybianCondition 1
end_if
if I_SettlementOwner Lugdunum = romans_julii
inc_counter PolybianCondition 1
end_if
if I_SettlementOwner Narbo_Martius = romans_julii
inc_counter PolybianCondition 1
end_if
if I_SettlementOwner Toletum = romans_julii
inc_counter PolybianCondition 1
end_if
if I_SettlementOwner Numantia = romans_julii
inc_counter PolybianCondition 1
end_if
if I_SettlementOwner Caesada = romans_julii
inc_counter PolybianCondition 1
end_if
if I_SettlementOwner Obila = romans_julii
inc_counter PolybianCondition 1
end_if
;Check if Reforms Conditions are met
if I_CompareCounter PolybianCondition > 3
console_command create_building Rome "Polybian_Gov"
set_counter Roman_Reforms 1
set_counter PolybianReformsMessage 1
terminate_monitor
end_if
;Reset Counters
set_counter PolybianCondition 0
;Cleanup
if I_CompareCounter Roman_Reforms = 2
terminate_monitor
end_if
;Cleanup
if I_CompareCounter Roman_Reforms = 3
terminate_monitor
end_if
end_monitor
Bookmarks