Scripted effect
progress_towards_hook_effect
progress_towards_hook_effect = { CHARACTER = … HOOK_TYPE = … }game/common/scripted_effects/00_relation_effects.txt, line 1230 (31 lines). Parameters: $CHARACTER$, $HOOK_TYPE$.
progress_towards_hook_effect is a scripted effect in Crusader Kings III, written at line 1230 of its file. A call passes 2 parameters: CHARACTER and HOOK_TYPE. The game's script calls it in 11 places, among them host_gains_intrigue_xp (activity pulse), …: the … Ward (event host_dinner_events.3031) and A Cake to Remember (event host_dinner_events.1021). Patch 1.20.1.2, from game/common/scripted_effects/00_relation_effects.txt.
The comment above it in the file
Sets favor relation, then gives hook
What it does
If
NOT = { has_hook = $CHARACTER$ }has_relation_potential_hook = $CHARACTER$
Then
add_hook = { type = $HOOK_TYPE$ target = $CHARACTER$ }
Otherwise
If
NOT = { has_hook = $CHARACTER$ }
Then
set_relation_potential_hook = $CHARACTER$
Otherwise
reverse_add_opinion = { target = $CHARACTER$ modifier = favor_opinion opinion = 25 }
• 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 (31 lines of game script)
progress_towards_hook_effect = {
#If has potential favor, give hook!
if = {
limit = {
NOT = {
has_hook = $CHARACTER$
}
has_relation_potential_hook = $CHARACTER$
}
add_hook = {
type = $HOOK_TYPE$
target = $CHARACTER$
}
}
# If not...
else = {
if = {
limit = {
NOT = { has_hook = $CHARACTER$ }
}
set_relation_potential_hook = $CHARACTER$
}
else = {
reverse_add_opinion = {
target = $CHARACTER$
modifier = favor_opinion
opinion = 25
}
}
}
}As written in game/common/scripted_effects/00_relation_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls progress_towards_hook_effect.
Activity pulse actions (1)
- host_gains_intrigue_xp
Events (6)
- …: the … Ward
host_dinner_events.3031 - A Cake to Remember
host_dinner_events.1021 - A Protégé
host_dinner_events.3030 - An Unwelcome Guest
host_dinner_events.1030 - An Unwelcome Guest
host_dinner_events.1031 - Dietary Differences
host_dinner_events.1011
Scripted effects inside an event file (3)
- 1003_liege_enjoys_effect
- 3020_drinking_duel_effect
- host_dinner_3010_give_local_food
Scripted effects (1)
Source: game/common/scripted_effects/00_relation_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.