Scripted effect
begin_scheme_basic_effect
begin_scheme_basic_effect = { SCHEME_TYPE = … TARGET_SCOPE = … TARGET_TYPE = … }game/common/scripted_effects/00_scheme_scripted_effects.txt, line 16419 (42 lines). Parameters: $SCHEME_TYPE$, $TARGET_SCOPE$, $TARGET_TYPE$.
begin_scheme_basic_effect is a scripted effect in Crusader Kings III, written at line 16419 of its file. A call passes 3 parameters: SCHEME_TYPE, TARGET_SCOPE and TARGET_TYPE. The game's script calls it in 16 places, among them Befriend (Scheme) (interaction), Coerce Tributary (Scheme) (interaction) and Convert to Witchcraft (Scheme) (interaction). Patch 1.20.1.2, from game/common/scripted_effects/00_scheme_scripted_effects.txt.
What it does
Every line of it is script with no tooltip text: the script is below.
The script as written (42 lines of game script)
begin_scheme_basic_effect = {
# Log our scheme launcher so that we can refer to them down the line.
save_scope_as = scheme_launcher
# Log all the currently on-going schemes.
## We do it this way being we can't guarantee mutually exclusive targets with non-character scheme targets any more: we can't just look for "X's murder scheme against Y", because X might be plotting against no target whatsoever and have multiple schemes of that type against nothing.
every_scheme = { add_to_list = current_schemes_list }
# Now start the scheme.
start_scheme = {
type = $SCHEME_TYPE$
$TARGET_TYPE$ = $TARGET_SCOPE$
}
# And grab the scheme's scope.
random_scheme = {
limit = {
NOT = { is_in_list = current_schemes_list }
}
save_scope_as = new_scheme
}
scope:new_scheme ?= {
if = {
limit = {
exists = scope:actor
exists = scope:puppet_or_actor
scope:is_puppet_action ?= yes
scheme_owner = scope:puppet_or_actor
}
set_variable = {
name = commanding_puppeteer
value = scope:actor
}
}
# If we have a custom charge threshold to complete, set that here.
## Sway.
if = {
limit = { scheme_type = sway }
set_variable = {
name = custom_charge_threshold
value = 5
}
}
}
}As written in game/common/scripted_effects/00_scheme_scripted_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls begin_scheme_basic_effect.
Character interactions (16)
Source: game/common/scripted_effects/00_scheme_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.