Wiki

effect · add_command_power

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

add command power to country

实战 · 配合 · 坑

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

实战用法

add_command_power 常用于国策、决议或事件中给予玩家/AI 额外的指挥点数奖励,例如在完成某个军事改革国策后立即补充大量指挥点数以便玩家快速提升将领技能。也可用于惩罚场景,传入负值来模拟指挥混乱造成的指挥力损耗。

country_event = {
    id = my_mod.1
    option = {
        name = my_mod.1.a
        # 完成军事改革,奖励指挥点数
        add_command_power = 25
        add_political_power = 50
    }
}

配合关系

  • [command_power](/wiki/trigger/command_power):在执行奖励前先检查当前指挥点数是否低于某阈值,避免溢出上限造成浪费,使逻辑更精确。
  • [add_political_power](/wiki/effect/add_political_power):军事类国策/决议通常同时奖励政治点数与指挥点数,两者搭配构成完整的"军政双重奖励"效果。
  • [add_trait](/wiki/effect/add_trait):在给予指挥点数的同时为将领添加特质,常见于将领成长类事件链中一并使用。
  • [add_war_support](/wiki/effect/add_war_support):战时激励类事件中,指挥点数与战争支持度往往一同提升,共同体现士气高涨的叙事效果。

常见坑

  1. 负值不一定生效如预期:部分版本对指挥点数扣减有下限保护(不会低于 0),新手常误以为可以用大负值彻底"清空"指挥点来做惩罚,实际效果可能被截断,需配合 [command_power](/wiki/trigger/command_power) 先行判断当前值再决定扣减量。
  2. Scope 误用:该 effect 只能在 COUNTRY scope 下使用,若写在 STATE 或 CHARACTER scope 的块内(如直接放在 every_army_leader 子块中),脚本会报错或静默失效,需确保在正确的国家作用域下调用。

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

add_command_power is commonly used in national focuses, decisions, or events to grant additional command power rewards to the player or AI. For example, upon completing a military reform focus, you can immediately replenish a large amount of command power to allow the player to quickly upgrade general skills. It can also be used in penalty scenarios by passing negative values to simulate command power loss from command confusion.

country_event = {
    id = my_mod.1
    option = {
        name = my_mod.1.a
        # Complete military reform and grant command power
        add_command_power = 25
        add_political_power = 50
    }
}

Synergy

  • [command_power](/wiki/trigger/command_power): Check whether the current command power is below a certain threshold before applying the reward to avoid wasting points by exceeding the cap, making the logic more precise.
  • [add_political_power](/wiki/effect/add_political_power): Military focuses or decisions typically award both political power and command power simultaneously, and combining these two creates a complete "dual military-political reward" effect.
  • [add_trait](/wiki/effect/add_trait): While granting command power, add traits to generals at the same time, commonly used together in general growth event chains.
  • [add_war_support](/wiki/effect/add_war_support): In wartime morale events, command power and war support are often increased together, jointly reinforcing the narrative effect of heightened morale.

Common Pitfalls

  1. Negative values may not work as expected: Some game versions have a floor protection on command power reduction (cannot go below 0). Beginners often mistakenly assume they can use large negative values to completely "empty" command power as a penalty, but the actual effect may be clamped. You should use [command_power](/wiki/trigger/command_power) to check the current value first before deciding on the reduction amount.
  2. Scope misuse: This effect only works within the COUNTRY scope. If placed in STATE or CHARACTER scope blocks (such as directly within an every_army_leader sub-block), the script will error or silently fail. Always ensure the effect is called within the correct country scope.