Wiki

trigger · contract_contains_equipment

Definition

  • Supported scope:PURCHASE_CONTRACT
  • Supported target:none

Description

Check if contract contains equipment category, equipment archetype or equipment.
Example:
    contract_contains_equipment = infantry_equipment

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

Commonly used in trade and arms procurement mods to validate contract contents when procurement contracts trigger certain events or decisions. For example, you can restrict diplomatic intervention or event triggers only when the contract involves specific equipment categories. It can also distinguish between different contract types and apply different processing logic (such as imposing additional restrictions on infantry equipment contracts).

# Only allow cancellation of a purchase contract if it contains infantry equipment
cancel_purchase_contract = {
    limit = {
        contract_contains_equipment = infantry_equipment
    }
}

Synergy

  • [buyer](/wiki/trigger/buyer): Use buyer first to confirm whether the contract buyer is the target country, then use this trigger to check equipment type for dual-layer filtering and precise contract targeting.
  • [seller](/wiki/trigger/seller): When used together with seller, you can constrain both parties' identities simultaneously, avoiding false matches with similar contracts between other nations.
  • [cancel_purchase_contract](/wiki/effect/cancel_purchase_contract): The typical follow-up action after conditions are met. Use this trigger in the limit block to filter, then execute the contract cancellation.
  • [deal_completion](/wiki/trigger/deal_completion): Paired with deal_completion, this allows you to identify contracts that "contain specific equipment and are about to complete delivery," useful for triggering delivery events.

Common Pitfalls

  1. Incorrect scope: This trigger must be called within the PURCHASE_CONTRACT scope. If placed directly in a country scope's trigger block, it will fail silently or throw an error. Ensure you have properly entered the contract scope through contract iteration or events.
  2. Parameter type confusion: The parameter can be an equipment category, equipment prototype, or specific equipment, but you must use the actual in-game defined key when filling it in (such as infantry_equipment rather than custom names). Spelling errors won't produce obvious warnings but will cause the condition to always evaluate as false.