I pretty much did the script and more, I'll just go and double post again to show it to whoever wants to read it, imo it uses some nice trickery that could be usefull to others ...
it uses some trickerey to figure out if a faction exists or not, basicly it just resets a variable(counter) and sets it when the faction has a turn(and thus exists) and so knows that every faction that did not set the var. does not exist ..
Code:
;SET FOLLOWING EVENT IN DESCR_EVENTS TO KICK-START THE RESPAWNING!!!
;faction_respawn_trigger
;Interval set at 40-80 years -> 80-160 turns.
;faction_respawn_event ==> global spawn starter event
;faction_respawn_england ==> per faction spawn event
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
script
declare_counter faction_exists_england
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;COPY FOR OTHER FACTIONS!!!
monitor_event FactionTurnStart FactionType england
and Treasury <= 10000
if I_LocalFaction england
terminate_monitor
end_if
console_command add_money england, 12000
end_monitor
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;COPY FOR OTHER FACTIONS!!!
monitor_event FactionTurnStart FactionType england
and I_EventCounter faction_respawn_event == 1
set_counter faction_exists_england 1
end_monitor
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;COPY FOR OTHER FACTIONS!!!
monitor_event EventCounter EventCounterType faction_respawn_england
and EventCounter >= 1
spawn_army
faction england
character William, named character, age 30, x 100, y 150, family
traits GoodCommander 2 , Loyal 2
unit NE Bodyguard exp 2 armour 1 weapon_lvl 1
end
spawn_character england Laurence Bidell, diplomat, age 42, x 101, y 150
spawn_character england Richard, spy, age 36, x 99, y 150
end_monitor
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
monitor_event EventCounter EventCounterType faction_respawn_trigger
and EventCounter >= 1
add_events
event counter faction_respawn_event
date 2
end_add_events
terminate_monitor
end_monitor
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
monitor_event EventCounter EventCounterType faction_respawn_event
and EventCounter >= 1
if I_EventCounter faction_respawn_event == 1
;;;
;;;COPY FOR OTHER FACTIONS!!!
set_counter faction_exists_england 0
;;;
;;;
add_events
event counter faction_respawn_event
date 2
end_add_events
end_if
if I_EventCounter faction_respawn_event == 2
;;;
;;;COPY FOR OTHER FACTIONS!!!
if I_CompareCounter faction_exists_england == 0
add_events
event counter faction_respawn_england
date 3 25
end_add_events
end_if
;;;
;;;
set_event_counter faction_respawn_event 0
add_events
event counter faction_respawn_event
date 38 78
end_add_events
end_if
end_monitor
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
wait_monitors
end_script
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
G
Bookmarks