Scripted effect
add_focused_lifestyle_xp_effect
add_focused_lifestyle_xp_effect = { AMOUNT = … }game/common/scripted_effects/00_lifestyle_focus_effects.txt, line 899 (36 lines). Parameters: $AMOUNT$.
add_focused_lifestyle_xp_effect is a scripted effect in Crusader Kings III, written at line 899 of its file. A call passes 1 parameter: AMOUNT. The game's script calls it in 2 places, among them …: Win Some, Lose Some (event scheme_critical_moments.1226) and A Lack of Discipline (event chinese_students.0003). Patch 1.20.1.2, from game/common/scripted_effects/00_lifestyle_focus_effects.txt.
The comment above it in the file
If you don't have a lifestyle focus, this will yield xp in a random lifestyle Takes the amount of _lifestyle_xp you want to hand out as an argument, from the scripted values
What it does
If
has_lifestyle = diplomacy_lifestyle
Then
add_diplomacy_lifestyle_xp = $AMOUNT$_lifestyle_xp
Else if
has_lifestyle = martial_lifestyle
Then
add_martial_lifestyle_xp = $AMOUNT$_lifestyle_xp
Else if
has_lifestyle = stewardship_lifestyle
Then
add_stewardship_lifestyle_xp = $AMOUNT$_lifestyle_xp
Else if
has_lifestyle = intrigue_lifestyle
Then
add_intrigue_lifestyle_xp = $AMOUNT$_lifestyle_xp
Else if
has_lifestyle = learning_lifestyle
Then
add_learning_lifestyle_xp = $AMOUNT$_lifestyle_xp
Else if
has_lifestyle = wanderer_lifestyle
Then
add_wanderer_lifestyle_xp = $AMOUNT$_lifestyle_xp
Otherwise
- 1 of 5 things will happen:
- 20%:
add_diplomacy_lifestyle_xp = $AMOUNT$_lifestyle_xp
- 20%:
add_martial_lifestyle_xp = $AMOUNT$_lifestyle_xp
- 20%:
add_stewardship_lifestyle_xp = $AMOUNT$_lifestyle_xp
- 20%:
add_intrigue_lifestyle_xp = $AMOUNT$_lifestyle_xp
- 20%:
add_learning_lifestyle_xp = $AMOUNT$_lifestyle_xp
- 20%:
• 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 (36 lines of game script)
add_focused_lifestyle_xp_effect = {
if = {
limit = { has_lifestyle = diplomacy_lifestyle }
add_diplomacy_lifestyle_xp = $AMOUNT$_lifestyle_xp
}
else_if = {
limit = { has_lifestyle = martial_lifestyle }
add_martial_lifestyle_xp = $AMOUNT$_lifestyle_xp
}
else_if = {
limit = { has_lifestyle = stewardship_lifestyle }
add_stewardship_lifestyle_xp = $AMOUNT$_lifestyle_xp
}
else_if = {
limit = { has_lifestyle = intrigue_lifestyle }
add_intrigue_lifestyle_xp = $AMOUNT$_lifestyle_xp
}
else_if = {
limit = { has_lifestyle = learning_lifestyle }
add_learning_lifestyle_xp = $AMOUNT$_lifestyle_xp
}
else_if = {
limit = { has_lifestyle = wanderer_lifestyle }
add_wanderer_lifestyle_xp = $AMOUNT$_lifestyle_xp
}
else = {
random_list = {
10 = { add_diplomacy_lifestyle_xp = $AMOUNT$_lifestyle_xp }
10 = { add_martial_lifestyle_xp = $AMOUNT$_lifestyle_xp }
10 = { add_stewardship_lifestyle_xp = $AMOUNT$_lifestyle_xp }
10 = { add_intrigue_lifestyle_xp = $AMOUNT$_lifestyle_xp }
10 = { add_learning_lifestyle_xp = $AMOUNT$_lifestyle_xp }
# Excludes wanderer since it's picked less often
}
}
}As written in game/common/scripted_effects/00_lifestyle_focus_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls add_focused_lifestyle_xp_effect.
Events (2)
- …: Win Some, Lose Some
scheme_critical_moments.1226 - A Lack of Discipline
chinese_students.0003
Source: game/common/scripted_effects/00_lifestyle_focus_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.