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

Scripted effect · Khans of the Steppe files

mpo_duchy_overrunning_vassal_title_distribution_effect

mpo_duchy_overrunning_vassal_title_distribution_effect = yes

game/common/scripted_effects/09_dlc_mpo_scripted_effects.txt, line 3675 (197 lines). No parameters.

mpo_duchy_overrunning_vassal_title_distribution_effect is a scripted effect in Crusader Kings III, in the Khans of the Steppe files, written at line 3675 of its file. It takes no parameters: mpo_duchy_overrunning_vassal_title_distribution_effect = yes. The game's script calls it in 1 place, among them Overrun Kingdom (casus belli). Patch 1.20.1.2, from game/common/scripted_effects/09_dlc_mpo_scripted_effects.txt.

What it does

Every line of it is script with no tooltip text: the script is below.

The script as written (120 lines of game script)
mpo_duchy_overrunning_vassal_title_distribution_effect = {
	#All counties but capital county are up for grabs
	every_held_title = {
		limit = {
			tier = tier_county
			NOT = {
				this = scope:attacker.capital_county
			}
		}
		add_to_list = overrun_counties
	}
	#Distribute all counties
	while = {
		limit = {
			any_in_list = {
				list = overrun_counties
				holder = scope:attacker
			}
			any_in_list = {
				list = potential_overrunning_vassals
				NOT = {
					has_character_flag = got_overrun_title
				}
			}
		}
		ordered_in_list = {
			order_by = development_level
			list = overrun_counties
			save_scope_as = title_to_grant
		}
		#Choose a vassal
		ordered_in_list = {
			list = potential_overrunning_vassals
			limit = {
				NOT = {
					has_character_flag = got_overrun_title
				}
			}
			order_by = max_military_strength
			save_scope_as = title_gainer
			#Add character flag - they should be done
			add_character_flag = got_overrun_title

			#tributaries go
			hidden_effect = {
				every_tributary = {
					custom = custom.every_tributary
					end_tributary = yes
				}
			}

			#Give up nomadic titles
			if = {
				limit = {
					NOT = {
						scope:title_to_grant = {
							any_county_province = {
								OR = {
									has_holding_type = nomad_holding
									has_holding_type = herder_holding
								}
							}
						}
					}
				}
				mpo_overrunning_ending_nomadism_effect = yes
			}
			#Nomads should still move
			else = {
				hidden_effect = {
					give_domain_to_herders = yes
				}
			}
		}
		scope:title_gainer = {
			create_title_and_vassal_change = {
				type = granted
				save_scope_as = title_change
			}
			scope:title_to_grant = {
				change_title_holder = {
					holder = scope:title_gainer
					change = scope:title_change
				}
			}
			resolve_title_and_vassal_change = scope:title_change
			#Add duchy if they're getting one
			if = {
				limit = {
					exists = scope:duchy_to_grant
				}
				create_title_and_vassal_change = {
					type = granted
					save_scope_as = title_change
				}
				scope:duchy_to_grant = {
					change_title_holder = {
						holder = scope:title_gainer
						change = scope:title_change
					}
				}
				resolve_title_and_vassal_change = scope:title_change
			}
		}
		#Change government
		scope:attacker = {
			if = {
				limit = {
					scope:title_to_grant = {
						any_county_province = {
							OR = {
								has_holding_type = nomad_holding
								has_holding_type = herder_holding
							}
						}
					}
				}
				#Do nothing, they're still nomadic
			}
			else_if = {

As written in game/common/scripted_effects/09_dlc_mpo_scripted_effects.txt.

The first 120 of its 197 lines; the rest is in game/common/scripted_effects/09_dlc_mpo_scripted_effects.txt from line 3675.

Where it is used

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

Casus belli (1)

Source: game/common/scripted_effects/09_dlc_mpo_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?