scripted_gui = {

	tpt_main_container = {
	
		context_type = selected_country_context
		
		window_name = "tpt_main_container"
		
		visible = {
			ROOT = {
				is_ai = no
				has_global_flag = tpt_enabled
				OR = {
					has_country_flag = tp_is_host
					NOT = {
						has_global_flag = tp_is_multiplayer
					}
				}
			}
		}
		
		effects = {
			tpt_tab_button_frame_1a_click = {
				set_global_flag = tpt_window_a
				clr_global_flag = tpt_window_b
				clr_global_flag = tpt_window_c
				clr_global_flag = tpt_window_d
				clr_global_flag = tpt_window_e
			}
			tpt_tab_button_frame_1b_click = {
				set_global_flag = tpt_window_b
				clr_global_flag = tpt_window_a
				clr_global_flag = tpt_window_c
				clr_global_flag = tpt_window_d
				clr_global_flag = tpt_window_e
			}
			tpt_tab_button_frame_1c_click = {
				clr_global_flag = tpt_window_b
				clr_global_flag = tpt_window_a
				set_global_flag = tpt_window_c
				clr_global_flag = tpt_window_d
				clr_global_flag = tpt_window_e
			}
			tpt_tab_button_frame_1d_click = {
				clr_global_flag = tpt_window_b
				clr_global_flag = tpt_window_a
				clr_global_flag = tpt_window_c
				set_global_flag = tpt_window_d
				clr_global_flag = tpt_window_e
			}
			tpt_tab_button_frame_1e_click = {
				clr_global_flag = tpt_window_b
				clr_global_flag = tpt_window_a
				clr_global_flag = tpt_window_c
				clr_global_flag = tpt_window_d
				set_global_flag = tpt_window_e
			}
			tpt_tab_switch_button_click = {
				if = {
					limit = { has_global_flag = tpt_window_e }
					clr_global_flag = tpt_window_e
					set_global_flag = tpt_window_a
					set_global_flag = tpt_window_stop
				}
				if = {
					limit = { has_global_flag = tpt_window_d }
					clr_global_flag = tpt_window_d
					set_global_flag = tpt_window_e
				}
				if = {
					limit = { has_global_flag = tpt_window_c }
					clr_global_flag = tpt_window_c
					set_global_flag = tpt_window_d
				}
				if = {
					limit = { has_global_flag = tpt_window_b }
					clr_global_flag = tpt_window_b
					set_global_flag = tpt_window_c
				}
				if = {
					limit = {
						has_global_flag = tpt_window_a
						NOT = { has_global_flag = tpt_window_stop }
					}
					clr_global_flag = tpt_window_a
					set_global_flag = tpt_window_b
				}
				clr_global_flag = tpt_window_stop
			}
			tpt_marker_click = {
				set_country_flag = tpt_actor
			}
			tpt_unmarker_click = {
				clr_country_flag = tpt_actor
			}
			tpt_unmark_all_click = {
				every_country = {
					limit = { has_country_flag = tpt_actor }
					clr_country_flag = tpt_actor
				}
			}
			tpt_mark_ideology_click = {
				if = {
					limit = { has_government = fascism }
					every_country = {
						limit = { has_government = fascism }
						set_country_flag = tpt_actor
					}
				}
				if = {
					limit = { has_government = communism }
					every_country = {
						limit = { has_government = communism }
						set_country_flag = tpt_actor
					}
				}
				if = {
					limit = { has_government = democratic }
					every_country = {
						limit = { has_government = democratic }
						set_country_flag = tpt_actor
					}
				}
				if = {
					limit = { has_government = neutrality }
					every_country = {
						limit = { has_government = neutrality }
						set_country_flag = tpt_actor
					}
				}
			}
### RESEARCH ###

			tpt_remove_rs_slot_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					if = {
						limit = {
							NOT = { has_country_flag = original_amount_rs_slots }
						}
						set_variable = { THIS.original_amount_rs_slots = THIS.amount_research_slots }
						set_country_flag = original_amount_rs_slots
					}
					add_research_slot = -1
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						if = {
							limit = {
								NOT = { has_country_flag = original_amount_rs_slots }
							}
							set_variable = { THIS.original_amount_rs_slots = THIS.amount_research_slots }
							set_country_flag = original_amount_rs_slots
						}
						add_research_slot = -1
						clr_country_flag = tpt_actor
					}
				}
			}
			tpt_remove_rs_slot_shift_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					if = {
						limit = {
							NOT = { has_country_flag = original_amount_rs_slots }
						}
						set_variable = { THIS.original_amount_rs_slots = THIS.amount_research_slots }
						set_country_flag = original_amount_rs_slots
					}
					add_research_slot = -5
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						if = {
							limit = {
								NOT = { has_country_flag = original_amount_rs_slots }
							}
							set_variable = { THIS.original_amount_rs_slots = THIS.amount_research_slots }
							set_country_flag = original_amount_rs_slots
						}
						add_research_slot = -5
						clr_country_flag = tpt_actor
					}
				}
			}
			tpt_add_rs_slot_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					if = {
						limit = {
							NOT = { has_country_flag = original_amount_rs_slots }
						}
						set_variable = { THIS.original_amount_rs_slots = THIS.amount_research_slots }
						set_country_flag = original_amount_rs_slots
					}
					add_research_slot = 1
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						if = {
							limit = {
								NOT = { has_country_flag = original_amount_rs_slots }
							}
							set_variable = { THIS.original_amount_rs_slots = THIS.amount_research_slots }
							set_country_flag = original_amount_rs_slots
						}
						add_research_slot = 1
						clr_country_flag = tpt_actor
					}
				}
			}
			tpt_add_rs_slot_shift_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					if = {
						limit = {
							NOT = { has_country_flag = original_amount_rs_slots }
						}
						set_variable = { THIS.original_amount_rs_slots = THIS.amount_research_slots }
						set_country_flag = original_amount_rs_slots
					}
					add_research_slot = 5
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						if = {
							limit = {
								NOT = { has_country_flag = original_amount_rs_slots }
							}
							set_variable = { THIS.original_amount_rs_slots = THIS.amount_research_slots }
							set_country_flag = original_amount_rs_slots
						}
						add_research_slot = 5
						clr_country_flag = tpt_actor
					}
				}
			}
			tpt_set_0_rs_slots_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					if = {
						limit = {
							NOT = { has_country_flag = original_amount_rs_slots }
						}
						set_variable = { THIS.original_amount_rs_slots = THIS.amount_research_slots }
						set_country_flag = original_amount_rs_slots
					}
					set_research_slots = 0
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						if = {
							limit = {
								NOT = { has_country_flag = original_amount_rs_slots }
							}
							set_variable = { THIS.original_amount_rs_slots = THIS.amount_research_slots }
							set_country_flag = original_amount_rs_slots
						}
						set_research_slots = 0
						clr_country_flag = tpt_actor
					}
				}
			}
			tpt_set_100_rs_slots_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					if = {
						limit = {
							NOT = { has_country_flag = original_amount_rs_slots }
						}
						set_variable = { THIS.original_amount_rs_slots = THIS.amount_research_slots }
						set_country_flag = original_amount_rs_slots
					}
					set_research_slots = 100
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						if = {
							limit = {
								NOT = { has_country_flag = original_amount_rs_slots }
							}
							set_variable = { THIS.original_amount_rs_slots = THIS.amount_research_slots }
							set_country_flag = original_amount_rs_slots
						}
						set_research_slots = 100
						clr_country_flag = tpt_actor
					}
				}
			}
			tpt_reset_rs_slots_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					if = {
						limit = {
							NOT = { has_country_flag = original_amount_rs_slots }
						}
						set_variable = { THIS.original_amount_rs_slots = THIS.amount_research_slots }
						set_country_flag = original_amount_rs_slots
					}
					set_research_slots = original_amount_rs_slots
					clr_country_flag = original_amount_rs_slots
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						if = {
							limit = {
								NOT = { has_country_flag = original_amount_rs_slots }
							}
							set_variable = { THIS.original_amount_rs_slots = THIS.amount_research_slots }
							set_country_flag = original_amount_rs_slots
						}
						set_research_slots = original_amount_rs_slots
						clr_country_flag = tpt_actor
						clr_country_flag = original_amount_rs_slots
					}
				}
			}
			tpt_add_breakthrough_land_1_click = {
				add_breakthrough_points = {
					specialization = specialization_land
					value = 1
				}
			}
			tpt_add_breakthrough_land_5_click = {
				add_breakthrough_points = {
					specialization = specialization_land
					value = 5
				}
			}
			tpt_add_breakthrough_navy_1_click = {
				add_breakthrough_points = {
					specialization = specialization_naval
			    	value = 1
				}
			}
			tpt_add_breakthrough_navy_5_click = {
				add_breakthrough_points = {
					specialization = specialization_naval
			    	value = 5
				}
			}
			tpt_add_breakthrough_air_1_click = {
				add_breakthrough_points = {
					specialization = specialization_air
			    	value = 1
				}
			}
			tpt_add_breakthrough_air_5_click = {
				add_breakthrough_points = {
					specialization = specialization_air
			    	value = 5
				}
			}
			tpt_add_breakthrough_nuclear_1_click = {
				add_breakthrough_points = {
					specialization = specialization_nuclear
			    	value = 1
				}
			}
			tpt_add_breakthrough_nuclear_5_click = {
				add_breakthrough_points = {
					specialization = specialization_nuclear
			    	value = 5
				}
			}
### COUNTRY ###
			tpt_add_fascism_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 8 }
					if = {
						limit = {
							NOT = { has_idea = tp_fascist_nation }
						}
						add_ideas = tp_fascist_nation
						else = { remove_ideas = tp_fascist_nation }
					}
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = {
							has_country_flag = tpt_actor
							NOT = { has_idea = tp_fascist_nation }
						}
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 8 }
						add_ideas = tp_fascist_nation
						every_other_country = {
							limit = { has_country_flag = tpt_actor }
							remove_ideas = tp_fascist_nation
							clr_country_flag = tpt_actor
						}
						clr_country_flag = tpt_actor
					}
				}
			}
			tpt_ban_fascism_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 8 }
					if = {
						limit = {
							NOT = { has_idea = tp_fascism_banned }
						}
						add_ideas = tp_fascism_banned
						else = { remove_ideas = tp_fascism_banned }
					}
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = {
							has_country_flag = tpt_actor
							NOT = { has_idea = tp_fascism_banned }
						}
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 8 }
						add_ideas = tp_fascism_banned
						every_other_country = {
							limit = { has_country_flag = tpt_actor }
							remove_ideas = tp_fascism_banned
							clr_country_flag = tpt_actor
						}
						clr_country_flag = tpt_actor
					}
				}
			}
			tpt_add_communism_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 8 }
					if = {
						limit = {
							NOT = { has_idea = tp_communist_nation }
						}
						add_ideas = tp_communist_nation
						else = { remove_ideas = tp_communist_nation }
					}
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = {
							has_country_flag = tpt_actor
							NOT = { has_idea = tp_communist_nation }
						}
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 8 }
						add_ideas = tp_communist_nation
						every_other_country = {
							limit = { has_country_flag = tpt_actor }
							remove_ideas = tp_communist_nation
							clr_country_flag = tpt_actor
						}
						clr_country_flag = tpt_actor
					}
				}
			}
			tpt_ban_communism_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 8 }
					if = {
						limit = {
							NOT = { has_idea = tp_communism_banned }
						}
						add_ideas = tp_communism_banned
						else = { remove_ideas = tp_communism_banned }
					}
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = {
							has_country_flag = tpt_actor
							NOT = { has_idea = tp_communism_banned }
						}
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 8 }
						add_ideas = tp_communism_banned
						every_other_country = {
							limit = { has_country_flag = tpt_actor }
							remove_ideas = tp_communism_banned
							clr_country_flag = tpt_actor
						}
						clr_country_flag = tpt_actor
					}
				}
			}
			tpt_add_democratic_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 8 }
					if = {
						limit = {
							NOT = { has_idea = tp_democratic_nation }
						}
						add_ideas = tp_democratic_nation
						else = { remove_ideas = tp_democratic_nation }
					}
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = {
							has_country_flag = tpt_actor
							NOT = { has_idea = tp_democratic_nation }
						}
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 8 }
						add_ideas = tp_democratic_nation
						every_other_country = {
							limit = { has_country_flag = tpt_actor }
							remove_ideas = tp_democratic_nation
							clr_country_flag = tpt_actor
						}
						clr_country_flag = tpt_actor
					}
				}
			}
			tpt_ban_democratic_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 8 }
					if = {
						limit = {
							NOT = { has_idea = tp_democratic_banned }
						}
						add_ideas = tp_democratic_banned
						else = { remove_ideas = tp_democratic_banned }
					}
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = {
							has_country_flag = tpt_actor
							NOT = { has_idea = tp_democratic_banned }
						}
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 8 }
						add_ideas = tp_democratic_banned
						every_other_country = {
							limit = { has_country_flag = tpt_actor }
							remove_ideas = tp_democratic_banned
							clr_country_flag = tpt_actor
						}
						clr_country_flag = tpt_actor
					}
				}
			}
			tpt_add_neutrality_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 8 }
					if = {
						limit = {
							NOT = { has_idea = tp_neutral_nation }
						}
						add_ideas = tp_neutral_nation
						else = { remove_ideas = tp_neutral_nation }
					}
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = {
							has_country_flag = tpt_actor
							NOT = { has_idea = tp_neutral_nation }
						}
						add_ideas = tp_neutral_nation
						every_other_country = {
							limit = { has_country_flag = tpt_actor }
							toolpack_cycle_action_log_variables = yes
							add_to_array = { global.toolpack_mp_action_array_targets = THIS }
							add_to_array = { global.toolpack_mp_action_array = 8 }
							remove_ideas = tp_neutral_nation
							clr_country_flag = tpt_actor
						}
						clr_country_flag = tpt_actor
					}
				}
			}
			tpt_ban_neutrality_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 8 }
					if = {
						limit = {
							NOT = { has_idea = tp_neutrality_banned }
						}
						add_ideas = tp_neutrality_banned
						else = { remove_ideas = tp_neutrality_banned }
					}
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = {
							has_country_flag = tpt_actor
							NOT = { has_idea = tp_neutrality_banned }
						}
						add_ideas = tp_neutrality_banned
						every_other_country = {
							limit = { has_country_flag = tpt_actor }
							remove_ideas = tp_neutrality_banned
							clr_country_flag = tpt_actor
						}
						clr_country_flag = tpt_actor
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 8 }
					}
				}
			}
			tpt_fascist_on_click = {
				set_global_flag = tpt_fascist
			}
			tpt_fascist_off_click = {
				clr_global_flag = tpt_fascist
			}
			tpt_communist_on_click = {
				set_global_flag = tpt_communist
			}
			tpt_communist_off_click = {
				clr_global_flag = tpt_communist
			}
			tpt_democratic_on_click = {
				set_global_flag = tpt_democratic
			}
			tpt_democratic_off_click = {
				clr_global_flag = tpt_democratic
			}
			tpt_neutral_on_click = {
				set_global_flag = tpt_neutral
			}
			tpt_neutral_off_click = {
				clr_global_flag = tpt_neutral
			}
			tpt_enable_elections_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					set_politics = {
						ruling_party = THIS
						elections_allowed = yes
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 8 }
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = {
							has_country_flag = tpt_actor
						}
						set_politics = {
							ruling_party = THIS
							elections_allowed = yes
						}
						clr_country_flag = tpt_actor
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 8 }
					}
				}
			}
			tpt_disable_elections_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					set_politics = {
						ruling_party = THIS
						elections_allowed = no
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 8 }
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = {
							has_country_flag = tpt_actor
						}
						set_politics = {
							ruling_party = THIS
							elections_allowed = no
						}
						clr_country_flag = tpt_actor
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 8 }
					}
				}
			}
			tpt_kill_country_leader_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					kill_country_leader = yes
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 8 }
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = {
							has_country_flag = tpt_actor
						}
						kill_country_leader = yes
						clr_country_flag = tpt_actor
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 8 }
					}
				}
			}
			tpt_change_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 8 }
					if = {
						limit = {
							has_global_flag = tpt_fascist
						}
						set_politics = { ruling_party = fascism }
					}
					if = {
						limit = {
							has_global_flag = tpt_communist
						}
						set_politics = { ruling_party = communism }
					}
					if = {
						limit = {
							has_global_flag = tpt_democratic
						}
						set_politics = { ruling_party = democratic }
					}
					if = {
						limit = {
							has_global_flag = tpt_neutral
						}
						set_politics = { ruling_party = neutrality }
					}
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 8 }
						if = {
							limit = {
								has_global_flag = tpt_fascist
							}
							set_politics = { ruling_party = fascism }
						}
						if = {
							limit = {
								has_global_flag = tpt_communist
							}
							set_politics = { ruling_party = communism }
						}
						if = {
							limit = {
								has_global_flag = tpt_democratic
							}
							set_politics = { ruling_party = democratic }
						}
						if = {
							limit = {
								has_global_flag = tpt_neutral
							}
							set_politics = { ruling_party = neutrality }
						}
						clr_country_flag = tpt_actor
					}
				}
			}
			tpt_add_5_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 8 }
					if = {
						limit = {
							has_global_flag = tpt_fascist
						}
						add_popularity = {
							ideology = fascism
							popularity = 0.05
						}
					}
					if = {
						limit = {
							has_global_flag = tpt_communist
						}
						add_popularity = {
							ideology = communism
							popularity = 0.05
						}
					}
					if = {
						limit = {
							has_global_flag = tpt_democratic
						}
						add_popularity = {
							ideology = democratic
							popularity = 0.05
						}
					}
					if = {
						limit = {
							has_global_flag = tpt_neutral
						}
						add_popularity = {
							ideology = neutrality
							popularity = 0.05
						}
					}
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 8 }
						if = {
							limit = {
								has_global_flag = tpt_fascist
							}
							add_popularity = {
								ideology = fascism
								popularity = 0.05
							}
						}
						if = {
							limit = {
								has_global_flag = tpt_communist
							}
							add_popularity = {
								ideology = communism
								popularity = 0.05
							}
						}
						if = {
							limit = {
								has_global_flag = tpt_democratic
							}
							add_popularity = {
								ideology = democratic
								popularity = 0.05
							}
						}
						if = {
							limit = {
								has_global_flag = tpt_neutral
							}
							add_popularity = {
								ideology = neutrality
								popularity = 0.05
							}
						}
						clr_country_flag = tpt_actor
					}
				}
			}
			tpt_subtract_5_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 8 }
					if = {
						limit = {
							has_global_flag = tpt_fascist
						}
						add_popularity = {
							ideology = fascism
							popularity = -0.05
						}
					}
					if = {
						limit = {
							has_global_flag = tpt_communist
						}
						add_popularity = {
							ideology = communism
							popularity = -0.05
						}
					}
					if = {
						limit = {
							has_global_flag = tpt_democratic
						}
						add_popularity = {
							ideology = democratic
							popularity = -0.05
						}
					}
					if = {
						limit = {
							has_global_flag = tpt_neutral
						}
						add_popularity = {
							ideology = neutrality
							popularity = -0.05
						}
					}
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 8 }
						if = {
							limit = {
								has_global_flag = tpt_fascist
							}
							add_popularity = {
								ideology = fascism
								popularity = -0.05
							}
						}
						if = {
							limit = {
								has_global_flag = tpt_communist
							}
							add_popularity = {
								ideology = communism
								popularity = -0.05
							}
						}
						if = {
							limit = {
								has_global_flag = tpt_democratic
							}
							add_popularity = {
								ideology = democratic
								popularity = -0.05
							}
						}
						if = {
							limit = {
								has_global_flag = tpt_neutral
							}
							add_popularity = {
								ideology = neutrality
								popularity = -0.05
							}
						}
						clr_country_flag = tpt_actor
					}
				}
			}
			tpt_add_10_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 8 }
					if = {
						limit = {
							has_global_flag = tpt_fascist
						}
						add_popularity = {
							ideology = fascism
							popularity = 0.10
						}
					}
					if = {
						limit = {
							has_global_flag = tpt_communist
						}
						add_popularity = {
							ideology = communism
							popularity = 0.10
						}
					}
					if = {
						limit = {
							has_global_flag = tpt_democratic
						}
						add_popularity = {
							ideology = democratic
							popularity = 0.10
						}
					}
					if = {
						limit = {
							has_global_flag = tpt_neutral
						}
						add_popularity = {
							ideology = neutrality
							popularity = 0.10
						}
					}
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 8 }
						if = {
							limit = {
								has_global_flag = tpt_fascist
							}
							add_popularity = {
								ideology = fascism
								popularity = 0.10
							}
						}
						if = {
							limit = {
								has_global_flag = tpt_communist
							}
							add_popularity = {
								ideology = communism
								popularity = 0.10
							}
						}
						if = {
							limit = {
								has_global_flag = tpt_democratic
							}
							add_popularity = {
								ideology = democratic
								popularity = 0.10
							}
						}
						if = {
							limit = {
								has_global_flag = tpt_neutral
							}
							add_popularity = {
								ideology = neutrality
								popularity = 0.10
							}
						}
						clr_country_flag = tpt_actor
					}
				}
			}
			tpt_subtract_10_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 8 }
					if = {
						limit = {
							has_global_flag = tpt_fascist
						}
						add_popularity = {
							ideology = fascism
							popularity = -0.10
						}
					}
					if = {
						limit = {
							has_global_flag = tpt_communist
						}
						add_popularity = {
							ideology = communism
							popularity = -0.10
						}
					}
					if = {
						limit = {
							has_global_flag = tpt_democratic
						}
						add_popularity = {
							ideology = democratic
							popularity = -0.10
						}
					}
					if = {
						limit = {
							has_global_flag = tpt_neutral
						}
						add_popularity = {
							ideology = neutrality
							popularity = -0.10
						}
					}
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 8 }
						if = {
							limit = {
								has_global_flag = tpt_fascist
							}
							add_popularity = {
								ideology = fascism
								popularity = -0.10
							}
						}
						if = {
							limit = {
								has_global_flag = tpt_communist
							}
							add_popularity = {
								ideology = communism
								popularity = -0.10
							}
						}
						if = {
							limit = {
								has_global_flag = tpt_democratic
							}
							add_popularity = {
								ideology = democratic
								popularity = -0.10
							}
						}
						if = {
							limit = {
								has_global_flag = tpt_neutral
							}
							add_popularity = {
								ideology = neutrality
								popularity = -0.10
							}
						}
						clr_country_flag = tpt_actor
					}
				}
			}
			tpt_add_50_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 8 }
					if = {
						limit = {
							has_global_flag = tpt_fascist
						}
						add_popularity = {
							ideology = fascism
							popularity = 0.50
						}
					}
					if = {
						limit = {
							has_global_flag = tpt_communist
						}
						add_popularity = {
							ideology = communism
							popularity = 0.50
						}
					}
					if = {
						limit = {
							has_global_flag = tpt_democratic
						}
						add_popularity = {
							ideology = democratic
							popularity = 0.50
						}
					}
					if = {
						limit = {
							has_global_flag = tpt_neutral
						}
						add_popularity = {
							ideology = neutrality
							popularity = 0.50
						}
					}
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 8 }
						if = {
							limit = {
								has_global_flag = tpt_fascist
							}
							add_popularity = {
								ideology = fascism
								popularity = 0.50
							}
						}
						if = {
							limit = {
								has_global_flag = tpt_communist
							}
							add_popularity = {
								ideology = communism
								popularity = 0.50
							}
						}
						if = {
							limit = {
								has_global_flag = tpt_democratic
							}
							add_popularity = {
								ideology = democratic
								popularity = 0.50
							}
						}
						if = {
							limit = {
								has_global_flag = tpt_neutral
							}
							add_popularity = {
								ideology = neutrality
								popularity = 0.50
							}
						}
						clr_country_flag = tpt_actor
					}
				}
			}
			tpt_subtract_50_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 8 }
					if = {
						limit = {
							has_global_flag = tpt_fascist
						}
						add_popularity = {
							ideology = fascism
							popularity = -0.50
						}
					}
					if = {
						limit = {
							has_global_flag = tpt_communist
						}
						add_popularity = {
							ideology = communism
							popularity = -0.50
						}
					}
					if = {
						limit = {
							has_global_flag = tpt_democratic
						}
						add_popularity = {
							ideology = democratic
							popularity = -0.50
						}
					}
					if = {
						limit = {
							has_global_flag = tpt_neutral
						}
						add_popularity = {
							ideology = neutrality
							popularity = -0.50
						}
					}
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 8 }
						if = {
							limit = {
								has_global_flag = tpt_fascist
							}
							add_popularity = {
								ideology = fascism
								popularity = -0.50
							}
						}
						if = {
							limit = {
								has_global_flag = tpt_communist
							}
							add_popularity = {
								ideology = communism
								popularity = -0.50
							}
						}
						if = {
							limit = {
								has_global_flag = tpt_democratic
							}
							add_popularity = {
								ideology = democratic
								popularity = -0.50
							}
						}
						if = {
							limit = {
								has_global_flag = tpt_neutral
							}
							add_popularity = {
								ideology = neutrality
								popularity = -0.50
							}
						}
						clr_country_flag = tpt_actor
					}
				}
			}
### DIPLOMACY ###
			tpt_guarantee_click = {
				custom_effect_tooltip = TPT_GUARANTEE
				every_country = {
					limit = { has_country_flag = tpt_actor }
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 7 }
					give_guarantee = FROM
					clr_country_flag = tpt_actor
				}
			}
			tpt_no_guarantee_click = {
				custom_effect_tooltip = TPT_UNGUARANTEE
				every_country = {
					limit = { has_country_flag = tpt_actor }
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 7 }
					diplomatic_relation = {
						country = FROM
						relation = guarantee
						active = no
					}
					clr_country_flag = tpt_actor
				}
			}
			tpt_remove_all_guarantees_click = {
				custom_effect_tooltip = TPT_REMOVE_ALL_GUARANTEES
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					every_country = {
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 7 }
						diplomatic_relation = {
							country = FROM
							relation = guarantee
							active = no
						}
					}
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						every_country = {
							diplomatic_relation = {
								country = PREV
								relation = guarantee
								active = no
							}
						}
						clr_country_flag = tpt_actor
					}
				}
			}
			tpt_access_click = {
				custom_effect_tooltip = TPT_ACCESS
				every_country = {
					limit = { has_country_flag = tpt_actor }
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 7 }
					FROM = { give_military_access = PREV }
					clr_country_flag = tpt_actor
				}
			}
			tpt_no_access_click = {
				custom_effect_tooltip = TPT_UNACCESS
				every_country = {
					limit = { has_country_flag = tpt_actor }
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 7 }
					FROM = {
						diplomatic_relation = {
							country = PREV
							relation = military_access
							active = no
						}
					}
					clr_country_flag = tpt_actor
				}
			}
			tpt_remove_all_access_click = {
				custom_effect_tooltip = TPT_REMOVE_ALL_ACCESS
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					every_country = {
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 7 }
						diplomatic_relation = {
							country = FROM
							relation = military_access
							active = no
						}
					}
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						every_country = {
							toolpack_cycle_action_log_variables = yes
							add_to_array = { global.toolpack_mp_action_array_targets = THIS }
							add_to_array = { global.toolpack_mp_action_array = 7 }
							diplomatic_relation = {
								country = PREV
								relation = military_access
								active = no
							}
						}
						clr_country_flag = tpt_actor
					}
				}
			}
			tpt_nap_click = {
				custom_effect_tooltip = TPT_NAP
				every_country = {
					limit = { has_country_flag = tpt_actor }
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 7 }
					FROM = {
						diplomatic_relation = {
							country = PREV
							relation = non_aggression_pact
							active = yes
						}
					}
					clr_country_flag = tpt_actor
				}
			}
			tpt_no_nap_click = {
				custom_effect_tooltip = TPT_UNNAP
				every_country = {
					limit = { has_country_flag = tpt_actor }
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 7 }
					FROM = {
						diplomatic_relation = {
							country = PREV
							relation = non_aggression_pact
							active = no
						}
					}
					diplomatic_relation = {
						country = FROM
						relation = non_aggression_pact
						active = no
					}
					clr_country_flag = tpt_actor
				}
			}
			tpt_remove_all_naps_click = {
				custom_effect_tooltip = TPT_REMOVE_ALL_NAPS
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					every_country = {
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 7 }
						diplomatic_relation = {
							country = FROM
							relation = non_aggression_pact
							active = no
						}
						FROM = {
							diplomatic_relation = {
								country = PREV
								relation = non_aggression_pact
								active = no
							}
						}
					}
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						every_country = {
							diplomatic_relation = {
								country = PREV
								relation = non_aggression_pact
								active = no
							}
							toolpack_cycle_action_log_variables = yes
							add_to_array = { global.toolpack_mp_action_array_targets = THIS }
							add_to_array = { global.toolpack_mp_action_array = 7 }
						}
						clr_country_flag = tpt_actor
					}
				}
			}
			tpt_decrease_opinion_click = {
				if = {
					limit = {
						check_variable = { global.tpt_op_value > -100 }
					}
					subtract_from_variable = {
						var = global.tpt_op_value
						value = 10
					}
				}
				if = {
					limit = {
						check_variable = { global.tpt_op_value = 0 }
					}
					subtract_from_variable = {
						var = global.tpt_op_value
						value = 10
					}
				}
			}
			tpt_increase_opinion_click = {
				if = {
					limit = {
						check_variable = { global.tpt_op_value < 100 }
					}
					add_to_variable = {
						var = global.tpt_op_value
						value = 10
					}
				}
				if = {
					limit = {
						check_variable = { global.tpt_op_value = 0 }
					}
					add_to_variable = {
						var = global.tpt_op_value
						value = 10
					}
				}
			}
			tpt_op_on_click = {
				clr_global_flag = tpt_op_turned_off
			}
			tpt_op_off_click = {
				set_global_flag = tpt_op_turned_off
			}
			tpt_trade_on_click = {
				clr_global_flag = tpt_trade_turned_off
			}
			tpt_trade_off_click = {
				set_global_flag = tpt_trade_turned_off
			}
			tpt_decrease_trade_click = {
				if = {
					limit = {
						check_variable = { global.tpt_trade_value > -100 }
					}
					subtract_from_variable = {
						var = global.tpt_trade_value
						value = 10
					}
				}
				if = {
					limit = {
						check_variable = { global.tpt_trade_value = 0 }
					}
					subtract_from_variable = {
						var = global.tpt_trade_value
						value = 10
					}
				}
			}
			tpt_increase_trade_click = {
				if = {
					limit = {
						check_variable = { global.tpt_trade_value < 100 }
					}
					add_to_variable = {
						var = global.tpt_trade_value
						value = 10
					}
				}
				if = {
					limit = {
						check_variable = { global.tpt_trade_value = 0 }
					}
					add_to_variable = {
						var = global.tpt_trade_value
						value = 10
					}
				}
			}
### STANCE ###
			tpt_war_button_click = {
				custom_effect_tooltip = TPT_WAR
				every_country = {
					limit = { has_country_flag = tpt_actor }
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 7 }
					declare_war_on = {
						target = FROM
						type = annex_everything
					}
					clr_country_flag = tpt_actor
				}
			}
			tpt_peace_button_click = {
				custom_effect_tooltip = TPT_PEACE
				every_country = {
					limit = { has_country_flag = tpt_actor }
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 7 }
					white_peace = FROM
					clr_country_flag = tpt_actor
				}
			}
			tpt_truce_button_click = {
				custom_effect_tooltip = TPT_TRUCE
				every_country = {
					limit = { has_country_flag = tpt_actor }
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 7 }
					set_truce = {
						target = FROM
						days = 90
					}
					clr_country_flag = tpt_actor
				}
			}

			tpt_cw_button_shift_click = {
				if = {
					limit = {
						NOT = { has_global_flag = tpt_cw_window_open }
					}
					set_global_flag = tpt_cw_window_open
					else = { clr_global_flag = tpt_cw_window_open }
				}
			}
			tpt_cw_button_click = {
				custom_effect_tooltip = TPT_CW
				if = {
					limit = {
						NOT = {
							has_global_flag = tpt_split_mode
						}
					}
					if = {
						limit = {
							all_country = {
								NOT = { has_country_flag = tpt_actor }
							}
						}
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 8 }
						if = {
							limit = { has_government = democratic }
							if = {
								limit = { has_global_flag = tpt_cw_fascist }
								start_civil_war = {
									ruling_party = democratic
									ideology = fascism
									size = 0.5
								}
							}
							if = {
								limit = { has_global_flag = tpt_cw_communist }
								start_civil_war = {
									ruling_party = democratic
									ideology = communism
									size = 0.5
								}
							}
							if = {
								limit = { has_global_flag = tpt_cw_neutral }
								start_civil_war = {
									ruling_party = democratic
									ideology = neutrality
									size = 0.5
								}
							}
						}
						if = {
							limit = { has_government = fascism }
							if = {
								limit = { has_global_flag = tpt_cw_democratic }
								start_civil_war = {
									ruling_party = fascism
									ideology = democratic
									size = 0.5
								}
							}
							if = {
								limit = { has_global_flag = tpt_cw_communist }
								start_civil_war = {
									ruling_party = fascism
									ideology = communism
									size = 0.5
								}
							}
							if = {
								limit = { has_global_flag = tpt_cw_neutral }
								start_civil_war = {
									ruling_party = fascism
									ideology = neutrality
									size = 0.5
								}
							}
						}
						if = {
							limit = { has_government = communism }
							if = {
								limit = { has_global_flag = tpt_cw_fascist }
								start_civil_war = {
									ruling_party = communism
									ideology = fascism
									size = 0.5
								}
							}
							if = {
								limit = { has_global_flag = tpt_cw_democratic }
								start_civil_war = {
									ruling_party = communism
									ideology = democratic
									size = 0.5
								}
							}
							if = {
								limit = { has_global_flag = tpt_cw_neutral }
								start_civil_war = {
									ruling_party = communism
									ideology = neutrality
									size = 0.5
								}
							}
						}
						if = {
							limit = { has_government = neutrality }
							if = {
								limit = { has_global_flag = tpt_cw_fascist }
								start_civil_war = {
									ruling_party = neutrality
									ideology = fascism
									size = 0.5
								}
							}
							if = {
								limit = { has_global_flag = tpt_cw_communist }
								start_civil_war = {
									ruling_party = neutrality
									ideology = communism
									size = 0.5
								}
							}
							if = {
								limit = { has_global_flag = tpt_cw_democratic }
								start_civil_war = {
									ruling_party = neutrality
									ideology = democratic
									size = 0.5
								}
							}
						}
					}
					if = {
						limit = {
							any_country = { has_country_flag = tpt_actor }
						}
						every_country = {
							limit = { has_country_flag = tpt_actor }

							toolpack_cycle_action_log_variables = yes
							add_to_array = { global.toolpack_mp_action_array_targets = THIS }
							add_to_array = { global.toolpack_mp_action_array = 8 }
							
							if = {
								limit = { has_government = democratic }
								if = {
									limit = { has_global_flag = tpt_cw_fascist }
									start_civil_war = {
										ruling_party = democratic
										ideology = fascism
										size = 0.5
									}
								}
								if = {
									limit = { has_global_flag = tpt_cw_communist }
									start_civil_war = {
										ruling_party = democratic
										ideology = communism
										size = 0.5
									}
								}
								if = {
									limit = { has_global_flag = tpt_cw_neutral }
									start_civil_war = {
										ruling_party = democratic
										ideology = neutrality
										size = 0.5
									}
								}
							}
							if = {
								limit = { has_government = fascism }
								if = {
									limit = { has_global_flag = tpt_cw_democratic }
									start_civil_war = {
										ruling_party = fascism
										ideology = democratic
										size = 0.5
									}
								}
								if = {
									limit = { has_global_flag = tpt_cw_communist }
									start_civil_war = {
										ruling_party = fascism
										ideology = communism
										size = 0.5
									}
								}
								if = {
									limit = { has_global_flag = tpt_cw_neutral }
									start_civil_war = {
										ruling_party = fascism
										ideology = neutrality
										size = 0.5
									}
								}
							}
							if = {
								limit = { has_government = communism }
								if = {
									limit = { has_global_flag = tpt_cw_fascist }
									start_civil_war = {
										ruling_party = communism
										ideology = fascism
										size = 0.5
									}
								}
								if = {
									limit = { has_global_flag = tpt_cw_democratic }
									start_civil_war = {
										ruling_party = communism
										ideology = democratic
										size = 0.5
									}
								}
								if = {
									limit = { has_global_flag = tpt_cw_neutral }
									start_civil_war = {
										ruling_party = communism
										ideology = neutrality
										size = 0.5
									}
								}
							}
							if = {
								limit = { has_government = neutrality }
								if = {
									limit = { has_global_flag = tpt_cw_fascist }
									start_civil_war = {
										ruling_party = neutrality
										ideology = fascism
										size = 0.5
									}
								}
								if = {
									limit = { has_global_flag = tpt_cw_communist }
									start_civil_war = {
										ruling_party = neutrality
										ideology = communism
										size = 0.5
									}
								}
								if = {
									limit = { has_global_flag = tpt_cw_democratic }
									start_civil_war = {
										ruling_party = neutrality
										ideology = democratic
										size = 0.5
									}
								}
							}
							clr_country_flag = tpt_actor
						}
					}
				}
				else = {
					random_owned_state = {
						limit = {
							NOT = {
								is_capital = yes
							}
						}
						PREV = {
							create_dynamic_country = {
								original_tag = PREV.PREV.PREV
								transfer_state = PREV.PREV
								if = {
									limit = { has_global_flag = tpt_cw_democratic }
									set_politics = {
										ruling_party = democratic
										elections_allowed = yes
									}
									add_popularity = {
										ideology = democratic
										popularity = 0.5
									}
								}
								else_if = {
									limit = { has_global_flag = tpt_cw_fascist }
									set_politics = {
										ruling_party = fascism
										elections_allowed = no
									}
									add_popularity = {
										ideology = fascism
										popularity = 0.5
									}
								}
								else_if = {
									limit = { has_global_flag = tpt_cw_neutral }
									set_politics = {
										ruling_party = neutrality
										elections_allowed = no
									}
									add_popularity = {
										ideology = neutrality
										popularity = 0.5
									}
								}
								else_if = {
									limit = { has_global_flag = tpt_cw_communist }
									set_politics = {
										ruling_party = communism
										elections_allowed = no
									}
									add_popularity = {
										ideology = communism
										popularity = 0.5
									}
								}
							}
						}
					}
				}
			}
			tpt_add_threat_1_click = {
				add_named_threat = {
					threat = 1
					name = Toolpack
				}
			}
			tpt_add_threat_5_click = {
				add_named_threat = {
					threat = 5
					name = Toolpack
				}
			}
			tpt_add_threat_20_click = {
				add_named_threat = {
					threat = 20
					name = Toolpack
				}
			}
			tpt_sub_threat_1_click = {
				add_named_threat = {
					threat = -1
					name = Toolpack
				}
			}
			tpt_sub_threat_5_click = {
				add_named_threat = {
					threat = -5
					name = Toolpack
				}
			}
			tpt_sub_threat_20_click = {
				add_named_threat = {
					threat = -20
					name = Toolpack
				}
			}
### COUNTRY ###
			tpt_add_stability_1_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					add_stability = 0.01
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 5 }
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						add_stability = 0.01
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 5 }
					}
				}
			}
			tpt_add_stability_5_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					add_stability = 0.05
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 5 }
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						add_stability = 0.05
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 5 }
						clr_country_flag = tpt_actor
					}
				}
			}
			tpt_add_stability_20_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					add_stability = 0.20
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 5 }
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						add_stability = 0.20
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 5 }
						clr_country_flag = tpt_actor
					}
				}
			}
			tpt_sub_stability_1_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					add_stability = -0.01
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 5 }
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						add_stability = -0.01
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 5 }
						clr_country_flag = tpt_actor
					}
				}
			}
			tpt_sub_stability_5_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					add_stability = -0.05
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 5 }
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						add_stability = -0.05
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 5 }
						clr_country_flag = tpt_actor
					}
				}
			}
			tpt_sub_stability_20_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					add_stability = -0.20
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 5 }
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						add_stability = -0.20
						clr_country_flag = tpt_actor
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 5 }
					}
				}
			}

			#WAR SUPPORT

			tpt_add_war_support_1_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					add_war_support = 0.01
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 6 }
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						add_war_support = 0.01
						clr_country_flag = tpt_actor
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 6 }
					}
				}
			}
			tpt_add_war_support_5_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					add_war_support = 0.05
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 6 }
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						add_war_support = 0.05
						clr_country_flag = tpt_actor
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 6 }
					}
				}
			}
			tpt_add_war_support_20_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					add_war_support = 0.20
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 6 }
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						add_war_support = 0.20
						clr_country_flag = tpt_actor
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 6 }
					}
				}
			}
			tpt_sub_war_support_1_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					add_war_support = -0.01
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 6 }
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						add_war_support = -0.01
						clr_country_flag = tpt_actor
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 6 }
					}
				}
			}
			tpt_sub_war_support_5_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					add_war_support = -0.05
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 6 }
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						add_war_support = -0.05
						clr_country_flag = tpt_actor
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 6 }
					}
				}
			}
			tpt_sub_war_support_20_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					add_war_support = -0.20
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 6 }
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						add_war_support = -0.20
						clr_country_flag = tpt_actor
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 6 }
					}
				}
			}

			tpt_add_political_power_20_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					add_political_power = 20
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 4 }
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						add_political_power = 20
						clr_country_flag = tpt_actor
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 4 }
					}
				}
			}
			tpt_sub_political_power_20_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					add_political_power = -20
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 4 }
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						add_political_power = -20
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 4 }
						clr_country_flag = tpt_actor
					}
				}
			}
			tpt_add_political_power_100_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					add_political_power = 100
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 4 }
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						add_political_power = 100
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 4 }
						clr_country_flag = tpt_actor
					}
				}
			}
			tpt_sub_political_power_100_click = {
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					add_political_power = -100
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 4 }
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						add_political_power = -100
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 4 }
						clr_country_flag = tpt_actor
					}
				}
			}

			tpt_create_faction_click = {
				custom_effect_tooltip = TPT_CREATE_FACTION
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 7 }
					if = {
						limit = {
							NOT = { has_global_flag = tpt_taken_treaty_geneva }
							NOT = { has_global_flag = tpt_stop_faction_names }
							OR = {
								owns_state = 3
								tag = SWI
								AND = {
									NOT = { country_exists = SWI }
									all_state = {
										if = {
											limit = { is_core_of = SWI }
											is_owned_by = FROM
										}
									}
								}
							}
						}
						create_faction = "Treaty of Geneva"
						set_global_flag = tpt_taken_treaty_geneva
						set_global_flag = tpt_stop_faction_names
					}
					if = {
						limit = {
							NOT = { has_global_flag = tpt_taken_nato }
							NOT = { has_global_flag = tpt_stop_faction_names }
							OR = {
								owns_state = 16
								tag = FRA
								AND = {
									NOT = { country_exists = FRA }
									all_state = {
										if = {
											limit = { is_core_of = FRA }
											is_owned_by = FROM
										}
									}
								}
							}
						}
						create_faction = "Treaty of Paris"
						set_global_flag = tpt_taken_treaty_paris
						set_global_flag = tpt_stop_faction_names
					}
					if = {
						limit = {
							NOT = { has_global_flag = tpt_taken_treaty_london }
							NOT = { has_global_flag = tpt_stop_faction_names }
							OR = {
								owns_state = 126
								tag = ENG
								AND = {
									NOT = { country_exists = ENG }
									all_state = {
										if = {
											limit = { is_core_of = ENG }
											is_owned_by = FROM
										}
									}
								}
							}
						}
						create_faction = "Treaty of London"
						set_global_flag = tpt_taken_treaty_london
						set_global_flag = tpt_stop_faction_names
					}
					if = {
						limit = {
							NOT = { has_global_flag = tpt_taken_treaty_berlin }
							NOT = { has_global_flag = tpt_stop_faction_names }
							OR = {
								owns_state = 64
								tag = GER
								AND = {
									NOT = { country_exists = GER }
									all_state = {
										if = {
											limit = { is_core_of = GER }
											is_owned_by = FROM
										}
									}
								}
							}
						}
						create_faction = "Treaty of Berlin"
						set_global_flag = tpt_taken_treaty_berlin
						set_global_flag = tpt_stop_faction_names
					}
					if = {
						limit = {
							NOT = { has_global_flag = tpt_taken_treaty_rome }
							NOT = { has_global_flag = tpt_stop_faction_names }
							OR = {
								owns_state = 2
								tag = ITA
								AND = {
									NOT = { country_exists = ITA }
									all_state = {
										if = {
											limit = { is_core_of = ITA }
											is_owned_by = FROM
										}
									}
								}
							}
						}
						create_faction = "Treaty of Rome"
						set_global_flag = tpt_taken_treaty_rome
						set_global_flag = tpt_stop_faction_names
					}
					if = {
						limit = {
							NOT = { has_global_flag = tpt_taken_treaty_moscow }
							NOT = { has_global_flag = tpt_stop_faction_names }
							OR = {
								owns_state = 219
								tag = SOV
								AND = {
									NOT = { country_exists = SOV }
									all_state = {
										if = {
											limit = { is_core_of = SOV }
											is_owned_by = FROM
										}
									}
								}
							}
						}
						create_faction = "Treaty of Moscow"
						set_global_flag = tpt_taken_treaty_moscow
						set_global_flag = tpt_stop_faction_names
					}
					if = {
						limit = {
							NOT = { has_global_flag = tpt_taken_treaty_vienna }
							NOT = { has_global_flag = tpt_stop_faction_names }
							OR = {
								owns_state = 4
								tag = AUS
								AND = {
									NOT = { country_exists = AUS }
									all_state = {
										if = {
											limit = { is_core_of = AUS }
											is_owned_by = FROM
										}
									}
								}
							}
						}
						create_faction = "Treaty of Vienna"
						set_global_flag = tpt_taken_treaty_vienna
						set_global_flag = tpt_stop_faction_names
					}
					if = {
						limit = {
							NOT = { has_global_flag = tpt_taken_treaty_warsaw }
							NOT = { has_global_flag = tpt_stop_faction_names }
							OR = {
								owns_state = 10
								tag = POL
								AND = {
									NOT = { country_exists = POL }
									all_state = {
										if = {
											limit = { is_core_of = POL }
											is_owned_by = FROM
										}
									}
								}
							}
						}
						create_faction = "Treaty of Warsaw"
						set_global_flag = tpt_taken_treaty_warsaw
						set_global_flag = tpt_stop_faction_names
					}
					if = {
						limit = {
							NOT = { has_global_flag = tpt_taken_nato }
							NOT = { has_global_flag = tpt_stop_faction_names }
							has_government = democratic
							tag = USA
						}
						create_faction = "NATO"
						set_global_flag = tpt_taken_nato
						set_global_flag = tpt_stop_faction_names
					}
					if = {
						limit = {
							NOT = { has_global_flag = tpt_taken_lebensraum }
							NOT = { has_global_flag = tpt_stop_faction_names }
							OR = {
								tag = POL
								tag = SOV
							}
						}
						create_faction = "Lebensraum"
						set_global_flag = tpt_taken_lebensraum
						set_global_flag = tpt_stop_faction_names
					}
					if = {
						limit = {
							NOT = { has_global_flag = tpt_taken_fifth_international }
							NOT = { has_global_flag = tpt_stop_faction_names }
							has_government = communism
							NOT = { tag = SOV }
							NOT = {
								has_country_leader = {
									name = "Leon Trotsky"
									ruling_only = yes
								}
							}
						}
						create_faction = "Fifth International"
						set_global_flag = tpt_taken_fifth_international
						set_global_flag = tpt_stop_faction_names
					}
					if = {
						limit = {
							NOT = { has_global_flag = tpt_taken_532_international }
							has_global_flag = tpt_taken_fifth_international
							NOT = { has_global_flag = tpt_stop_faction_names }
							has_government = communism
							NOT = { tag = SOV }
							NOT = {
								has_country_leader = {
									name = "Leon Trotsky"
									ruling_only = yes
								}
							}
						}
						create_faction = "Five Hundred Thirty-Second International"
						set_global_flag = tpt_taken_532_international
						set_global_flag = tpt_stop_faction_names
					}
					if = {
						limit = {
							NOT = { has_global_flag = tpt_taken_communist_vanguard }
							NOT = { has_global_flag = tpt_stop_faction_names }
							has_government = communism
						}
						create_faction = "Communist Vanguard"
						set_global_flag = tpt_taken_communist_vanguard
						set_global_flag = tpt_stop_faction_names
					}
					if = {
						limit = {
							NOT = { has_global_flag = tpt_taken_brownshirts }
							NOT = { has_global_flag = tpt_stop_faction_names }
							has_government = fascism
						}
						create_faction = "Brownshirts"
						set_global_flag = tpt_taken_brownshirts
						set_global_flag = tpt_stop_faction_names
					}
					if = {
						limit = {
							NOT = { has_global_flag = tpt_taken_blackshirts }
							NOT = { has_global_flag = tpt_stop_faction_names }
							has_government = fascism
						}
						create_faction = "Blackshirts"
						set_global_flag = tpt_taken_blackshirts
						set_global_flag = tpt_stop_faction_names
					}
					if = {
						limit = {
							NOT = { has_global_flag = tpt_taken_red_front }
							NOT = { has_global_flag = tpt_stop_faction_names }
							has_government = communism
						}
						create_faction = "Red Front"
						set_global_flag = tpt_taken_red_front
						set_global_flag = tpt_stop_faction_names
					}
					if = {
						limit = {
							NOT = { has_global_flag = tpt_taken_liberation_pact }
							NOT = { has_global_flag = tpt_stop_faction_names }
							has_government = democratic
						}
						create_faction = "Liberation Pact"
						set_global_flag = tpt_taken_liberation_pact
						set_global_flag = tpt_stop_faction_names
					}
					if = {
						limit = {
							NOT = { has_global_flag = tpt_taken_home_of_the_free }
							NOT = { has_global_flag = tpt_stop_faction_names }
							has_government = democratic
						}
						create_faction = "Home of the Free"
						set_global_flag = tpt_taken_home_of_the_free
						set_global_flag = tpt_stop_faction_names
					}
					if = {
						limit = {
							NOT = { has_global_flag = tpt_taken_vertical_axis }
							NOT = { has_global_flag = tpt_stop_faction_names }
							has_government = fascism
						}
						create_faction = "Vertical Axis"
						set_global_flag = tpt_taken_vertical_axis
						set_global_flag = tpt_stop_faction_names
					}
					if = {
						limit = {
							NOT = { has_global_flag = tpt_taken_peoples_united_republics }
							NOT = { has_global_flag = tpt_stop_faction_names }
							has_government = communism
						}
						create_faction = "People's United Republics"
						set_global_flag = tpt_taken_peoples_united_republics
						set_global_flag = tpt_stop_faction_names
					}
					if = {
						limit = {
							NOT = { has_global_flag = tpt_taken_peacekeepers }
							NOT = { has_global_flag = tpt_stop_faction_names }
							has_government = democratic
						}
						create_faction = "Peacekeepers"
						set_global_flag = tpt_taken_peacekeepers
						set_global_flag = tpt_stop_faction_names
					}
					if = {
						limit = {
							NOT = { has_global_flag = tpt_taken_global_defensive_alliance }
							NOT = { has_global_flag = tpt_stop_faction_names }
							has_government = democratic
						}
						create_faction = "Global Defensive Alliance"
						set_global_flag = tpt_taken_global_defensive_alliance
						set_global_flag = tpt_stop_faction_names
					}
					if = {
						limit = {
							NOT = { has_global_flag = tpt_taken_central_states }
							NOT = { has_global_flag = tpt_stop_faction_names }
							has_government = neutrality
						}
						create_faction = "Central States"
						set_global_flag = tpt_taken_central_states
						set_global_flag = tpt_stop_faction_names
					}
					if = {
						limit = {
							NOT = { has_global_flag = tpt_taken_iron_guard }
							NOT = { has_global_flag = tpt_stop_faction_names }
							has_government = neutrality
						}
						create_faction = "Iron Guard"
						set_global_flag = tpt_taken_iron_guard
						set_global_flag = tpt_stop_faction_names
					}
					if = {
						limit = {
							NOT = { has_global_flag = tpt_taken_entente_cordiale }
							NOT = { has_global_flag = tpt_stop_faction_names }
						}
						create_faction = "Entente Cordiale"
						set_global_flag = tpt_taken_entente_cordiale
						set_global_flag = tpt_stop_faction_names
					}
					if = {
						limit = {
							NOT = { has_global_flag = tpt_taken_central_powers }
							NOT = { has_global_flag = tpt_stop_faction_names }
						}
						create_faction = "Central Powers"
						set_global_flag = tpt_taken_central_powers
						set_global_flag = tpt_stop_faction_names
					}
					if = {
						limit = {
							NOT = { has_global_flag = tpt_taken_iron_front }
							NOT = { has_global_flag = tpt_stop_faction_names }
						}
						create_faction = "Iron Front"
						set_global_flag = tpt_taken_iron_front
						set_global_flag = tpt_stop_faction_names
					}
					if = {
						limit = {
							NOT = { has_global_flag = tpt_taken_entente }
							NOT = { has_global_flag = tpt_stop_faction_names }
						}
						create_faction = "Entente"
						set_global_flag = tpt_taken_entente
						set_global_flag = tpt_stop_faction_names
					}
					if = {
						limit = {
							NOT = { has_global_flag = tpt_taken_new_world_order }
							NOT = { has_global_flag = tpt_stop_faction_names }
						}
						create_faction = "New World Order"
						set_global_flag = tpt_taken_new_world_order
						set_global_flag = tpt_stop_faction_names
					}
					clr_global_flag = tpt_stop_faction_names
					if = {
						limit = {							
							has_global_flag = tpt_taken_communist_vanguard
							has_global_flag = tpt_taken_brownshirts
							has_global_flag = tpt_taken_blackshirts
							has_global_flag = tpt_taken_red_front
							has_global_flag = tpt_taken_liberation_pact
							has_global_flag = tpt_taken_home_of_the_free
							has_global_flag = tpt_taken_peoples_united_republics
							has_global_flag = tpt_taken_peacekeepers
							has_global_flag = tpt_taken_global_defensive_alliance
							has_global_flag = tpt_taken_central_states
							has_global_flag = tpt_taken_iron_guard
							has_global_flag = tpt_taken_entente_cordiale
							has_global_flag = tpt_taken_central_powers
							has_global_flag = tpt_taken_iron_front
							has_global_flag = tpt_taken_entente
							has_global_flag = tpt_taken_new_world_order
						}
						clr_global_flag = tpt_taken_communist_vanguard
						clr_global_flag = tpt_taken_brownshirts
						clr_global_flag = tpt_taken_blackshirts
						clr_global_flag = tpt_taken_red_front
						clr_global_flag = tpt_taken_liberation_pact
						clr_global_flag = tpt_taken_home_of_the_free
						clr_global_flag = tpt_taken_peoples_united_republics
						clr_global_flag = tpt_taken_peacekeepers
						clr_global_flag = tpt_taken_global_defensive_alliance
						clr_global_flag = tpt_taken_central_states
						clr_global_flag = tpt_taken_iron_guard
						clr_global_flag = tpt_taken_entente_cordiale
						clr_global_flag = tpt_taken_central_powers
						clr_global_flag = tpt_taken_iron_front
						clr_global_flag = tpt_taken_entente
						clr_global_flag = tpt_taken_new_world_order
					}
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 7 }
						create_faction = "Toolpack"
						clr_country_flag = tpt_actor
					}
				}
			}
			tpt_dismantle_faction_click = {
				custom_effect_tooltip = TPT_DISMANTLE_FACTION
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					dismantle_faction = yes
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 7 }
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						dismantle_faction = yes
						clr_country_flag = tpt_actor
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 7 }
					}
				}
			}
			tpt_dismantle_all_factions_click = {
				tcw_clear_all_global_confirms = yes
				set_global_flag = tp_open_confirmation_window
				set_global_flag = tpt_confirm_faction_dismantling
				custom_effect_tooltip = TPT_DISMANTLE_ALL_FACTIONS
				effect_tooltip = {
					every_country = {
						dismantle_faction = yes
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 7 }
					}
				}
			}
			tpt_add_to_faction_click = {
				custom_effect_tooltip = TPT_ADD_TO_FACTION
				every_country = {
					limit = { has_country_flag = tpt_actor }
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 7 }
					FROM = {
						if = {
							limit = {
								has_war_with = PREV
							}
							white_peace = PREV
						}
						add_to_faction = PREV
					}
					clr_country_flag = tpt_actor
				}
			}
			tpt_leave_faction_click = {
				custom_effect_tooltip = TPT_LEAVE_FACTION
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					leave_faction = yes
					toolpack_cycle_action_log_variables = yes
					add_to_array = { global.toolpack_mp_action_array_targets = THIS }
					add_to_array = { global.toolpack_mp_action_array = 7 }
				}
				if = {
					limit = {
						any_country = {
							has_country_flag = tpt_actor
						}
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						leave_faction = yes
						clr_country_flag = tpt_actor
						toolpack_cycle_action_log_variables = yes
						add_to_array = { global.toolpack_mp_action_array_targets = THIS }
						add_to_array = { global.toolpack_mp_action_array = 7 }
					}
				}
			}
			tpt_make_faction_leader_click = {
				set_faction_leader = yes
				toolpack_cycle_action_log_variables = yes
				add_to_array = { global.toolpack_mp_action_array_targets = THIS }
				add_to_array = { global.toolpack_mp_action_array = 7 }
			}
			tpt_set_major_button_click = {
				custom_effect_tooltip = TPT_SET_MAJOR
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					set_major = yes
					set_country_flag = tpt_major
					clr_country_flag = tpt_not_major
					clr_country_flag = tpt_actor
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						set_major = yes
						set_country_flag = tpt_major
						clr_country_flag = tpt_not_major
						clr_country_flag = tpt_actor
					}
				}
			}
			tpt_unmajor_button_click = {
				custom_effect_tooltip = TPT_SET_UNMAJOR
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					set_major = no
					set_country_flag = tpt_not_major
					clr_country_flag = tpt_major
					clr_country_flag = tpt_actor
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						set_major = no
						set_country_flag = tpt_not_major
						clr_country_flag = tpt_major
						clr_country_flag = tpt_actor
					}
				}
			}
		}
		triggers = {

			tpt_tab_button_frame_1a_visible = {
				NOT = { has_global_flag = tpt_window_a }
			}
			tpt_tab_button_frame_2a_visible = {
				has_global_flag = tpt_window_a
			}
			tpt_tab_button_frame_1b_visible = {
				NOT = { has_global_flag = tpt_window_b }
			}
			tpt_tab_button_frame_2b_visible = {
				has_global_flag = tpt_window_b
			}
			tpt_tab_button_frame_1c_visible = {
				NOT = { has_global_flag = tpt_window_c }
			}
			tpt_tab_button_frame_2c_visible = {
				has_global_flag = tpt_window_c
			}
			tpt_tab_button_frame_1d_visible = {
				NOT = { has_global_flag = tpt_window_d }
			}
			tpt_tab_button_frame_2d_visible = {
				has_global_flag = tpt_window_d
			}
			tpt_tab_button_frame_1e_visible = {
				NOT = { has_global_flag = tpt_window_e }
			}
			tpt_tab_button_frame_2e_visible = {
				has_global_flag = tpt_window_e
			}
			tpt_marker_visible = {
				NOT = {
					has_country_flag = tpt_actor
				}
			}
			tpt_marker_enabled = {
				NOT = {
					has_country_flag = tpt_actor
				}
			}
			tpt_unmarker_visible = {
				has_country_flag = tpt_actor
			}
			tpt_unmarker_click_enabled = {
				has_country_flag = tpt_actor
			}
			tpt_unmark_all_visible = {
			}
			tpt_unmark_all_click_enabled = {
				any_country = {
					has_country_flag = tpt_actor
				}
			}
### RESEARCH ###
			tpt_remove_rs_slot_visible = {
				has_global_flag = tpt_window_e
			}
			tpt_remove_rs_slot_click_enabled = {
				OR = {
					AND = {
						any_country = {
							has_country_flag = tpt_actor
							NOT = {
								check_variable = { THIS.amount_research_slots = 0 }
							}
						}
					}
					AND = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
						NOT = {
							check_variable = { THIS.amount_research_slots = 0 }
						}
					}
				}
			}
			tpt_add_rs_slot_visible = {
				has_global_flag = tpt_window_e
			}
			tpt_rs_slot_value_visible = {
				has_global_flag = tpt_window_e
			}
			tpt_rs_slot_text_visible = {
				has_global_flag = tpt_window_e
			}
			tpt_set_0_rs_slots_visible = {
				has_global_flag = tpt_window_e
			}
			tpt_set_0_rs_slots_click_enabled = {
				OR = {
					AND = {
						any_country = {
							has_country_flag = tpt_actor
							NOT = {
								check_variable = { THIS.amount_research_slots = 0 }
							}
						}
					}
					AND = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
						NOT = {
							check_variable = { THIS.amount_research_slots = 0 }
						}
					}
				}
			}
			tpt_set_100_rs_slots_visible = {
				has_global_flag = tpt_window_e
			}
			tpt_set_100_rs_slots_click_enabled = {
				OR = {
					AND = {
						any_country = {
							has_country_flag = tpt_actor
							NOT = {
								check_variable = { THIS.amount_research_slots = 100 }
							}
						}
					}
					AND = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
						NOT = {
							check_variable = { THIS.amount_research_slots = 100 }
						}
					}
				}
			}
			tpt_reset_rs_slots_visible = {
				has_global_flag = tpt_window_e
			}
			tpt_reset_rs_slots_click_enabled = {
				OR = {
					any_country = {
						has_country_flag = tpt_actor
						has_country_flag = original_amount_rs_slots
					}
					AND = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
						has_country_flag = original_amount_rs_slots
					}
				}
			}
			tpt_breakthrough_title_text_visible = {
				has_global_flag = tpt_window_e
			}
			tpt_breakthrough_land_text_visible = {
				has_global_flag = tpt_window_e
			}
			tpt_add_breakthrough_land_1_visible = {
				has_global_flag = tpt_window_e
			}
			tpt_add_breakthrough_land_5_visible = {
				has_global_flag = tpt_window_e
			}
			tpt_breakthrough_navy_text_visible = {
				has_global_flag = tpt_window_e
			}
			tpt_add_breakthrough_navy_1_visible = {
				has_global_flag = tpt_window_e
			}
			tpt_add_breakthrough_navy_5_visible = {
				has_global_flag = tpt_window_e
			}
			tpt_breakthrough_air_text_visible = {
				has_global_flag = tpt_window_e
			}
			tpt_add_breakthrough_air_1_visible = {
				has_global_flag = tpt_window_e
			}
			tpt_add_breakthrough_air_5_visible = {
				has_global_flag = tpt_window_e
			}
			tpt_breakthrough_nuclear_text_visible = {
				has_global_flag = tpt_window_e
			}
			tpt_add_breakthrough_nuclear_1_visible = {
				has_global_flag = tpt_window_e
			}
			tpt_add_breakthrough_nuclear_5_visible = {
				has_global_flag = tpt_window_e
			}
### IDEOLOGY ###
			tpt_add_fascism_visible = {
				has_global_flag = tpt_window_a
			}
			tpt_ban_fascism_visible = {
				has_global_flag = tpt_window_a
			}
			tpt_add_communism_visible = {
				has_global_flag = tpt_window_a
			}
			tpt_ban_communism_visible = {
				has_global_flag = tpt_window_a
			}
			tpt_add_democratic_visible = {
				has_global_flag = tpt_window_a
			}
			tpt_ban_democratic_visible = {
				has_global_flag = tpt_window_a
			}
			tpt_add_neutrality_visible = {
				has_global_flag = tpt_window_a
			}
			tpt_ban_neutrality_visible = {
				has_global_flag = tpt_window_a
			}
			tpt_fascist_on_visible = {
				has_global_flag = tpt_window_a
				NOT = { has_global_flag = tpt_fascist }
			}
			tpt_fascist_off_visible = {
				has_global_flag = tpt_window_a
				has_global_flag = tpt_fascist
			}
			tpt_communist_on_visible = {
				has_global_flag = tpt_window_a
				NOT = { has_global_flag = tpt_communist }
			}
			tpt_communist_off_visible = {
				has_global_flag = tpt_window_a
				has_global_flag = tpt_communist
			}
			tpt_democratic_on_visible = {
				has_global_flag = tpt_window_a
				NOT = { has_global_flag = tpt_democratic }
			}
			tpt_democratic_off_visible = {
				has_global_flag = tpt_window_a
				has_global_flag = tpt_democratic
			}
			tpt_neutral_on_visible = {
				has_global_flag = tpt_window_a
				NOT = { has_global_flag = tpt_neutral }
			}
			tpt_neutral_off_visible = {
				has_global_flag = tpt_window_a
				has_global_flag = tpt_neutral
			}
			tpt_add_5_click_enabled = {
				OR = {
					has_global_flag = tpt_fascist
					has_global_flag = tpt_communist
					has_global_flag = tpt_democratic
					has_global_flag = tpt_neutral
				}
			}
			tpt_add_5_visible = {
				has_global_flag = tpt_window_a
			}
			tpt_subtract_5_click_enabled = {
				OR = {
					has_global_flag = tpt_fascist
					has_global_flag = tpt_communist
					has_global_flag = tpt_democratic
					has_global_flag = tpt_neutral
				}
			}
			tpt_subtract_5_visible = {
				has_global_flag = tpt_window_a
			}
			tpt_add_10_click_enabled = {
				OR = {
					has_global_flag = tpt_fascist
					has_global_flag = tpt_communist
					has_global_flag = tpt_democratic
					has_global_flag = tpt_neutral
				}
			}
			tpt_add_10_visible = {
				has_global_flag = tpt_window_a
			}
			tpt_subtract_10_click_enabled = {
				OR = {
					has_global_flag = tpt_fascist
					has_global_flag = tpt_communist
					has_global_flag = tpt_democratic
					has_global_flag = tpt_neutral
				}
			}
			tpt_subtract_10_visible = {
				has_global_flag = tpt_window_a
			}
			tpt_add_50_click_enabled = {
				OR = {
					has_global_flag = tpt_fascist
					has_global_flag = tpt_communist
					has_global_flag = tpt_democratic
					has_global_flag = tpt_neutral
				}
			}
			tpt_add_50_visible = {
				has_global_flag = tpt_window_a
			}
			tpt_subtract_50_click_enabled = {
				OR = {
					has_global_flag = tpt_fascist
					has_global_flag = tpt_communist
					has_global_flag = tpt_democratic
					has_global_flag = tpt_neutral
				}
			}
			tpt_subtract_50_visible = {
				has_global_flag = tpt_window_a
			}
			tpt_change_click_enabled = {
				OR = {
					AND = {
						has_global_flag = tpt_fascist
						NOT = { has_global_flag = tpt_communist }
						NOT = { has_global_flag = tpt_democratic }
						NOT = { has_global_flag = tpt_neutral }
					}
					AND = {
						has_global_flag = tpt_communist
						NOT = { has_global_flag = tpt_fascist }
						NOT = { has_global_flag = tpt_democratic }
						NOT = { has_global_flag = tpt_neutral }
					}
					AND = {
						has_global_flag = tpt_democratic
						NOT = { has_global_flag = tpt_fascist }
						NOT = { has_global_flag = tpt_communist }
						NOT = { has_global_flag = tpt_neutral }
					}
					AND = {
						has_global_flag = tpt_neutral
						NOT = { has_global_flag = tpt_fascist }
						NOT = { has_global_flag = tpt_communist }
						NOT = { has_global_flag = tpt_democratic }
					}
				}
			}
			tpt_fascist_text_visible = {
				has_global_flag = tpt_window_a
			}
			tpt_fascist_number_visible = {
				has_global_flag = tpt_window_a
			}
			tpt_communist_text_visible = {
				has_global_flag = tpt_window_a
			}
			tpt_communist_number_visible = {
				has_global_flag = tpt_window_a
			}
			tpt_democratic_text_visible = {
				has_global_flag = tpt_window_a
			}
			tpt_democratic_number_visible = {
				has_global_flag = tpt_window_a
			}
			tpt_neutral_text_visible = {
				has_global_flag = tpt_window_a
			}
			tpt_neutral_number_visible = {
				has_global_flag = tpt_window_a
			}
			tpt_change_visible = {
				has_global_flag = tpt_window_a
			}
			tpt_enable_elections_visible = {
				has_global_flag = tpt_window_a
			}
			tpt_enable_elections_click_enabled = {
				OR = {
					AND = {
						any_country = {
							has_country_flag = tpt_actor
							NOT = { has_elections = yes }
						}
					}
					AND = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
						NOT = { has_elections = yes }
					}
				}
			}
			tpt_disable_elections_visible = {
				has_global_flag = tpt_window_a
			}
			tpt_disable_elections_click_enabled = {
				OR = {
					AND = {
						any_country = {
							has_country_flag = tpt_actor
							has_elections = yes
						}
					}
					AND = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
						has_elections = yes
					}
				}
			}
			tpt_kill_country_leader_visible = {
				has_global_flag = tpt_window_a
			}
### DIPLMOACY ###
			tpt_guarantee_visible = {
				has_global_flag = tpt_window_b
			}
			tpt_guarantee_click_enabled = {
				any_other_country = {
					has_country_flag = tpt_actor
					NOT = { has_guaranteed = FROM }
				}
				NOT = { has_country_flag = tpt_actor }
			}
			tpt_no_guarantee_visible = {
				has_global_flag = tpt_window_b
			}
			tpt_no_guarantee_click_enabled = {
				any_other_country = {
					has_country_flag = tpt_actor
					has_guaranteed = FROM
				}
				NOT = { has_country_flag = tpt_actor }
			}
			tpt_remove_all_guarantees_visible = {
				has_global_flag = tpt_window_b
			}
			tpt_remove_all_guarantees_click_enabled = {
				OR = {
					AND = {
						all_other_country = {
							NOT = { has_country_flag = tpt_actor }
						}
						any_other_country = {
							has_guaranteed = FROM
						}
					}
					any_other_country = {
						has_country_flag = tpt_actor
						has_guaranteed = FROM
					}
				}
			}
			tpt_access_visible = {
				has_global_flag = tpt_window_b
			}
			tpt_access_click_enabled = {
				any_other_country = {
					has_country_flag = tpt_actor
					NOT = { has_military_access_to = FROM }	#was "NOT = { gives_military_access_to = FROM }" which made it impossible to add it in both directions
				}
				NOT = { has_country_flag = tpt_actor }
			}
			tpt_no_access_visible = {
				has_global_flag = tpt_window_b
			}
			tpt_no_access_click_enabled = {
				any_other_country = {
					has_country_flag = tpt_actor
					gives_military_access_to = FROM
				}
				NOT = { has_country_flag = tpt_actor }
			}
			tpt_remove_all_access_visible = {
				has_global_flag = tpt_window_b
			}
			tpt_remove_all_access_click_enabled = {
				any_country = {
					has_military_access_to = FROM
				}
			}
			tpt_nap_visible = {
				has_global_flag = tpt_window_b
			}
			tpt_nap_click_enabled = {
				any_other_country = {
					has_country_flag = tpt_actor
					NOT = { has_non_aggression_pact_with = FROM }
				}
				NOT = { has_country_flag = tpt_actor }
			}
			tpt_no_nap_visible = {
				has_global_flag = tpt_window_b
			}
			tpt_no_nap_click_enabled = {
				any_other_country = {
					has_country_flag = tpt_actor
					has_non_aggression_pact_with = FROM
				}
				NOT = { has_country_flag = tpt_actor }
			}
			tpt_remove_all_naps_visible = {
				has_global_flag = tpt_window_b
			}
			tpt_remove_all_naps_click_enabled = {
				any_country = {
					has_non_aggression_pact_with = FROM
				}
			}
			tpt_decrease_opinion_visible = {
				has_global_flag = tpt_window_b
			}
			tpt_decrease_opinion_click_enabled = {
				check_variable = { global.tpt_op_value > -100 }
			}
			tpt_increase_opinion_visible = {
				has_global_flag = tpt_window_b
			}
			tpt_increase_opinion_click_enabled = {
				check_variable = { global.tpt_op_value < 100 }
			}
			tpt_opinion_value_visible = {
				has_global_flag = tpt_window_b
			}
			tpt_decrease_trade_visible = {
				has_global_flag = tpt_window_b
			}
			tpt_decrease_trade_click_enabled = {
				check_variable = { global.tpt_trade_value > -100 }
			}
			tpt_increase_trade_visible = {
				has_global_flag = tpt_window_b
			}
			tpt_increase_trade_click_enabled = {
				check_variable = { global.tpt_trade_value < 100 }
			}
			tpt_trade_value_visible = {
				has_global_flag = tpt_window_b
			}
			tpt_opinion_text_visible = {
				has_global_flag = tpt_window_b
			}
			tpt_op_on_visible = {
				has_global_flag = tpt_window_b
				has_global_flag = tpt_op_turned_off
			}
			tpt_op_off_visible = {
				has_global_flag = tpt_window_b
				NOT = { has_global_flag = tpt_op_turned_off }
			}
			tpt_trade_text_visible = {
				has_global_flag = tpt_window_b
			}
			tpt_trade_on_visible = {
				has_global_flag = tpt_window_b
				has_global_flag = tpt_trade_turned_off
			}
			tpt_trade_off_visible = {
				has_global_flag = tpt_window_b
				NOT = { has_global_flag = tpt_trade_turned_off }
			}
			tpt_add_opinion_button_visible = {
				has_global_flag = tpt_window_b
			}
			tpt_add_opinion_button_click_enabled = {
				NOT = { has_country_flag = tpt_actor }
				any_other_country = {
					has_country_flag = tpt_actor
					OR = {
						NOT = { has_opinion_modifier = TPT_neg_100_tno }
						NOT = { has_opinion_modifier = TPT_neg_90_tno }
						NOT = { has_opinion_modifier = TPT_neg_80_tno }
						NOT = { has_opinion_modifier = TPT_neg_70_tno }
						NOT = { has_opinion_modifier = TPT_neg_60_tno }
						NOT = { has_opinion_modifier = TPT_neg_50_tno }
						NOT = { has_opinion_modifier = TPT_neg_40_tno }
						NOT = { has_opinion_modifier = TPT_neg_30_tno }
						NOT = { has_opinion_modifier = TPT_neg_20_tno }
						NOT = { has_opinion_modifier = TPT_neg_10_tno }
						NOT = { has_opinion_modifier = TPT_pos_100_tno }
						NOT = { has_opinion_modifier = TPT_pos_90_tno }
						NOT = { has_opinion_modifier = TPT_pos_80_tno }
						NOT = { has_opinion_modifier = TPT_pos_70_tno }
						NOT = { has_opinion_modifier = TPT_pos_60_tno }
						NOT = { has_opinion_modifier = TPT_pos_50_tno }
						NOT = { has_opinion_modifier = TPT_pos_40_tno }
						NOT = { has_opinion_modifier = TPT_pos_30_tno }
						NOT = { has_opinion_modifier = TPT_pos_20_tno }
						NOT = { has_opinion_modifier = TPT_pos_10_tno }
						NOT = { has_opinion_modifier = TPT_neg_100_tyes }
						NOT = { has_opinion_modifier = TPT_neg_90_tyes }
						NOT = { has_opinion_modifier = TPT_neg_80_tyes }
						NOT = { has_opinion_modifier = TPT_neg_70_tyes }
						NOT = { has_opinion_modifier = TPT_neg_60_tyes }
						NOT = { has_opinion_modifier = TPT_neg_50_tyes }
						NOT = { has_opinion_modifier = TPT_neg_40_tyes }
						NOT = { has_opinion_modifier = TPT_neg_30_tyes }
						NOT = { has_opinion_modifier = TPT_neg_20_tyes }
						NOT = { has_opinion_modifier = TPT_neg_10_tyes }
						NOT = { has_opinion_modifier = TPT_pos_100_tyes }
						NOT = { has_opinion_modifier = TPT_pos_90_tyes }
						NOT = { has_opinion_modifier = TPT_pos_80_tyes }
						NOT = { has_opinion_modifier = TPT_pos_70_tyes }
						NOT = { has_opinion_modifier = TPT_pos_60_tyes }
						NOT = { has_opinion_modifier = TPT_pos_50_tyes }
						NOT = { has_opinion_modifier = TPT_pos_40_tyes }
						NOT = { has_opinion_modifier = TPT_pos_30_tyes }
						NOT = { has_opinion_modifier = TPT_pos_20_tyes }
						NOT = { has_opinion_modifier = TPT_pos_10_tyes }
					}
				}
			}
			tpt_remove_opinion_button_visible = {
				has_global_flag = tpt_window_b
			}
			tpt_remove_opinion_button_click_enabled = {
				NOT = { has_country_flag = tpt_actor }
				any_other_country = {
					has_country_flag = tpt_actor
					OR = {
						has_opinion_modifier = TPT_neg_100_tno
						has_opinion_modifier = TPT_neg_90_tno
						has_opinion_modifier = TPT_neg_80_tno
						has_opinion_modifier = TPT_neg_70_tno
						has_opinion_modifier = TPT_neg_60_tno
						has_opinion_modifier = TPT_neg_50_tno
						has_opinion_modifier = TPT_neg_40_tno
						has_opinion_modifier = TPT_neg_30_tno
						has_opinion_modifier = TPT_neg_20_tno
						has_opinion_modifier = TPT_neg_10_tno
						has_opinion_modifier = TPT_pos_100_tno
						has_opinion_modifier = TPT_pos_90_tno
						has_opinion_modifier = TPT_pos_80_tno
						has_opinion_modifier = TPT_pos_70_tno
						has_opinion_modifier = TPT_pos_60_tno
						has_opinion_modifier = TPT_pos_50_tno
						has_opinion_modifier = TPT_pos_40_tno
						has_opinion_modifier = TPT_pos_30_tno
						has_opinion_modifier = TPT_pos_20_tno
						has_opinion_modifier = TPT_pos_10_tno
						has_opinion_modifier = TPT_neg_100_tyes
						has_opinion_modifier = TPT_neg_90_tyes
						has_opinion_modifier = TPT_neg_80_tyes
						has_opinion_modifier = TPT_neg_70_tyes
						has_opinion_modifier = TPT_neg_60_tyes
						has_opinion_modifier = TPT_neg_50_tyes
						has_opinion_modifier = TPT_neg_40_tyes
						has_opinion_modifier = TPT_neg_30_tyes
						has_opinion_modifier = TPT_neg_20_tyes
						has_opinion_modifier = TPT_neg_10_tyes
						has_opinion_modifier = TPT_pos_100_tyes
						has_opinion_modifier = TPT_pos_90_tyes
						has_opinion_modifier = TPT_pos_80_tyes
						has_opinion_modifier = TPT_pos_70_tyes
						has_opinion_modifier = TPT_pos_60_tyes
						has_opinion_modifier = TPT_pos_50_tyes
						has_opinion_modifier = TPT_pos_40_tyes
						has_opinion_modifier = TPT_pos_30_tyes
						has_opinion_modifier = TPT_pos_20_tyes
						has_opinion_modifier = TPT_pos_10_tyes
					}
				}
			}
			tpt_remove_all_opinions_button_visible = {
				has_global_flag = tpt_window_b
			}
			tpt_remove_all_opinions_button_click_enabled = {
				OR = {
					has_opinion_modifier = TPT_neg_100_tno
					has_opinion_modifier = TPT_neg_90_tno
					has_opinion_modifier = TPT_neg_80_tno
					has_opinion_modifier = TPT_neg_70_tno
					has_opinion_modifier = TPT_neg_60_tno
					has_opinion_modifier = TPT_neg_50_tno
					has_opinion_modifier = TPT_neg_40_tno
					has_opinion_modifier = TPT_neg_30_tno
					has_opinion_modifier = TPT_neg_20_tno
					has_opinion_modifier = TPT_neg_10_tno
					has_opinion_modifier = TPT_pos_100_tno
					has_opinion_modifier = TPT_pos_90_tno
					has_opinion_modifier = TPT_pos_80_tno
					has_opinion_modifier = TPT_pos_70_tno
					has_opinion_modifier = TPT_pos_60_tno
					has_opinion_modifier = TPT_pos_50_tno
					has_opinion_modifier = TPT_pos_40_tno
					has_opinion_modifier = TPT_pos_30_tno
					has_opinion_modifier = TPT_pos_20_tno
					has_opinion_modifier = TPT_pos_10_tno
					has_opinion_modifier = TPT_neg_100_tyes
					has_opinion_modifier = TPT_neg_90_tyes
					has_opinion_modifier = TPT_neg_80_tyes
					has_opinion_modifier = TPT_neg_70_tyes
					has_opinion_modifier = TPT_neg_60_tyes
					has_opinion_modifier = TPT_neg_50_tyes
					has_opinion_modifier = TPT_neg_40_tyes
					has_opinion_modifier = TPT_neg_30_tyes
					has_opinion_modifier = TPT_neg_20_tyes
					has_opinion_modifier = TPT_neg_10_tyes
					has_opinion_modifier = TPT_pos_100_tyes
					has_opinion_modifier = TPT_pos_90_tyes
					has_opinion_modifier = TPT_pos_80_tyes
					has_opinion_modifier = TPT_pos_70_tyes
					has_opinion_modifier = TPT_pos_60_tyes
					has_opinion_modifier = TPT_pos_50_tyes
					has_opinion_modifier = TPT_pos_40_tyes
					has_opinion_modifier = TPT_pos_30_tyes
					has_opinion_modifier = TPT_pos_20_tyes
					has_opinion_modifier = TPT_pos_10_tyes
				}
			}
### STANCE ###
			tpt_war_button_visible = {
				has_global_flag = tpt_window_c
			}
			tpt_war_button_click_enabled = {
				any_other_country = {
					NOT = { has_war_with = FROM }
					has_country_flag = tpt_actor
				}
				NOT = { has_country_flag = tpt_actor }
			}
			tpt_peace_button_visible = {
				has_global_flag = tpt_window_c
			}
			tpt_peace_button_click_enabled = {
				any_other_country = {
					has_country_flag = tpt_actor
					has_war_with = FROM
				}
				NOT = { has_country_flag = tpt_actor }
			}
			tpt_truce_button_visible = {
				has_global_flag = tpt_window_c
			}
			tpt_truce_button_click_enabled = {
				any_other_country = {
					NOT = { has_war_with = FROM }
					has_country_flag = tpt_actor
				}
				NOT = { has_country_flag = tpt_actor }
			}
			tpt_cw_button_visible = {
				has_global_flag = tpt_window_c
			}
			tpt_cw_button_click_enabled = {
				OR = {
					AND = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
						NOT = { has_civil_war = yes }
						num_of_controlled_states > 1
					}
					AND = {
						any_country = {
							has_country_flag = tpt_actor
						}
						all_country = {
							if = {
								limit = { has_country_flag = tpt_actor }
								has_civil_war = no
								num_of_controlled_states > 1
							}
						}
					}
				}
			}
			tpt_add_threat_1_visible = {
				has_global_flag = tpt_window_c
			}
			tpt_add_threat_5_visible = {
				has_global_flag = tpt_window_c
			}
			tpt_add_threat_20_visible = {
				has_global_flag = tpt_window_c
			}
			tpt_sub_threat_1_visible = {
				has_global_flag = tpt_window_c
			}
			tpt_sub_threat_5_visible = {
				has_global_flag = tpt_window_c
			}
			tpt_sub_threat_20_visible = {
				has_global_flag = tpt_window_c
			}
			tpt_threat_text_visible = {
				has_global_flag = tpt_window_c
			}
			tpt_create_faction_visible = {
				has_global_flag = tpt_window_c
			}
			tpt_dismantle_faction_visible = {
				has_global_flag = tpt_window_c
			}
			tpt_dismantle_faction_click_enabled = {
				OR = {
					AND = {
						is_faction_leader = yes
						all_other_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					any_country = {
						is_faction_leader = yes
						has_country_flag = tpt_actor
					}
				}
			}
			tpt_add_to_faction_visible = {
				has_global_flag = tpt_window_c
			}
			tpt_add_to_faction_click_enabled = {
				NOT = { has_country_flag = tpt_actor }
				is_faction_leader = yes
				any_other_country = {
					has_country_flag = tpt_actor
					NOT = { is_in_faction_with = FROM }
				}
			}
			tpt_leave_faction_visible = {
				has_global_flag = tpt_window_c
			}
			tpt_leave_faction_click_enabled = {
				OR = {
					AND = {
						is_in_faction = yes
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					any_country = {
						has_country_flag = tpt_actor
						is_in_faction = yes
					}
				}
			}
			tpt_dismantle_all_factions_visible = {
				has_global_flag = tpt_window_c
			}
			tpt_dismantle_all_factions_click_enabled = {
				any_country = { is_in_faction = yes }
			}
			tpt_make_faction_leader_visible = {
				has_global_flag = tpt_window_c
			}
			tpt_make_faction_leader_click_enabled = {
				NOT = { is_faction_leader = yes }
				is_in_faction = yes
			}
### COUNTRY ###
			tpt_set_major_button_visible = {
				has_global_flag = tpt_window_d
			}
			tpt_set_major_button_click_enabled = {
				is_major = no
				NOT = { has_country_flag = tpt_major }
			}
			tpt_unmajor_button_visible = {
				has_global_flag = tpt_window_d
			}
			tpt_unmajor_button_click_enabled = {
				has_country_flag = tpt_major
				NOT = { has_country_flag = tpt_not_major }
			}
			tpt_major_text_visible = {
				has_global_flag = tpt_window_d
			}
			tpt_stability_text_visible = {
				has_global_flag = tpt_window_d
			}
			tpt_add_stability_1_visible = {
				has_global_flag = tpt_window_d
			}
			tpt_add_stability_5_visible = {
				has_global_flag = tpt_window_d
			}
			tpt_add_stability_20_visible = {
				has_global_flag = tpt_window_d
			}
			tpt_sub_stability_1_visible = {
				has_global_flag = tpt_window_d
			}
			tpt_sub_stability_5_visible = {
				has_global_flag = tpt_window_d
			}
			tpt_sub_stability_20_visible = {
				has_global_flag = tpt_window_d
			}
			tpt_war_support_text_visible = {
				has_global_flag = tpt_window_d
			}
			tpt_add_war_support_1_visible = {
				has_global_flag = tpt_window_d
			}
			tpt_add_war_support_5_visible = {
				has_global_flag = tpt_window_d
			}
			tpt_add_war_support_20_visible = {
				has_global_flag = tpt_window_d
			}
			tpt_sub_war_support_1_visible = {
				has_global_flag = tpt_window_d
			}
			tpt_sub_war_support_5_visible = {
				has_global_flag = tpt_window_d
			}
			tpt_sub_war_support_20_visible = {
				has_global_flag = tpt_window_d
			}
			tpt_political_power_text_visible = {
				has_global_flag = tpt_window_d
			}
			tpt_add_political_power_20_visible = {
				has_global_flag = tpt_window_d
			}
			tpt_sub_political_power_20_visible = {
				has_global_flag = tpt_window_d
			}
			tpt_add_political_power_100_visible = {
				has_global_flag = tpt_window_d
			}
			tpt_sub_political_power_100_visible = {
				has_global_flag = tpt_window_d
			}
		}
		effects = {

			tpt_add_opinion_button_click = {
				custom_effect_tooltip = TPT_ADD_OPINIONS
				if = {
					limit = {
						any_other_country = { has_country_flag = tpt_actor }
						NOT = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						clr_country_flag = tpt_actor
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -100 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_100_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -90 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_90_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -80 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_80_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -70 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_70_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -60 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_60_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -50 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_50_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -40 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_40_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -30 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_30_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -20 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_20_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -10 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_10_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 10 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_10_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 20 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_20_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 30 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_30_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 40 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_40_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 50 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_50_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 60 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_60_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 70 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_70_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 80 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_80_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 90 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_90_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 100 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_100_tno
							}
						}
					}
					if = {
						limit = {
							NOT = { has_global_flag = tpt_trade_turned_off }
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -100 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_100_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -90 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_90_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -80 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_80_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -70 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_70_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -60 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_60_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -50 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_50_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -40 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_40_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -30 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_30_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -20 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_20_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -10 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_10_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 10 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_10_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 20 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_20_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 30 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_30_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 40 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_40_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 50 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_50_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 60 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_60_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 70 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_70_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 80 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_80_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 90 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_90_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 100 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_100_tyes
							}
						}
					}
				}
				if = {
					limit = {
						has_country_flag = tpt_actor
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						clr_country_flag = tpt_actor
						if = {
							limit = {
								NOT = { has_global_flag = tpt_op_turned_off }
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -100 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_100_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -90 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_90_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -80 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_80_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -70 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_70_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -60 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_60_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -50 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_50_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -40 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_40_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -30 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_30_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -20 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_20_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -10 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_10_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 10 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_10_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 20 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_20_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 30 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_30_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 40 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_40_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 50 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_50_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 60 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_60_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 70 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_70_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 80 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_80_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 90 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_90_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 100 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_100_tno
								}
							}
						}
						if = {
							limit = {
								NOT = { has_global_flag = tpt_trade_turned_off }
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -100 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_100_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -90 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_90_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -80 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_80_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -70 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_70_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -60 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_60_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -50 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_50_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -40 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_40_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -30 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_30_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -20 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_20_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -10 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_10_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 10 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_10_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 20 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_20_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 30 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_30_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 40 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_40_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 50 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_50_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 60 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_60_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 70 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_70_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 80 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_80_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 90 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_90_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 100 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_100_tyes
								}
							}
						}
					}
				}
			}
			tpt_remove_opinion_button_click = {
				custom_effect_tooltip = TPT_REMOVE_OPINIONS
				if = {
					limit = {
						any_other_country = { has_country_flag = tpt_actor }
						NOT = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						clr_country_flag = tpt_actor
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -100 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_100_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -90 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_90_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -80 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_80_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -70 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_70_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -60 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_60_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -50 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_50_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -40 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_40_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -30 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_30_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -20 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_20_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -10 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_10_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 10 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_10_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 20 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_20_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 30 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_30_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 40 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_40_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 50 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_50_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 60 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_60_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 70 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_70_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 80 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_80_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 90 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_90_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 100 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_100_tno
							}
						}
					}
					if = {
						limit = {
							NOT = { has_global_flag = tpt_trade_turned_off }
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -100 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_100_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -90 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_90_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -80 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_80_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -70 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_70_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -60 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_60_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -50 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_50_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -40 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_40_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -30 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_30_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -20 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_20_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -10 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_10_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 10 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_10_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 20 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_20_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 30 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_30_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 40 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_40_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 50 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_50_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 60 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_60_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 70 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_70_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 80 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_80_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 90 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_90_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 100 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_100_tyes
							}
						}
					}
				}
				if = {
					limit = {
						has_country_flag = tpt_actor
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						clr_country_flag = tpt_actor
						if = {
							limit = {
								NOT = { has_global_flag = tpt_op_turned_off }
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -100 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_100_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -90 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_90_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -80 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_80_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -70 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_70_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -60 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_60_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -50 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_50_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -40 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_40_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -30 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_30_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -20 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_20_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -10 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_10_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 10 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_10_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 20 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_20_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 30 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_30_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 40 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_40_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 50 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_50_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 60 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_60_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 70 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_70_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 80 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_80_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 90 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_90_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 100 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_100_tno
								}
							}
						}
						if = {
							limit = {
								NOT = { has_global_flag = tpt_trade_turned_off }
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -100 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_100_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -90 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_90_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -80 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_80_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -70 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_70_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -60 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_60_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -50 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_50_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -40 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_40_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -30 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_30_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -20 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_20_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -10 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_10_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 10 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_10_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 20 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_20_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 30 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_30_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 40 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_40_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 50 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_50_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 60 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_60_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 70 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_70_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 80 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_80_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 90 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_90_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 100 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_100_tyes
								}
							}
						}
					}
				}
			}
			tpt_remove_all_opinions_button_click = {
				every_other_country = {
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_neg_100_tno
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_neg_90_tno
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_neg_80_tno
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_neg_70_tno
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_neg_60_tno
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_neg_50_tno
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_neg_40_tno
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_neg_30_tno
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_neg_20_tno
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_neg_10_tno
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_pos_10_tno
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_pos_20_tno
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_pos_30_tno
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_pos_40_tno
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_pos_50_tno
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_pos_60_tno
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_pos_70_tno
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_pos_80_tno
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_pos_90_tno
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_pos_100_tno
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_neg_100_tyes
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_neg_90_tyes
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_neg_80_tyes
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_neg_70_tyes
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_neg_60_tyes
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_neg_50_tyes
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_neg_40_tyes
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_neg_30_tyes
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_neg_20_tyes
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_neg_10_tyes
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_pos_10_tyes
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_pos_20_tyes
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_pos_30_tyes
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_pos_40_tyes
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_pos_50_tyes
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_pos_60_tyes
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_pos_70_tyes
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_pos_80_tyes
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_pos_90_tyes
					}
					remove_opinion_modifier = {
						target = FROM
						modifier = TPT_pos_100_tyes
					}
					FROM = {
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_100_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_90_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_80_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_70_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_60_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_50_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_40_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_30_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_20_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_10_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_10_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_20_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_30_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_40_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_50_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_60_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_70_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_80_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_90_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_100_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_100_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_90_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_80_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_70_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_60_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_50_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_40_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_30_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_20_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_10_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_10_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_20_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_30_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_40_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_50_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_60_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_70_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_80_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_90_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_100_tyes
						}
					}
				}
			}
			### OPINION ###

			tpt_add_opinion_button_click = {
				if = {
					limit = {
						any_other_country = { has_country_flag = tpt_actor }
						NOT = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						clr_country_flag = tpt_actor
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -100 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_100_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -90 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_90_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -80 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_80_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -70 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_70_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -60 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_60_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -50 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_50_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -40 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_40_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -30 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_30_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -20 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_20_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -10 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_10_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 10 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_10_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 20 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_20_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 30 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_30_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 40 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_40_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 50 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_50_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 60 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_60_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 70 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_70_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 80 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_80_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 90 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_90_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 100 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_100_tno
							}
						}
					}
					if = {
						limit = {
							NOT = { has_global_flag = tpt_trade_turned_off }
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -100 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_100_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -90 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_90_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -80 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_80_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -70 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_70_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -60 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_60_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -50 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_50_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -40 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_40_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -30 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_30_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -20 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_20_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -10 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_10_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 10 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_10_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 20 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_20_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 30 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_30_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 40 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_40_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 50 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_50_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 60 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_60_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 70 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_70_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 80 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_80_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 90 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_90_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 100 }
							}
							add_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_100_tyes
							}
						}
					}
				}
				if = {
					limit = {
						has_country_flag = tpt_actor
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						clr_country_flag = tpt_actor
						if = {
							limit = {
								NOT = { has_global_flag = tpt_op_turned_off }
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -100 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_100_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -90 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_90_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -80 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_80_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -70 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_70_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -60 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_60_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -50 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_50_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -40 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_40_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -30 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_30_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -20 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_20_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -10 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_10_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 10 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_10_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 20 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_20_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 30 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_30_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 40 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_40_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 50 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_50_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 60 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_60_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 70 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_70_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 80 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_80_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 90 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_90_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 100 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_100_tno
								}
							}
						}
						if = {
							limit = {
								NOT = { has_global_flag = tpt_trade_turned_off }
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -100 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_100_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -90 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_90_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -80 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_80_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -70 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_70_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -60 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_60_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -50 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_50_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -40 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_40_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -30 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_30_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -20 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_20_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -10 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_10_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 10 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_10_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 20 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_20_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 30 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_30_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 40 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_40_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 50 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_50_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 60 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_60_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 70 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_70_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 80 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_80_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 90 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_90_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 100 }
								}
								add_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_100_tyes
								}
							}
						}
					}
				}
			}
			tpt_remove_opinion_button_click = {
				if = {
					limit = {
						any_other_country = { has_country_flag = tpt_actor }
						NOT = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						clr_country_flag = tpt_actor
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -100 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_100_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -90 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_90_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -80 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_80_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -70 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_70_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -60 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_60_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -50 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_50_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -40 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_40_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -30 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_30_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -20 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_20_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = -10 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_10_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 10 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_10_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 20 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_20_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 30 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_30_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 40 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_40_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 50 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_50_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 60 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_60_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 70 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_70_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 80 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_80_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 90 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_90_tno
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_op_value = 100 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_100_tno
							}
						}
					}
					if = {
						limit = {
							NOT = { has_global_flag = tpt_trade_turned_off }
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -100 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_100_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -90 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_90_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -80 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_80_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -70 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_70_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -60 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_60_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -50 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_50_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -40 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_40_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -30 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_30_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -20 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_20_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = -10 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_neg_10_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 10 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_10_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 20 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_20_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 30 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_30_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 40 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_40_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 50 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_50_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 60 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_60_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 70 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_70_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 80 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_80_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 90 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_90_tyes
							}
						}
						if = {
							limit = {
								check_variable = { global.tpt_trade_value = 100 }
							}
							remove_opinion_modifier = {
								target = FROM
								modifier = TPT_pos_100_tyes
							}
						}
					}
				}
				if = {
					limit = {
						has_country_flag = tpt_actor
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						clr_country_flag = tpt_actor
						if = {
							limit = {
								NOT = { has_global_flag = tpt_op_turned_off }
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -100 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_100_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -90 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_90_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -80 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_80_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -70 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_70_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -60 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_60_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -50 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_50_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -40 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_40_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -30 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_30_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -20 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_20_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = -10 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_10_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 10 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_10_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 20 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_20_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 30 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_30_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 40 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_40_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 50 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_50_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 60 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_60_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 70 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_70_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 80 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_80_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 90 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_90_tno
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_op_value = 100 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_100_tno
								}
							}
						}
						if = {
							limit = {
								NOT = { has_global_flag = tpt_trade_turned_off }
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -100 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_100_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -90 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_90_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -80 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_80_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -70 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_70_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -60 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_60_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -50 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_50_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -40 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_40_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -30 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_30_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -20 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_20_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = -10 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_neg_10_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 10 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_10_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 20 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_20_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 30 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_30_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 40 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_40_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 50 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_50_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 60 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_60_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 70 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_70_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 80 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_80_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 90 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_90_tyes
								}
							}
							if = {
								limit = {
									check_variable = { global.tpt_trade_value = 100 }
								}
								remove_opinion_modifier = {
									target = FROM
									modifier = TPT_pos_100_tyes
								}
							}
						}
					}
				}
			}
			tpt_remove_all_opinions_button_click = {
				custom_effect_tooltip = TPT_REMOVE_ALL_OPINIONS
				if = {
					limit = {
						all_country = {
							NOT = { has_country_flag = tpt_actor }
						}
					}
					every_other_country = {
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_neg_100_tno
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_neg_90_tno
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_neg_80_tno
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_neg_70_tno
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_neg_60_tno
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_neg_50_tno
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_neg_40_tno
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_neg_30_tno
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_neg_20_tno
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_neg_10_tno
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_pos_10_tno
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_pos_20_tno
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_pos_30_tno
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_pos_40_tno
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_pos_50_tno
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_pos_60_tno
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_pos_70_tno
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_pos_80_tno
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_pos_90_tno
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_pos_100_tno
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_neg_100_tyes
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_neg_90_tyes
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_neg_80_tyes
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_neg_70_tyes
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_neg_60_tyes
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_neg_50_tyes
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_neg_40_tyes
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_neg_30_tyes
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_neg_20_tyes
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_neg_10_tyes
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_pos_10_tyes
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_pos_20_tyes
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_pos_30_tyes
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_pos_40_tyes
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_pos_50_tyes
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_pos_60_tyes
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_pos_70_tyes
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_pos_80_tyes
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_pos_90_tyes
						}
						remove_opinion_modifier = {
							target = FROM
							modifier = TPT_pos_100_tyes
						}
						FROM = {
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_100_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_90_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_80_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_70_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_60_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_50_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_40_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_30_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_20_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_10_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_10_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_20_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_30_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_40_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_50_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_60_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_70_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_80_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_90_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_100_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_100_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_90_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_80_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_70_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_60_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_50_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_40_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_30_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_20_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_10_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_10_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_20_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_30_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_40_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_50_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_60_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_70_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_80_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_90_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_100_tyes
							}
						}
					}
				}
				if = {
					limit = {
						any_country = { has_country_flag = tpt_actor }
					}
					every_country = {
						limit = { has_country_flag = tpt_actor }
						clr_country_flag = tpt_actor
					every_other_country = {
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_100_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_90_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_80_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_70_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_60_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_50_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_40_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_30_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_20_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_10_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_10_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_20_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_30_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_40_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_50_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_60_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_70_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_80_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_90_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_100_tno
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_100_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_90_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_80_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_70_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_60_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_50_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_40_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_30_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_20_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_neg_10_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_10_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_20_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_30_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_40_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_50_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_60_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_70_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_80_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_90_tyes
						}
						remove_opinion_modifier = {
							target = PREV
							modifier = TPT_pos_100_tyes
						}
						PREV = {
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_100_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_90_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_80_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_70_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_60_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_50_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_40_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_30_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_20_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_10_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_10_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_20_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_30_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_40_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_50_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_60_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_70_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_80_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_90_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_100_tno
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_100_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_90_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_80_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_70_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_60_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_50_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_40_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_30_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_20_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_neg_10_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_10_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_20_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_30_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_40_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_50_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_60_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_70_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_80_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_90_tyes
							}
							remove_opinion_modifier = {
								target = PREV
								modifier = TPT_pos_100_tyes
							}
						}
					}
				}
			}
		}
	}
}
	tpt_cw_window = {
	
		context_type = selected_country_context
		
		window_name = "tpt_cw_window"
		
		visible = {
			ROOT = {
				is_ai = no
				has_global_flag = tpt_cw_window_open
			}
		}
		
		effects = {
			tpt_cw_close_window_click = {
				clr_global_flag = tpt_cw_window_open
			}
			tpt_cw_fascist_on_click = {
				set_global_flag = tpt_cw_fascist
				clr_global_flag = tpt_cw_communist
				clr_global_flag = tpt_cw_democratic
				clr_global_flag = tpt_cw_neutral
			}
			tpt_cw_fascist_off_click = {
				clr_global_flag = tpt_cw_fascist
			}
			tpt_cw_communist_on_click = {
				set_global_flag = tpt_cw_communist
				clr_global_flag = tpt_cw_fascist
				clr_global_flag = tpt_cw_democratic
				clr_global_flag = tpt_cw_neutral
			}
			tpt_cw_communist_off_click = {
				clr_global_flag = tpt_cw_communist
			}
			tpt_cw_democratic_on_click = {
				set_global_flag = tpt_cw_democratic
				clr_global_flag = tpt_cw_communist
				clr_global_flag = tpt_cw_fascist
				clr_global_flag = tpt_cw_neutral
			}
			tpt_cw_democratic_off_click = {
				clr_global_flag = tpt_cw_democratic
			}
			tpt_cw_neutral_on_click = {
				set_global_flag = tpt_cw_neutral
				clr_global_flag = tpt_cw_communist
				clr_global_flag = tpt_cw_fascist
				clr_global_flag = tpt_cw_democratic
			}
			tpt_cw_neutral_off_click = {
				clr_global_flag = tpt_cw_neutral
			}
			tpt_cw_split_on_click = {
				set_global_flag = tpt_split_mode
			}
			tpt_cw_split_off_click = {
				clr_global_flag = tpt_split_mode
			}
		}

		triggers = {
			tpt_cw_fascist_on_visible = {
				NOT = { has_global_flag = tpt_cw_fascist }
			}
			tpt_cw_fascist_off_visible = {
				has_global_flag = tpt_cw_fascist
			}
			tpt_cw_communist_on_visible = {
				NOT = { has_global_flag = tpt_cw_communist }
			}
			tpt_cw_communist_off_visible = {
				has_global_flag = tpt_cw_communist
			}
			tpt_cw_democratic_on_visible = {
				NOT = { has_global_flag = tpt_cw_democratic }
			}
			tpt_cw_democratic_off_visible = {
				has_global_flag = tpt_cw_democratic
			}
			tpt_cw_neutral_on_visible = {
				NOT = { has_global_flag = tpt_cw_neutral }
			}
			tpt_cw_neutral_off_visible = {
				has_global_flag = tpt_cw_neutral
			}
			tpt_cw_split_on_visible = {
				NOT = {
					has_global_flag = tpt_split_mode
				}
			}
			tpt_cw_split_off_visible = {
				has_global_flag = tpt_split_mode
			}
		}
	}
}