Skip to content

ships.Function.resolveBlueprintForModule

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

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

Function: resolveBlueprintForModule()

resolveBlueprintForModule(moduleSymbol, blueprintSymbol): string

Defined in: src/ships/blueprint-journal.ts:79

The blueprint whose numbers a module actually rolls when a journal names blueprint on it — the same id back, except where the game spells two different recipes alike.

One BlueprintName, two recipes. Long Range and Wide Angle are offered on the internal sensor suite and on the KWS/manifest/wake scanners under the same id, and the two roll different stats in opposite directions:

On a sensor suite On a utility scanner
Long Range: Mass ×1.20, ScannerRange +0…15% Long Range: PowerDraw ×1.10, ScannerRange +0…24%
Wide Angle: PowerDraw ×1.10, ScannerRange −4% Wide Angle: Mass ×1.20, ScannerTimeToScan +10%

(Grade 1 shown.) BLUEPRINTS keys the scanner side under Scanner_LongRange / Scanner_WideAngle, the spelling the scanner menus list, so folding the journal id as written would charge the build mass where the game charges power draw.

The same holds for Weapon_Overcharged, which the game writes for every weapon, though a multi-cannon's also cuts the clip — 3% at grade 1 falling to 15% at grade 5. BLUEPRINTS keys that side under MC_Overcharged, and this is the common case: 70 of the build corpus's 1902 declared entries go through it, against one for the scanners. The clip penalty is folded only where a module's menu offers the multi-cannon recipe — anti-xeno multi-cannons have no ordinary menu, and cannons, fragment cannons and plasma accelerators take no clip leg. See data/ships/SOURCES.md § "Multi-cannon Overcharged" for the captures.

Only the module can settle it, which is why this takes one, and it resolves into a menu and never out of one: a sensor suite's Sensor_LongRange comes back unchanged, as does Scanner_LongRange asked of a suite — unchanged is not offered, and getBlueprintsForModule still says a suite does not take it. A generic Misc_* id is left alone too: that pair is one recipe under two published spellings. Materials are unaffected — both spellings of a pair bill the same at every grade, so getBlueprintCost needs no module.

Parameters

moduleSymbol

string

A module symbol, e.g. "Hpt_CloudScanner_Size0_Class5".

blueprintSymbol

string

A blueprint catalogue or journal id, matched case-insensitively and trimmed. Colliding journal spellings are resolved against moduleSymbol.

Returns

string

The id to join to BLUEPRINTS, in that catalogue's spelling when a journal name resolved, and otherwise blueprintSymbol exactly as it was passed — byte for byte, so a caller who never meets the collision never sees their own spelling rewritten.

Throws

If blueprintSymbol is not a string, including when it is missing — this returns an id rather than reporting whether one is known, so there is no miss for a nullish one to be. A nullish moduleSymbol is a miss: an unknown module offers no menu, and blueprintSymbol comes back unchanged.

Example

import { resolveBlueprintForModule } from '@elite-dangerous-almanac/core/ships/blueprint-journal';

// A wake scanner's Long Range is the scanner recipe, whichever way the build spells it.
resolveBlueprintForModule('Hpt_CloudScanner_Size0_Class5', 'Sensor_LongRange');
// -> 'Scanner_LongRange'

// The sensor suite keeps its own, and every other module keeps whatever it was given.
resolveBlueprintForModule('Int_Sensors_Size4_Class5', 'Sensor_LongRange');
// -> 'Sensor_LongRange'

// A multi-cannon's Overcharged is the multi-cannon recipe, clip penalty and all.
resolveBlueprintForModule('Hpt_MultiCannon_Fixed_Medium', 'Weapon_Overcharged');
// -> 'MC_Overcharged'
resolveBlueprintForModule('Hpt_BeamLaser_Fixed_Small', 'Weapon_Overcharged');
// -> 'Weapon_Overcharged'

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