trigger · unit_strength
Definition
- Supported scope:(none)
- Supported target:
THIS,ROOT,PREV,FROM,OWNER,CONTROLLER,OCCUPIED,CAPITAL
Description
Check scope unit strength status 0-1: Example unit_strength < 1
unit_strengthTHIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITALCheck scope unit strength status 0-1: Example unit_strength < 1
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
unit_strength 常用于判断某省份或地块上的部队是否已被削弱到特定阈值,从而触发事件、解锁决策或改变 AI 行为。例如在入侵事件链中,当占领区守军强度低于满编的一定比例时,才允许触发后续决策:
available = {
unit_strength < 0.3
}
上例表示:只有当当前 scope 内的部队强度不足 30% 时,该决策才可用。
由于当前白名单中无可引用的 effect 或 trigger 命令,暂无可列出的交叉引用项。建议在实际 mod 中结合省份、国家 scope 切换命令一同使用,以确保 scope 指向正确的检测目标。
unit_strength 的 scope 列表为空(即不限定于特定 scope 类型),但实际使用时必须确保当前 scope 是一个有意义的省份或地块,否则条件将始终返回假或报错,新手容易忘记用 CONTROLLER/OWNER 等目标切换到正确的 scope 再做判断。unit_strength < 50),导致条件逻辑永远为真或产生非预期结果。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.
unit_strength is commonly used to determine whether units in a given province or state have been weakened below a specific threshold, thereby triggering events, unlocking decisions, or altering AI behavior. For example, in an invasion event chain, subsequent decisions may only be triggered when the garrison strength of occupied territory falls below a certain percentage of full strength:
available = {
unit_strength < 0.3
}
The above example indicates that the decision is only available when the unit strength within the current scope is less than 30%.
Since there are currently no referential effects or trigger commands in the whitelist, there are no cross-reference items to list. It is recommended to combine this with province and country scope-switching commands in actual mods to ensure the scope points to the correct detection target.
unit_strength has an empty scope list (meaning it is not restricted to a specific scope type), but in actual usage you must ensure the current scope is a meaningful province or state, otherwise the condition will always return false or produce an error. Beginners often forget to use CONTROLLER/OWNER and similar target-switching commands to switch to the correct scope before making the check.unit_strength < 50), causing the condition logic to always evaluate to true or produce unintended results.