CK3 DatabaseCrusader Kings III · 1.20.1.2 “Crozier” · unofficial
Silk & Silverout Tue, Nov 17What's free, what needs the DLC, price →

Scripted effect · Legacy of Persia files

spawn_seljuk_character_effect

spawn_seljuk_character_effect = yes

game/common/scripted_effects/01_dlc_fp3_scripted_effects.txt, line 222 (115 lines). No parameters.

spawn_seljuk_character_effect is a scripted effect in Crusader Kings III, in the Legacy of Persia files, written at line 222 of its file. It takes no parameters: spawn_seljuk_character_effect = yes. The game's script calls it in 1 place, among them fp3_story_cycle_seljuks_invasion_events.0001 (event). Patch 1.20.1.2, from game/common/scripted_effects/01_dlc_fp3_scripted_effects.txt.

The comment above it in the file

A leader is created

What it does

  • One random county in region:
    • region = dlc_fp3_seljuk_birth_region
  • Every county in region:
    • region = world_steppe_west
  • One random county in region:
    • region = dlc_fp3_seljuk_birth_region
  • create_character = { … }

• the game's own tooltip text · ◦ our reading of the script line · code the script where neither exists

“They” is whatever it runs on (the scope it is called in). The scripted triggers and effects it calls link to their own pages; $PARAMETERS$ stay as written: each call fills them in.

The script as written (115 lines of game script)
spawn_seljuk_character_effect = {
	## CULTURE SELECTION
	# Look for a random culture in the region, weight up Oghuz with it also as a fallback
	random_county_in_region = {
		region = dlc_fp3_seljuk_birth_region
		limit = {
			exists = culture
		}
		weight = {
			base = 1
			modifier = {
				culture = culture:turkish
				add = 100
			}
			modifier = {
				culture = { has_cultural_pillar = heritage_turkic }
				add = 50
			}
		}
		culture = { save_scope_as = seljuk_birth_culture }
	}

	## FAITH SELECTION
	# Create a list of possible faiths
	every_county_in_region = {
		region = world_steppe_west
		title_province.faith = { add_to_list = seljuk_faith_selection_list }
	}
	# Find a religion in the wider region. weight it up if a county with the culture has that religion
	random_in_list = {
		list = seljuk_faith_selection_list
		weight = {
			base = 1
			# Upweight the faith of the culture if it is in their historical birth place
			modifier = {
				add = 50
				save_temporary_scope_as = temp_faith
				scope:seljuk_birth_culture = {
					any_culture_county = {
						faith = scope:temp_faith
						title_province = { geographical_region = dlc_fp3_seljuk_birth_region }
					}
				}
			}
			# Upweight Islamic faiths since it's historical (Maturidi)
			modifier = {
				religion_tag = islam_religion
				add = 5
			}
			# Exclude pagan faiths
			modifier = {
				has_doctrine_parameter = unreformed
				factor = 0 
			}
		}
		save_scope_as = seljuk_birth_faith
	}
	random_county_in_region = {
		region = dlc_fp3_seljuk_birth_region
		weight = {
			base = 1
			modifier = {
				culture = scope:seljuk_birth_culture
				add = 2
			}
			modifier = {
				faith = scope:seljuk_birth_faith
				add = 2
			}
		}
		random_county_province = { save_scope_as = seljuk_birthplace }
	}

	create_character = {
		age = { 20 40 }
		location = scope:seljuk_birthplace
		gender_female_chance = fp3_chance_female_leader
		culture = scope:seljuk_birth_culture
		faith = scope:seljuk_birth_faith
		trait = brave
		trait = ambitious
		trait = gregarious
		trait = education_martial_5
		trait = open_terrain_expert
		trait = warlike_court_2
		martial = { 16 21 }
		stewardship = { 12 15 }
		diplomacy = { 11 14 }
		intrigue = { 10 13 }
		learning = { 9 11 }
		prowess	 = { 18 24 }

		dynasty_house = house:house_seljuk

		after_creation = {
			set_variable = {
				name = seljuk_birthplace
				value = scope:seljuk_birthplace
			}
			give_seljuk_title_effect = yes
			add_gold =  { medium_gold_min_value major_gold_max_value }
			add_prestige = { medium_prestige_value massive_prestige_value }
			add_piety = { medium_piety_value massive_piety_value }
			add_martial_lifestyle_xp = 10000
			random = {
				chance = 25
				add_trait = athletic
			}

			add_character_flag = is_seljuk
			game_rule_create_spouse_and_children = { CHARACTER = this LOCATION = this } #to make sure there is someone to continue the invasions
		}
		save_scope_as = lead_seljuk
	}
}

As written in game/common/scripted_effects/01_dlc_fp3_scripted_effects.txt.

Where it is used

Every place in common/, events/ and history/ that calls spawn_seljuk_character_effect.

Source: game/common/scripted_effects/01_dlc_fp3_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.

Spotted a mistake on this page?