Scripted effect
yearly_0001_set_random_weighted_skill_effect
yearly_0001_set_random_weighted_skill_effect = { MENTEE = … MENTOR = … }game/common/scripted_effects/00_yearly_event_effects.txt, line 9 (73 lines). Parameters: $MENTEE$, $MENTOR$.
yearly_0001_set_random_weighted_skill_effect is a scripted effect in Crusader Kings III, written at line 9 of its file. A call passes 2 parameters: MENTEE and MENTOR. The game's script calls it in 1 place, among them yearly.0001 (event). Patch 1.20.1.2, from game/common/scripted_effects/00_yearly_event_effects.txt.
What it does
- 1 of 5 things will happen:
- 20%: Nothing else happens
- 20%: Nothing else happens
- 20%: Nothing else happens
- 20%: Nothing else happens
- 20%: Nothing else happens
• 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 (73 lines of game script)
yearly_0001_set_random_weighted_skill_effect = {
set_variable = {
name = yearly_0001_skill
value = flag:diplomacy
}
random_list = {
20 = {
#Must be better at the skill we pick than our liege.
trigger = {
$MENTEE$.diplomacy < $MENTOR$.diplomacy
}
$MENTEE$ = {
set_variable = {
name = yearly_0001_skill
value = flag:diplomacy
}
}
}
20 = {
#Must be better at the skill we pick than our liege.
trigger = {
$MENTEE$.martial < $MENTOR$.martial
}
$MENTEE$ = {
set_variable = {
name = yearly_0001_skill
value = flag:martial
}
}
}
20 = {
#Must be better at the skill we pick than our liege.
trigger = {
$MENTEE$.stewardship < $MENTOR$.stewardship
}
$MENTEE$ = {
set_variable = {
name = yearly_0001_skill
value = flag:stewardship
}
}
}
20 = {
#Must be better at the skill we pick than our liege.
trigger = {
$MENTEE$.intrigue < $MENTOR$.intrigue
}
$MENTEE$ = {
set_variable = {
name = yearly_0001_skill
value = flag:intrigue
}
}
}
20 = {
#
trigger = {
$MENTEE$.learning < $MENTOR$.learning
}
$MENTEE$ = {
set_variable = {
name = yearly_0001_skill
value = flag:learning
}
}
}
}
}As written in game/common/scripted_effects/00_yearly_event_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls yearly_0001_set_random_weighted_skill_effect.
Events (1)
Source: game/common/scripted_effects/00_yearly_event_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.