Wiki

effect · add_logistics

Definition

  • Supported scope:CHARACTER
  • Supported target:none

Description

Adds logistics skill to a unit leader
Example: add_logistics = 1

实战 · 配合 · 坑

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

实战用法

add_logistics 常用于为新生成的将领赋予初始后勤技能,或在剧本事件/决议中奖励玩家的将领成长。例如完成某条科技树或战役任务后,给指定军官提升后勤能力,使其在补给紧张的战场上表现更好:

# 在事件 option 中给指定角色加后勤技能
some_character = {
    add_logistics = 2
}

配合关系

  • [add_skill_level](/wiki/effect/add_skill_level):整体技能等级提升常与单项技能加成同时使用,搭配 add_logistics 可构建"全面成长"的将领奖励包。
  • [add_unit_leader_trait](/wiki/effect/add_unit_leader_trait):后勤技能提升往往配合添加后勤相关特质(如补给专家类 trait),共同强化将领的补给管理能力。
  • [logistics_skill_level](/wiki/trigger/logistics_skill_level):在执行 add_logistics 前用该触发器检查当前后勤等级,可以设置上限条件,避免无限叠加超出合理范围。
  • [gain_xp](/wiki/effect/gain_xp):如果 mod 使用经验驱动成长体系,可先用 gain_xp 积累经验,再配合 add_logistics 直接调整数值,两种方式互补。

常见坑

  1. 作用域写错add_logistics 必须在 CHARACTER scope 下执行。新手容易在国家 scope 或省份 scope 里直接写,导致脚本报错或静默无效;需要先用 some_character = { ... } 或类似方式进入角色 scope。
  2. 忽略技能上限:游戏内将领技能存在隐性上限,直接填写过大的数值并不会让技能无限增长,但也不会有任何报错提示,容易让开发者误以为脚本生效而实际数值被截断,建议配合 [logistics_skill_level](/wiki/trigger/logistics_skill_level) 做条件判断。

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_logistics is commonly used to grant newly generated commanders initial logistics skills, or to reward player officer growth through scripted events or decisions. For example, after completing a technology tree branch or campaign objective, you can boost a specific officer's logistics capability, enabling them to perform better on supply-constrained battlefields:

# Grant logistics skill to a specific character within an event option
some_character = {
    add_logistics = 2
}

Synergy

  • [add_skill_level](/wiki/effect/add_skill_level): Overall skill level increases are often combined with individual skill bonuses. Pairing with add_logistics creates a "holistic growth" reward package for commanders.
  • [add_unit_leader_trait](/wiki/effect/add_unit_leader_trait): Logistics skill improvements typically work alongside logistics-related traits (such as supply expert traits), jointly strengthening a commander's supply management capabilities.
  • [logistics_skill_level](/wiki/trigger/logistics_skill_level): Before executing add_logistics, use this trigger to check the current logistics level. This allows you to set upper limit conditions and prevent stacking beyond reasonable bounds.
  • [gain_xp](/wiki/effect/gain_xp): If your mod uses an experience-driven growth system, you can first accumulate experience with gain_xp, then complement it with add_logistics for direct value adjustment—the two approaches are mutually reinforcing.

Common Pitfalls

  1. Incorrect scope: add_logistics must execute within a CHARACTER scope. Newcomers often write it directly in country or province scopes, causing script errors or silent failures. You must first enter the character scope using constructs like some_character = { ... }.
  2. Ignoring skill caps: In-game commander skills have hidden upper limits. Inputting excessively large values won't cause infinite growth, nor will it produce error messages—making it easy for developers to assume the script worked while the actual value gets capped. It's recommended to pair this with [logistics_skill_level](/wiki/trigger/logistics_skill_level) for conditional checks.