Wiki

trigger · num_of_supply_nodes

Definition

  • Supported scope:COUNTRY
  • Supported target:THIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITAL

Description

check amount of supply nodes

实战 · 配合 · 坑

实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。

实战用法

num_of_supply_nodes 常用于判断某国是否已建立了足够的铁路枢纽/补给节点,从而解锁特定决策或国策奖励,适合做"基建完成度检查"类的条件门槛。例如在一个工业发展任务中,要求玩家先扩展补给网络才能触发下一阶段:

available = {
    num_of_supply_nodes > 5
}

配合关系

  • [has_built](/wiki/trigger/has_built):常与 num_of_supply_nodes 配合,同时检查具体建筑数量和节点数量,综合衡量一国的后勤基础设施完备程度。
  • [controls_state](/wiki/trigger/controls_state):补给节点分布在各州,配合判断是否控制特定州,可验证"是否在某地区建立了节点"这一逻辑。
  • [add_political_power](/wiki/effect/add_political_power) :作为满足条件后的奖励 effect,当国家达到目标节点数量时给予政治点奖励,用于激励玩家投资后勤建设。
  • [building_count_trigger](/wiki/trigger/building_count_trigger):两者都是检查基础设施水平的 trigger,常写在同一个 AND 块内,形成"节点数量 + 建筑等级"的双重门槛。

常见坑

  1. 混淆 scope 层级num_of_supply_nodes 只能在 COUNTRY scope 下使用,新手有时在 STATE scope(例如 any_owned_state 内部)直接调用,导致脚本报错或行为异常——需确保退回国家 scope 再进行判断。
  2. 忽视节点的动态变化:补给节点数量会随战争中省份的得失而实时变化,把该 trigger 写在只求值一次的地方(如 allowed)可能导致条件逻辑不符合预期,应优先放在 availabletrigger 块中以便持续求值。

Hands-On Notes

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.

Hands-On Usage

num_of_supply_nodes is commonly used to check whether a nation has established sufficient railway hubs/supply nodes, thereby unlocking specific decisions or national focus rewards. It is well-suited for "infrastructure completion check" type conditional thresholds. For example, in an industrial development task that requires the player to first expand the supply network before triggering the next phase:

available = {
    num_of_supply_nodes > 5
}

Synergy

  • [has_built](/wiki/trigger/has_built): Often paired with num_of_supply_nodes to simultaneously check specific building counts and node quantities, providing a comprehensive assessment of a nation's logistical infrastructure completeness.
  • [controls_state](/wiki/trigger/controls_state): Supply nodes are distributed across states; combined with checks on whether specific states are controlled, you can verify the logic "whether nodes have been established in a particular region."
  • [add_political_power](/wiki/effect/add_political_power): Serves as a reward effect upon condition fulfillment; when a nation reaches the target node count, grant political power rewards to incentivize players to invest in logistics development.
  • [building_count_trigger](/wiki/trigger/building_count_trigger): Both are triggers for checking infrastructure levels, commonly written within the same AND block, forming a dual threshold of "node count + building level."

Common Pitfalls

  1. Confusing scope levels: num_of_supply_nodes can only be used within COUNTRY scope. Beginners sometimes call it directly within STATE scope (e.g., inside any_owned_state), resulting in script errors or unexpected behavior—ensure you return to country scope before performing the check.
  2. Overlooking dynamic node changes: The number of supply nodes changes in real time as provinces are gained or lost during war. Placing this trigger in a location evaluated only once (such as allowed) may cause the conditional logic to not behave as expected. Prioritize placing it in available or trigger blocks for continuous evaluation.