Code:
monitor_event PreFactionTurnStart FactionType slave
; Histria kai Liburnia
if I_EventCounter RisingSpawn003 > 24 ; cooldown has ended
generate_random_counter sett_003_rising 1 50
if I_EventCounter sett_003_rising < 2 ; 2% chance
spawn_army
faction slave, sub_faction f_getai
character random_name, named character, age 30, x 143, y 178, portrait barb2
traits SlaveGetaiModel 1 , CommandExperience 2, GoodLeader 1, HaleAndHearty 2, TurnsAlive 2
unit italic infantry histro venetic exp 4 armour 0 weapon_lvl 0
unit illyrian infantry thureophoroi exp 1 armour 0 weapon_lvl 0
unit illyrian infantry thureophoroi exp 0 armour 0 weapon_lvl 0
unit illyrian infantry peltastai exp 0 armour 0 weapon_lvl 0
unit illyrian infantry peltastai exp 0 armour 0 weapon_lvl 0
end
set_event_counter RisingSpawn003 0 ; resetting cooldown
end_if
if I_EventCounter sett_003_rising = 20 ; 2% chance
spawn_army
faction slave, sub_faction f_getai
character random_name, named character, age 30, x 139, y 184, portrait barb3
traits SlaveGetaiModel 1 , CommandExperience 2, GoodLeader 1, HaleAndHearty 2, TurnsAlive 2
unit italic infantry histro venetic exp 4 armour 0 weapon_lvl 0
unit illyrian infantry thureophoroi exp 1 armour 0 weapon_lvl 0
unit illyrian infantry thureophoroi exp 0 armour 0 weapon_lvl 0
unit illyrian infantry peltastai exp 0 armour 0 weapon_lvl 0
unit illyrian infantry peltastai exp 0 armour 0 weapon_lvl 0
end
set_event_counter RisingSpawn003 0 ; resetting cooldown
end_if
if I_EventCounter sett_003_rising > 49 ; 2% chance
spawn_army
faction slave, sub_faction f_getai
character random_name, named character, age 30, x 135, y 186, portrait barb4
traits SlaveGetaiModel 1 , CommandExperience 3, GoodDefender 1, GoodLeader 1, HaleAndHearty 2, TurnsAlive 2
unit illyrian cavalry hippeis exp 4 armour 0 weapon_lvl 0
unit italic infantry histro venetic exp 1 armour 0 weapon_lvl 0
unit illyrian infantry thureophoroi exp 0 armour 0 weapon_lvl 0
unit illyrian infantry thureophoroi exp 0 armour 0 weapon_lvl 0
unit illyrian infantry thureophoroi exp 0 armour 0 weapon_lvl 0
unit illyrian infantry peltastai exp 1 armour 0 weapon_lvl 0
unit illyrian infantry peltastai exp 0 armour 0 weapon_lvl 0
unit hellenistic infantry sphendonitai exp 0 armour 0 weapon_lvl 0
end
if I_SettlementOwner sett_003 != slave
add_settlement_turmoil sett_003 2 ; unrest in settlement
end_if
set_event_counter RisingSpawn003 0 ; resetting cooldown
end_if
end_if
; Asturia-Kantabria
if I_EventCounter RisingSpawn016 > 11 ; cooldown has ended
generate_random_counter sett_016_rising 1 40
if I_EventCounter sett_016_rising < 2 ; 2.5% chance
spawn_army
faction slave, sub_faction f_arevaci
character random_name, named character, age 30, x 49, y 183, portrait iberian2
traits SlaveBoiiModel 1 , CommandExperience 2, GoodLeader 1, HaleAndHearty 2, TurnsAlive 2
unit celtiberian cavalry rider exp 4 armour 0 weapon_lvl 0
unit celtiberian infantry dunaminaca swordsmen exp 1 armour 0 weapon_lvl 0
unit celtiberian infantry dunaminaca spearmen exp 0 armour 0 weapon_lvl 0
unit celtiberian infantry dunaminaca spearmen exp 0 armour 0 weapon_lvl 0
unit iberian infantry skirmisher exp 0 armour 0 weapon_lvl 0
end
set_event_counter RisingSpawn016 0 ; resetting cooldown
end_if
if I_EventCounter sett_016_rising = 20 ; 2.5% chance
spawn_army
faction slave, sub_faction f_arevaci
character random_name, named character, age 30, x 40, y 177, portrait iberian3
traits SlaveBoiiModel 1 , CommandExperience 2, GoodLeader 1, HaleAndHearty 2, TurnsAlive 2
unit celtiberian cavalry rider exp 4 armour 0 weapon_lvl 0
unit celtiberian infantry dunaminaca swordsmen exp 1 armour 0 weapon_lvl 0
unit celtiberian infantry dunaminaca spearmen exp 0 armour 0 weapon_lvl 0
unit celtiberian infantry dunaminaca spearmen exp 0 armour 0 weapon_lvl 0
unit iberian infantry skirmisher exp 0 armour 0 weapon_lvl 0
end
set_event_counter RisingSpawn016 0 ; resetting cooldown
end_if
if I_EventCounter sett_016_rising > 39 ; 2.5% chance
spawn_army
faction slave, sub_faction f_arevaci
character random_name, named character, age 30, x 44, y 177, portrait iberian4
traits SlaveBoiiModel 1 , CommandExperience 3, GoodDefender 1, GoodLeader 1, HaleAndHearty 2, TurnsAlive 2
unit iberian cavalry cantabrian exp 4 armour 0 weapon_lvl 0
unit celtiberian infantry dunaminaca swordsmen exp 1 armour 0 weapon_lvl 0
unit celtiberian infantry dunaminaca spearmen exp 0 armour 0 weapon_lvl 0
unit celtiberian infantry dunaminaca spearmen exp 0 armour 0 weapon_lvl 0
unit iberian infantry spearman exp 0 armour 0 weapon_lvl 0
unit iberian infantry spearman exp 0 armour 0 weapon_lvl 0
unit iberian infantry skirmisher exp 0 armour 0 weapon_lvl 0
unit iberian infantry shepherd slinger exp 0 armour 0 weapon_lvl 0
end
if I_SettlementOwner sett_016 != slave
add_settlement_turmoil sett_016 4 ; unrest in settlement
end_if
set_event_counter RisingSpawn016 0 ; resetting cooldown
end_if
end_if
; Korsim
if I_EventCounter RisingSpawn048 > 24 ; cooldown has ended
generate_random_counter sett_048_rising 1 50
if I_EventCounter sett_048_rising < 2 ; 2% chance
spawn_army
faction slave, sub_faction f_rome
character random_name, named character, age 30, x 111, y 169
traits SlaveRomanModel 1 , CommandExperience 2, GoodLeader 1, HaleAndHearty 2, TurnsAlive 2
unit italic infantry etruscan exp 4 armour 0 weapon_lvl 0
unit ligurian infantry spearmen exp 1 armour 0 weapon_lvl 0
unit ligurian infantry spearmen exp 0 armour 0 weapon_lvl 0
unit roman infantry leves exp 0 armour 0 weapon_lvl 0
unit hellenistic infantry sphendonitai exp 0 armour 0 weapon_lvl 0
end
set_event_counter RisingSpawn048 0 ; resetting cooldown
end_if
if I_EventCounter sett_048_rising > 49 ; 2% chance
spawn_army
faction slave, sub_faction f_rome
character random_name, named character, age 30, x 113, y 167
traits SlaveRomanModel 1 , CommandExperience 3, GoodDefender 1, GoodLeader 1, HaleAndHearty 2, TurnsAlive 2
unit italic infantry etruscan exp 4 armour 0 weapon_lvl 0
unit ligurian infantry spearmen exp 1 armour 0 weapon_lvl 0
unit ligurian infantry spearmen exp 0 armour 0 weapon_lvl 0
unit roman infantry leves exp 0 armour 0 weapon_lvl 0
unit hellenistic infantry sphendonitai exp 0 armour 0 weapon_lvl 0
end
if I_SettlementOwner sett_048 != slave
add_settlement_turmoil sett_048 2 ; unrest in settlement
end_if
set_event_counter RisingSpawn048 0 ; resetting cooldown
end_if
end_if
; Cooldown increments
inc_event_counter RisingSpawn003 1 ; increasing cooldown counter every turn
inc_event_counter RisingSpawn016 1
inc_event_counter RisingSpawn048 1
end_monitor
First some basics.