Wiki

trigger · is_female

Definition

  • Supported scope:COUNTRY, CHARACTER, ACE
  • Supported target:THIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITAL

Description

checks if scoped unit leader, ace or country is female

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

is_female is commonly used in gender-differentiated mod scenarios, such as setting conditional thresholds for female-exclusive advisor positions, portraits, or national leader traits, and can also be used in event narratives to branch into different dialogue text based on character gender. In "role-playing" mods, a typical usage pattern is filtering the current character within a limit block to ensure a particular effect applies only to female characters.

# Example: Grant exclusive trait to female military advisors
promote_character = {
    limit = {
        is_female = yes
        has_advisor_role = { slot = high_command }
    }
    add_trait = { trait = female_commander_trait }
}

Synergy

  • [has_advisor_role](/wiki/trigger/has_advisor_role) — Frequently combined with is_female to filter "female advisors in specific positions," ensuring traits or effects apply only to characters meeting both conditions.
  • [any_character](/wiki/trigger/any_character) — When iterating through all characters using any_character within COUNTRY scope, is_female is typically nested in its limit block to bulk search/manipulate all female characters.
  • [add_trait](/wiki/effect/add_trait) — Grants traits upon condition fulfillment; serves as the core effect partner for gender-exclusive progression paths.
  • [set_portraits](/wiki/effect/set_portraits) — Dynamically swaps character portraits after gender determination, commonly used in character creation workflows requiring distinct male and female artwork.

Common Pitfalls

  1. Scope mismatch errors: is_female requires scope to be a specific CHARACTER, ACE, or COUNTRY (for checking the national leader). Direct invocation in STATE or DIVISION scope will cause silent failure or errors; beginners often mistakenly use this trigger inside any_owned_state blocks.
  2. Semantic misunderstanding of COUNTRY scope: Under COUNTRY scope, is_female = yes checks whether the current ruling national leader is female, not some attribute of the nation itself. If a country has multiple leaders simultaneously (e.g., wartime cabinet), the evaluation result may not match expectations; switch to a specific CHARACTER scope for precise determination.