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

Scripted effect · All Under Heaven files

tgp_chaos_shattering_effect

tgp_chaos_shattering_effect = yes

game/common/scripted_effects/10_dlc_tgp_dynastic_cycle_scripted_effects.txt, line 409 (264 lines). No parameters.

tgp_chaos_shattering_effect is a scripted effect in Crusader Kings III, in the All Under Heaven files, written at line 409 of its file. It takes no parameters: tgp_chaos_shattering_effect = yes. The game's script calls it in 1 place, among them The Empire, Long United, Must Divide (event tgp_dynastic_cycle.0081). Patch 1.20.1.2, from game/common/scripted_effects/10_dlc_tgp_dynastic_cycle_scripted_effects.txt.

The comment above it in the file

Effect called when entering the Chaos Phase

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)
tgp_chaos_shattering_effect = {
	hidden_effect = {
		title:h_china = {
			holder = { save_temporary_scope_as = old_emperor_temp }
			# Reset imperial examination activity
			set_variable = {
				name = years_since_imperial_examination
				value = 0
			}
		}
		#put every vassal of the current hegemon in a list
		situation:dynastic_cycle = {
			every_situation_participant = {
				limit = {
	   				top_liege = scope:old_emperor_temp
				}
				add_to_list = former_vassals
			}
		}
		scope:old_emperor_temp = {
			#destroy the title of china and all Empires that the Hegemon holds
			every_held_title = {
				limit = {
					tier > tier_kingdom
				}
				scope:old_emperor_temp = {
					destroy_title = prev
				}
			}
			create_title_and_vassal_change = {
				type = independency
				save_scope_as = chaos_change
				add_claim_on_loss = yes
			}
			every_vassal = {
				limit = {
					#breakaway all non-dejure vassals
					primary_title = {
						NOT = { target_is_de_jure_liege_or_above = scope:old_emperor_temp.primary_title }
					}
				}
				becomes_independent = { change = scope:chaos_change }
			}
			resolve_title_and_vassal_change = scope:chaos_change
		}
		# destroy all empire and king level titles if holders have not enough power
		every_in_list = {
			list = former_vassals
			limit = {
				is_landed = yes
				is_ai = yes
				OR = {
					AND = {
						highest_held_title_tier = tier_empire
						var:movement_power_individual < high_movement_power_value
					}
					AND = {
						highest_held_title_tier = tier_kingdom
						var:movement_power_individual < decent_movement_power_value
					}
				}
			}
			every_held_title = {
				limit = {
					tier > tier_duchy
				}
				prev = {
					destroy_title = prev
				}
			}
			tgp_fire_china_realm_name_event_for_vassals_effect = yes
		}
		every_in_list = {
			list = former_vassals
			# Destroy any held minister title
			destroy_held_ministry_titles_effect = yes
		}
		every_in_list = {
			list = former_vassals
			# let the former vassals of the hegemon become regular conquerors
			ai_chance_to_become_conqueror_effect = yes
			# put movement leaders and elders into a list
			if = {
				limit = {
					OR = {
						num_of_relation_disciple > 0
						has_variable = former_movement_leader
					}
					is_independent_ruler = yes
					is_landed = yes
				}
				add_to_list = new_lieges
			}
		}
		# remake the hierarchy by vassalizing or tributarizing non-leader movement members and disciples
		every_in_list = {
			list = new_lieges
			save_scope_as = new_liege
			every_in_list = {
				list = former_vassals
				limit = {
					OR = {
						scope:new_liege.var:former_movement_leader ?= var:former_movement_member
						has_relation_elder = scope:new_liege
					}
					this != scope:new_liege
				}
				save_scope_as = member
				# if lower tier than the potential new liege and is neighboring them or anyone that is also neighboring new liege, vassalize them
				if = {
					limit = {
						highest_held_title_tier < scope:new_liege.highest_held_title_tier
						OR = {
							primary_title ?= { is_neighbor_to_realm = scope:new_liege }
							any_in_list = {
								list = former_vassals
								this != scope:new_liege
								this != scope:member
								primary_title ?= {
									is_neighbor_to_realm = scope:new_liege

As written in game/common/scripted_effects/10_dlc_tgp_dynastic_cycle_scripted_effects.txt.

The first 120 of its 264 lines; the rest is in game/common/scripted_effects/10_dlc_tgp_dynastic_cycle_scripted_effects.txt from line 409.

Where it is used

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

Events (1)

Source: game/common/scripted_effects/10_dlc_tgp_dynastic_cycle_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?