Scripted trigger
harm_game_rule_enablement_trigger
harm_game_rule_enablement_trigger = yesgame/common/scripted_triggers/00_game_rule_triggers.txt, line 54 (28 lines). No parameters.
harm_game_rule_enablement_trigger is a scripted trigger in Crusader Kings III, written at line 54 of its file. It takes no parameters: harm_game_rule_enablement_trigger = yes (or no). The game's script calls it in 11 places, among them A Disastrous Victory (event harm.2071), Camp Fever (event harm.2001) and For the Realm (event harm.2041). Patch 1.20.1.2, from game/common/scripted_triggers/00_game_rule_triggers.txt.
The comment above it in the file
Sometimes we disable these events for specific characters.
What it checks
- Depending on has game rule:
- When has game rule is harm safe: Never
- When has game rule is harm target player only: Is played by a person
- When has game rule is harm target ai only: Is played by the AI
- In any other case:
always = yes
- If played by a person:
player_heir.dynasty ?= dynasty
- Does not have the trait Immortal
• 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 (28 lines of game script)
harm_game_rule_enablement_trigger = {
# Disable entirely if harm_safe.
switch = {
trigger = has_game_rule
harm_safe = {
always = no
}
harm_target_player_only = {
is_ai = no
}
harm_target_ai_only = {
is_ai = yes
}
fallback = {
always = yes
}
}
# Never just kill the player if it'd utterly game-over them.
trigger_if = {
limit = { is_ai = no }
# Either because they have no heir.
exists = player_heir
# Or because they have an heir they can't survive with.
player_heir.dynasty ?= dynasty
}
# Immortals do not receive harm events, as they would be inevitably killed by them over a long enough period of time.
NOT = { has_trait_with_flag = is_immortal }
}As written in game/common/scripted_triggers/00_game_rule_triggers.txt.
Where it is used
Every place in common/, events/ and history/ that calls harm_game_rule_enablement_trigger.
Events (9)
- A Disastrous Victory
harm.2071 - Camp Fever
harm.2001 - For the Realm
harm.2041 - harm.9501
- Harried Each Step
harm.2061 - Marching Malaise
harm.2011
3 more
- So... Cold...
harm.2021 - So... Hot...
harm.2031 - Starvation
harm.2051
Scripted triggers inside an event file (2)
- harm_0001_general_requirements_trigger
- harm_0012_valid_commander_trigger
Source: game/common/scripted_triggers/00_game_rule_triggers.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.