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_economic_building_effect

add_random_economic_building_effect = yes

game/common/scripted_effects/00_building_effects.txt, line 2615 (181 lines). No parameters.

add_random_economic_building_effect is a scripted effect in Crusader Kings III, written at line 2615 of its file. It takes no parameters: add_random_economic_building_effect = yes. The game's script calls it in 6 places, among them Motte (building), Shrine (building) and Village Center (building). Its body carries 1 text of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/00_building_effects.txt.

What it does

  • If free building slots more than 0: Holding of … gains a random Economic Building

• 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_economic_building_effect = {
	if = {
		limit = { free_building_slots > 0 }
		save_scope_as = building_scope
		custom_tooltip = random_economic_building_tt
		hidden_effect = {
			random_list = {
				10 = { # Caravanserai
					trigger = {
						NOT = { has_building_or_higher = caravanserai_01 }
						building_caravanserai_requirement_terrain = yes
						building_requirement_castle_city_church = { LEVEL = 01 }
						culture = {
							has_innovation = innovation_guilds
						}
					}
					add_building = caravanserai_01
				}
				10 = { # Watermills
					trigger = {
						NOT = { has_building_or_higher = watermills_01 }
						building_watermills_requirement_terrain = yes
						building_requirement_castle_city_church = { LEVEL = 01 }
						culture = {
							has_innovation = innovation_windmills
						}
					}
					add_building = watermills_01
				}
				10 = { # Windmills
					trigger = {
						NOT = { has_building_or_higher = windmills_01 }
						building_windmills_requirement_terrain = yes
						building_requirement_castle_city_church = { LEVEL = 01 }
						culture = {
							has_innovation = innovation_windmills
						}
					}
					add_building = windmills_01
				}
				10 = { # Trade Port
					trigger = {
						NOT = { has_building_or_higher = common_tradeport_01 }
						building_common_tradeport_requirement_terrain = yes
						OR = {
							AND = {
								culture = {
									has_cultural_parameter = trade_ports_enabled_for_tribals
								}
								has_building_or_higher = tribe_01
							}
							building_requirement_castle_city_church = { LEVEL = 01 }
						}
					}
					add_building = common_tradeport_01
				}
				10 = { # Pastures
					trigger = {
						NOT = { has_building_or_higher = pastures_01 }
						building_pastures_requirement_terrain = yes
						building_requirement_castle_city_church = { LEVEL = 01 }
					}
					add_building = pastures_01
				}
				10 = { # Hunting Grounds
					trigger = {
						NOT = { has_building_or_higher = hunting_grounds_01 }
						building_hunting_grounds_requirement_terrain = yes
						building_requirement_castle_city_church = { LEVEL = 01 }
					}
					add_building = hunting_grounds_01
				}
				10 = { # Orchards
					trigger = {
						NOT = { has_building_or_higher = orchards_01 }
						building_orchards_requirement_terrain = yes
						building_requirement_castle_city_church = { LEVEL = 01 }
					}
					add_building = orchards_01
				}
				10 = { # Farm Estates
					trigger = {
						NOT = { has_building_or_higher = farm_estates_01 }
						building_farm_estates_requirement_terrain = yes
						building_requirement_castle_city_church = { LEVEL = 01 }
					}
					add_building = farm_estates_01
				}
				10 = { # Cereal Fields
					trigger = {
						NOT = { has_building_or_higher = cereal_fields_01 }
						building_cereal_fields_requirement_terrain = yes
						building_requirement_castle_city_church = { LEVEL = 01 }
					}
					add_building = cereal_fields_01
				}
				10 = { # Logging Camps
					trigger = {
						NOT = { has_building_or_higher = logging_camps_01 }
						building_logging_camps_requirement_terrain = yes
						building_requirement_castle_city_church = { LEVEL = 01 }
					}
					add_building = logging_camps_01
				}
				10 = { # Peat Quarries
					trigger = {
						NOT = { has_building_or_higher = peat_quarries_01 }
						building_peat_quarries_requirement_terrain = yes
						building_requirement_castle_city_church = { LEVEL = 01 }
					}
					add_building = peat_quarries_01
				}
				10 = { # Hill Farms
					trigger = {
						NOT = { has_building_or_higher = hill_farms_01 }
						building_hill_farms_requirement_terrain = yes
						building_requirement_castle_city_church = { LEVEL = 01 }
					}
					add_building = hill_farms_01
				}

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

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

Where it is used

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

Events (1)

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

  • on_building_completed

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?