Scripted effect
give_pilgrim_trait_or_xp_effect
give_pilgrim_trait_or_xp_effect = yesgame/common/scripted_effects/00_pilgrimage_effects.txt, line 216 (181 lines). No parameters.
give_pilgrim_trait_or_xp_effect is a scripted effect in Crusader Kings III, written at line 216 of its file. It takes no parameters: give_pilgrim_trait_or_xp_effect = yes. The game's script calls it in 26 places, among them Alexandria! (event pilgrimage.5031), All Roads Lead to Rome (event pilgrimage.5001) and Ayodhya (event pilgrimage.5311). Patch 1.20.1.2, from game/common/scripted_effects/00_pilgrimage_effects.txt.
The comment above it in the file
Grants you Pilgrimage trait as appropriate; if you already have the trait it either gives xp or piety. Also logs arrival in activity log for host
What it does
If
Then
If
a check the game hides
Then
Otherwise
• 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 (120 lines of game script)
give_pilgrim_trait_or_xp_effect = {
if = {
limit = { has_hajj_pilgrimage_type_trigger = no }
if = { # Host
limit = { this = involved_activity.activity_host }
involved_activity = {
add_activity_log_entry = {
key = pilgrimage_arrived_log
score = 50
tags = { arrived }
character = root
show_in_conclusion = yes
#Effects
root = {
if = {
limit = {
NOT = { has_trait = pilgrim }
}
add_trait = pilgrim
}
else_if = {
if = {
limit = {
has_pam_dlc_trigger = yes
faith = { has_variable = pam_secured_pilgrim_routes }
has_trait_xp = {
trait = pilgrim
value < 100
}
}
add_trait_xp = {
trait = pilgrim
value = 30
}
}
else_if = {
limit = {
has_trait_xp = {
trait = pilgrim
value < 100
}
}
}
else = {
add_trait_xp = {
trait = pilgrim
value = 20
}
}
}
else_if = {
limit = { has_lifestyle = learning_lifestyle }
add_learning_lifestyle_xp = major_lifestyle_xp
}
else = { add_character_flag = should_get_trait_piety }
}
}
}
}
else = { # Non-Host
if = {
limit = {
NOT = { has_trait = pilgrim }
}
add_trait = pilgrim
}
else_if = {
if = {
limit = {
has_pam_dlc_trigger = yes
faith = { has_variable = pam_secured_pilgrim_routes }
has_trait_xp = {
trait = pilgrim
value < 100
}
}
add_trait_xp = {
trait = pilgrim
value = 20
}
}
else_if = {
limit = {
has_trait_xp = {
trait = pilgrim
value < 100
}
}
add_trait_xp = {
trait = pilgrim
value = 10
}
}
else_if = {
limit = { has_lifestyle = learning_lifestyle }
add_learning_lifestyle_xp = major_lifestyle_xp
}
else = { add_character_flag = should_get_trait_piety }
}
}
}
#Add trait or xp for any people coming along as well
if = {
limit = {
has_hajj_pilgrimage_type_trigger = yes
this = involved_activity.activity_host
current_travel_plan ?= {
any_entourage_character = {
religion = religion:islam_religion
has_hajj_pilgrimage_type_trigger = yes
}
}
}
#To get the past tense loc for the Obligatory arrival
custom_description_no_bullet = {
text = pilgrimage_entourage_gains_hajjaj_trait
hidden_effect = {
current_travel_plan = {
every_entourage_character = {
if = {As written in game/common/scripted_effects/00_pilgrimage_effects.txt.
The first 120 of its 181 lines; the rest is in game/common/scripted_effects/00_pilgrimage_effects.txt from line 216.
Where it is used
Every place in common/, events/ and history/ that calls give_pilgrim_trait_or_xp_effect.
Events (26)
- Alexandria!
pilgrimage.5031 - All Roads Lead to Rome
pilgrimage.5001 - Ayodhya
pilgrimage.5311 - Been There
pilgrimage.4010 - Bodh Gaya
pilgrimage.5401 - Dwarka
pilgrimage.5361
20 more
- Haridwar
pilgrimage.5331 - Kanchipuram
pilgrimage.5341 - Kushinagar
pilgrimage.5411 - Mathura
pilgrimage.5321 - Memento Mori
pilgrimage.4020 - O Jerusalem, Jerusalem!
pilgrimage.5011 - Open Blue Skies
pilgrimage.5911 - Paderborn!
pilgrimage.5901 - Parikrama
pilgrimage.5445 - Sacred Groves
pilgrimage.5921 - Sarnath
pilgrimage.5421 - Shikharji
pilgrimage.5501 - Sinai and Horeb
pilgrimage.5101 - The Arrival
pilgrimage.4001 - The Arrival
pilgrimage.4002 - The City of the World's Desire!
pilgrimage.5021 - The Divine Consciousness
pilgrimage.5601 - The Hegira
pilgrimage.5201 - Ujjayini
pilgrimage.5351 - Varanasi
pilgrimage.5301
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.