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

Scripted effect

populate_location_with_special_contracts_effect

populate_location_with_special_contracts_effect = { AMOUNT = … AREA_CHAR = … }

game/common/scripted_effects/00_laamp_effects.txt, line 101 (41 lines). Parameters: $AMOUNT$, $AREA_CHAR$.

populate_location_with_special_contracts_effect is a scripted effect in Crusader Kings III, written at line 101 of its file. A call passes 2 parameters: AMOUNT and AREA_CHAR. The game's script calls it in 2 places, among them ep3_laamp_flavour_ewan_3021_choose_kingdom_effect (local effect) and on_travel_plan_movement (on action). Patch 1.20.1.2, from game/common/scripted_effects/00_laamp_effects.txt.

What it does

• 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 (41 lines of game script)
populate_location_with_special_contracts_effect = {
	if = {
		limit = {
			# The AI have their own system for getting contracts.
			trigger_if = {
				limit = { has_government = landless_adventurer_government }
				is_ai = no
			}
			lock_contracts_from_spawning_in_sahara_trigger = yes
		}
		# Flag our pre-existing contracts if necessary.
		if = {
			limit = { exists = scope:toggle_distance_ignore }
			every_character_task_contract = { add_to_list = pre_existing_contracts_list }
		}
		populate_task_contracts_for_area = {
			location = $AREA_CHAR$.capital_province
			amount = $AMOUNT$
			group = {
				laamp_contracts_transport_group
				laamp_contracts_war_group
				laamp_contracts_hireling_group
				laamp_contracts_intrigue_group
				laamp_contracts_legitimist_group
			}
		}
		# Then flag our new contracts (again, if necessary).
		if = {
			limit = { exists = scope:toggle_distance_ignore }
			every_character_task_contract = {
				limit = {
					NOT = { is_in_list = pre_existing_contracts_list }
				}
				set_variable = {
					name = retain_despite_distance
					value = yes
				}
			}
		}
	}
}

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

Where it is used

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

Scripted effects inside an event file (1)

  • ep3_laamp_flavour_ewan_3021_choose_kingdom_effect

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

  • on_travel_plan_movement

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