CK3 DatabaseCrusader Kings III · 1.20.1.2 “Crozier” · unofficial
Silk & Silverout Tue, Nov 17What's free, what needs the DLC, price →

Scripted effect

give_witch_secret_or_trait_effect

give_witch_secret_or_trait_effect = yes

game/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

• 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)

13 more

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.

Spotted a mistake on this page?