Code:
monitor_event SettlementTurnStart IsSettlementRioting
and SettlementName sett_040
if not I_IsFactionAIControlled f_rome ; not needed if human player is this faction
terminate_monitor
end_if
if I_NumberOfSettlements f_rome < 1
and not I_SettlementUnderSiege sett_040
inc_counter f_rome_emerge 1
set_counter f_rome_building 0
end_if
end_monitor
monitor_event FactionTurnEnd FactionType slave
if not I_IsFactionAIControlled f_rome ; not needed if human player is this faction
terminate_monitor
end_if
if I_CompareCounter f_rome_emerge > 1
set_event_counter ros_bonus 1 ; order bonus for everywhere but intended location - to stop wandering re-emergence
set_event_counter ros_target_040 1 ; order penalty in Roma
set_counter sett_040_riot 1
; Spawn
if I_EventCounter ecCamillanEra > 0
spawn_army
faction f_rome
character random_name, named character, age 30, x 128, y 163, family
traits NaturalIntelligence 4 , NaturalCharisma 4 , NaturalEnergy 5 , Temperament 2 , Selflessness 4 , LoyaltyLevel 4 , Plebeian 1 , RomanMilitaryService 3 , RomanRank 3 , MilitaryTribune 2 , PlebeianTribune 2 , PlebeianAedile 3 , GoodLeader 1 , PoliticsSkill 2 , GoodAdministrator 3 , CommandExperience 2 , GensAtilia 2 , AtilivsRegvlvs 1 , EthnoDetermined 1 , Nobile 1
unit roman cavalry equites consulares exp 4 armour 0 weapon_lvl 0
unit roman cavalry equites camillan exp 0 armour 0 weapon_lvl 0
unit italic cavalry sabellian exp 1 armour 0 weapon_lvl 0
unit roman infantry triarii camillan exp 1 armour 0 weapon_lvl 0
unit roman infantry triarii camillan exp 0 armour 0 weapon_lvl 0
unit roman infantry principes camillan exp 1 armour 0 weapon_lvl 0
unit roman infantry principes camillan exp 0 armour 0 weapon_lvl 0
unit roman infantry principes camillan exp 0 armour 0 weapon_lvl 0
unit roman infantry hastati camillan exp 1 armour 0 weapon_lvl 0
unit roman infantry hastati camillan exp 0 armour 0 weapon_lvl 0
unit roman infantry hastati camillan exp 0 armour 0 weapon_lvl 0
unit italic infantry samnites spearmen exp 1 armour 0 weapon_lvl 0
unit italic infantry samnites spearmen exp 0 armour 0 weapon_lvl 0
unit italic infantry samnites spearmen exp 1 armour 0 weapon_lvl 0
unit italic infantry samnites spearmen exp 0 armour 0 weapon_lvl 0
unit italic infantry etruscan exp 1 armour 0 weapon_lvl 0
unit italic infantry etruscan exp 0 armour 0 weapon_lvl 0
unit roman infantry leves exp 1 armour 0 weapon_lvl 0
unit roman infantry leves exp 0 armour 0 weapon_lvl 0
unit roman infantry leves exp 0 armour 0 weapon_lvl 0
end
inc_counter unitlimit_f_rome 20
end_if
if I_EventCounter ecPolybianEra > 0
spawn_army
faction f_rome
character random_name, named character, age 30, x 128, y 163, family
traits NaturalIntelligence 4 , NaturalCharisma 4 , NaturalEnergy 5 , Temperament 2 , Selflessness 4 , LoyaltyLevel 4 , Plebeian 1 , RomanMilitaryService 3 , RomanRank 3 , MilitaryTribune 2 , PlebeianTribune 2 , PlebeianAedile 3 , GoodLeader 1 , PoliticsSkill 2 , GoodAdministrator 3 , CommandExperience 2 , GensAtilia 2 , AtilivsRegvlvs 1 , EthnoDetermined 1 , Nobile 1
unit roman cavalry equites consulares exp 4 armour 0 weapon_lvl 0
unit roman cavalry equites polybian exp 0 armour 0 weapon_lvl 0
unit italic cavalry sabellian exp 1 armour 0 weapon_lvl 0
unit roman infantry triarii polybian exp 1 armour 0 weapon_lvl 0
unit roman infantry triarii polybian exp 0 armour 0 weapon_lvl 0
unit roman infantry principes polybian exp 1 armour 0 weapon_lvl 0
unit roman infantry principes polybian exp 0 armour 0 weapon_lvl 0
unit roman infantry principes polybian exp 0 armour 0 weapon_lvl 0
unit roman infantry hastati polybian exp 1 armour 0 weapon_lvl 0
unit roman infantry hastati polybian exp 0 armour 0 weapon_lvl 0
unit roman infantry hastati polybian exp 0 armour 0 weapon_lvl 0
unit italic infantry cohors sociorum exp 0 armour 0 weapon_lvl 0
unit italic infantry cohors sociorum exp 0 armour 0 weapon_lvl 0
unit italic infantry samnites spearmen exp 1 armour 0 weapon_lvl 0
unit italic infantry samnites spearmen exp 0 armour 0 weapon_lvl 0
unit italic infantry etruscan exp 1 armour 0 weapon_lvl 0
unit italic infantry etruscan exp 0 armour 0 weapon_lvl 0
unit roman infantry velites exp 1 armour 0 weapon_lvl 0
unit roman infantry velites exp 0 armour 0 weapon_lvl 0
unit hellenistic infantry sphendonitai exp 1 armour 0 weapon_lvl 0
end
inc_counter unitlimit_f_rome 20
end_if
if I_EventCounter ecMarianEra > 0
spawn_army
faction f_rome
character random_name, named character, age 30, x 128, y 163, family
traits NaturalIntelligence 4 , NaturalCharisma 4 , NaturalEnergy 5 , Temperament 2 , Selflessness 4 , LoyaltyLevel 4 , Plebeian 1 , RomanMilitaryService 3 , RomanRank 3 , MilitaryTribune 2 , PlebeianTribune 2 , PlebeianAedile 3 , GoodLeader 1 , PoliticsSkill 2 , GoodAdministrator 3 , CommandExperience 2 , GensAtilia 2 , AtilivsRegvlvs 1 , EthnoDetermined 1 , Nobile 1
unit roman cavalry equites consulares exp 4 armour 0 weapon_lvl 0
unit roman cavalry equites polybian exp 0 armour 0 weapon_lvl 0
unit roman cavalry equites auxilium exp 1 armour 0 weapon_lvl 0
unit roman infantry cohors evocatae exp 1 armour 0 weapon_lvl 0
unit roman infantry cohors evocatae exp 0 armour 0 weapon_lvl 0
unit roman infantry cohors evocatae exp 1 armour 0 weapon_lvl 0
unit roman infantry reformata first exp 0 armour 0 weapon_lvl 0
unit roman infantry reformata first exp 0 armour 0 weapon_lvl 0
unit roman infantry cohors reformata exp 1 armour 0 weapon_lvl 0
unit roman infantry cohors reformata exp 0 armour 0 weapon_lvl 0
unit roman infantry cohors reformata exp 0 armour 0 weapon_lvl 0
unit roman infantry cohors reformata exp 0 armour 0 weapon_lvl 0
unit roman infantry cohors reformata exp 0 armour 0 weapon_lvl 0
unit roman infantry cohors reformata exp 1 armour 0 weapon_lvl 0
unit roman infantry cohors reformata exp 0 armour 0 weapon_lvl 0
unit roman infantry cohors reformata exp 1 armour 0 weapon_lvl 0
unit roman infantry cohors reformata exp 0 armour 0 weapon_lvl 0
unit roman infantry antesignani exp 1 armour 0 weapon_lvl 0
unit roman infantry antesignani exp 0 armour 0 weapon_lvl 0
unit roman infantry antesignani exp 1 armour 0 weapon_lvl 0
end
inc_counter unitlimit_f_rome 20
end_if
; Re-emergence
if I_SettlementOwner sett_040 = f_pergamon
faction_emerge f_rome f_pergamon 1 400.0 0.0 1.2 town true unused_label1 unused_name 30
end_if
if I_SettlementOwner sett_040 = f_carthage
faction_emerge f_rome f_carthage 1 400.0 0.0 1.2 town true unused_label1 unused_name 30
end_if
if I_SettlementOwner sett_040 = f_makedonia
faction_emerge f_rome f_makedonia 1 400.0 0.0 1.2 town true unused_label1 unused_name 30
end_if
if I_SettlementOwner sett_040 = f_epeiros
faction_emerge f_rome f_epeiros 1 400.0 0.0 1.2 town true unused_label1 unused_name 30
end_if
if I_SettlementOwner sett_040 = f_kh
faction_emerge f_rome f_kh 1 400.0 0.0 1.2 town true unused_label1 unused_name 30
end_if
if I_SettlementOwner sett_040 = f_seleukid
faction_emerge f_rome f_seleukid 1 400.0 0.0 1.2 town true unused_label1 unused_name 30
end_if
if I_SettlementOwner sett_040 = f_ptolemaioi
faction_emerge f_rome f_ptolemaioi 1 400.0 0.0 1.2 town true unused_label1 unused_name 30
end_if
if I_SettlementOwner sett_040 = f_baktria
faction_emerge f_rome f_baktria 1 400.0 0.0 1.2 town true unused_label1 unused_name 30
end_if
if I_SettlementOwner sett_040 = f_hayasdan
faction_emerge f_rome f_hayasdan 1 400.0 0.0 1.2 town true unused_label1 unused_name 30
end_if
if I_SettlementOwner sett_040 = f_parthia
faction_emerge f_rome f_parthia 1 400.0 0.0 1.2 town true unused_label1 unused_name 30
end_if
if I_SettlementOwner sett_040 = f_aedui
faction_emerge f_rome f_aedui 1 400.0 0.0 1.2 town true unused_label1 unused_name 30
end_if
if I_SettlementOwner sett_040 = f_arverni
faction_emerge f_rome f_arverni 1 400.0 0.0 1.2 town true unused_label1 unused_name 30
end_if
if I_SettlementOwner sett_040 = f_casse
faction_emerge f_rome f_casse 1 400.0 0.0 1.2 town true unused_label1 unused_name 30
end_if
if I_SettlementOwner sett_040 = f_lusotannan
faction_emerge f_rome f_lusotannan 1 400.0 0.0 1.2 town true unused_label1 unused_name 30
end_if
if I_SettlementOwner sett_040 = f_sweboz
faction_emerge f_rome f_sweboz 1 400.0 0.0 1.2 town true unused_label1 unused_name 30
end_if
if I_SettlementOwner sett_040 = f_getai
faction_emerge f_rome f_getai 1 400.0 0.0 1.2 town true unused_label1 unused_name 30
end_if
if I_SettlementOwner sett_040 = f_saba
faction_emerge f_rome f_saba 1 400.0 0.0 1.2 town true unused_label1 unused_name 30
end_if
if I_SettlementOwner sett_040 = f_saka
faction_emerge f_rome f_saka 1 400.0 0.0 1.2 town true unused_label1 unused_name 30
end_if
if I_SettlementOwner sett_040 = f_sauromatae
faction_emerge f_rome f_sauromatae 1 400.0 0.0 1.2 town true unused_label1 unused_name 30
end_if
if I_SettlementOwner sett_040 = f_numidia
faction_emerge f_rome f_numidia 1 400.0 0.0 1.2 town true unused_label1 unused_name 30
end_if
if I_SettlementOwner sett_040 = f_pontos
faction_emerge f_rome f_pontos 1 400.0 0.0 1.2 town true unused_label1 unused_name 30
end_if
if I_SettlementOwner sett_040 = f_gandhara
faction_emerge f_rome f_gandhara 1 400.0 0.0 1.2 town true unused_label1 unused_name 30
end_if
if I_SettlementOwner sett_040 = f_lugia
faction_emerge f_rome f_lugia 1 400.0 0.0 1.2 town true unused_label1 unused_name 30
end_if
if I_SettlementOwner sett_040 = f_bosporan
faction_emerge f_rome f_bosporan 1 400.0 0.0 1.2 town true unused_label1 unused_name 30
end_if
if I_SettlementOwner sett_040 = f_arevaci
faction_emerge f_rome f_arevaci 1 400.0 0.0 1.2 town true unused_label1 unused_name 30
end_if
if I_SettlementOwner sett_040 = f_boii
faction_emerge f_rome f_boii 1 400.0 0.0 1.2 town true unused_label1 unused_name 30
end_if
if I_SettlementOwner sett_040 = f_nabatu
faction_emerge f_rome f_nabatu 1 400.0 0.0 1.2 town true unused_label1 unused_name 30
end_if
if I_SettlementOwner sett_040 = slave
faction_emerge f_rome slave 1 400.0 0.0 1.2 town true unused_label1 unused_name 30
end_if
historic_event HE_ROMANI_REBORN
set_counter f_rome_emerge 0
set_counter sett_040_riot 0
add_money f_rome 40000
set_counter RomeAtPeace 0
set_counter f_rome_emerge_lt 0
wait 1
destroy_buildings f_rome govallied true
set_event_counter ros_bonus 0 ; switch off order boost for everywhere else
set_event_counter ros_target_040 0 ; switch off order penalty in Roma
end_if
end_monitor
monitor_event PreFactionTurnStart FactionIsLocal
and I_CompareCounter f_rome_building < 1
if not I_IsFactionAIControlled f_rome ; not needed if human player is this faction
terminate_monitor
end_if
if I_SettlementOwner sett_040 = f_rome
and I_CompareCounter f_rome_emerge < 1
and I_CompareCounter sett_040_riot < 1
set_event_counter ros_stabilisation_040 1 ; order bonus to help stabilise re-emerged faction
end_if
if I_SettlementOwner sett_040 = f_rome
and I_CompareCounter f_rome_emerge < 1
and I_CompareCounter sett_040_riot < 1
and I_EventCounter po_bonus_time_040 > 2 ; it's been three rounds of order bonus
set_event_counter ros_stabilisation_040 0 ; switch off order bonus
set_counter f_rome_building 1
set_event_counter po_bonus_time_040 0 ; reset order counter
end_if
if I_SettlementOwner sett_040 = f_rome
and I_CompareCounter f_rome_emerge < 1
and I_CompareCounter sett_040_riot < 1
inc_event_counter po_bonus_time_040 1 ; increase order counter
end_if
if not I_SettlementOwner sett_040 = f_rome ; in case the town is lost before the order bonus counter reaches it's end
set_event_counter ros_stabilisation_040 0 ; switch off order bonus
set_counter f_rome_building 1
set_event_counter po_bonus_time_040 0 ; reset order counter
end_if
end_monitor
In the relevant province building: