Wiki

trigger · has_navy_ledger

Definition

  • Supported scope:CHARACTER
  • Supported target:none

Description

has_navy_ledger = yes/no - Checks if the current character has a navy ledger

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

has_navy_ledger is commonly used in advisor or commander-related mod scenarios, such as determining whether a character holds a naval ledger to decide if they can assume a specific position, or restricting the unlock conditions for certain traits. When designing navy-exclusive character progression paths, you can use this trigger as a prerequisite threshold for available or limit to prevent army leaders from accidentally triggering navy-exclusive logic.

# Only allow selecting this advisor character when the character possesses a naval ledger
available = {
    has_navy_ledger = yes
    is_navy_leader = yes
}

Synergy

  • [is_navy_leader](/wiki/trigger/is_navy_leader): These two are often used in combination. is_navy_leader confirms the character's command type, while has_navy_ledger further confirms their ledger affiliation, providing dual verification to avoid logical loopholes.
  • [has_army_ledger](/wiki/trigger/has_army_ledger), [has_air_ledger](/wiki/trigger/has_air_ledger): Typically appear in mutually exclusive form within the same trigger block, used to distinguish which of the three military branches the character's ledger belongs to, ensuring a character belongs to only one military branch.
  • [has_advisor_role](/wiki/trigger/has_advisor_role): When determining whether a character can assume a navy-affiliated advisor position, it serves alongside has_navy_ledger as a prerequisite condition. Combined usage precisely restricts the character's functional scope.
  • [add_naval_commander_role](/wiki/effect/add_naval_commander_role): After granting a character a naval commander position in the effect block, subsequently use has_navy_ledger as a condition to verify that the assignment took effect before executing the next step of logic.

Common Pitfalls

  1. Scope Errors: This trigger can only be used within CHARACTER scope. Beginners sometimes call it directly in country or province scope, causing script errors or silent failures. Always verify that the current scope has been switched to a character before use.
  2. yes/no Logic Inversion: Some beginners forget to use has_navy_ledger = no or wrap it in NOT = { } when trying to "exclude characters holding a naval ledger," resulting in filtering logic that contradicts expectations.