on_game_start = {
	effect = {
		every_player = {
			debug_log = "CW_SAVE_PURGE_debug_log_on_game_start"
		}
	}
}

# Like on_game_start, except it is called once the host (or player, in single player) exits the lobby. Good for anything where you need to know who the players are, or what the game rules are
on_game_start_after_lobby = {
	on_actions = {
		cwalert_setup_after_game_start_on_actions
	}
}

# Replicates RICE's RICEintro.0002 trigger exactly: fired from
# on_game_start_after_lobby with an immediate trigger_event of a defined
# character_event. This hook runs on a new game AND on loading a save (RICE
# relies on it for all of its per-load setup), so the reminder shows on both.
# NOTE: triggering the event from on_game_start instead does NOT work — that
# hook fires too early in the load for the popup to display, which is why RICE
# (and now CW) use the after-lobby hook.
cwalert_setup_after_game_start_on_actions = {
	effect = {
		every_player = {
			trigger_event = cwalert.1
			debug_log = "CW_SAVE_PURGE_debug_log_on_action3"
			"[ExecuteConsoleCommand(Concatenate('battle_max:', 'purge'))]"
		}
	}
}
