Scripted effect
give_witch_secret_or_trait_effect
give_witch_secret_or_trait_effect = yesgame/common/scripted_effects/00_secret_effects.txt, line 145 (69 lines). No parameters.
give_witch_secret_or_trait_effect is a scripted effect in Crusader Kings III, written at line 145 of its file. It takes no parameters: give_witch_secret_or_trait_effect = yes. The game's script calls it in 30 places, among them … of the North Sea (event fp1_major_decisions.1002), …: (event health.3001) and A Coin for a Fortune (event cultural_festival.9040). Patch 1.20.1.2, from game/common/scripted_effects/00_secret_effects.txt.
What it does
If
is_witch_trigger = no
Then
If
- Is available
NOT = { knows_doctrine = doctrine_witchcraft_accepted }
Then
add_known_doctrine = doctrine_witchcraft_accepted
If
trait_is_shunned_or_criminal_in_my_or_lieges_rite_trigger = { TRAIT = trait:witch GENDER_CHARACTER = scope:witch_character }
Then
add_secret = { type = secret_witch }shunned_or_criminal_sf_impact_effect = { TRAIT = trait:witch }
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 (69 lines of game script)
give_witch_secret_or_trait_effect = {
save_temporary_scope_as = witch_character
if = {
limit = { #Not already a witch
is_witch_trigger = no
}
if = {
limit = {
is_available_quick = { advanced_ruler = yes }
NOT = { knows_doctrine = doctrine_witchcraft_accepted }
}
add_known_doctrine = doctrine_witchcraft_accepted
}
if = {
limit = {
trait_is_shunned_or_criminal_in_my_or_lieges_rite_trigger = { TRAIT = trait:witch GENDER_CHARACTER = scope:witch_character }
}
add_secret = {
type = secret_witch
}
shunned_or_criminal_sf_impact_effect = { TRAIT = trait:witch }
random_secret = {
type = secret_witch
save_scope_as = witch_secret
}
# If you have a legend maybe we change it?
if = {
limit = {
has_legend_chapter_trigger = { CHAPTER = opening }
}
random = {
chance = 10
send_interface_toast = {
title = legend_chapter_change_toast
left_icon = root
promoted_legend = {
set_legend_chapter = {
name = opening
localization_key = legend_chapter_opening_witch
}
}
}
}
}
}
else = {
add_trait = witch
# If you have a legend maybe we change it?
if = {
limit = {
has_legend_chapter_trigger = { CHAPTER = opening }
}
random = {
chance = 10
send_interface_toast = {
title = legend_chapter_change_toast
left_icon = root
promoted_legend = {
set_legend_chapter = {
name = opening
localization_key = legend_chapter_opening_witch
}
}
}
}
}
}
}
}As written in game/common/scripted_effects/00_secret_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls give_witch_secret_or_trait_effect.
Events (19)
- … of the North Sea
fp1_major_decisions.1002 - …:
health.3001 - A Coin for a Fortune
cultural_festival.9040 - A Message From Beyond
trait_specific_ongoing.2002 - A Most Miraculous Fish
learning_medicine_special.2100 - A New Hobby
bp1_yearly.1000
13 more
- A Servant of …
witch.2002 - Accursed
fp1_yearly.0111 - Convert to Witchcraft: A New Novice
witch.2003 - Divine Judgment
witch.4003 - Every … for …
yearly.1030 - Secrets of Nature
learning_medicine.2002 - Secrets of Nature
learning_medicine.2003 - Study Rite: Practitioner of Ancient Rites
study_faith_ongoing.1012 - The … of …
travel_events.4033 - The Borders of Faith
fp2_struggle.2006 - The Good Witch of the Bog
bp1_yearly.9035 - Whispers of Witchcraft
bookmark.1067 - Wise …
playdate.3013
Scripted effects inside an event file (1)
- witch_4030_convince_success_effect
History files (the start of the game) (7)
- 40606 (characters)
- easteregg_celine_jensen (characters)
- easteregg_david_drake (characters)
- easteregg_elisabeth_gangenes (characters)
- easteregg_francesca_passoni (characters)
- easteregg_linnea_thimren (characters)
1 more
- easteregg_nicholas_meredith (characters)
Source: game/common/scripted_effects/00_secret_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.