effect · add_autonomy_ratio
Definition
- Supported scope:
COUNTRY - Supported target:
none
Description
Adds % freedom score to the autonomy.
Example:
add_autonomy_ratio={
value=0.005
localization="LOC_KEY"
}
add_autonomy_ratioCOUNTRYnoneAdds % freedom score to the autonomy.
Example:
add_autonomy_ratio={
value=0.005
localization="LOC_KEY"
}
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
add_autonomy_ratio 常用于宗主国/附庸国关系的 mod 场景,例如在焦点树或决策中给某个附庸国"一次性推进一定比例的自治进程",使其更快迈向独立或更高自治等级,而无需硬编码固定的自治分数。以下示例展示在一个焦点完成时为当前国家(宗主国视角下的附庸)增加自治比率:
# 在宗主国 scope 下,需先切换到附庸国 scope 再调用
puppet_scope = {
add_autonomy_ratio = {
value = 0.05
localization = "FOCUS_GRANT_AUTONOMY_RATIO"
}
}
[compare_autonomy_progress_ratio](/wiki/trigger/compare_autonomy_progress_ratio):在触发条件中检测附庸当前的自治进度比率,与 add_autonomy_ratio 配合可实现"达到一定自治进度后才触发进一步推进"的阶梯式逻辑。[add_autonomy_score](/wiki/effect/add_autonomy_score):两者分别以"百分比"和"绝对分值"两种方式修改自治度,常同时出现以精确控制自治进程的幅度,一个做粗粒度推进,一个做微调。[has_autonomy_state](/wiki/trigger/has_autonomy_state):用于判断附庸当前处于哪个自治等级(如整合领地、自治领等),配合 add_autonomy_ratio 可避免在错误的自治阶段执行脚本,防止逻辑混乱。[end_puppet](/wiki/effect/end_puppet):当自治进度因 add_autonomy_ratio 累积到满值仍需手动处理独立逻辑时,可在同一 option 中调用 end_puppet 彻底解除附庸关系,两者共同完成完整的独立流程。add_autonomy_ratio 必须在附庸国自身的 scope 下执行,而新手常在宗主国 scope 下直接调用,导致命令无效或报错;正确做法是先通过 puppet_scope 或事件中指定附庸国 scope 后再调用。localization 键缺失导致显示异常:localization 字段虽然表面上只影响 UI 提示文本,但若填入一个不存在于本地化文件中的键,会导致玩家在自治度界面看到原始键名字符串(如 LOC_KEY),务必在 .yml 本地化文件中为该键补充对应的翻译条目。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.
add_autonomy_ratio is commonly used in mod scenarios involving overlord/puppet relationships, such as in focus trees or decisions to give a puppet nation "one-time advancement of a certain percentage of autonomy progress," enabling it to reach independence or higher autonomy tiers more quickly without hardcoding fixed autonomy scores. The following example demonstrates adding autonomy ratio to the current nation (a puppet from the overlord's perspective) upon focus completion:
# Must switch to puppet scope first when in overlord scope before calling
puppet_scope = {
add_autonomy_ratio = {
value = 0.05
localization = "FOCUS_GRANT_AUTONOMY_RATIO"
}
}
[compare_autonomy_progress_ratio](/wiki/trigger/compare_autonomy_progress_ratio): Detects the puppet's current autonomy progress ratio in trigger conditions; when paired with add_autonomy_ratio, it enables tiered logic such as "trigger further advancement only after reaching certain autonomy progress."[add_autonomy_score](/wiki/effect/add_autonomy_score): Both modify autonomy through "percentage" and "absolute value" methods respectively; they often appear together to precisely control the magnitude of autonomy changes—one handles coarse-grained advancement while the other handles fine-tuning.[has_autonomy_state](/wiki/trigger/has_autonomy_state): Checks which autonomy tier the puppet currently occupies (e.g., integrated puppet, dominion, etc.); paired with add_autonomy_ratio, it prevents script execution at incorrect autonomy stages and avoids logic conflicts.[end_puppet](/wiki/effect/end_puppet): When autonomy progress accumulated by add_autonomy_ratio reaches maximum but independence logic still requires manual handling, you can invoke end_puppet in the same option to completely sever the puppet relationship, with both working together to complete the full independence flow.add_autonomy_ratio must execute within the puppet nation's own scope; beginners often call it directly under the overlord's scope, resulting in command failure or errors. The correct approach is to first switch to the puppet's scope through puppet_scope or by specifying it in events before calling the command.localization key causes display issues: While the localization field ostensibly only affects UI tooltip text, if you input a key that doesn't exist in the localization files, players will see the raw key string (e.g., LOC_KEY) in the autonomy interface. Always ensure the corresponding translation entry is added to the .yml localization file for that key.