Scripted effect
resolve_pilgrimage_type_reward_effect
resolve_pilgrimage_type_reward_effect = yesgame/common/scripted_effects/00_pilgrimage_effects.txt, line 1301 (118 lines). No parameters.
resolve_pilgrimage_type_reward_effect is a scripted effect in Crusader Kings III, written at line 1301 of its file. It takes no parameters: resolve_pilgrimage_type_reward_effect = yes. The game's script calls it in 1 place, among them Pilgrimage (activity). Patch 1.20.1.2, from game/common/scripted_effects/00_pilgrimage_effects.txt.
The comment above it in the file
Account for the state of our variables, apply flags that are resolved in give_pilgrimage_reward_effect - run in pilgrimage.7000
What it does
• 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 (118 lines of game script)
resolve_pilgrimage_type_reward_effect = {
#Pious Type
involved_activity ?= {
if = {
limit = {
#Pious and Hajj
OR = {
activity_has_pious_pilgrimage_type_trigger = yes
activity_has_hajj_pilgrimage_type_trigger = yes
}
}
#Perfect piousness - 75-100
if = {
limit = { var:activity_special_type_progression >= 75 }
scope:host = { add_character_flag = perfect_pious_reward }
}
#High-end piousness - 50-75
else_if = {
limit = {
var:activity_special_type_progression < 75
var:activity_special_type_progression >= 50
}
scope:host = { add_character_flag = high_pious_reward }
}
#OK piousness - 25-50
else_if = {
limit = {
var:activity_special_type_progression < 50
var:activity_special_type_progression >= 25
}
scope:host = { add_character_flag = mid_pious_reward }
}
#Lousy piousness - 0-25
else = {
scope:host = { add_character_flag = low_pious_reward }
}
}
#Worldly Type
if = {
limit = { activity_has_worldly_pilgrimage_type_trigger = yes }
#Perfect worldliness - 75-100
if = {
limit = { var:activity_special_type_progression >= 75 }
scope:host = { add_character_flag = perfect_worldly_reward }
}
#High end worldliness - 50-75
else_if = {
limit = {
var:activity_special_type_progression < 75
var:activity_special_type_progression >= 50
}
scope:host = { add_character_flag = high_worldly_reward }
}
#OK piousness - 25-50
else_if = {
limit = {
var:activity_special_type_progression < 50
var:activity_special_type_progression >= 25
}
scope:host = { add_character_flag = mid_worldly_reward }
}
#Lousy piousness - 0-25
else = {
scope:host = { add_character_flag = low_worldly_reward }
}
}
}
if = {
limit = {
scope:host = {
has_trait_xp = {
trait = pilgrim
value >= 50
}
NOR = {
has_character_flag = pilgrim_legend
has_game_rule = historical_legends_only
}
has_dlc_feature = legends
}
}
scope:host = {
random = {
chance = {
value = legend_seed_chance_low #15%
if = {
limit = {
has_trait_xp = {
trait = pilgrim
value >= 75
}
}
add = legend_seed_chance_medium #55% chance
}
else_if = {
limit = {
has_trait_xp = {
trait = pilgrim
value >= 60
}
}
add = legend_seed_chance_low #30% chance
}
}
add_character_flag = pilgrim_legend
create_legend_seed = {
type = holy
quality = famed
chronicle = saintly_deed
properties = {
ancestor = scope:host
religion = scope:host.religion
}
}
}
}
}
}As written in game/common/scripted_effects/00_pilgrimage_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls resolve_pilgrimage_type_reward_effect.
Activities (1)
Source: game/common/scripted_effects/00_pilgrimage_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.