00 On Actions
00 On Actions
00 On Actions
# country
on_new_term_election = {
random_events = {
100 = usa.6
100 = usa.7
100 = usa.8
100 = usa.9
100 = usa.10
100 = usa.11
100 = usa.12
}
random_events = {
100 = spain.9
100 = lar_spain.1
}
random_events = {
100 = election.2
100 = election.3
100 = election.4
100 = election.5
100 = election.6
100 = election.11
100 = election.12
100 = election.13
100 = election.14
100 = election.15
}
}
# Ace pilots
# country, FROM = ace
on_ace_promoted = {
random_events = {
100 = ace_promoted.1
5 = ace_promoted.2
}
}
random_events = {
100 = war_justification.1
100 = war_justification.2
100 = war_justification.3
100 = war_justification.4
100 = war_justification.5
100 = war_justification.6
100 = war_justification.7
100 = war_justification.8
100 = war_justification.9
100 = war_justification.10
100 = war_justification.11
100 = war_justification.12
100 = war_justification.13
100 = war_justification.14
100 = war_justification.15
100 = war_justification.16
100 = war_justification.17
100 = war_justification.18
100 = war_justification.19
17000 = 0
#Soviet demands
1000 = soviet.30
1000 = soviet.31
1000 = soviet.32
1000 = soviet.33
1000 = soviet.34
}
}
on_wargoal_expire = {
random_events = {
100 = war_justification.301
}
}
on_nuke_drop = {
effect = {
set_global_flag = first_nuke_dropped
if = {
limit = { NOT = { has_global_flag = first_nuke_dropped } }
country_event = { id = generic.8 }
}
if = {
limit = { has_idea = race_for_the_bomb_outclassed }
remove_ideas = race_for_the_bomb_outclassed
}
if = {
limit = { NOT = { has_country_flag =
achievement_has_dropped_nuke } }
goto_state = FROM
set_country_flag = achievement_has_dropped_nuke
}
if = {
limit = {
FROM = { state = 378 }
}
set_country_flag = achievement_has_nuked_california
}
if = {
limit = {
FROM = { is_core_of = AST }
}
set_country_flag = achievement_AST_nuke_self
}
if = {
limit = {
tag = SWE
FROM = {
is_owned_by = DEN
is_core_of = DEN
}
}
set_country_flag = achievement_med_plutonium
}
if = {
limit = {
FROM = {
is_core_of = JAP
}
has_global_flag = JAP_nuke_1
NOT = {
has_global_flag = JAP_nuke_2
}
}
set_global_flag = JAP_nuke_2
}
if = {
limit = {
FROM = {
is_core_of = JAP
}
NOT = {
has_global_flag = JAP_nuke_1
}
}
set_global_flag = JAP_nuke_1
}
#on_five_year_pulse = {
#
#}
on_border_war_lost = {
effect = {
owner = {
country_event = { id = china.14 }
country_event = { id = china.16 }
}
}
}
on_leave_faction = {
effect = {
if = {
limit = {
AND = {
tag = CAN
NOT = { has_dlc = "Together for Victory" }
}
}
abandon_colony_tag = yes
}
FROM = {
add_opinion_modifier = {
modifier = faction_traitor
target = ROOT
days = 365
}
add_opinion_modifier = {
modifier = faction_traitor_trade
target = ROOT
days = 365
}
}
}
}
#FROM is faction leader on join faction requests. THIS DOES NOT FIRE ON
ADD_TO_FACTION EFFECT! USE ON_OFFER_JOIN_FACTION!
on_join_faction = {
effect = {
set_country_flag = achievement_has_joined_faction
#Remove anti_soviet_pact if joining commie Soviet in faction
if = {
limit = {
has_idea = anti_soviet_pact
FROM = {
original_tag = SOV
has_government = communism
}
}
remove_ideas = anti_soviet_pact
}
if = {
limit = {
FROM = {
has_civil_war = yes
original_tag = SPR
}
has_civil_war = yes
original_tag = SPR
}
random_country = {
limit = {
original_tag = FRA
OR = {
has_completed_focus =
FRA_right_wing_rhetoric
has_completed_focus =
FRA_utilize_the_leagues
}
}
country_event = { id = france.32 }
}
}
}
}
if = {
limit = {
original_tag = POL
has_government = neutrality
}
retire_country_leader = yes
}
if = {
limit = {
original_tag = YUG
}
remove_ideas = YUG_idea_economic_aid
}
if = {
limit = {
original_tag = DEN
}
country_event = { id = wtt_denmark.1 days = 1 }
}
if = {
limit = {
original_tag = FRA
has_government = democratic
NOT = { has_global_flag =
achievement_france_surrender } #might as well use the achievement flag to check if
france.10 fired
is_subject = no
is_in_faction_with = ENG
has_war_with = GER
}
country_event = france.10
}
}
}
on_government_change = {
effect = {
#Make sure Soviet can always create factions
if = {
limit = {
original_tag = SOV
NOT = { has_government = communism }
}
set_rule = { can_create_factions = yes }
}
if = {
limit = { has_government = democratic }
if = {
limit = { has_idea =
democratic_opposition_voicing_protests }
remove_ideas = democratic_opposition_voicing_protests
}
if = {
limit = { has_idea = democratic_revolutionaries }
remove_ideas = democratic_revolutionaries
}
if = {
limit = { has_idea = reign_of_terror }
remove_ideas = reign_of_terror
}
}
if = {
limit = { has_government = communism }
if = {
limit = { TAG = SAF }
set_cosmetic_tag = SAF_COM
}
if = {
limit = { has_idea = communist_partisans_recruiting }
remove_ideas = communist_partisans_recruiting
}
if = {
limit = { has_idea = communist_revolutionaries }
remove_ideas = communist_revolutionaries
}
if = {
limit = { has_idea = communism_defeated }
remove_ideas = communism_defeated
}
#Remove anti_soviet_pact
if = {
limit = { has_idea = anti_soviet_pact }
remove_ideas = anti_soviet_pact
}
}
if = {
limit = { has_government = fascism }
if = {
limit = { has_idea = fascist_assault_divisions }
remove_ideas = fascist_assault_divisions
}
if = {
limit = { has_idea = fascist_revolutionaries }
remove_ideas = fascist_revolutionaries
}
if = {
limit = { has_idea = fascism_defeated }
remove_ideas = fascism_defeated
}
if = {
limit = { has_idea = anti_nazi_coup }
remove_ideas = anti_nazi_coup
}
}
#Replace the following two with events for SOV if they are not
communist.
#if = {
# limit = {
# OR = {
# has_idea = trotskyite_plot
# has_idea = trotskyite_plot_purged
# }
# NOT = {
# has_civil_war = yes
# }
# }
# country_event = { id = soviet.54 }
#}
}
}
on_coup_succeeded = {
effect = {
#Turn elections on for democracies created from coup
random_other_country = {
limit = {
has_government = democratic
original_tag = ROOT
}
set_politics = {
ruling_party = democratic
elections_allowed = yes
}
}
}
}
#ROOT is winner #FROM gets annexed - This will also fire on_annex
on_civil_war_end = {
effect = {
#End of SCW
if = {
limit = {
NOT = { has_dlc = "La Resistance" }
FROM = {
original_tag = SPR
}
ROOT = {
original_tag = SPR
has_government = fascism
}
}
if = {
limit = {
OR = {
is_historical_focus_on = no
has_completed_focus =
SPA_supremacy_of_the_communion
}
}
add_timed_idea = { idea =
SPA_recovering_from_civil_war days = 1825 }
}
if = {
limit = {
is_historical_focus_on = yes
NOT = {
has_completed_focus =
SPA_supremacy_of_the_communion
}
}
add_ideas = SPA_recovering_from_civil_war #keep the
spirit on historical mode, keeping them out of the war
}
}
#End of SCW
if = {
limit = {
FROM = {
original_tag = SPR
}
ROOT = {
original_tag = SPR
OR = {
has_government = democratic
has_government = communism
}
}
}
ROOT = {
set_country_flag = achievement_won_spanish_civil_war
}
}
if = {
limit = {
has_government = democratic
}
set_politics = {
ruling_party = democratic
elections_allowed = yes
}
}
#End of German Civil War
if = {
limit = {
FROM = {
original_tag = GER
has_government = fascism
}
original_tag = GER
has_government = neutrality
NOT = { is_subject_of = HOL }
}
set_global_flag = { flag = civil_war_olympics value = 1
days = 30 }
country_event = { id = wtt_germany.18 days = 1 }
}
#End of US civil war
if = {
limit = {
original_tag = USA
OR = {
has_government = neutrality
has_government = fascism
}
}
news_event = { id = mtg_news.7 days = 4 random_days = 5 }
}
#End of ideology Civil War
if = {
limit = {
has_country_flag = ideology_civil_war
}
clr_country_flag = ideology_civil_war
set_country_flag = { flag = won_ideology_civil_war value =
1 days = 365 }
country_event = { id = generic.11 days = 1 }
}
}
}
on_puppet = {
effect = {
if = {
limit = {
OR = {
original_tag = DDR
original_tag = WGR
original_tag = GER
}
has_government = communism
has_country_leader = { name = "Wilhelm Pieck" }
FROM = {
original_tag = SOV
has_government = communism
has_country_leader = { name = "Joseph Stalin" }
# Would look silly if Trotsky released Stalin's Puppet
}
}
add_country_leader_trait = stalins_puppet
}
if = {
limit = {
NOT = { has_elections = yes }
has_government = democratic
}
set_politics = {
ruling_party = democratic
elections_allowed = yes
}
}
}
}
#used when puppeting through the occupied territories menu during peace time
(or when releasing from non-core but owned territory, f.e. Britain releasing Egypt)
#ROOT = nation being released, FROM = overlord
on_release_as_puppet = {
effect = {
if = {
limit = {
OR = {
original_tag = DDR
original_tag = WGR
original_tag = GER
}
has_government = communism
has_country_leader = { name = "Wilhelm Pieck" }
FROM = {
original_tag = SOV
has_government = communism
has_country_leader = { name = "Joseph Stalin" }
# Would look silly if Trotsky released Stalin's Puppet
}
}
add_country_leader_trait = stalins_puppet
}
if = {
limit = {
NOT = { has_elections = yes }
has_government = democratic
}
set_politics = {
ruling_party = democratic
elections_allowed = yes
}
}
}
}
#ROOT is winner #FROM gets annexed - For civil wars on_civil_war_end is also
fired
on_annex = {
effect = {
every_country = {
limit = {
OR = {
original_tag = RAJ
original_tag = CAN
original_tag = MAL
original_tag = INS
}
is_puppet = no
}
abandon_colony_tag = yes
}
}
}
on_unit_leader_level_up = {
effect = {
}
}
on_army_leader_promoted = {
effect = {
add_timed_unit_leader_trait = {
trait = recently_promoted
days = 100
}
}
}