Scripted effect
laamp_rewards_apply_knight_errant_xp_effect
laamp_rewards_apply_knight_errant_xp_effect = { XP_MAX = … XP_MIN = … }game/common/scripted_effects/00_laamp_effects.txt, line 636 (21 lines). Parameters: $XP_MAX$, $XP_MIN$.
laamp_rewards_apply_knight_errant_xp_effect is a scripted effect in Crusader Kings III, written at line 636 of its file. A call passes 2 parameters: XP_MAX and XP_MIN. The game's script calls it in 10 places, among them laamp_base_1001 (contract), laamp_base_1011 (contract) and laamp_base_1021 (contract). Patch 1.20.1.2, from game/common/scripted_effects/00_laamp_effects.txt.
The comment above it in the file
Dish out XP in the Knight-Errant trait.
What it does
- If has the Trait: Knight-Errant: Knight-Errant experience changes
• 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 (21 lines of game script)
laamp_rewards_apply_knight_errant_xp_effect = {
if = {
limit = { has_trait = knight_errant }
save_scope_as = xp_gainer
save_scope_value_as = {
name = xp_change_min
value = $XP_MIN$
}
add_trait_xp = {
trait = knight_errant
value = {
# Always use the gallowsbait_xp_minor_gain and related values for positive gains to ensure proper multipliers are applied!
integer_range = {
min = $XP_MIN$
max = $XP_MAX$
}
floor = yes # Round numbers down when modified
}
}
}
}As written in game/common/scripted_effects/00_laamp_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls laamp_rewards_apply_knight_errant_xp_effect.
Task contracts (10)
- laamp_base_1001
- laamp_base_1011
- laamp_base_1021
- laamp_base_1031
- laamp_base_5011
- laamp_base_5021
4 more
- laamp_base_6001
- laamp_base_6011
- laamp_base_6021
- laamp_base_6031
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.