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
is_femaleCOUNTRY, CHARACTER, ACETHIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITALchecks if scoped unit leader, ace or country is female
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
is_female 常用于性别差异化的 mod 场景,例如为女性角色专属的顾问职位、头像或国家领导人特质设置条件门槛,也可用于事件叙事中根据角色性别分支到不同的对话文本。在"角色扮演"类 mod 中,常见的用法是在 limit 块内过滤当前角色,确保某项效果只对女性人物生效。
# 示例:为女性军事顾问授予专属特质
promote_character = {
limit = {
is_female = yes
has_advisor_role = { slot = high_command }
}
add_trait = { trait = female_commander_trait }
}
[has_advisor_role](/wiki/trigger/has_advisor_role) — 常与 is_female 组合,用于筛选"特定职位上的女性顾问",确保特质或效果只作用于符合双重条件的角色。[any_character](/wiki/trigger/any_character) — 在 COUNTRY scope 下用 any_character 遍历所有角色时,通常在其 limit 内嵌套 is_female,以批量查找/操作所有女性角色。[add_trait](/wiki/effect/add_trait) — 条件满足后授予特质,是性别专属成长路线的核心效果搭档。[set_portraits](/wiki/effect/set_portraits) — 在性别判断后动态更换角色头像,常见于需要区分男女立绘的角色创建流程中。is_female 要求 scope 必须是具体的 CHARACTER、ACE 或 COUNTRY(用于判断国家领袖),若在 STATE 或 DIVISION scope 下直接调用,脚本会静默失败或报错,新手容易在 any_owned_state 的内部块里误用此 trigger。is_female = yes 检查的是当前执政的国家领导人是否为女性,而非国家本身的某个属性;若国家同时有多个领导人(如战时内阁),判断结果可能不符合预期,应切换到具体 CHARACTER 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.
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 }
}
[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.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.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.