trigger · has_war_support
Definition
- Supported scope:
COUNTRY - Supported target:
THIS,ROOT,PREV,FROM,OWNER,CONTROLLER,OCCUPIED,CAPITAL
Description
check value of war_support 0-1: Example has_war_support < 0.6
has_war_supportCOUNTRYTHIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITALcheck value of war_support 0-1: Example has_war_support < 0.6
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
has_war_support 常用于国策、决议或事件中,根据国家的战争支持度动态解锁或限制选项,例如要求国家民心足够高才能发动激进战略、或在战争支持度不足时触发内政危机事件。它也常出现在 available 块中,防止玩家在国内反战情绪高涨时强行推进军事路线。
# 国策可用条件:要求战争支持度达到 60% 以上才能选取
focus = {
id = GER_mobilize_nation
available = {
has_war_support > 0.6
}
...
}
# 决议 limit:战争支持度低于 30% 时才触发民心崩溃事件
decision = {
id = GER_home_front_crisis
available = {
has_war_support < 0.3
}
...
}
[add_war_support](/wiki/effect/add_war_support):最直接的搭档——先用 has_war_support 检查当前值,再用 add_war_support 进行补偿或惩罚,形成"低于阈值→触发效果→拉升/压低"的闭环。[has_stability](/wiki/trigger/has_stability):战争支持度与稳定度往往同步检查,二者共同决定国家的"内政健康度",在允许条件中频繁并列使用。[has_defensive_war](/wiki/trigger/has_defensive_war):防御战往往会自动拉高战争支持度,结合此 trigger 可区分"主动备战"与"被迫应战"两种情形,给出不同的剧本分支。[add_stability](/wiki/effect/add_stability):当战争支持度极低时,往往同步检查稳定度并给予惩罚,两个效果配合使用模拟"士气崩溃"后果。has_war_support < 0.6,新手容易想当然写成 has_war_support = 0.6(精确等于),但战争支持度是浮点数,精确等于几乎永远不会成立,必须使用 < / > 进行范围比较。has_war_support 仅支持国家 scope,若在 owned_state 或 division 等子 scope 内直接书写而不切换回国家 scope,脚本会静默失败或报错,需要用 OWNER / ROOT 等目标显式指回正确 scope。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.
has_war_support is commonly used in national focuses, decisions, or events to dynamically unlock or restrict options based on a country's war support level. For example, it can require sufficient war support before allowing aggressive strategies, or trigger domestic crisis events when war support drops too low. It frequently appears in available blocks to prevent players from pursuing military paths when domestic anti-war sentiment is high.
# Focus availability condition: requires war support above 60% to select
focus = {
id = GER_mobilize_nation
available = {
has_war_support > 0.6
}
...
}
# Decision limit: triggers home front crisis only when war support is below 30%
decision = {
id = GER_home_front_crisis
available = {
has_war_support < 0.3
}
...
}
[add_war_support](/wiki/effect/add_war_support): The most direct partner—first use has_war_support to check the current value, then apply add_war_support to compensate or penalize, creating a closed loop of "below threshold → trigger effect → raise/lower".[has_stability](/wiki/trigger/has_stability): War support and stability are often checked together; both jointly determine a country's "domestic health". They frequently appear side-by-side in conditional blocks.[has_defensive_war](/wiki/trigger/has_defensive_war): Defensive wars typically automatically increase war support. Combined with this trigger, you can distinguish between "proactive preparation" and "forced response" scenarios, branching the script accordingly.[add_stability](/wiki/effect/add_stability): When war support is critically low, stability is often checked simultaneously and penalized together. Both effects work in tandem to simulate the consequences of "morale collapse".has_war_support < 0.6. Beginners often mistakenly write has_war_support = 0.6 (exact equality), but war support is a floating-point number—exact equality almost never occurs. You must use < or > for range comparisons instead.has_war_support only works in country scope. If used directly within sub-scopes like owned_state or division without switching back to country scope, the script will silently fail or error. Use explicit scope targets like OWNER or ROOT to redirect to the correct scope.