Wiki

trigger · unit_organization

Definition

  • Supported scope:(none)
  • Supported target:THIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITAL

Description

Check scope unit organization status 0-1: Example unit_organization < 1

Hands-On Notes

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.

Hands-On Usage

unit_organization is commonly used to check whether a unit's organization level is within a specific threshold, making it suitable for controlling "special options during unit fatigue states" in decision events or AI behavior scripts. For example, it can restrict a decision to only be available when your units have organization levels close to maximum, preventing players from triggering aggressive actions when units are critically damaged.

# Example: A decision is only available when unit organization is sufficient
available = {
    unit_organization > 0.8
}

Synergy

Since there are no other effect or trigger commands in the current whitelist that can be cross-referenced, there are no compliant synergy items to list.

Note: The whitelist for the scope this trigger operates in is empty, making it impossible to list cross-references in standard format. Fabricating command names would mislead developers, so this section is intentionally left blank.

Common Pitfalls

  1. Numeric Range Misunderstanding: Organization level's valid value range is 0 to 1 (floating-point), and beginners often mistakenly write it in percentage form from 0 to 100 (such as unit_organization > 80), causing the condition to always be false or always true.
  2. Scope Mixing: This trigger must be used within the correct unit scope. If written directly in a condition block under country scope without switching to the corresponding unit scope, the script will error or silently fail. Watch for scope mismatch warnings in the debug log during troubleshooting.