# Allows you to create your own dynamic keys
# to be called in localization.
# defined_text -> this is it, we're defining the text
# text -> a discrete entry that can be picked to display in loc.
# trigger -> determines if a text entry will be picked or not.
# (The triggers need to be valid for the scope the key is called in
# (eg Root or From.From).)
# localization_key -> points to the localization key
# that'll be used if trigger passes
# random_list can take a scoped variable as a seed if you don't want a predictable result

defined_text = { # Country
	name = GetImportOrDomesticFilmIndustry
	text = {
		trigger = {
			is_major = yes
		}
		localization_key = DOMESTIC_FILM_INDUSTRY
	}
	text = {
		localization_key = IMPORTED_FILM_INDUSTRY
	}
}

defined_text = { # Country
	name = GetImportOrDomesticFilmIndustryDesc
	text = {
		trigger = {
			is_major = yes
		}
		localization_key = DOMESTIC_FILM_INDUSTRY_DESC
	}
	text = {
		localization_key = IMPORTED_FILM_INDUSTRY_DESC
	}
}

defined_text = {
	name = GetCountryAppropriateFilmProduction
	
	###Allied films
	text = {
		trigger = {
			tag = AST
		}
		random_list = {
			seed = num_of_controlled_factories #Because otherwise seed is drawn directly from the country - it'll be the same each time.
			10 = { localization_key = men_of_timor }
			10 = { localization_key = soldiers_without_uniform }
			10 = { localization_key = mid_east }
		}
	}
	text = {
		trigger = {
			tag = CAN
		}
		random_list = {
			seed = num_of_controlled_factories #Because otherwise seed is drawn directly from the country - it'll be the same each time.
			10 = { localization_key = atlantic_patrol }
			10 = { localization_key = front_of_steel }
			10 = { localization_key = home_front }
			10 = { localization_key = wings_of_youth }
			10 = { localization_key = all_out_for_war }
			10 = { localization_key = banshees_over_canada }
		}
	}
	text = {
		trigger = {
			tag = RAJ
		}
		random_list = {
			seed = num_of_controlled_factories #Because otherwise seed is drawn directly from the country - it'll be the same each time.
			10 = { localization_key = the_planes_of_hindustan }
			10 = { localization_key = road_to_victory }
			10 = { localization_key = hes_in_the_navy }
			10 = { localization_key = in_self_defence }
		}
	}
	text = {
		trigger = {
			OR = {
				tag = BEL
				tag = HOL
			}
		}
		random_list = {
			seed = num_of_controlled_factories #Because otherwise seed is drawn directly from the country - it'll be the same each time.
			10 = { localization_key = belguique_toujours }
			10 = { localization_key = high_stakes_in_the_east }
			10 = { localization_key = glorious_colours }
			10 = { localization_key = litte_belgium }
		}
	}
	text = {
		trigger = {
			if = {
				limit = { is_major = yes }
				tag = ENG
			}
			else = {
				is_in_faction_with = ENG
			}
		}
		random_list = {
			seed = num_of_controlled_factories #Because otherwise seed is drawn directly from the country - it'll be the same each time.
			10 = { localization_key = the_lion_has_wings }
			10 = { localization_key = the_battle_of_london }
			10 = { localization_key = queens_messengers }
			10 = { localization_key = in_which_we_serve }
			10 = { localization_key = the_volunteer }
			10 = { localization_key = fires_were_started }
		}
	}
	text = {
		trigger = {
			if = {
				limit = {
					is_major = yes
				}
				tag = USA
			}
			else = {
				is_in_faction_with = USA
			}
		}
		random_list = {
			seed = num_of_controlled_factories #Because otherwise seed is drawn directly from the country - it'll be the same each time.
			10 = { localization_key = women_in_defense }
			10 = { localization_key = winning_your_wings }
			10 = { localization_key = the_world_at_war }
			10 = { localization_key = mission_accomplished }
			10 = { localization_key = road_to_victory }
			10 = { localization_key = the_fleet_that_came_to_stay }
			10 = { localization_key = fury_in_the_pacific }
			10 = { localization_key = its_your_war_too }
		}
	}
	### Comintern
	text = {
		trigger = {
			if = {
				limit = {
					is_major = yes
				}
				tag = SOU
			}
			else = {
				is_in_faction_with = SOU
			}
		}
		random_list = {
			seed = num_of_controlled_factories #Because otherwise seed is drawn directly from the country - it'll be the same each time.
			10 = { localization_key = for_the_front }
			10 = { localization_key = the_peoples_avengers }
			10 = { localization_key = day_of_war }
			10 = { localization_key = film_motherland }
			10 = { localization_key = sons_of_the_motherland }
			10 = { localization_key = moscow_strikes_back }
		}
	}
	
	### Axis films
	
	text = {
		trigger = {
			if = {
				limit = {
					is_major = yes
				}
				tag = GER
			}
			else = {
				is_in_faction_with = GER
			}
		}
		random_list = {
			seed = num_of_controlled_factories #Because otherwise seed is drawn directly from the country - it'll be the same each time.
			10 = { localization_key = fluchtlinge }
			10 = { localization_key = film_bismarck }
			10 = { localization_key = wunschkonzert }
			10 = { localization_key = anschlag_auf_baku }
			10 = { localization_key = die_entlassung }
			10 = { localization_key = besatzung_dora }
			10 = { localization_key = opfergang }
			10 = { localization_key = panorama }
			10 = { localization_key = kolberg }
		}
	}
	
	text = {
		trigger = {
			if = {
				limit = {
					is_major = yes
				}
				tag = ITA
			}
			else = {
				is_in_faction_with = ITA
			}
		}
		random_list = {
			seed = num_of_controlled_factories #Because otherwise seed is drawn directly from the country - it'll be the same each time.
			10 = { localization_key = condottieri }
			10 = { localization_key = scipio_africano }
			10 = { localization_key = the_man_with_the_cross }
		}
	}
	###CoPros
	text = {
		trigger = {
			if = {
				limit = {
					is_major = yes
				}
				tag = JAP
			}
			else = {
				is_in_faction_with = JAP
			}
		}
		random_list = {
			seed = num_of_controlled_factories #Because otherwise seed is drawn directly from the country - it'll be the same each time.
			10 = { localization_key = monkey_king }
			10 = { localization_key = genghis_khan }
			10 = { localization_key = vow_in_the_desert }
			10 = { localization_key = song_of_the_white_orchid }
			10 = { localization_key = five_scouts }
			10 = { localization_key = fire_on_that_flag }
		}
	}
	text = {
		random_list = {
			seed = num_of_controlled_factories #Because otherwise seed is drawn directly from the country - it'll be the same each time.
			10 = { localization_key = our_war }
			10 = { localization_key = the_war_for_our_existence }
			10 = { localization_key = war_in_the_skies }
			10 = { localization_key = flags_raised }
			10 = { localization_key = the_day_of_sacrifice }
			10 = { localization_key = blood_and_toil }
		}
	}
	
}
