trigger · fuel_ratio
Definition
- Supported scope:
COUNTRY - Supported target:
THIS,ROOT,PREV,FROM,OWNER,CONTROLLER,OCCUPIED,CAPITAL
Description
Compares the fuel ratio to a variable.
Example: fuel_ratio > 0.5
fuel_ratioCOUNTRYTHIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITALCompares the fuel ratio to a variable.
Example: fuel_ratio > 0.5
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.
fuel_ratio is commonly used in war economy-related mods to dynamically trigger decisions, national spirits, or AI strategy adjustments based on a nation's fuel reserve ratio. For example, in a fuel crisis simulation mod, when the fuel ratio drops below a certain threshold, you can lock specific player decisions or trigger warning events:
# In the available block of a decision: check if fuel reserves are sufficient
available = {
fuel_ratio > 0.3
}
# In a trigger block: show supply warning only when fuel is insufficient
limit = {
fuel_ratio < 0.2
}
[add_fuel](/wiki/effect/add_fuel) — When fuel_ratio drops below a threshold and triggers an effect, use this command to emergency-replenish fuel reserves, forming a complete "detect→replenish" logic loop.[add_ideas](/wiki/effect/add_ideas) — Add different national spirits based on fuel ratio levels (such as "Fuel Shortage" penalties or "Energy Abundance" bonuses), implementing a dynamic economic pressure system.[has_country_flag](/wiki/trigger/has_country_flag) — Combined with country flags to prevent duplicate triggers: first check if a flag is already set, then combine with fuel_ratio to decide whether to execute subsequent logic, avoiding event/decision spam.[command_power](/wiki/trigger/command_power) — In the same trigger block, use joint conditions with fuel_ratio to simulate a "dual crisis" scenario where both fuel shortage and reduced command power must occur before allowing certain special options.fuel_ratio = 0.5 intending to mean "equals", but this trigger only supports > / < / >= / <= comparison operators. Using = won't throw an error but semantically means "greater than or equal to", which doesn't match the intended logic. Always explicitly write the required comparison operator.fuel_ratio can only be used within COUNTRY scope. If called directly in state scope (such as inside every_owned_state), it will silently fail or throw an error. You must first use OWNER or similar target-switching to return to country scope before making the check.