effect · set_fuel_ratio
Definition
- Supported scope:
COUNTRY - Supported target:
none
Description
Set country's current fuel ratio relative to its capacity
set_fuel_ratioCOUNTRYnoneSet country's current fuel ratio relative to its capacity
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
set_fuel_ratio 常用于事件或决议中立即调整某国的燃油储量比例,例如为玩家奖励"加油补给"或在剧本触发时模拟燃油危机。它接受一个 0 到 1 之间的小数值,直接将当前储量设置为容量的对应比例,而非增量操作。
# 事件选项:获得紧急燃油补给,将燃油比例补满至 80%
option = {
name = my_event.1.a
set_fuel_ratio = 0.8
}
# 决议效果:模拟燃油危机,将燃油比例压低至 10%
immediate = {
set_fuel_ratio = 0.1
}
[fuel_ratio](/wiki/trigger/fuel_ratio):在执行 set_fuel_ratio 前先用此触发器检查当前燃油比例,确保只在燃油不足时才触发补给奖励,避免浪费。[add_fuel](/wiki/effect/add_fuel):两者互补——set_fuel_ratio 是绝对赋值,add_fuel 是相对增量;需要精确设定目标比例时用前者,需要动态加减时用后者。[add_dynamic_modifier](/wiki/effect/add_dynamic_modifier):燃油比例调整后,可同步附加一个动态修正来模拟燃油充足/短缺对作战效率的持续影响,形成完整的逻辑链。[country_event](/wiki/effect/country_event):调整燃油比例后触发后续事件,向玩家通知状态变化或推进剧情分支。set_fuel_ratio = 80 而非 set_fuel_ratio = 0.8,游戏不会报错但会直接将燃油比例钳制到上限(1.0),导致效果与预期完全不符,难以察觉。COUNTRY scope 中有效,若在 owned_state 或单位领袖的 scope 块内调用,效果会静默失效而不给出任何错误提示,调试时极易遗漏。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.
set_fuel_ratio is commonly used in events or decisions to immediately adjust a nation's fuel storage ratio, such as rewarding players with "emergency fuel resupply" or simulating a fuel crisis when triggered by a scenario. It accepts a decimal value between 0 and 1, setting the current stockpile directly to the corresponding proportion of capacity rather than applying an incremental change.
# Event option: receive emergency fuel resupply, replenish fuel ratio to 80%
option = {
name = my_event.1.a
set_fuel_ratio = 0.8
}
# Decision effect: simulate a fuel crisis, reduce fuel ratio to 10%
immediate = {
set_fuel_ratio = 0.1
}
[fuel_ratio](/wiki/trigger/fuel_ratio): Check the current fuel ratio with this trigger before executing set_fuel_ratio to ensure resupply rewards only trigger when fuel is insufficient, avoiding waste.[add_fuel](/wiki/effect/add_fuel): These two complement each other—set_fuel_ratio is absolute assignment while add_fuel is relative increment; use the former when you need precise ratio targets and the latter for dynamic adjustments.[add_dynamic_modifier](/wiki/effect/add_dynamic_modifier): After adjusting the fuel ratio, you can apply a dynamic modifier simultaneously to simulate the ongoing impact of adequate/insufficient fuel on combat efficiency, creating a complete logical chain.[country_event](/wiki/effect/country_event): Trigger subsequent events after adjusting the fuel ratio to notify the player of status changes or advance story branches.set_fuel_ratio = 80 instead of set_fuel_ratio = 0.8. The game won't error but will clamp the fuel ratio directly to the maximum (1.0), producing results completely contrary to expectations and making the issue difficult to detect.COUNTRY scope. If called within scope blocks of owned_state or unit leaders, the effect silently fails without any error message, making it extremely easy to overlook during debugging.