The second link's thread talks about why that probably can't work.
The second link's thread talks about why that probably can't work.
@QuintusSertorius
hey man if you're willing to lend a hand again, i would like to make the script spawn different armies depending on year, well events actually like i've seen in some other scripts, in this case that event would be the full_plate, how do i make it so after that event happens newer and stronger units spawn ?
what lines should i add to the script and where ?
i must have misunderstood something because the script is working for AI non capital settlements aswell, i sieged english settlemens with scotland but the script also worked when english settlements were sieged by France AI too so i am kinda confused what "I_IsFactionAIControlled and I_SettlementOwner" are for
You need to indent and make two loops per spawn, one with if I_EventCounter full_plate < 1 and the other if I_EventCounter full_plate > 0. What does your current script look like?
I_IsFactionAIControlled means the script only activates when that faction is AI controlled, I_SettlementOwner triggers when the specified faction owns the settlement concerned.
Code:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ENGLAND ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; monitor_event FactionTurnEnd FactionType slave ; --- London ---- if I_IsFactionAIControlled england ; script is 'AI only' and I_SettlementOwner London = england ; is owned by Pahlava and I_SettlementUnderSiege London ; makes sure the settlement (not a fort) if I_EventCounter London_spawn < 1 ; checking for cool down period console_command create_unit London "Fyrd Spearmen" 5 0 0 0 set_event_counter LondonC_spawn 10 ; setting cool down period inc_counter unitlimit_england 10 end_if if I_EventCounter LondonC_spawn > 0 inc_event_counter LondonC_spawn -1 end_if end_if ; add a loop for each subsequent settlement end_monitor ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Here it is with a loop for before/after the event:
Code:monitor_event FactionTurnEnd FactionType slave ; --- London ---- if I_IsFactionAIControlled england ; script is 'AI only' and I_SettlementOwner London = england ; is owned by England and I_SettlementUnderSiege London ; makes sure the settlement (not a fort) if I_EventCounter LondonC_spawn < 1 ; checking for cool down period if I_EventCounter full_plate < 1 ; event hasn't happened yet console_command create_unit London "Fyrd Spearmen" 5 0 0 0 set_event_counter LondonC_spawn 10 ; setting cool down period end_if if I_EventCounter full_plate > 0 ; event has happened console_command create_unit London "[better, tougher unit]" 5 0 0 0 set_event_counter LondonC_spawn 10 ; setting cool down period end_if end_if if I_EventCounter LondonC_spawn > 0 inc_event_counter LondonC_spawn -1 end_if end_if ; add a loop for each subsequent settlement end_monitor