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

Scripted effect

ep3_frankokratia_vassalize_latin_counts_effect

ep3_frankokratia_vassalize_latin_counts_effect = yes

game/common/scripted_effects/07_frankokratia_scripted_effects.txt, line 4894 (105 lines). No parameters.

ep3_frankokratia_vassalize_latin_counts_effect is a scripted effect in Crusader Kings III, written at line 4894 of its file. It takes no parameters: ep3_frankokratia_vassalize_latin_counts_effect = yes. The game's script calls it in 1 place, among them Ours is the Purple (event ep3_frankokratia_events.0044). Patch 1.20.1.2, from game/common/scripted_effects/07_frankokratia_scripted_effects.txt.

What it does

  • If

    • Any vassal: Highest held Title is exactly Duchy Rank
    • Any vassal:
      • Highest held Title is exactly County Rank
      • Their primary title’s duchy › Their holder:
        • is_vassal_of = scope:latin_emperor

    Then

    • while = { … }
  • If

    • Any held title:
      • Title tier exactly County
      • Their duchy › Their holder:
        • is_vassal_or_below_of = scope:latin_emperor

    Then

    • while = { … }

• 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 (105 lines of game script)
ep3_frankokratia_vassalize_latin_counts_effect = {
	#Move de jure neighbour vassals into kingdoms
	if = {
		limit = {
			#Duchy titles have been assigned
			any_vassal = {
				highest_held_title_tier = tier_duchy
			}
			#At least one count is under the duchy
			any_vassal = {
				highest_held_title_tier = tier_county
				primary_title.duchy = {
					holder ?= {
						is_vassal_of = scope:latin_emperor
					}
				}
			}
		}
		every_vassal = {
			limit = {
				highest_held_title_tier = tier_county
				primary_title.duchy = {
					holder ?= {
						is_vassal_of = scope:latin_emperor
					}
				}
			}
			add_to_list = counts_to_distribute
		}
		while = {
			limit = {
				any_vassal = {
					is_in_list = counts_to_distribute
				}
			}
			random_in_list = {
				list = counts_to_distribute
				save_scope_as = vassalizing_vassal
				primary_title.duchy.holder = {
					save_scope_as = new_liege
				}
				create_title_and_vassal_change = {
					type = granted
					save_scope_as = change
					add_claim_on_loss = no
				}
				change_liege = {
					liege = scope:new_liege
					change = scope:change
				}
				resolve_title_and_vassal_change = scope:change
			}
		}
	}
	#Give out leftover counties
	if = {
		limit = {
			any_held_title = {
				title_tier = county
				duchy = {
					holder ?= {
						is_vassal_or_below_of = scope:latin_emperor
					}
				}
			}
		}
		while = {
			limit = {
				any_held_title = {
					title_tier = county
					duchy = {
						holder ?= {
							is_vassal_or_below_of = scope:latin_emperor
						}
					}
				}
			}
			random_held_title = {
				title_tier = county
				limit = {
					duchy = {
						holder ?= {
							is_vassal_or_below_of = scope:latin_emperor
						}
					}
				}
				duchy.holder = {
					save_scope_as = latin_vassal
				}
				save_scope_as = county_to_grant
			}
			create_title_and_vassal_change = {
				type = granted
				save_scope_as = title_change
			}
			scope:county_to_grant = {
				change_title_holder = {
					holder = scope:latin_vassal
					change = scope:title_change
				}
			}
			resolve_title_and_vassal_change = scope:title_change
		}
	}
}

As written in game/common/scripted_effects/07_frankokratia_scripted_effects.txt.

Where it is used

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

Events (1)

Source: game/common/scripted_effects/07_frankokratia_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?