Scripted effect
add_random_tiered_trait_xp_effect
add_random_tiered_trait_xp_effect = { LEVEL_1 = … LEVEL_3 = … TRAIT = … }game/common/scripted_effects/00_pool_effects.txt, line 76 (45 lines). Parameters: $LEVEL_1$, $LEVEL_3$, $TRAIT$.
add_random_tiered_trait_xp_effect is a scripted effect in Crusader Kings III, written at line 76 of its file. A call passes 3 parameters: LEVEL_1, LEVEL_3 and TRAIT. The game's script calls it in 48 places, among them A Cure for Acedia (event fp3_yearly.8037), Accusations of … (event stewardship_general.1054) and An Acidic Accident (event fp3_yearly.8021). Patch 1.20.1.2, from game/common/scripted_effects/00_pool_effects.txt.
What it does
- If has the Trait: … › 1 of 3 things will happen:
- 50%: $TRAIT$ experience changes
- 33%: $TRAIT$ experience changes
- 17%: $TRAIT$ experience +100
• 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 (45 lines of game script)
add_random_tiered_trait_xp_effect = {
save_scope_value_as = {
name = level_1_possible
value = flag:$LEVEL_1$
}
save_scope_value_as = {
name = level_3_possible
value = flag:$LEVEL_3$
}
if = {
limit = { has_trait = $TRAIT$ }
random_list = {
15 = {
trigger = { scope:level_1_possible = flag:yes }
add_trait_xp = {
trait = $TRAIT$
value = {
integer_range = {
min = small_lifestyle_random_xp_low
max = small_lifestyle_random_xp_high
}
}
}
}
10 = {
add_trait_xp = {
trait = $TRAIT$
value = {
integer_range = {
min = medium_lifestyle_random_xp_low
max = medium_lifestyle_random_xp_high
}
}
}
}
5 = {
trigger = { scope:level_3_possible = flag:yes }
add_trait_xp = {
trait = $TRAIT$
value = 100
}
}
}
}
}As written in game/common/scripted_effects/00_pool_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls add_random_tiered_trait_xp_effect.
Events (8)
- A Cure for Acedia
fp3_yearly.8037 - Accusations of …
stewardship_general.1054 - An Acidic Accident
fp3_yearly.8021 - An Anatomical Expert
court.0109 - Explorers from the South
fp1_yearly.0041 - Flight of Fancy
fp2_yearly.8003
Scripted effects inside an event file (1)
- cultural_tradition_events_grab_or_make_mendicant_effect
Scripted character templates (39)
- accolade_contender_character
- accolade_disciplinarian_character
- accolade_fanatic_character
- accolade_house_knight_character
- accolade_lancer_character
- accolade_marauder_character
33 more
- accolade_skirmisher_character
- accolade_stalwart_character
- accolade_thug_character
- accolade_valiant_character
- accolade_vanguard_character
- ancient_forest_traveler_character
- bp1_yearly_2021_diplomacy_person_template
- culture_defender_knight_template
- foreign_mercenary_template
- fp3_gnostic_paragon
- fp3_raging_ghazi_character
- fp3_sufi_mystic
- fp3_zoroastrian_armed_pilgrim
- local_saint_template
- mendicant_mystic_character
- millenarian_template
- new_berserker_character
- new_warrior_character
- pilgrim_character
- pool_repopulate_learning
- pool_repopulate_local_flavor
- pool_repopulate_prowess
- preacher_template
- stylite_saint_character
- symposium_template
- tgp_japan_yearly_events_tengu_warrior_template
- tgp_warrior_monk_template
- tournament_foot_character
- tournament_mulan_character
- trepanner_character
- varangian_template
- wetlands_commander_character
- wise_woman_character
Source: game/common/scripted_effects/00_pool_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.