Skip to content

equipment.Function.parseSuitLoadout

github-actions[bot] edited this page Sep 20, 2026 · 11 revisions

@elite-dangerous-almanac/core / equipment / parseSuitLoadout

Function: parseSuitLoadout()

parseSuitLoadout(event): SuitLoadout

Defined in: src/equipment/suit-loadout.ts:327

Import a journal SuitLoadout, SwitchSuitLoadout or CreateSuitLoadout event.

Parameters

event

SuitLoadoutEvent

The event object, as the game wrote it.

Returns

SuitLoadout

The frozen SuitLoadout.

Remarks

A mount name is matched case-insensitively, with surrounding whitespace ignored, and the loadout reports the catalogue's own spelling — so fitted.mount === 'PrimaryWeapon1' holds whatever spelling the source used. Weapon and recipe symbols are matched the same way.

The suit has to resolve: an unknown SuitName is a TypeError, because the grade, the mounts and every stat come from it. Everything else the catalogues cannot resolve is left out of the loadout and reported by SuitLoadout.importOutcomes, so one unknown weapon does not cost a caller the rest of the event.

SuitID, SuitModuleID, LoadoutID and LoadoutName are kept: they name the items the Commander owns and the loadout slot they sit in, which is what a later LoadoutEquipModule event joins to. event, timestamp and the _Localised display text are dropped.

Throws

If event is not shaped like one. event must be an object whose SuitName is a string naming a catalogued suit; Modules, SuitMods and WeaponMods must be arrays whenever they are present; each module must be an object with a string SlotName and ModuleName, no two claiming the same mount; and each modification must be a string. Every other field is trusted.

Examples

import { parseSuitLoadout } from '@elite-dangerous-almanac/core/equipment/suit-loadout';

const loadout = parseSuitLoadout({
    event: 'SwitchSuitLoadout',
    SuitID: 1700482757598197,
    SuitName: 'tacticalsuit_class5',
    SuitMods: ['suit_nightvision', 'suit_increasedammoreserves'],
    LoadoutID: 4293000007,
    LoadoutName: 'Double Trouble',
    Modules: [
        {
            SlotName: 'PrimaryWeapon1',
            SuitModuleID: 1701103603778031,
            ModuleName: 'wpn_m_launcher_rocket_sauto',
            Class: 5,
            WeaponMods: ['weapon_clipsize'],
        },
    ],
});

loadout.suit.name; // -> 'Dominator Suit'
loadout.grade; // -> 5
loadout.name; // -> 'Double Trouble'
loadout.weapons[0]?.weapon.name; // -> 'Karma L-6'
loadout.weapons[0]?.metrics.damagePerSecond; // -> 119.2

A stat the game shows on foot is the catalogue's base with the fitted modifiers folded onto it. The suit's Extra Ammo Capacity reaches the weapon that carries the reserve.

import { applyPersonalModifiers } from '@elite-dangerous-almanac/core/equipment/engineering';
import { parseSuitLoadout } from '@elite-dangerous-almanac/core/equipment/suit-loadout';

const loadout = parseSuitLoadout({
    SuitName: 'tacticalsuit_class5',
    SuitMods: ['suit_increasedshieldregen', 'suit_increasedammoreserves'],
    Modules: [
        {
            SlotName: 'PrimaryWeapon1',
            ModuleName: 'wpn_m_launcher_rocket_sauto',
            Class: 5,
            WeaponMods: [],
        },
    ],
});

const fitted = loadout.weapons[0]!;
applyPersonalModifiers('shieldRegeneration', loadout.stats.shieldRegeneration, loadout.modifiers);
// -> 3.1
applyPersonalModifiers('reserveAmmo', fitted.weapon.reserveAmmo, fitted.modifiers); // -> 12

TypeScript

Guides
astro
Classes (1)
ProceduralSystem

Properties

Accessors

Methods

Interfaces (28)
Type Aliases (6)
Variables (22)
Functions (57)
Subpath modules (3)
commodities
Interfaces (1)
Type Aliases (1)
Variables (3)
Functions (3)
equipment
Interfaces (18)
Type Aliases (9)
Variables (4)
Functions (14)
Subpath modules (2)
galaxy-map
Interfaces (1)
Variables (1)
Functions (2)
i18n
Interfaces (1)
Type Aliases (1)
Functions (23)
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 (86)
Subpath modules (8)

Clone this wiki locally