Scripted effect
populate_location_with_contracts_effect
populate_location_with_contracts_effect = { AMOUNT = … AREA_CHAR = … }game/common/scripted_effects/00_laamp_effects.txt, line 43 (57 lines). Parameters: $AMOUNT$, $AREA_CHAR$.
populate_location_with_contracts_effect is a scripted effect in Crusader Kings III, written at line 43 of its file. A call passes 2 parameters: AMOUNT and AREA_CHAR. The game's script calls it in 9 places, among them Echoes of History: … (event historical_char_creation_events.1), ep3_laamps.9982 (event) and Wycliffe's Heresy (event heresy_historical.0050). Patch 1.20.1.2, from game/common/scripted_effects/00_laamp_effects.txt.
What it does
If
- If has a Adventurer Government: Is played by a person
lock_contracts_from_spawning_in_sahara_trigger = yes
Then
populate_task_contracts_for_area = { … }
• 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 (57 lines of game script)
populate_location_with_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 }
}
# prevent spawn in there you start travel.
if = {
limit = {
current_travel_plan ?= { is_travel_with_domicile = yes }
}
$AREA_CHAR$.location = { save_temporary_scope_as = location }
}
else = {
$AREA_CHAR$.capital_province = { save_temporary_scope_as = location }
}
# Now populate.
populate_task_contracts_for_area = {
location = scope:location
amount = $AMOUNT$
group = {
laamp_contracts_transport_group
laamp_contracts_criminal_group
laamp_contracts_diplomacy_group
laamp_contracts_hireling_group
laamp_contracts_hunting_group
laamp_contracts_intrigue_group
laamp_contracts_learning_group
laamp_contracts_martial_group
laamp_contracts_stewardship_group
laamp_contracts_justicar_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_contracts_effect.
Character interactions (2)
- Move Domicile
- Populate Contracts at Location
Events (3)
- Echoes of History: …
historical_char_creation_events.1 - ep3_laamps.9982
- Wycliffe's Heresy
heresy_historical.0050
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.