Scripted effect
assign_council_task_scopes_in_contract_effect
assign_council_task_scopes_in_contract_effect = { COUNCILLOR_TYPE = … COUNCIL_TASK_TYPE = … }game/common/scripted_effects/00_laamp_effects.txt, line 355 (37 lines). Parameters: $COUNCILLOR_TYPE$, $COUNCIL_TASK_TYPE$.
assign_council_task_scopes_in_contract_effect is a scripted effect in Crusader Kings III, written at line 355 of its file. A call passes 2 parameters: COUNCILLOR_TYPE and COUNCIL_TASK_TYPE. The game's script calls it in 3 places, among them laamp_help_fabricate_claim_contract (contract), laamp_help_find_secrets_contract (contract) and laamp_help_train_commanders_contract (contract). Patch 1.20.1.2, from game/common/scripted_effects/00_laamp_effects.txt.
The comment above it in the file
used in task contracts triggered from council tasks, assumes you already saved root as task_contract COUNCILLOR_TYPE = councillor type name COUNCIL_TASK_TYPE = council task type name
What it does
If
scope:task_contract.task_contract_employer.cp:$COUNCILLOR_TYPE$:is_performing_council_task = $COUNCIL_TASK_TYPE$
Then
set_task_contract_target = scope:task_contract.task_contract_employer.cp:$COUNCILLOR_TYPE$task_contract_target = { … }
Otherwise
set_task_contract_target = scope:task_contract.task_contract_employer.liege
• 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 (37 lines of game script)
assign_council_task_scopes_in_contract_effect = {
if = {
limit = {
scope:task_contract.task_contract_employer.cp:$COUNCILLOR_TYPE$ ?= {
is_performing_council_task = $COUNCIL_TASK_TYPE$
}
}
set_task_contract_target = scope:task_contract.task_contract_employer.cp:$COUNCILLOR_TYPE$
task_contract_target = {
save_scope_as = task_contract_councillor
liege = {
save_scope_as = task_contract_councillor_liege
}
}
}
else = {
set_task_contract_target = scope:task_contract.task_contract_employer.liege
scope:task_contract.task_contract_employer = {
save_scope_as = task_contract_councillor
liege = {
save_scope_as = task_contract_councillor_liege
}
}
}
set_variable = {
name = task_contract_target
value = scope:task_contract.task_contract_target
}
set_variable = {
name = task_contract_councillor
value = scope:task_contract_councillor
}
set_variable = {
name = task_contract_councillor_liege
value = scope:task_contract_councillor_liege
}
}As written in game/common/scripted_effects/00_laamp_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls assign_council_task_scopes_in_contract_effect.
Task contracts (3)
- laamp_help_fabricate_claim_contract
- laamp_help_find_secrets_contract
- laamp_help_train_commanders_contract
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.