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

Scripted effect

stress_threshold_event_aftereffects

stress_threshold_event_aftereffects = yes

game/common/scripted_effects/00_stress_effects.txt, line 47 (50 lines). No parameters.

stress_threshold_event_aftereffects is a scripted effect in Crusader Kings III, written at line 47 of its file. It takes no parameters: stress_threshold_event_aftereffects = yes. The game's script calls it in 41 places, among them Mental Break: A Friend in Need (event stress_threshold_prison.3001), Mental Break: A Grasp on Power (event stress_threshold_prison.1031) and Mental Break: A Visitor (event stress_threshold.2360). Its body carries 1 text of the game's own for the player. Patch 1.20.1.2, from game/common/scripted_effects/00_stress_effects.txt.

The comment above it in the file

Must be run in the 'after' EVERY stress threshold event, to ensure all tasks the system expect to execute are done properly.

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 (50 lines of game script)
stress_threshold_event_aftereffects = {
	if = {
		limit = {
			is_alive = yes
		}
		
		# Clean up all event option flags.
		remove_stress_threshold_option_flags_effect = yes

		# Based on the character's recorded stress level, apply the appropraite cooldown flag for the cooldown duration - 1 days.
		if = {
			limit = {
				has_character_flag = apply_stress_threshold_cooldown_level_3
			}
			add_character_flag = {
				flag = stress_threshold_event_3_cooldown
				days = stress_threshold_cooldown_duration # 1 day less than 5 years (8 with Perk)
			}
		}
		else_if = {
			limit = {
				has_character_flag = apply_stress_threshold_cooldown_level_2
			}
			add_character_flag = {
				flag = stress_threshold_event_2_cooldown
				days = stress_threshold_cooldown_duration # 1 day less than 5 years (8 with Perk)
			}
		}
		else = {
			add_character_flag = {
				flag = stress_threshold_event_1_cooldown
				days = stress_threshold_cooldown_duration # 1 day less than 5 years (8 with Perk)
			}
		}
		
		# Remove the character's recorded stress level flags.
		remove_character_flag = apply_stress_threshold_cooldown_level_3
		remove_character_flag = apply_stress_threshold_cooldown_level_2
		remove_character_flag = apply_stress_threshold_cooldown_level_1

		# Schedule a new stress event to occur after the cooldown duration has elapsed.
		trigger_event = {
			id = stress_threshold.0005
			days = stress_threshold_second_check_timing # 5 year maximum between events (8 with Perk)
		}

		# Warn the player that they will receive another event if they are still Stressed.
		custom_tooltip = stress_threshold_cooldown_message	
	}
}

As written in game/common/scripted_effects/00_stress_effects.txt.

Where it is used

Every place in common/, events/ and history/ that calls stress_threshold_event_aftereffects.

Events (41)

35 more

Source: game/common/scripted_effects/00_stress_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?