Scripted effect
add_random_tiered_trait_track_xp_effect
add_random_tiered_trait_track_xp_effect = { LEVEL_1 = … LEVEL_3 = … TRACK = … TRAIT = … }game/common/scripted_effects/00_pool_effects.txt, line 122 (48 lines). Parameters: $LEVEL_1$, $LEVEL_3$, $TRACK$, $TRAIT$.
add_random_tiered_trait_track_xp_effect is a scripted effect in Crusader Kings III, written at line 122 of its file. A call passes 4 parameters: LEVEL_1, LEVEL_3, TRACK and TRAIT. The game's script calls it in 54 places, among them Mediators of … (event ep3_emperor_yearly.2110), trait_specific.0001 (event) and spawn_temujin_character_effect (scripted effect). 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$ ($TRACK$) experience changes
- 33%: $TRAIT$ ($TRACK$) experience changes
- 17%: $TRAIT$ ($TRACK$) 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 (48 lines of game script)
add_random_tiered_trait_track_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$
track = $TRACK$
value = {
integer_range = {
min = small_lifestyle_random_xp_low
max = small_lifestyle_random_xp_high
}
}
}
}
10 = {
add_trait_xp = {
trait = $TRAIT$
track = $TRACK$
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$
track = $TRACK$
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_track_xp_effect.
Events (2)
- Mediators of …
ep3_emperor_yearly.2110 - trait_specific.0001
Scripted effects (1)
Scripted character templates (51)
- accolade_archer_character
- accolade_besieger_character
- accolade_camelry_character
- accolade_crossbowmen_character
- accolade_horse_archer_character
- accolade_house_knight_character
45 more
- accolade_huntsmaster_character
- accolade_idealist_character
- accolade_marauder_character
- accolade_outrider_character
- accolade_skirmisher_character
- accolade_stalwart_character
- accolade_tactician_character
- accolade_valiant_character
- ambassador_template
- ancient_forest_traveler_character
- bandit_character
- bandit_character_generic
- celebration_chessmaster_character
- celebration_hunter_character
- chagatai_character_template
- court_linguist_good_template
- court_linguist_medium_template
- culture_defender_knight_template
- demanding_poet_diplomacy_character
- demanding_poet_martial_character
- dynamic_genghis_character_template
- ep3_poet_template
- ep3_poet_toned_down_template
- falconer_template
- foreign_mercenary_template
- forest_commander_character
- fp3_turko-mongol_leader
- genghis_khan_character_template
- good_merchant_template
- hunter_template
- jochi_character_template
- jungle_commander_character
- mime_template
- new_berserker_character
- new_warrior_character
- open_commander_character
- pool_repopulate_diplomacy
- pool_repopulate_local_flavor
- pool_repopulate_martial
- pool_repopulate_prowess
- subutai_character_template
- tgp_warrior_monk_template
- tournament_archery_character
- tournament_horse_character
- tournament_pugilism_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.