trigger · compare_autonomy_progress_ratio
Definition
- Supported scope:
COUNTRY - Supported target:
none
Description
check if autonomy progress ratio is higher than value, example:
compare_autonomy_progress_ratio > 0.5
compare_autonomy_progress_ratioCOUNTRYnonecheck if autonomy progress ratio is higher than value, example:
compare_autonomy_progress_ratio > 0.5
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
compare_autonomy_progress_ratio 常见于自治领事件或决议的 available / trigger 块中,用于判断宗主国向自治领输送或回收自治进度是否达到某个比例阈值,从而触发自动升级/降级自治等级的剧本逻辑。例如,在一个殖民地独立运动 mod 里,可以在宗主国视角检测自治进度是否超过一半,再决定是否解锁某项外交选项:
# 宗主国 scope 下,检测自治进度比例是否超过 50%
available = {
compare_autonomy_progress_ratio > 0.5
}
[has_autonomy_state](/wiki/trigger/has_autonomy_state) — 先用此 trigger 确认当前自治等级(如 autonomy_dominion),再用 compare_autonomy_progress_ratio 精确判断进度,避免对非自治关系国家误判。[compare_autonomy_state](/wiki/trigger/compare_autonomy_state) — 两者组合可同时限定自治层级范围与进度比例,适合多级自治演进的条件链。[add_autonomy_score](/wiki/effect/add_autonomy_score) — 条件满足后配合此 effect 直接修改自治分数,实现"进度到阈值则推进自治"的完整逻辑闭环。[add_autonomy_ratio](/wiki/effect/add_autonomy_ratio) — 同上,当需要按比例而非固定值调整自治进度时与本 trigger 搭配,保持逻辑一致性。compare_autonomy_progress_ratio > 0.5),新手容易误写成 = { value > 0.5 } 的花括号块形式,导致解析报错或条件永远不触发。[has_autonomy_state](/wiki/trigger/has_autonomy_state) 做前置保护,确认存在自治关系后再评估此条件。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.
compare_autonomy_progress_ratio is commonly found in the available / trigger blocks of autonomy-related events or decisions, used to determine whether the overlord's transfer or recovery of autonomy progress to a subject reaches a certain threshold ratio, thereby triggering script logic for automatic autonomy tier upgrades/downgrades. For example, in a colonial independence movement mod, you can check from the overlord's perspective whether autonomy progress exceeds 50%, then decide whether to unlock certain diplomatic options:
# Check from overlord scope whether autonomy progress ratio exceeds 50%
available = {
compare_autonomy_progress_ratio > 0.5
}
[has_autonomy_state](/wiki/trigger/has_autonomy_state) — First use this trigger to confirm the current autonomy tier (e.g., autonomy_dominion), then use compare_autonomy_progress_ratio to precisely evaluate progress, avoiding false positives on non-autonomy relationships.[compare_autonomy_state](/wiki/trigger/compare_autonomy_state) — Combining both allows simultaneous constraints on autonomy tier range and progress ratio, ideal for multi-stage autonomy evolution condition chains.[add_autonomy_score](/wiki/effect/add_autonomy_score) — Once conditions are met, pair with this effect to directly modify autonomy score, implementing a complete logic loop for "progress reaches threshold then advance autonomy tier".[add_autonomy_ratio](/wiki/effect/add_autonomy_ratio) — Same as above; when needing to adjust autonomy progress by ratio rather than fixed value, combine with this trigger to maintain logical consistency.compare_autonomy_progress_ratio > 0.5); beginners often mistakenly write it as the curly brace block form = { value > 0.5 }, causing parse errors or conditions that never fire.[has_autonomy_state](/wiki/trigger/has_autonomy_state) as a precondition check, confirming an autonomy relationship exists before evaluating this condition.