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

Scripted effect

form_dai_viet_empire_decision_scripted_effect

form_dai_viet_empire_decision_scripted_effect = yes

game/common/scripted_effects/00_major_decisions_scripted_effects.txt, line 2770 (135 lines). No parameters.

form_dai_viet_empire_decision_scripted_effect is a scripted effect in Crusader Kings III, written at line 2770 of its file. It takes no parameters: form_dai_viet_empire_decision_scripted_effect = yes. The game's script calls it in 2 places, among them Found the Viet Empire (decision) and Reign of the Southern Emperor (event major_decisions.4000). Patch 1.20.1.2, from game/common/scripted_effects/00_major_decisions_scripted_effects.txt.

What it does

  • Dai Viet: Gains the … Title (root)
  • Your dynasty: The dynasty gains … Renown
  • If

    • Dai Viet:
      • Title already created
      • NOT = { holder = ROOT }

    Then

    Else if

    Then

  • If

    Then

    • Dai Viet: Becomes de jure part of Dai Viet
  • If

    Then

    • Champa: Becomes de jure part of Dai Viet
  • If

    • Hai Dong:
      • NOT = { target_is_de_jure_liege_or_above = title:k_viet }

    Then

    • Hai Dong: Becomes de jure part of Dai Viet
  • If

    • Lam Tay:
      • NOT = { target_is_de_jure_liege_or_above = title:k_viet }

    Then

    • Lam Tay: Becomes de jure part of Dai Viet
  • If

    • Nghe An:
      • NOT = { target_is_de_jure_liege_or_above = title:k_viet }

    Then

    • Nghe An: Becomes de jure part of Dai Viet
  • If

    • Hai Dong:
      • NOT = { target_is_de_jure_liege_or_above = title:k_viet }

    Then

    • Thăng Long: Becomes de jure part of Dai Viet
  • If

    • Indrapura:
      • NOT = { target_is_de_jure_liege_or_above = title:k_champa }

    Then

    • Indrapura: Becomes de jure part of Champa
  • If

    • Vijaya:
      • NOT = { target_is_de_jure_liege_or_above = title:k_champa }

    Then

    • Vijaya: Becomes de jure part of Champa
  • If

    • Baigaur:
      • NOT = { target_is_de_jure_liege_or_above = title:k_champa }

    Then

    • Baigaur: Becomes de jure part of Champa
  • If government is Meritocratic: Adopts the Primogeniture Law

• 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 (120 lines of game script)
form_dai_viet_empire_decision_scripted_effect = {
	save_scope_as = founder
	create_title_and_vassal_change = {
		type = created
		save_scope_as = title_change
		add_claim_on_loss = no
	}
	title:e_viet = {
		change_title_holder = {
			holder = root
			change = scope:title_change
		}
	}
	resolve_title_and_vassal_change = scope:title_change
	root.dynasty = {
		add_dynasty_prestige = major_dynasty_prestige_gain
	}

	if = {
		limit = {
			title:k_viet = {
				is_title_created = yes
				NOT = {
					holder = ROOT
				}
			}
		}
		create_title_and_vassal_change = {
			type = usurped
			save_scope_as = title_change_2
			add_claim_on_loss = no
		}
		title:k_viet = {
			change_title_holder = {
				holder = root
				change = scope:title_change_2
			}
		}
		resolve_title_and_vassal_change = scope:title_change_2
	}
	else_if = {
		limit = {
			title:k_viet = { is_title_created = no }
		}
		create_title_and_vassal_change = {
			type = created
			save_scope_as = title_change_2
			add_claim_on_loss = no
		}
		title:k_viet = {
			change_title_holder = {
				holder = root
				change = scope:title_change_2
			}
		}
		resolve_title_and_vassal_change = scope:title_change_2
	}
	#Viet controls
	if = {	#If owned, annex Dai Viet.
		limit = {
			title:k_viet = { holder = root  }
		}
		title:k_viet = { set_de_jure_liege_title = title:e_viet }
	}
	if = {	#If owned, annex Champa.
		limit = {
			title:k_champa = { holder = root  }
		}
		title:k_champa = { set_de_jure_liege_title = title:e_viet }
	}
	if = {	#If any have drifted out, then k_viet's constituent duchies are flipped back.
		limit = {
			title:d_hai_dong = {
				NOT = { target_is_de_jure_liege_or_above = title:k_viet }
			}
		}
		title:d_hai_dong = { set_de_jure_liege_title = title:k_viet }
	}
	if = {	#If any have drifted out, then k_viet's constituent duchies are flipped back.
		limit = {
			title:d_lam_tay = {
				NOT = { target_is_de_jure_liege_or_above = title:k_viet }
			}
		}
		title:d_lam_tay = { set_de_jure_liege_title = title:k_viet }
	}
	if = {	#If any have drifted out, then k_viet's constituent duchies are flipped back.
		limit = {
			title:d_nghe_an = {
				NOT = { target_is_de_jure_liege_or_above = title:k_viet }
			}
		}
		title:d_nghe_an = { set_de_jure_liege_title = title:k_viet }
	}
	if = {	#If any have drifted out, then k_viet's constituent duchies are flipped back.
		limit = {
			title:d_hai_dong = {
				NOT = { target_is_de_jure_liege_or_above = title:k_viet }
			}
		}
		title:d_thang_long = { set_de_jure_liege_title = title:k_viet }
	}
	#Champa controls
	if = {	#If any have drifted out, then k_champa's constituent duchies are flipped back.
		limit = {
			title:d_indrapura = {
				NOT = { target_is_de_jure_liege_or_above = title:k_champa }
			}
		}
		title:d_indrapura = { set_de_jure_liege_title = title:k_champa }
	}
	if = {	#If any have drifted out, then k_champa's constituent duchies are flipped back.
		limit = {
			title:d_vijaya = {
				NOT = { target_is_de_jure_liege_or_above = title:k_champa }
			}
		}
		title:d_vijaya = { set_de_jure_liege_title = title:k_champa }
	}
	if = {	#If any have drifted out, then k_champa's constituent duchies are flipped back.

As written in game/common/scripted_effects/00_major_decisions_scripted_effects.txt.

The first 120 of its 135 lines; the rest is in game/common/scripted_effects/00_major_decisions_scripted_effects.txt from line 2770.

Where it is used

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

Events (1)

Source: game/common/scripted_effects/00_major_decisions_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?