campaign_script;i want too make script that notice every new turn if the faction that is played by the player is in civil war or not,not the ai factions,but something wrong i get sometimes two times message of cival war other times 6 times,but would have only one message appears that tells the player if he is in civil war or not,am losing mine hair here lol
here is campaign script;
Code:
;unrest minus bonus while king has civil war;POLAND
monitor_event FactionTurnStart poland
and not IsFactionAIControlled
and I_FactionLeaderTrait poland Offensive_To_Nobles >= 1
set_event_counter civil_war_poland_going_on 1
historic_event CIVIL_WAR factions { poland, }
end_monitor
monitor_event FactionTurnStart poland
and not IsFactionAIControlled
and I_EventCounter civil_war_poland_going_on = 1
and I_FactionLeaderTrait poland Offensive_To_Nobles < 1
set_event_counter civil_war_poland_going_on 0
historic_event END_CIVIL_WAR factions { poland, }
end_monitor
;spain
monitor_event FactionTurnStart spain
and not IsFactionAIControlled
and I_FactionLeaderTrait spain Offensive_To_Nobles >= 1
set_event_counter civil_war_spain_going_on 1
historic_event CIVIL_WAR factions { all, }
end_monitor
monitor_event FactionTurnStart spain
and not IsFactionAIControlled
and I_EventCounter civil_war_spain_going_on = 1
and I_FactionLeaderTrait spain Offensive_To_Nobles < 1
set_event_counter civil_war_spain_going_on 0
historic_event END_CIVIL_WAR factions { all, }
end_monitor
;hungary
monitor_event FactionTurnStart hungary
and not IsFactionAIControlled
and I_FactionLeaderTrait hungary Offensive_To_Nobles >= 1
set_event_counter civil_war_hungary_going_on 1
historic_event CIVIL_WAR factions { all, }
end_monitor
monitor_event FactionTurnStart hungary
and not IsFactionAIControlled
and I_EventCounter civil_war_hungary_going_on = 1
and I_FactionLeaderTrait hungary Offensive_To_Nobles < 1
set_event_counter civil_war_hungary_going_on 0
historic_event END_CIVIL_WAR factions { all, }
end_monitor
;england
monitor_event FactionTurnStart england
and not IsFactionAIControlled
and I_FactionLeaderTrait england Offensive_To_Nobles >= 1
set_event_counter civil_war_england_going_on 1
historic_event CIVIL_WAR factions { all, }
end_monitor
monitor_event FactionTurnStart england
and not IsFactionAIControlled
and I_EventCounter civil_war_england_going_on = 1
and I_FactionLeaderTrait england Offensive_To_Nobles < 1
set_event_counter civil_war_england_going_on 0
historic_event END_CIVIL_WAR factions { all, }
end_monitor
;norway
monitor_event FactionTurnStart norway
and not IsFactionAIControlled
and I_FactionLeaderTrait norway Offensive_To_Nobles >= 1
set_event_counter civil_war_norway_going_on 1
historic_event CIVIL_WAR factions { all, }
end_monitor
monitor_event FactionTurnStart norway
and not IsFactionAIControlled
and I_EventCounter civil_war_norway_going_on = 1
and I_FactionLeaderTrait norway Offensive_To_Nobles < 1
set_event_counter civil_war_norway_going_on 0
historic_event END_CIVIL_WAR factions { all, }
end_monitor
;teutonic_order
monitor_event FactionTurnStart teutonic_order
and not IsFactionAIControlled
and I_FactionLeaderTrait teutonic_order Offensive_To_Nobles >= 1
set_event_counter civil_war_teutonic_order_going_on 1
historic_event CIVIL_WAR factions { all, }
end_monitor
monitor_event FactionTurnStart teutonic_order
and not IsFactionAIControlled
and I_EventCounter civil_war_teutonic_order_going_on = 1
and I_FactionLeaderTrait teutonic_order Offensive_To_Nobles < 1
set_event_counter civil_war_teutonic_order_going_on 0
historic_event END_CIVIL_WAR factions { all, }
end_monitor
;denmark
monitor_event FactionTurnStart denmark
and not IsFactionAIControlled
and I_FactionLeaderTrait denmark Offensive_To_Nobles >= 1
set_event_counter civil_war_denmark_going_on 1
historic_event CIVIL_WAR factions { all, }
end_monitor
monitor_event FactionTurnStart denmark
and not IsFactionAIControlled
and I_EventCounter civil_war_denmark_going_on = 1
and I_FactionLeaderTrait denmark Offensive_To_Nobles < 1
set_event_counter civil_war_denmark_going_on 0
historic_event END_CIVIL_WAR factions { all, }
end_monitor
;antioch
monitor_event FactionTurnStart antioch
and not IsFactionAIControlled
and I_FactionLeaderTrait antioch Offensive_To_Nobles >= 1
set_event_counter civil_war_antioch_going_on 1
historic_event CIVIL_WAR factions { all, }
end_monitor
monitor_event FactionTurnStart antioch
and not IsFactionAIControlled
and I_EventCounter civil_war_antioch_going_on = 1
and I_FactionLeaderTrait antioch Offensive_To_Nobles < 1
set_event_counter civil_war_antioch_going_on 0
historic_event END_CIVIL_WAR factions { all, }
end_monitor
;france
monitor_event FactionTurnStart france
and not IsFactionAIControlled
and I_FactionLeaderTrait france Offensive_To_Nobles >= 1
set_event_counter civil_war_france_going_on 1
historic_event CIVIL_WAR factions { all, }
end_monitor
monitor_event FactionTurnStart france
and not IsFactionAIControlled
and I_EventCounter civil_war_france_going_on = 1
and I_FactionLeaderTrait france Offensive_To_Nobles < 1
set_event_counter civil_war_france_going_on 0
historic_event END_CIVIL_WAR factions { all, }
end_monitor
;hre
monitor_event FactionTurnStart hre
and not IsFactionAIControlled
and I_FactionLeaderTrait hre Offensive_To_Nobles >= 1
set_event_counter civil_war_hre_going_on 1
historic_event CIVIL_WAR factions { all, }
end_monitor
monitor_event FactionTurnStart hre
and not IsFactionAIControlled
and I_EventCounter civil_war_hre_going_on = 1
and I_FactionLeaderTrait hre Offensive_To_Nobles < 1
set_event_counter civil_war_hre_going_on 0
historic_event END_CIVIL_WAR factions { all, }
end_monitor
;venice
monitor_event FactionTurnStart venice
and not IsFactionAIControlled
and I_FactionLeaderTrait venice Offensive_To_Nobles >= 1
set_event_counter civil_war_venice_going_on 1
historic_event CIVIL_WAR factions { all, }
end_monitor
monitor_event FactionTurnStart venice
and not IsFactionAIControlled
and I_EventCounter civil_war_venice_going_on = 1
and I_FactionLeaderTrait venice Offensive_To_Nobles < 1
set_event_counter civil_war_venice_going_on 0
historic_event END_CIVIL_WAR factions { all, }
end_monitor
;sicily
monitor_event FactionTurnStart sicily
and not IsFactionAIControlled
and I_FactionLeaderTrait sicily Offensive_To_Nobles >= 1
set_event_counter civil_war_sicily_going_on 1
historic_event CIVIL_WAR factions { all, }
end_monitor
monitor_event FactionTurnStart sicily
and not IsFactionAIControlled
and I_EventCounter civil_war_sicily_going_on = 1
and I_FactionLeaderTrait sicily Offensive_To_Nobles < 1
set_event_counter civil_war_sicily_going_on 0
historic_event END_CIVIL_WAR factions { all, }
end_monitor
;aztecs
monitor_event FactionTurnStart aztecs
and not IsFactionAIControlled
and I_FactionLeaderTrait aztecs Offensive_To_Nobles >= 1
set_event_counter civil_war_aztecs_going_on 1
historic_event CIVIL_WAR factions { all, }
end_monitor
monitor_event FactionTurnStart aztecs
and not IsFactionAIControlled
and I_EventCounter civil_war_aztecs_going_on = 1
and I_FactionLeaderTrait aztecs Offensive_To_Nobles < 1
set_event_counter civil_war_aztecs_going_on 0
historic_event END_CIVIL_WAR factions { all, }
end_monitor
;saxons
monitor_event FactionTurnStart saxons
and not IsFactionAIControlled
and I_FactionLeaderTrait saxons Offensive_To_Nobles >= 1
set_event_counter civil_war_saxons_going_on 1
historic_event CIVIL_WAR factions { all, }
end_monitor
monitor_event FactionTurnStart saxons
and not IsFactionAIControlled
and I_EventCounter civil_war_saxons_going_on = 1
and I_FactionLeaderTrait saxons Offensive_To_Nobles < 1
set_event_counter civil_war_saxons_going_on 0
historic_event END_CIVIL_WAR factions { all, }
end_monitor
;scotland
monitor_event FactionTurnStart scotland
and not IsFactionAIControlled
and I_FactionLeaderTrait scotland Offensive_To_Nobles >= 1
set_event_counter civil_war_scotland_going_on 1
historic_event CIVIL_WAR factions { all, }
end_monitor
monitor_event FactionTurnStart scotland
and not IsFactionAIControlled
and I_EventCounter civil_war_scotland_going_on = 1
and I_FactionLeaderTrait scotland Offensive_To_Nobles < 1
set_event_counter civil_war_scotland_going_on 0
historic_event END_CIVIL_WAR factions { all, }
end_monitor
;bulgaria
monitor_event FactionTurnStart bulgaria
and not IsFactionAIControlled
and I_FactionLeaderTrait bulgaria Offensive_To_Nobles >= 1
set_event_counter civil_war_bulgaria_going_on 1
historic_event CIVIL_WAR factions { all, }
end_monitor
monitor_event FactionTurnStart bulgaria
and not IsFactionAIControlled
and I_EventCounter civil_war_bulgaria_going_on = 1
and I_FactionLeaderTrait bulgaria Offensive_To_Nobles < 1
set_event_counter civil_war_bulgaria_going_on 0
historic_event END_CIVIL_WAR factions { all, }
end_monitor
;russia
monitor_event FactionTurnStart russia
and not IsFactionAIControlled
and I_FactionLeaderTrait russia Offensive_To_Nobles >= 1
set_event_counter civil_war_russia_going_on 1
historic_event CIVIL_WAR factions { all, }
end_monitor
monitor_event FactionTurnStart russia
and not IsFactionAIControlled
and I_EventCounter civil_war_russia_going_on = 1
and I_FactionLeaderTrait russia Offensive_To_Nobles < 1
set_event_counter civil_war_russia_going_on 0
historic_event END_CIVIL_WAR factions { all, }
end_monitor
;portugal
monitor_event FactionTurnStart portugal
and not IsFactionAIControlled
and I_FactionLeaderTrait portugal Offensive_To_Nobles >= 1
set_event_counter civil_war_portugal_going_on 1
historic_event CIVIL_WAR factions { all, }
end_monitor
monitor_event FactionTurnStart portugal
and not IsFactionAIControlled
and I_EventCounter civil_war_portugal_going_on = 1
and I_FactionLeaderTrait portugal Offensive_To_Nobles < 1
set_event_counter civil_war_portugal_going_on 0
historic_event END_CIVIL_WAR factions { all, }
end_monitor
;mongols
monitor_event FactionTurnStart mongols
and not IsFactionAIControlled
and I_FactionLeaderTrait mongols Offensive_To_Nobles >= 1
set_event_counter civil_war_mongols_going_on 1
historic_event CIVIL_WAR factions { all, }
end_monitor
monitor_event FactionTurnStart mongols
and not IsFactionAIControlled
and I_EventCounter civil_war_mongols_going_on = 1
and I_FactionLeaderTrait mongols Offensive_To_Nobles < 1
set_event_counter civil_war_mongols_going_on 0
historic_event END_CIVIL_WAR factions { all, }
end_monitor
;egypt
monitor_event FactionTurnStart egypt
and not IsFactionAIControlled
and I_FactionLeaderTrait egypt Offensive_To_Nobles >= 1
set_event_counter civil_war_egypt_going_on 1
historic_event CIVIL_WAR factions { all, }
end_monitor
monitor_event FactionTurnStart egypt
and not IsFactionAIControlled
and I_EventCounter civil_war_egypt_going_on = 1
and I_FactionLeaderTrait egypt Offensive_To_Nobles < 1
set_event_counter civil_war_egypt_going_on 0
historic_event END_CIVIL_WAR factions { all, }
end_monitor
;milan
monitor_event FactionTurnStart milan
and not IsFactionAIControlled
and I_FactionLeaderTrait milan Offensive_To_Nobles >= 1
set_event_counter civil_war_milan_going_on 1
historic_event CIVIL_WAR factions { all, }
end_monitor
monitor_event FactionTurnStart milan
and not IsFactionAIControlled
and I_EventCounter civil_war_milan_going_on = 1
and I_FactionLeaderTrait milan Offensive_To_Nobles < 1
set_event_counter civil_war_milan_going_on 0
historic_event END_CIVIL_WAR factions { all, }
end_monitor
;wales
monitor_event FactionTurnStart wales
and not IsFactionAIControlled
and I_FactionLeaderTrait wales Offensive_To_Nobles >= 1
set_event_counter civil_war_wales_going_on 1
historic_event CIVIL_WAR factions { all, }
end_monitor
monitor_event FactionTurnStart wales
and not IsFactionAIControlled
and I_EventCounter civil_war_wales_going_on = 1
and I_FactionLeaderTrait wales Offensive_To_Nobles < 1
set_event_counter civil_war_wales_going_on 0
historic_event END_CIVIL_WAR factions { all, }
end_monitor
;lithuania
monitor_event FactionTurnStart lithuania
and not IsFactionAIControlled
and I_FactionLeaderTrait lithuania Offensive_To_Nobles >= 1
set_event_counter civil_war_lithuania_going_on 1
historic_event CIVIL_WAR factions { all, }
end_monitor
monitor_event FactionTurnStart lithuania
and not IsFactionAIControlled
and I_EventCounter civil_war_lithuania_going_on = 1
and I_FactionLeaderTrait lithuania Offensive_To_Nobles < 1
set_event_counter civil_war_lithuania_going_on 0
historic_event END_CIVIL_WAR factions { all, }
end_monitor
;moors
monitor_event FactionTurnStart moors
and not IsFactionAIControlled
and I_FactionLeaderTrait moors Offensive_To_Nobles >= 1
set_event_counter civil_war_moors_going_on 1
historic_event CIVIL_WAR factions { all, }
end_monitor
monitor_event FactionTurnStart moors
and not IsFactionAIControlled
and I_EventCounter civil_war_moors_going_on = 1
and I_FactionLeaderTrait moors Offensive_To_Nobles < 1
set_event_counter civil_war_moors_going_on 0
historic_event END_CIVIL_WAR factions { all, }
end_monitor
;ghazni
monitor_event FactionTurnStart ghazni
and not IsFactionAIControlled
and I_FactionLeaderTrait ghazni Offensive_To_Nobles >= 1
set_event_counter civil_war_ghazni_going_on 1
historic_event CIVIL_WAR factions { all, }
end_monitor
monitor_event FactionTurnStart ghazni
and not IsFactionAIControlled
and I_EventCounter civil_war_ghazni_going_on = 1
and I_FactionLeaderTrait ghazni Offensive_To_Nobles < 1
set_event_counter civil_war_ghazni_going_on 0
historic_event END_CIVIL_WAR factions { all, }
end_monitor
;byzantium
monitor_event FactionTurnStart byzantium
and not IsFactionAIControlled
and I_FactionLeaderTrait byzantium Offensive_To_Nobles >= 1
set_event_counter civil_war_byzantium_going_on 1
historic_event CIVIL_WAR factions { all, }
end_monitor
monitor_event FactionTurnStart byzantium
and not IsFactionAIControlled
and I_EventCounter civil_war_byzantium_going_on = 1
and I_FactionLeaderTrait byzantium Offensive_To_Nobles < 1
set_event_counter civil_war_byzantium_going_on 0
historic_event END_CIVIL_WAR factions { all, }
end_monitor
;turks
monitor_event FactionTurnStart turks
and not IsFactionAIControlled
and I_FactionLeaderTrait turks Offensive_To_Nobles >= 1
set_event_counter civil_war_turks_going_on 1
historic_event CIVIL_WAR factions { all, }
end_monitor
monitor_event FactionTurnStart turks
and not IsFactionAIControlled
and I_EventCounter civil_war_turks_going_on = 1
and I_FactionLeaderTrait turks Offensive_To_Nobles < 1
set_event_counter civil_war_turks_going_on 0
historic_event END_CIVIL_WAR factions { all, }
end_monitor
;timurids
monitor_event FactionTurnStart timurids
and not IsFactionAIControlled
and I_FactionLeaderTrait timurids Offensive_To_Nobles >= 1
set_event_counter civil_war_timurids_going_on 1
historic_event CIVIL_WAR factions { all, }
end_monitor
monitor_event FactionTurnStart timurids
and not IsFactionAIControlled
and I_EventCounter civil_war_timurids_going_on = 1
and I_FactionLeaderTrait timurids Offensive_To_Nobles < 1
set_event_counter civil_war_timurids_going_on 0
historic_event END_CIVIL_WAR factions { all, }
end_monitor
;georgia
monitor_event FactionTurnStart georgia
and not IsFactionAIControlled
and I_FactionLeaderTrait georgia Offensive_To_Nobles >= 1
set_event_counter civil_war_georgia_going_on 1
historic_event CIVIL_WAR factions { all, }
end_monitor
monitor_event FactionTurnStart georgia
and not IsFactionAIControlled
and I_EventCounter civil_war_georgia_going_on = 1
and I_FactionLeaderTrait georgia Offensive_To_Nobles < 1
set_event_counter civil_war_georgia_going_on 0
historic_event END_CIVIL_WAR factions { all, }
end_monitor
and here is in export buildings;
Code:
happiness_bonus bonus -2 requires factions { spain, } and event_counter civil_war_spain_going_on 1
happiness_bonus bonus -2 requires factions { ghazni, } and event_counter civil_war_ghazni_going_on 1
happiness_bonus bonus -2 requires factions { france, } and event_counter civil_war_france_going_on 1
happiness_bonus bonus -2 requires factions { portugal, } and event_counter civil_war_portugal_going_on 1
happiness_bonus bonus -2 requires factions { england, } and event_counter civil_war_england_going_on 1
happiness_bonus bonus -2 requires factions { scotland, } and event_counter civil_war_scotland_going_on 1
happiness_bonus bonus -2 requires factions { norway, } and event_counter civil_war_norway_going_on 1
happiness_bonus bonus -2 requires factions { denmark, } and event_counter civil_war_denmark_going_on 1
happiness_bonus bonus -2 requires factions { hre, } and event_counter civil_war_hre_going_on 1
happiness_bonus bonus -2 requires factions { poland, } and event_counter civil_war_poland_going_on 1
happiness_bonus bonus -2 requires factions { hungary, } and event_counter civil_war_hungary_going_on 1
happiness_bonus bonus -2 requires factions { venice, } and event_counter civil_war_venice_going_on 1
happiness_bonus bonus -2 requires factions { sicily, } and event_counter civil_war_sicily_going_on 1
happiness_bonus bonus -2 requires factions { saxons, } and event_counter civil_war_saxons_going_on 1
happiness_bonus bonus -2 requires factions { milan, } and event_counter civil_war_milan_going_on 1
happiness_bonus bonus -2 requires factions { antioch, } and event_counter civil_war_antioch_going_on 1
happiness_bonus bonus -2 requires factions { teutonic_order, } and event_counter civil_war_teutonic_order_going_on 1
happiness_bonus bonus -2 requires factions { byzantium, } and event_counter civil_war_byzantium_going_on 1
happiness_bonus bonus -2 requires factions { timurids, } and event_counter civil_war_timurids_going_on 1
happiness_bonus bonus -2 requires factions { russia, } and event_counter civil_war_russia_going_on 1
happiness_bonus bonus -2 requires factions { bulgaria, } and event_counter civil_war_bulgaria_going_on 1
happiness_bonus bonus -2 requires factions { mongols, } and event_counter civil_war_mongols_going_on 1
happiness_bonus bonus -2 requires factions { lithuania, } and event_counter civil_war_lithuania_going_on 1
happiness_bonus bonus -2 requires factions { moors, } and event_counter civil_war_moors_going_on 1
happiness_bonus bonus -2 requires factions { turks, } and event_counter civil_war_turks_going_on 1
happiness_bonus bonus -2 requires factions { aztecs, } and event_counter civil_war_aztecs_going_on 1
happiness_bonus bonus -2 requires factions { wales, } and event_counter civil_war_wales_going_on 1
happiness_bonus bonus -2 requires factions { egypt, } and event_counter civil_war_egypt_going_on 1
happiness_bonus bonus -2 requires factions { georgia, } and event_counter civil_war_georgia_going_on 1
law_bonus bonus -1 requires factions { spain, } and event_counter civil_war_spain_going_on 1
law_bonus bonus -1 requires factions { ghazni, } and event_counter civil_war_ghazni_going_on 1
law_bonus bonus -1 requires factions { france, } and event_counter civil_war_france_going_on 1
law_bonus bonus -1 requires factions { portugal, } and event_counter civil_war_portugal_going_on 1
law_bonus bonus -1 requires factions { england, } and event_counter civil_war_england_going_on 1
law_bonus bonus -1 requires factions { scotland, } and event_counter civil_war_scotland_going_on 1
law_bonus bonus -1 requires factions { norway, } and event_counter civil_war_norway_going_on 1
law_bonus bonus -1 requires factions { denmark, } and event_counter civil_war_denmark_going_on 1
law_bonus bonus -1 requires factions { hre, } and event_counter civil_war_hre_going_on 1
law_bonus bonus -1 requires factions { poland, } and event_counter civil_war_poland_going_on 1
law_bonus bonus -1 requires factions { hungary, } and event_counter civil_war_hungary_going_on 1
law_bonus bonus -1 requires factions { venice, } and event_counter civil_war_venice_going_on 1
law_bonus bonus -1 requires factions { sicily, } and event_counter civil_war_sicily_going_on 1
law_bonus bonus -1 requires factions { saxons, } and event_counter civil_war_saxons_going_on 1
law_bonus bonus -1 requires factions { milan, } and event_counter civil_war_milan_going_on 1
law_bonus bonus -1 requires factions { antioch, } and event_counter civil_war_antioch_going_on 1
law_bonus bonus -1 requires factions { teutonic_order, } and event_counter civil_war_teutonic_order_going_on 1
law_bonus bonus -1 requires factions { byzantium, } and event_counter civil_war_byzantium_going_on 1
law_bonus bonus -1 requires factions { timurids, } and event_counter civil_war_timurids_going_on 1
law_bonus bonus -1 requires factions { russia, } and event_counter civil_war_russia_going_on 1
law_bonus bonus -1 requires factions { bulgaria, } and event_counter civil_war_bulgaria_going_on 1
law_bonus bonus -1 requires factions { mongols, } and event_counter civil_war_mongols_going_on 1
law_bonus bonus -1 requires factions { lithuania, } and event_counter civil_war_lithuania_going_on 1
law_bonus bonus -1 requires factions { moors, } and event_counter civil_war_moors_going_on 1
law_bonus bonus -1 requires factions { turks, } and event_counter civil_war_turks_going_on 1
law_bonus bonus -1 requires factions { aztecs, } and event_counter civil_war_aztecs_going_on 1
law_bonus bonus -1 requires factions { wales, } and event_counter civil_war_wales_going_on 1
law_bonus bonus -1 requires factions { egypt, } and event_counter civil_war_egypt_going_on 1
law_bonus bonus -1 requires factions { georgia, } and event_counter civil_war_georgia_going_on 1