Skip to content

ships.Function.getPreEngineeredStats

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

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

Function: getPreEngineeredStats()

getPreEngineeredStats(variant): OutfittingModule | null

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

A pre-engineered variant resolved into a module record you can fit.

Returns the base module's catalogue record with every stat the variant modifies — and that the catalogue carries — replaced by its engineered value. symbol, name, class, rating and cost are the base module's throughout: a pre-engineered variant is the same article with different numbers, not a different module. A final variant also carries engineeringLocked: true, so fitting the resolved article keeps that restriction. Exact damage components scale with an engineered damage value so their proportions and the anti-xeno overlay remain coherent with the resolved scalar.

A variant with no stat block (every mercenary row) resolves to a copy of the base record with nothing changed, which is the honest answer — the pre-engineering those arrive with is not published anywhere, so the catalogue does not guess at it.

Parameters

variant

PreEngineeredVariant

A pre-engineered variant.

Returns

OutfittingModule | null

The resolved module record, or null when the variant's symbol is not in the module catalogues. It is always a record of your own — never the shared catalogue singleton — so you may adjust it before fitting it; its nested values are still the catalogue's frozen ones, so replace them rather than write into them.

Example

import { getModuleBySymbol } from '@elite-dangerous-almanac/core/ships/modules';
import { getPreEngineeredVariants } from '@elite-dangerous-almanac/core/ships/pre-engineered';
import { getPreEngineeredStats } from '@elite-dangerous-almanac/core/ships/pre-engineered-stats';

const shard = getPreEngineeredVariants('Hpt_Guardian_ShardCannon_Fixed_Medium')[0]!;
const stock = getModuleBySymbol(shard.symbol)!;
const fitted = getPreEngineeredStats(shard)!;
stock.mass;  // -> 4
fitted.mass; // -> 6  (the variant carries Mass +50%)

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