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

Scripted effect

destroy_random_estate_building_variable_effect

destroy_random_estate_building_variable_effect = yes

game/common/scripted_effects/00_building_effects.txt, line 1761 (226 lines). No parameters.

destroy_random_estate_building_variable_effect is a scripted effect in Crusader Kings III, written at line 1761 of its file. It takes no parameters: destroy_random_estate_building_variable_effect = yes. The game's script calls it in 3 places, among them scheme_critical_moments.8031 (event), ep3_governor_8020_fail_effect (local effect) and on_title_lost (on action). Patch 1.20.1.2, from game/common/scripted_effects/00_building_effects.txt.

What it does

  • 1 of 27 things will happen:
    • 4%: Nothing else happens
    • 4%: Nothing else happens
    • 4%: Nothing else happens
    • 4%: Nothing else happens
    • 4%: Nothing else happens
    • 4%: Nothing else happens
    • 4%: Nothing else happens
    • 4%: Nothing else happens
    • 4%: Nothing else happens
    • 4%: Nothing else happens
    • 4%: Nothing else happens
    • 4%: Nothing else happens
    • 4%: Nothing else happens
    • 4%: Nothing else happens
    • 4%: Nothing else happens
    • 4%: Nothing else happens
    • 4%: Nothing else happens
    • 4%: Nothing else happens
    • 4%: Nothing else happens
    • 4%: Nothing else happens
    • 4%: Nothing else happens
    • 4%: Nothing else happens
    • 4%: Nothing else happens
    • 4%: Nothing else happens
    • 4%: Nothing else happens
    • 4%: Nothing else happens
    • 4%: Nothing else happens

• 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)
destroy_random_estate_building_variable_effect = { # Domicile scope
	save_scope_as = raid_domicile
	if = {
		limit = { has_variable = destroyed_building_variable }
		remove_variable = destroyed_building_variable
	}
	random_list = { # Which building?
		# Generic/Terrain
		10 = { # barracks : Normal
			trigger = { has_domicile_building_or_higher = barracks_01 }
			set_variable = {
				name = destroyed_building_variable
				value = 0
				months = 1
			}
		}
		10 = { # watchtower : Normal
			trigger = { has_domicile_building_or_higher = watchtower_01 }
			set_variable = {
				name = destroyed_building_variable
				value = 1
				months = 1
			}
		}
		10 = { # guardhouse : Normal
			trigger = { has_domicile_building_or_higher = guardhouse_01 }
			set_variable = {
				name = destroyed_building_variable
				value = 2
				months = 1
			}
		}
		10 = { # garden : Normal
			trigger = { has_domicile_building_or_higher = garden_01 }
			set_variable = {
				name = destroyed_building_variable
				value = 3
				months = 1
			}
		}
		10 = { # stable : Normal
			trigger = { has_domicile_building_or_higher = stable_01 }
			set_variable = {
				name = destroyed_building_variable
				value = 4
				months = 1
			}
		}
		10 = { # workshop : Normal
			trigger = { has_domicile_building_or_higher = workshop_01 }
			set_variable = {
				name = destroyed_building_variable
				value = 5
				months = 1
			}
		}
		10 = { # storage : Normal
			trigger = { has_domicile_building_or_higher = storage_01 }
			set_variable = {
				name = destroyed_building_variable
				value = 6
				months = 1
			}
		}
		10 = { # market : Normal
			trigger = { has_domicile_building_or_higher = market_01 }
			set_variable = {
				name = destroyed_building_variable
				value = 7
				months = 1
			}
		}
		10 = { # grazing_land : Normal
			trigger = { has_domicile_building_or_higher = grazing_land_01 }
			set_variable = {
				name = destroyed_building_variable
				value = 8
				months = 1
			}
		}
		10 = { # grain_field : Normal
			trigger = { has_domicile_building_or_higher = grain_field_01 }
			set_variable = {
				name = destroyed_building_variable
				value = 9
				months = 1
			}
		}
		10 = { # living_quarters : Normal
			trigger = { has_domicile_building_or_higher = living_quarters_01 }
			set_variable = {
				name = destroyed_building_variable
				value = 10
				months = 1
			}
		}
		10 = { # vineyard : Normal
			trigger = { has_domicile_building_or_higher = vineyard_01 }
			set_variable = {
				name = destroyed_building_variable
				value = 11
				months = 1
			}
		}
		10 = { # olive : Normal
			trigger = { has_domicile_building_or_higher = olive_01 }
			set_variable = {
				name = destroyed_building_variable
				value = 12
				months = 1
			}
		}
		10 = { # temple : Normal
			trigger = { has_domicile_building_or_higher = temple_small_01 }
			set_variable = {
				name = destroyed_building_variable
				value = 13
				months = 1
			}
		}

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

The first 120 of its 226 lines; the rest is in game/common/scripted_effects/00_building_effects.txt from line 1761.

Where it is used

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

Scripted effects inside an event file (1)

  • ep3_governor_8020_fail_effect

On actions (the game's own hooks) (1)

  • on_title_lost

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