Wiki

trigger · seller

Definition

  • Supported scope:PURCHASE_CONTRACT
  • Supported target:THIS, ROOT, PREV, FROM, OWNER, CONTROLLER, OCCUPIED, CAPITAL

Description

Check the seller country. Example: seller = GER

实战 · 配合 · 坑

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

实战用法

seller 常用于购买合同相关的事件或决策中,筛选出特定国家作为卖方时才触发后续逻辑,例如限制某些国家不能向敌对阵营出售装备。在 mod 里可以用它来实现"只有当德国是卖方时才允许取消合同"之类的外交限制规则。

# 在 PURCHASE_CONTRACT scope 下,检查卖方是否为德国
cancel_purchase_contract = {
    limit = {
        seller = GER
        buyer = SOV
    }
}

配合关系

  • [buyer](/wiki/trigger/buyer):与 seller 搭档使用,同时锁定买卖双方身份,构成完整的合同双边筛选条件。
  • [contract_contains_equipment](/wiki/trigger/contract_contains_equipment):在确认卖方之后进一步检查合同内的装备类型,实现更细粒度的合同筛选。
  • [cancel_purchase_contract](/wiki/effect/cancel_purchase_contract):确认卖方条件成立后,用此 effect 执行取消合同的实际操作,是最直接的后续动作。
  • [deal_completion](/wiki/trigger/deal_completion):与 seller 联用可判断特定卖方的合同是否已完成交割,适合做交易历史追踪。

常见坑

  1. scope 用错seller 必须在 PURCHASE_CONTRACT scope 内使用,若直接写在国家 scope(如某国的 trigger 块)下会报错或永远返回假,新手容易忘记先切换到正确的合同 scope。
  2. target 混淆:填写的值应当是国家标签(如 GER)或合法的 scope 关键字(如 ROOTFROM),若误填成省份 ID 或其他非国家类型的 target,条件将无法正确匹配。

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

seller is commonly used in events or decisions related to purchase contracts, filtering for specific nations acting as sellers before triggering subsequent logic. For example, it can restrict certain countries from selling equipment to opposing factions. In mods, you can use it to implement diplomatic restrictions like "allow contract cancellation only when Germany is the seller."

# Under PURCHASE_CONTRACT scope, check if the seller is Germany
cancel_purchase_contract = {
    limit = {
        seller = GER
        buyer = SOV
    }
}

Synergy

  • [buyer](/wiki/trigger/buyer): Works in tandem with seller to simultaneously lock both buyer and seller identities, forming a complete bilateral contract filtering condition.
  • [contract_contains_equipment](/wiki/trigger/contract_contains_equipment): After confirming the seller, further check the equipment types in the contract for finer-grained contract filtering.
  • [cancel_purchase_contract](/wiki/effect/cancel_purchase_contract): Once the seller condition is satisfied, use this effect to execute the actual contract cancellation operation, the most direct follow-up action.
  • [deal_completion](/wiki/trigger/deal_completion): Used together with seller to determine whether a specific seller's contract has been completed, suitable for transaction history tracking.

Common Pitfalls

  1. Wrong scope: seller must be used within the PURCHASE_CONTRACT scope. If written directly in a nation scope (such as within a nation's trigger block), it will error or always return false. Beginners often forget to switch to the correct contract scope first.
  2. Target confusion: The value provided should be a nation tag (such as GER) or a valid scope keyword (such as ROOT, FROM). If mistakenly filled with a province ID or other non-nation type target, the condition will fail to match correctly.