Wiki

effect · set_faction_member_upgrade_min

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

Set a faction's minimal requirements for an faction member upgrade group

### Examples

TAG = { set_faction_upgrade_min = { upgrade = TOKEN_TO_FACTION_MEMBER_UPGRADE } }

实战 · 配合 · 坑

实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。

实战用法

在 mod 中为自定义派系添加加入条件门槛时,可用此 effect 限制成员升级组的最低要求,例如要求盟友必须达到一定的工业或军事标准才能触发特定的派系升级。典型场景是在国家焦点或决策完成后,动态调整派系升级门槛以配合剧情推进。

# 某国完成焦点后,设置派系成员升级组的最低要求
focus = {
    id = tighten_faction_standards
    ...
    completion_reward = {
        set_faction_member_upgrade_min = {
            upgrade = my_faction_military_upgrade
        }
    }
}

配合关系

  • [faction_upgrade_level](/wiki/trigger/faction_upgrade_level):先检查当前派系升级等级,再决定是否调用此 effect 提高最低门槛,避免反复覆盖设置。
  • [add_faction_goal](/wiki/effect/add_faction_goal):配合设置派系目标,当派系整体目标推进到某阶段时同步更新升级最低要求,使派系发展逻辑前后一致。
  • [has_completed_faction_goal](/wiki/trigger/has_completed_faction_goal):在升级门槛调整前校验特定派系目标是否已完成,确保条件触发顺序正确。
  • [every_faction_member](/wiki/effect/every_faction_member):遍历所有派系成员检查其状态后,再于领导国 scope 下调用此 effect,保证修改时机与成员实际能力相匹配。

常见坑

  1. Scope 混淆:此 effect 必须在 COUNTRY(派系领导国或相关国家)的 scope 下执行,若误写在 STATE 或其他 scope 中将导致脚本报错或静默失效,调试时需用 error.log 确认 scope 层级。
  2. upgrade token 填写错误upgrade 字段必须填写在 faction_member_upgrades 定义文件中实际存在的 TOKEN,若拼写错误或引用了不属于该派系的升级组,游戏不会给出明显报错,门槛设置将被静默忽略。

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

When adding entry condition thresholds for custom factions in mods, you can use this effect to restrict the minimum requirements for member upgrade groups. For example, requiring allies to reach certain industrial or military standards before triggering specific faction upgrades. A typical scenario is dynamically adjusting faction upgrade thresholds after national focuses or decisions are completed to align with narrative progression.

# After a country completes a focus, set the minimum requirements for faction member upgrade groups
focus = {
    id = tighten_faction_standards
    ...
    completion_reward = {
        set_faction_member_upgrade_min = {
            upgrade = my_faction_military_upgrade
        }
    }
}

Synergy

  • [faction_upgrade_level](/wiki/trigger/faction_upgrade_level): Check the current faction upgrade level first, then decide whether to invoke this effect to raise the minimum threshold, avoiding repeated overwrites.
  • [add_faction_goal](/wiki/effect/add_faction_goal): Pair with faction goal settings; when the faction's overall objective reaches a certain stage, synchronously update the upgrade minimum requirements to keep faction development logic consistent.
  • [has_completed_faction_goal](/wiki/trigger/has_completed_faction_goal): Verify whether a specific faction goal has been completed before adjusting upgrade thresholds, ensuring the trigger sequence is correct.
  • [every_faction_member](/wiki/effect/every_faction_member): After iterating through all faction members to check their status, invoke this effect within the faction leader's scope to ensure modification timing matches the members' actual capabilities.

Common Pitfalls

  1. Scope Confusion: This effect must be executed within the COUNTRY scope (the faction leader or relevant country). If mistakenly written in STATE or another scope, it will cause script errors or silent failures. Use error.log during debugging to confirm scope hierarchy.
  2. upgrade Token Mistakes: The upgrade field must reference an actual TOKEN defined in the faction_member_upgrades definition file. If the spelling is incorrect or it references an upgrade group not belonging to the faction, the game will not issue an obvious error, and the threshold setting will be silently ignored.