Scripted effect
give_hajj_trait_or_xp_effect
give_hajj_trait_or_xp_effect = yesgame/common/scripted_effects/00_pilgrimage_effects.txt, line 399 (87 lines). No parameters.
give_hajj_trait_or_xp_effect is a scripted effect in Crusader Kings III, written at line 399 of its file. It takes no parameters: give_hajj_trait_or_xp_effect = yes. The game's script calls it in 1 place, among them pilgrimage_completed_log_entry_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_effects/00_pilgrimage_effects.txt.
The comment above it in the file
Grants you Hajjaj trait as appropriate; if you already have the trait it either gives xp or piety. Also logs the effect in activity log for host
What it does
- If does not have the Trait: Hajji: Gains the Trait Hajji
- Else, if all of these hold:
- Conditions:
has_lifestyle = learning_lifestyle
- Then:
add_learning_lifestyle_xp = major_lifestyle_xp
- Conditions:
give_pilgrimage_reward_effect = yes
• 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 (87 lines of game script)
give_hajj_trait_or_xp_effect = {
if = {
limit = {
NOT = { has_trait = hajjaj }
}
add_trait = hajjaj
}
else_if = {
limit = { has_lifestyle = learning_lifestyle }
add_learning_lifestyle_xp = major_lifestyle_xp
}
else = { add_character_flag = should_get_trait_piety }
give_pilgrimage_reward_effect = yes
#Add trait or xp for any people coming along as well
if = {
limit = {
this = involved_activity.activity_host
current_travel_plan ?= {
any_entourage_character = {
religion = religion:islam_religion
NOT = { has_trait = hajjaj }
}
}
}
#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 = {
limit = {
religion = religion:islam_religion
NOT = { has_trait = hajjaj }
}
add_trait = hajjaj
}
}
}
}
}
if = {
limit = {
this = involved_activity.activity_host
current_travel_plan ?= {
any_entourage_character = {
NOT = { religion = religion:islam_religion }
exists = involved_activity
save_temporary_scope_as = pilgrim_temp
faith = {
any_holy_site_barony = { this = scope:pilgrim_temp.involved_activity.activity_location.barony }
}
}
}
}
#To get the past tense loc for the Obligatory arrival
custom_description_no_bullet = {
text = pilgrimage_entourage_gains_pilgrim_trait
hidden_effect = {
current_travel_plan = {
every_entourage_character = {
limit = {
NOT = { religion = religion:islam_religion }
exists = involved_activity
save_temporary_scope_as = pilgrim_temp
faith = {
any_holy_site_barony = { this = scope:pilgrim_temp.involved_activity.activity_location.barony }
}
}
if = {
limit = {
NOT = { has_trait = pilgrim }
}
add_trait = pilgrim
}
else_if = {
limit = { has_trait = pilgrim }
add_trait_xp = {
trait = pilgrim
value = 10
}
}
}
}
}
}
}
}As written in game/common/scripted_effects/00_pilgrimage_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls give_hajj_trait_or_xp_effect.
Scripted effects (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.