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

Scripted effect

add_random_building_variable_effect

add_random_building_variable_effect = yes

game/common/scripted_effects/00_building_effects.txt, line 59 (858 lines). No parameters.

add_random_building_variable_effect is a scripted effect in Crusader Kings III, written at line 59 of its file. It takes no parameters: add_random_building_variable_effect = yes. The game's script calls it in 2 places, among them Amateur Architecture: Success! (event laamp_base_contract_schemes.2022) and Building Blocks (event court.8090). Patch 1.20.1.2, from game/common/scripted_effects/00_building_effects.txt.

The comment above it in the file

1, sets variable based on fitness of possible buildings

What it does

  • 1 of 40 things will happen:
    • 5%: Nothing else happens
    • 5%: Nothing else happens
    • 5%: Nothing else happens
    • 5%: Nothing else happens
    • 5%: Nothing else happens
    • 5%: Nothing else happens
    • 5%: Nothing else happens
    • 5%: Nothing else happens
    • 5%: Nothing else happens
    • 5%: Nothing else happens
    • 5%: 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
    • 1%: Nothing else happens
    • 1%: Nothing else happens
    • 1%: Nothing else happens
    • 1%: Nothing else happens
    • 1%: Nothing else happens
    • 5%: Nothing else happens
    • 5%: Nothing else happens
    • 5%: Nothing else happens
    • 5%: Nothing else happens
    • 1%: Nothing else happens
    • 1%: 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)
add_random_building_variable_effect = { # Province scope
	province_owner = { save_scope_as = build_owner }
	province_owner = { save_scope_as = holder } #Since building requirements reference scope:holder.
	random_list = { # Which building?
		# Generic/Terrain
		10 = { # outposts : Cheap
			trigger = {
				add_random_building_trigger = { BUILDING = outposts } # Generic eligiblity
				generic_recruitment_building_innovations_trigger = { BUILDING = outposts }
			}
			set_variable = {
				name = random_building_variable
				value = 0
				days = 365
			}
		}
		10 = { # logging_camps : Cheap
			trigger = {
				add_random_building_trigger = { BUILDING = logging_camps }
				generic_economic_building_innovation_trigger = { BUILDING = logging_camps }
			}
			set_variable = {
				name = random_building_variable
				value = 1
				days = 365
			}
		}
		10 = { # peat_quarries : Cheap
			trigger = {
				add_random_building_trigger = { BUILDING = peat_quarries }
				generic_economic_building_innovation_trigger = { BUILDING = peat_quarries }
			}
			set_variable = {
				name = random_building_variable
				value = 2
				days = 365
			}
		}
		10 = { # hill_forts : Cheap
			trigger = {
				add_random_building_trigger = { BUILDING = hill_forts }
				generic_fortification_building_innovations_trigger = { BUILDING = hill_forts }
			}
			set_variable = {
				name = random_building_variable
				value = 3
				days = 365
			}
		}
		10 = { # plantations : Cheap
			trigger = {
				add_random_building_trigger = { BUILDING = plantations }
				generic_economic_building_innovation_trigger = { BUILDING = plantations }
			}
			set_variable = {
				name = random_building_variable
				value = 4
				days = 365
			}
		}
		10 = { # quarries : Cheap
			trigger = {
				add_random_building_trigger = { BUILDING = quarries }
				generic_economic_building_innovation_trigger = { BUILDING = quarries }
			}
			set_variable = {
				name = random_building_variable
				value = 5
				days = 365
			}
		}
		10 = { # hunting_grounds : Cheap
			trigger = {
				add_random_building_trigger = { BUILDING = hunting_grounds }
				generic_economic_building_innovation_trigger = { BUILDING = hunting_grounds }
			}
			set_variable = {
				name = random_building_variable
				value = 6
				days = 365
			}
		}
		10 = { # military_camps : Cheap
			trigger = {
				add_random_building_trigger = { BUILDING = military_camps }
				generic_recruitment_building_innovations_trigger = { BUILDING = military_camps }
			}
			set_variable = {
				name = random_building_variable
				value = 7
				days = 365
			}
		}
		10 = { # horse_pastures : Cheap
			trigger = {
				add_random_building_trigger = { BUILDING = horse_pastures }
				generic_recruitment_building_innovations_trigger = { BUILDING = horse_pastures }
			}
			set_variable = {
				name = random_building_variable
				value = 8
				days = 365
			}
		}
		10 = { # hillside_grazing : Cheap
			trigger = {
				add_random_building_trigger = { BUILDING = hillside_grazing }
				generic_recruitment_building_innovations_trigger = { BUILDING = hillside_grazing }
			}
			set_variable = {
				name = random_building_variable
				value = 9
				days = 365
			}
		}
		10 = { # warrior_lodges : Cheap
			trigger = {
				add_random_building_trigger = { BUILDING = warrior_lodges }
				generic_recruitment_building_innovations_trigger = { BUILDING = warrior_lodges }
			}

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

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

Where it is used

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

Events (2)

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?