Skip to content

Unlock

An Unlock is a conditional discovery that triggers when the player interacts with a Station (often via Signal leak or scanning). Each unlock has relation / secrecy thresholds, an allowed-owner whitelist, and a category — blueprint / commission / discount / information.

Inheritance: dbdata → unlock.

PropertyTypeDescription
.idstringUnlock id
.namestringDisplay name
.rawnamestringRaw text entry reference
.descriptionstringDescription
PropertyTypeDescription
.allowedownerslistOwner factions where this unlock can trigger (empty = all)
.allowedwareslistWares for trade-offer location unlocks (empty = all)
.minrelationfloatMinimum relation with owner
.maxrelationfloatMaximum relation with owner
.secrecylevel.minintMinimum secrecy level of component
.secrecylevel.maxintMaximum secrecy level of component
PropertyTypeDescription
.isblueprintboolReveals a blueprint ware
.iscommissionboolReveals a trade commission
.isdiscountboolReveals a trade discount
.isinformationboolReveals information

Exactly one of the four .isX flags is true per unlock.

<do_if value="$unlock.isblueprint">
<!-- gain a blueprint ware -->
</do_if>
<do_elseif value="$unlock.isdiscount">
<!-- gain a trade discount -->
</do_elseif>
<do_elseif value="$unlock.iscommission">
<!-- gain a trade commission -->
</do_elseif>
<do_elseif value="$unlock.isinformation">
<!-- reveal some info -->
</do_elseif>
<set_value name="$rel"
exact="faction.player.relationto.{$Station.owner}"/>
<do_if value="$unlock.minrelation le $rel
and $unlock.maxrelation ge $rel
and ($unlock.allowedowners.count == 0
or $unlock.allowedowners.indexof.{$Station.owner} gt 0)">
<!-- player is eligible for this unlock at this station -->
</do_if>
  • .minrelation AND .maxrelation both apply. Player relation must be in [min, max]. Some unlocks only trigger at high relation; others trigger at LOW relation (hostile discoveries).
  • .allowedowners empty = all factions. Don’t treat empty list as “no factions allowed”. Empty is the universal default.
  • .secrecylevel.min/max gates by scanner ability. Player needs scanner with adequate .maxscanlevel to trigger high-secrecy unlocks. See Scanner.
  • One category flag per unlock. Vanilla mods that try to combine (e.g. “this unlock is both blueprint AND discount”) are not supported by the data model.
  • Unlocks are db-defined. Modders add unlocks via data files (libraries/unlocks.xml-style), not via runtime spawning.
  • Station — host (.unlocks accessor where applicable).
  • Faction.allowedowners checked against station owner.
  • Signal leak — common unlock trigger.
  • Scanner.maxscanlevel gates secrecy-level unlocks.
  • Ware.allowedwares for trade-offer unlocks.