Scripted effect · All Under Heaven files
scheme_change_movement_power_effect
scheme_change_movement_power_effect = { VALUE = … }game/common/scripted_effects/10_dlc_tgp_scripted_effects.txt, line 1377 (83 lines). Parameters: $VALUE$.
scheme_change_movement_power_effect is a scripted effect in Crusader Kings III, in the All Under Heaven files, written at line 1377 of its file. A call passes 1 parameter: VALUE. The game's script calls it in 2 places, among them …: Success (event scheme_critical_moments.1232) and …: Success (event scheme_critical_moments.1235). Its body carries 4 texts of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/10_dlc_tgp_scripted_effects.txt.
The comment above it in the file
use this in SCHEMES to temporarily increase or decrease movement power of a character or movement
What it does
If
a check the game hides
Then
If
scope:movement_power_scheme_effect_value >= 0
Then
- Increase Movement Power of … by … Merit Rank: movement power scheme effect value (-20/year)
Otherwise
- Decrease Movement Power of … by … Merit Rank: movement power scheme effect value (+20/year)
update_character_movement_power_effect = yestop_participant_group:dynastic_cycle:
Otherwise
If
scope:movement_power_scheme_effect_value >= 0
Then
- Increase Movement Power of … by … Merit Rank: movement power scheme effect value (-20/year)
Otherwise
- Decrease Movement Power of … by … Merit Rank: movement power scheme effect value (+20/year)
update_movement_power_effect = yes
• 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 (83 lines of game script)
scheme_change_movement_power_effect = {
save_scope_value_as = {
name = movement_power_scheme_effect_value
value = {
value = $VALUE$
multiply = 100
}
}
if = {
limit = {
scope:movement_power_scheme_effect_value >= 0
}
if = {
limit = {
exists = var:movement_power_increased_scheme
}
set_variable = {
name = movement_power_increased_scheme
value = {
value = var:movement_power_increased_scheme
add = $VALUE$
}
}
}
else = {
set_variable = {
name = movement_power_increased_scheme
value = $VALUE$
}
}
}
else = {
if = {
limit = {
exists = var:movement_power_decreased_scheme
}
set_variable = {
name = movement_power_decreased_scheme
value = {
value = var:movement_power_decreased_scheme
add = $VALUE$
}
}
}
else = {
set_variable = {
name = movement_power_decreased_scheme
value = $VALUE$
}
}
}
#force the update of variables to immediately show changes
if = { #for characters
limit = {
exists = var:movement_power_individual
}
if = {
limit = {
scope:movement_power_scheme_effect_value >= 0
}
custom_tooltip = movement_power_scheme.tt.increased_character
}
else = {
custom_tooltip = movement_power_scheme.tt.decreased_character
}
update_character_movement_power_effect = yes
top_participant_group:dynastic_cycle ?= {
update_movement_power_effect = yes
}
}
else = { #for movements
if = {
limit = {
scope:movement_power_scheme_effect_value >= 0
}
custom_tooltip = movement_power_scheme.tt.increased_movement
}
else = {
custom_tooltip = movement_power_scheme.tt.decreased_movement
}
update_movement_power_effect = yes
}
}As written in game/common/scripted_effects/10_dlc_tgp_scripted_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls scheme_change_movement_power_effect.
Events (2)
- …: Success
scheme_critical_moments.1232 - …: Success
scheme_critical_moments.1235
Source: game/common/scripted_effects/10_dlc_tgp_scripted_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.