Skip to content

ships.Function.identifyPreEngineeredVariant

github-actions[bot] edited this page Aug 26, 2026 · 74 revisions

@elite-dangerous-almanac/core / ships / identifyPreEngineeredVariant

Function: identifyPreEngineeredVariant()

identifyPreEngineeredVariant(module): PreEngineeredVariant | null

Defined in: src/ships/pre-engineered-stats.ts:243

Identify the fixed pre-engineered/reward variant described by a fitted loadout module.

Reward matching uses the reported post-engineering stat values rather than trusting the blueprint tuple alone: reward variants carry hand-set values that an ordinary roll of the named blueprint does not reproduce. A captured experimental effect is composed with each candidate before comparison, because some fixed articles accept an effect after purchase (the V1 frame-shift drives are the common example).

Mercenary articles are the exception: their bespoke blueprint is available only after buying the article, while their unpublished purchase modifier block cannot identify it. The module symbol and blueprint therefore identify the purchase at grade 1 and after upgrading it through grades 2–5. The fitted grade and experimental effect remain the loadout's current engineering state; the returned variant carries the original purchase grade and Merc Coin price.

A locked fixed article is also identified by its unique symbol/blueprint/grade/experimental tuple when a SLEF capture omits the Modifiers key entirely. A present empty or partial array does not use this shortcut: older library exports can carry an ordinary roll with the same tuple, and its values must not be replaced by reward stats. A third-party export can omit the array from such a roll; that record is indistinguishable from the fixed article, so the catalogue identity wins.

Frontier journals and captures may omit a derived modifier, so one predicted value may be absent. Every stated predicted value must agree within journal float noise, and all but at most one must be present. Ambiguous or incomplete evidence returns null rather than guessing. Other variants without a published stat block cannot be identified.

Parameters

module

LoadoutModule

A module from a journal Loadout event or SLEF export.

Returns

PreEngineeredVariant | null

The uniquely matching catalogue variant, or null when the stats do not identify one.

Throws

If a field it reads is present and not a string — module.Item, a modifier's Label, or the block's BlueprintName or ExperimentalEffect. A module with no engineering block answers null before any of them is read.

Example

import { identifyPreEngineeredVariant } from '@elite-dangerous-almanac/core/ships/pre-engineered-stats';
import type { LoadoutEvent } from '@elite-dangerous-almanac/core/ships/slef';

declare const loadoutEvent: LoadoutEvent;

const fitted = loadoutEvent.Modules.find((m) => m.Slot === 'FrameShiftDrive')!;
identifyPreEngineeredVariant(fitted)?.acquisition; // -> 'techBroker', or null

API

Guides
astro
Classes (1)
ProceduralSystem

Properties

Accessors

Methods

Interfaces (16)
Type Aliases (3)
Variables (11)
Functions (37)
Subpath modules (3)
commodities
Interfaces (1)
Type Aliases (1)
Variables (3)
Functions (3)
equipment
Interfaces (6)
Type Aliases (8)
Variables (3)
Functions (10)
Subpath modules (2)
i18n
Interfaces (1)
Type Aliases (1)
Functions (17)
materials
Enumerations (2)
Interfaces (2)
Type Aliases (2)
Variables (9)
Functions (9)
ships
Classes (3)
BuildMetrics

Methods

LoadoutEditError

Constructors

Properties

Methods

ShipLoadout

Accessors

Methods

Interfaces (125)
Type Aliases (44)
Variables (10)
Functions (85)
Subpath modules (8)

Clone this wiki locally