effect · supply_units
Definition
- Supported scope:
CHARACTER - Supported target:
none
Description
Give [hours] of supply to units being controlled by this leader.
Example supply_units = 24
supply_unitsCHARACTERnoneGive [hours] of supply to units being controlled by this leader.
Example supply_units = 24
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
supply_units 常用于事件或决策奖励场景,例如当将领完成某项特殊任务后立即为其麾下部队补充一定时数的补给,以模拟后勤支援或战略物资到位的效果。也适用于 mod 中设计"紧急补给"类国策或间谍行动,让玩家在补给线被切断时通过触发事件获得缓冲。
# 事件 option 中:某将领获得紧急补给支援
option = {
name = my_event.1.a
trigger = { is_corps_commander = yes }
supply_units = 48 # 补充 48 小时的补给
}
[is_leading_army](/wiki/trigger/is_leading_army):在触发条件中确认该角色当前正在统领军队,确保补给效果有实际意义,避免对未带兵的将领无效触发。[add_temporary_buff_to_units](/wiki/effect/add_temporary_buff_to_units):与临时战斗加成同步发放,模拟"补给到位+士气提升"的组合奖励,增强事件叙事感。[add_timed_unit_leader_trait](/wiki/effect/add_timed_unit_leader_trait):搭配限时特性(如后勤专家),与补给效果一起构成完整的"补给强化"奖励包。[num_units](/wiki/trigger/num_units):条件判断麾下部队数量,据此决定是否值得触发补给效果,避免在将领无兵可带时浪费脚本逻辑。supply_units 必须在 CHARACTER scope 下执行,若直接写在 country 级别的 effect 块中而未通过 characters = { ... } 或事件主角正确限定 scope,指令会被游戏静默忽略甚至报错,新手容易因此误以为效果生效了。7 只相当于约 7 小时补给,而非 7 天,实际测试时若发现补给量"少得离奇",往往是忘记将天数换算为小时(×24)所致。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.
supply_units is commonly used in event or decision reward scenarios, such as immediately replenishing supply hours to a commander's forces after completing a special mission, simulating the effect of logistics support or strategic resources arriving. It is also suitable for designing "emergency supply" type national focuses or espionage operations in mods, allowing players to gain a buffer by triggering events when supply lines are cut off.
# In event option: a commander receives emergency supply support
option = {
name = my_event.1.a
trigger = { is_corps_commander = yes }
supply_units = 48 # Replenish 48 hours of supply
}
[is_leading_army](/wiki/trigger/is_leading_army): Confirm in trigger conditions that the character is currently commanding an army, ensuring the supply effect has practical significance and avoiding ineffective triggers on commanders without troops.[add_temporary_buff_to_units](/wiki/effect/add_temporary_buff_to_units): Distribute simultaneously with temporary combat bonuses, simulating a combined reward of "supplies arrive + morale boost", enhancing narrative impact of events.[add_timed_unit_leader_trait](/wiki/effect/add_timed_unit_leader_trait): Pair with time-limited traits (such as logistics expert), forming a complete "supply enhancement" reward package together with the supply effect.[num_units](/wiki/trigger/num_units): Conditionally judge the number of units under command, determining whether it is worthwhile to trigger the supply effect, avoiding wasted script logic when a commander has no troops to lead.supply_units must be executed within a CHARACTER scope. If written directly in a country-level effect block without properly limiting scope through characters = { ... } or the event protagonist, the command will be silently ignored by the game or cause errors. Beginners often mistakenly believe the effect worked as a result.7 only amounts to approximately 7 hours of supply, not 7 days. If testing reveals supply quantity is "suspiciously low", it is often because forgetting to convert days to hours (×24).