Hearts of Iron IV

Hearts of Iron IV

League of Nations
yonihakam 21 Apr, 2020 @ 12:25pm
Voting Trigger
I was wondering....
Which file exactly and which part of that file is the part that countries choose to vote for or against?
I would like to edit it a bit. Because in every vote majority are against sanctions (even if the country has MORE than 50% threat.

Thanks
< >
Showing 1-3 of 3 comments
LimonenZitrone  [developer] 15 May, 2020 @ 10:42am 
That should be "league_of_nations_voting_yes_click" and "league_of_nations_voting_no_click" in the ai_weigts section in the 01 scripted gui file.
yonihakam 22 Sep, 2021 @ 9:57pm 
also how does the AI weighs it's vote for yes or no? by opinion of the target ? by % of threat of the target?
LimonenZitrone  [developer] 22 Sep, 2021 @ 11:07pm 
It is in the exact same file and position as I answered on the first question.
league_of_nations_voting_yes_click = { ai_will_do = { factor = 0 modifier = { surrender_progress > 0.5 any_country = { has_country_flag = target_of_league_of_nations_voting has_war_with = ROOT } add = 50 } modifier = { any_country = { has_country_flag = target_of_league_of_nations_voting has_offensive_war = yes } add = 10 } modifier = { any_country = { has_country_flag = target_of_league_of_nations_voting ROOT = { has_opinion = { target = PREV value < 0 } } } add = 5 } modifier = { any_country = { has_country_flag = started_league_of_nations_voting ROOT = { has_opinion = { target = PREV value > 50 } } } add = 5 } modifier = { has_capitulated = yes any_owned_state = { NOT = { is_controlled_by = ROOT } controller = { has_war_with = ROOT has_country_flag = target_of_league_of_nations_voting } } add = 100 } modifier = { check_variable = { league_of_nations_neutrality_random_chance_in_voting = 1 } add = 5 } modifier = { check_variable = { league_of_nations_neutrality_random_chance_in_voting = 2 } add = 10 } modifier = { check_variable = { league_of_nations_neutrality_random_chance_in_voting = 3 } add = 20 } modifier = { any_neighbor_country = { has_country_flag = target_of_league_of_nations_voting NOT = { check_variable = { league_of_nations_generated_threat < 40 } } } add = 10 } modifier = { any_country = { has_country_flag = target_of_league_of_nations_voting NOT = { is_neighbor_of = ROOT } NOT = { check_variable = { league_of_nations_generated_threat < 40 } } } add = 5 } modifier = { any_neighbor_country = { has_country_flag = target_of_league_of_nations_voting OR = { has_war_with = ROOT NOT = { check_variable = { league_of_nations_generated_threat < 20 } } ROOT = { has_opinion = { target = PREV value < 0 } } } } add = 10 } modifier = { any_country = { has_country_flag = target_of_league_of_nations_voting NOT = { is_neighbor_of = ROOT } OR = { has_war_with = ROOT NOT = { check_variable = { league_of_nations_generated_threat < 20 } } ROOT = { has_opinion = { target = PREV value < 0 } } } } add = 5 } modifier = { has_global_flag = ITA_ETH_voting add = 4 } modifier = { any_country = { has_country_flag = target_of_league_of_nations_voting has_country_flag = last_league_of_nations_threat_static_change has_country_flag = { flag = last_league_of_nations_threat_static_change days < 40 } OR = { check_variable = { last_league_of_nations_threat_static_change = 1 } check_variable = { last_league_of_nations_threat_static_change = 2 } } } add = 3 } modifier = { has_global_flag = league_of_nations_always_vote_yes_cheat_flag add = 10000 } } } league_of_nations_voting_no_click = { ai_will_do = { factor = 0 modifier = { check_variable = { league_of_nations_neutrality_random_chance_in_voting = 4 } add = 5 } modifier = { check_variable = { league_of_nations_neutrality_random_chance_in_voting = 5 } add = 10 } modifier = { check_variable = { league_of_nations_neutrality_random_chance_in_voting = 6 } add = 20 } modifier = { any_country = { has_country_flag = target_of_league_of_nations_voting NOT = { is_neighbor_of = ROOT } OR = { has_war_with = ROOT NOT = { check_variable = { league_of_nations_generated_threat < 20 } } ROOT = { has_opinion = { target = PREV value < 0 } } } } add = 5 } modifier = { any_neighbor_country = { has_country_flag = target_of_league_of_nations_voting NOT = { OR = { has_war_with = ROOT NOT = { check_variable = { league_of_nations_generated_threat < 20 } } ROOT = { has_opinion = { target = PREV value < 0 } } } } } add = 5 } modifier = { NOT = { has_global_flag = GER_anschluss_voting } NOT = { has_global_flag = ITA_ETH_voting } NOT = { has_global_flag = SOV_FIN_voting } any_country = { has_country_flag = target_of_league_of_nations_voting NOT = { is_neighbor_of = ROOT } NOT = { OR = { has_war_with = ROOT NOT = { check_variable = { league_of_nations_generated_threat < 20 } } ROOT = { has_opinion = { target = PREV value < 0 } } } } } add = 15 } modifier = { has_global_flag = GER_anschluss_voting add = 5 } modifier = { any_neighbor_country = { has_country_flag = target_of_league_of_nations_voting check_variable = { num_of_active_league_of_nations_trade_sanctions > 0 } } add = 2 } modifier = { any_country = { has_country_flag = target_of_league_of_nations_voting check_variable = { num_of_active_league_of_nations_trade_sanctions > 1 } } add = 2 } modifier = { any_country = { has_country_flag = target_of_league_of_nations_voting check_variable = { num_of_active_league_of_nations_trade_sanctions > 2 } } add = 2 } modifier = { any_country = { has_country_flag = target_of_league_of_nations_voting check_variable = { num_of_active_league_of_nations_trade_sanctions > 3 } } add = 3 } modifier = { any_country = { has_country_flag = target_of_league_of_nations_voting check_variable = { num_of_active_league_of_nations_trade_sanctions > 4 } } add = 3 } modifier = { any_country = { has_country_flag = target_of_league_of_nations_voting check_variable = { num_of_active_league_of_nations_trade_sanctions > 5 } } add = 5 } modifier = { any_country = { has_country_flag = target_of_league_of_nations_voting check_variable = { num_of_active_league_of_nations_trade_sanctions > 6 } } add = 5 } modifier = { any_country = { has_country_flag = target_of_league_of_nations_voting check_variable = { num_of_active_league_of_nations_trade_sanctions > 7 } } add = 5 } modifier = { any_country = { has_country_flag = target_of_league_of_nations_voting check_variable = { num_of_active_league_of_nations_trade_sanctions > 8 } } add = 5 } modifier = { is_subject = yes any_country = { has_country_flag = target_of_league_of_nations_voting ROOT = { is_subject_of = PREV } } add = 1000 } modifier = { any_country = { has_country_flag = target_of_league_of_nations_voting has_capitulated = yes } add = 10 } modifier = { any_country = { has_country_flag = target_of_league_of_nations_voting has_government = ROOT } add = 10 } modifier = { any_country = { has_country_flag = target_of_league_of_nations_voting is_in_faction_with = ROOT } add = 100 } modifier = { any_country = { has_country_flag = target_of_league_of_nations_voting NOT = { has_war_with = ROOT } } NOT = { any_neighbor_country = { OR = { has_country_flag = target_of_league_of_nations_voting any_neighbor_country = { OR = { has_country_flag = target_of_league_of_nations_voting any_neighbor_country = { OR = { has_country_flag = target_of_league_of_nations_voting any_neighbor_country = { has_country_flag = target_of_league_of_nations_voting } } } } } } } } add = 20 } modifier = { has_global_flag = league_of_nations_always_vote_no_cheat_flag add = 10000 } } }
< >
Showing 1-3 of 3 comments
Per page: 1530 50