trigger · has_country_custom_difficulty_setting
Definition
- Supported scope:
COUNTRY - Supported target:
any
Description
Returns true if the game has any custom difficulty on the scope nation
has_country_custom_difficulty_settingCOUNTRYanyReturns true if the game has any custom difficulty on the scope nation
Hands-on notes are AI-generated and checked against the vanilla command vocabulary — treat them as a starting point, not authoritative reference. The definition above is the game's own documentation.
This trigger is commonly used in mod scenarios related to custom difficulty systems. For example, after a player enables custom difficulty options for a nation, you can dynamically adjust that nation's research speed, factory output, or AI behavior. It can also be used in the available block of a focus or decision to restrict certain powerful options to only trigger on standard difficulty.
# Check whether custom difficulty is enabled in a country event trigger
country_event = {
id = my_mod.1
trigger = {
has_country_custom_difficulty_setting = yes
# Only countries with custom difficulty enabled will trigger this event
}
...
}
[has_country_flag](/wiki/trigger/has_country_flag): Use flags to record player difficulty choices first, then combine with this trigger for dual confirmation to avoid false positives.[has_active_rule](/wiki/trigger/has_active_rule): Custom difficulty often comes with specific rule toggles; using both together allows precise differentiation between multiple difficulty configuration combinations.[add_ideas](/wiki/effect/add_ideas): After detecting custom difficulty, dynamically balance nation attributes by adding ideas—this is the most common follow-up effect pattern.[country_event](/wiki/effect/country_event): After confirming custom difficulty takes effect, trigger exclusive events to notify players of the current difficulty state or grant special rewards/penalties.limit blocks.