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_military_building_effect

add_random_military_building_effect = yes

game/common/scripted_effects/00_building_effects.txt, line 2841 (107 lines). No parameters.

add_random_military_building_effect is a scripted effect in Crusader Kings III, written at line 2841 of its file. It takes no parameters: add_random_military_building_effect = yes. The game's script calls it in 4 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 Military 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 (107 lines of game script)
add_random_military_building_effect = {
	if = {
		limit = { free_building_slots > 0 }
		save_scope_as = building_scope
		custom_tooltip = random_military_building_tt
		hidden_effect = {
			random_list = {
				10 = { # Wind Furnace
					trigger = {
						NOT = { has_building_or_higher = wind_furnace_01 }
						building_wind_furnace_requirement_terrain = yes
						building_requirement_castle_city_church = { LEVEL = 01 }
					}
					add_building = wind_furnace_01
				}
				10 = { # Workshops
					trigger = {
						NOT = { has_building_or_higher = workshops_01 }
						building_workshops_requirement_terrain = yes
						building_requirement_castle_city_church = { LEVEL = 01 }
						scope:building_scope.county.holder.culture = {
							has_innovation = innovation_advanced_bowmaking
						}
					}
					add_building = workshops_01
				}
				10 = { # Horse Pastures
					trigger = {
						NOT = { has_building_or_higher = windmills_01 }
						building_horse_pastures_requirement_terrain = yes
					}
					add_building = windmills_01
				}
				10 = { # Hillside Grazing
					trigger = {
						NOT = { has_building_or_higher = hillside_grazing_01 }
						building_hillside_grazing_requirement_terrain = yes
					}
					add_building = hillside_grazing_01
				}
				10 = { # Warrior Lodges
					trigger = {
						NOT = { has_building_or_higher = warrior_lodges_01 }
						building_warrior_lodges_requirement_terrain = yes
					}
					add_building = warrior_lodges_01
				}
				10 = { # Military Camps
					trigger = {
						NOT = { has_building_or_higher = military_camps_01 }
						building_military_camps_requirement_terrain = yes
						building_requirement_castle_city_church = { LEVEL = 01 }
					}
					add_building = military_camps_01
				}
				10 = { # Regimental Grounds
					trigger = {
						NOT = { has_building_or_higher = regimental_grounds_01 }
						building_regimental_grounds_requirement_terrain = yes
						building_requirement_castle_city_church = { LEVEL = 01 }
					}
					add_building = regimental_grounds_01
				}
				10 = { # Outposts
					trigger = {
						NOT = { has_building_or_higher = outposts_01 }
						building_outposts_requirement_terrain = yes
						building_requirement_castle_city_church = { LEVEL = 01 }
					}
					add_building = outposts_01
				}
				10 = { # Barracks
					trigger = {
						NOT = { has_building_or_higher = barracks_01 }
						building_barracks_requirement_terrain = yes
						building_requirement_castle_city_church = { LEVEL = 01 }
					}
					add_building = barracks_01
				}
				10 = { # Camel Farms
					trigger = {
						NOT = { has_building_or_higher = camel_farms_01 }
						building_camel_farms_requirement_terrain = yes
						building_requirement_castle_city_church = { LEVEL = 01 }
					}
					add_building = camel_farms_01
				}
				10 = { # Stables
					trigger = {
						NOT = { has_building_or_higher = stables_01 }
						building_stables_requirement_terrain = yes
						building_requirement_castle_city_church = { LEVEL = 01 }
					}
					add_building = stables_01
				}
				10 = { # Smiths
					trigger = {
						NOT = { has_building_or_higher = smiths_01 }
						building_smiths_requirement_terrain = yes
						building_requirement_castle_city_church = { LEVEL = 01 }
					}
					add_building = smiths_01
				}
			}
		}
	}
}

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

Where it is used

Every place in common/, events/ and history/ that calls add_random_military_building_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?