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_building_variable_effect

destroy_random_building_variable_effect = yes

game/common/scripted_effects/00_building_effects.txt, line 1114 (380 lines). No parameters.

destroy_random_building_variable_effect is a scripted effect in Crusader Kings III, written at line 1114 of its file. It takes no parameters: destroy_random_building_variable_effect = yes. The game's script calls it in 10 places, among them Border Raid (casus belli), Border Raid against the Roman Empire (casus belli) and Pillaging Foray (casus belli). Patch 1.20.1.2, from game/common/scripted_effects/00_building_effects.txt.

What it does

  • 1 of 46 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
    • 1%: Nothing else happens
    • 1%: Nothing else happens
    • 1%: Nothing else happens
    • 1%: Nothing else happens
    • 1%: Nothing else happens
    • 1%: Nothing else happens
    • 1%: Nothing else happens
    • 1%: Nothing else happens
    • 1%: Nothing else happens
    • 1%: Nothing else happens
    • 1%: Nothing else happens
    • 1%: Nothing else happens
    • 1%: Nothing else happens
    • 1%: Nothing else happens
    • 1%: Nothing else happens
    • 1%: Nothing else happens
    • 1%: Nothing else happens
    • 1%: Nothing else happens
    • 0%: Nothing else happens
    • 0%: Nothing else happens
    • 0%: Nothing else happens
    • 0%: Nothing else happens
    • 0%: Nothing else happens
    • 0%: Nothing else happens
    • 0%: 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_building_variable_effect = { # Province scope
	save_scope_as = raid_province
	if = {
		limit = { has_variable = destroyed_building_variable }
		remove_variable = destroyed_building_variable
	}
	random_list = { # Which building?
		# Generic/Terrain
		10 = { # outposts : Cheap
			trigger = { has_building_or_higher = outposts_01 }
			set_variable = {
				name = destroyed_building_variable
				value = 0
				months = 1
			}
		}
		10 = { # logging_camps : Cheap
			trigger = { has_building_or_higher = logging_camps_01 }
			set_variable = {
				name = destroyed_building_variable
				value = 1
				months = 1
			}
		}
		10 = { # peat_quarries : Cheap
			trigger = { has_building_or_higher = peat_quarries_01 }
			set_variable = {
				name = destroyed_building_variable
				value = 2
				months = 1
			}
		}
		10 = { # hill_forts : Cheap
			trigger = { has_building_or_higher = hill_forts_01 }
			set_variable = {
				name = destroyed_building_variable
				value = 3
				months = 1
			}
		}
		10 = { # plantations : Cheap
			trigger = { has_building_or_higher = plantations_01 }
			set_variable = {
				name = destroyed_building_variable
				value = 4
				months = 1
			}
		}
		10 = { # quarries : Cheap
			trigger = { has_building_or_higher = quarries_01 }
			set_variable = {
				name = destroyed_building_variable
				value = 5
				months = 1
			}
		}
		10 = { # hunting_grounds : Cheap
			trigger = { has_building_or_higher = hunting_grounds_01 }
			set_variable = {
				name = destroyed_building_variable
				value = 6
				months = 1
			}
		}
		10 = { # military_camps : Cheap
			trigger = { has_building_or_higher = military_camps_01 }
			set_variable = {
				name = destroyed_building_variable
				value = 7
				months = 1
			}
		}
		10 = { # horse_pastures : Cheap
			trigger = { has_building_or_higher = horse_pastures_01 }
			set_variable = {
				name = destroyed_building_variable
				value = 8
				months = 1
			}
		}
		10 = { # hillside_grazing : Cheap
			trigger = { has_building_or_higher = hillside_grazing_01 }
			set_variable = {
				name = destroyed_building_variable
				value = 9
				months = 1
			}
		}
		10 = { # warrior_lodges : Cheap
			trigger = { has_building_or_higher = warrior_lodges_01 }
			set_variable = {
				name = destroyed_building_variable
				value = 10
				months = 1
			}
		}
		2 = { # pastures : Normal
			trigger = { has_building_or_higher = pastures_01 }
			set_variable = {
				name = destroyed_building_variable
				value = 11
				months = 1
			}
		}
		2 = { # ramparts : Normal
			trigger = { has_building_or_higher = ramparts_01 }
			set_variable = {
				name = destroyed_building_variable
				value = 12
				months = 1
			}
		}
		2 = { # curtain_walls : Normal
			trigger = { has_building_or_higher = curtain_walls_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 380 lines; the rest is in game/common/scripted_effects/00_building_effects.txt from line 1114.

Where it is used

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

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?