maximum 13 years (26 turns), average 6,5 years
(but keep in mind that the script below is the improved version after my recent fixes to avoid those CTDs reported - and in the older version problems may arise. plus I'm not sure if I understand all the intricacies and if somewhere in another part of the script there's any trap set by another modder ;-)
after my changes it will be on average half as long (3,25 years), but very unlikely maximum still 13 years
; It works as follows:
; the "resistance" counter goes from 0 to 25 and again
; if in any faction the FactionLeader is a Usurper then there's 50% chance (this is my new fix) that a Civil War starts and depending on the size of the faction 1 to 4 armies are spawned
; (safety valve: if for any reason the FL doesn't have the Usurper trait anymore (eg he died and a new FL comes), then end the civil war)
; when the counter equals a number for a faction (eg. Spain = 1) then remove trait Usurper from the FL and end Civil War
Code:
monitor_event PreFactionTurnStart FactionType slave
inc_event_counter resistance 1
if I_EventCounter resistance > 25
set_event_counter resistance 0
end_if
set_event_counter new_house_spain 0
.....
if I_EventCounter resistance < 26
if I_FactionLeaderTrait spain Usurper >= 3
and I_EventCounter civil_war_spain_going_on = 0
and RandomPercent > 50
set_event_counter civil_war_spain_going_on 1
historic_event civil_war_spain
increment_kings_purse spain -1000
if I_NumberOfSettlements spain > 2
faction_emerge slave spain 1 100.0 0.0 1.2 town true
if I_NumberOfSettlements spain > 5
faction_emerge slave spain 1 100.0 0.0 1.2 town true
if I_NumberOfSettlements spain > 8
faction_emerge slave spain 1 100.0 0.0 1.2 town true unused_labels1 Piero 30
if I_NumberOfSettlements spain > 11
faction_emerge slave spain 1 100.0 0.0 1.2 town true unused_labels2 Panelo 30
if I_NumberOfSettlements spain > 14
faction_emerge slave spain 1 100.0 0.0 1.2 town true unused_labels3 Nicolo 30
end_if
end_if
end_if
end_if
end_if
end_if
Code:
if I_EventCounter civil_war_spain_going_on = 1 if I_FactionLeaderTrait spain Usurper < 3
historic_event end_civil_war_spain
increment_kings_purse spain 1000
set_event_counter civil_war_spain_going_on 0
end_if
end_if
Code:
if I_EventCounter resistance = 1 if I_EventCounter civil_war_spain_going_on = 1
if I_FactionLeaderTrait spain Usurper >= 3
set_event_counter new_house_spain 1
end_if
historic_event end_civil_war_spain
increment_kings_purse spain 1000
set_event_counter civil_war_spain_going_on 0
end_if
end_if
Code:
;========================================================;--------- Establishing a New House ---------------------
;--- it also means getting rid of the Usurper trait -----
;------------------------------------------
Trigger new_house_spain1
WhenToTest CharacterTurnStart
Condition IsFactionLeader
and Trait Usurper >= 3
and I_EventCounter new_house_spain = 1
and CharFactionType spain
Affects Usurper -5 Chance 100
Affects Factionleader 3 Chance 100
Affects Royal_Founder 1 Chance 100