Wiki

trigger · has_design_based_on

Definition

  • Supported scope:COUNTRY
  • Supported target:none

Description

check if country has a buildable non-obsolete design based on an archetype

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 your mod needs to check whether a nation possesses buildable, non-obsolete ship/armor designs based on a specific archetype, this trigger is extremely useful. Common scenarios include: in the available block of national focuses or decisions, requiring the player to have designed an available blueprint for a certain weapon platform before unlocking subsequent production bonuses or tech bonuses.

# Example: Allow activation of a decision only when the nation has an available design based on the heavy tank archetype
available = {
    has_design_based_on = heavy_tank
}

Synergy

  • [has_built](/wiki/trigger/has_built): Use in conjunction to further confirm that the nation not only has a design, but has also actually constructed and equipped the relevant hardware, avoiding triggering rewards when only blueprints exist without production.
  • [add_tech_bonus](/wiki/effect/add_tech_bonus): When conditions are met, triggers as an effect reward, granting research bonuses related to that equipment type, forming a "design exists → accelerate research" logic chain.
  • [create_equipment_variant](/wiki/effect/create_equipment_variant): Use this trigger as a protective check before attempting to create variants, preventing errors from trying to create variants based on non-existent archetypes.
  • [any_purchase_contract](/wiki/trigger/any_purchase_contract): If your mod involves production licenses or foreign procurement logic, combine with this trigger to distinguish between "self-developed designs" and "licensed procurement" sources of equipment paths.

Common Pitfalls

  1. Confusing archetype with concrete equipment keys: The parameter for has_design_based_on must be an equipment archetype (such as medium_tank, destroyer), not a specific equipment variant or tech key. Beginners often input the name of a researched specific tech, causing the condition to never evaluate true.
  2. Overlooking the "non-obsolete" restriction: This trigger only returns true for designs that are buildable and not marked as obsolete. If all of the player's related designs have become obsolete due to tech advancement, the condition remains unsatisfied—this easily causes confusion in late-game scenarios and requires explanation to players in documentation or tooltips.