Skip to content

ships.Function.shieldMetrics

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

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

Function: shieldMetrics()

shieldMetrics(input): ShieldMetrics

Defined in: src/ships/shields.ts:358

A build's bare shields: strength, where it comes from, and the resistances the generator and boosters stack up between them.

These are the pip-free figures, the ones an outfitting screen shows. The SYS capacitor is a separate story with its own entry point, shieldCapacitorMetrics, which takes what this returns and folds a pip allocation into it.

Parameters

input

ShieldInput

The hull's mass and base shield strength, the fitted generator, and any powered boosters and Guardian reinforcement.

Returns

ShieldMetrics

The ShieldMetrics. With no generator fitted there is no shield for a resistance to apply to: every strength figure is 0 — any reinforcement passed is dropped, since a Guardian package has no shield to reinforce — and resistances and effectiveHitPoints are 0 for every damage type. massCurveMultiplier is 0 and boostMultiplier is 1, whatever boosters are fitted, since there is no generator strength to multiply.

Throws

With a generator fitted, if hullMass is not a finite number of zero or more, or the generator carries a complete but non-physical curve — the contract shieldMassCurveMultiplier documents, reported as shieldMetrics. A generator whose record is simply missing part of its curve is not a failure: hullMass is never read, and massCurveMultiplier and every strength figure are 0.

Example

import { shieldMetrics } from '@elite-dangerous-almanac/core/ships/shields';
import type { ShieldGeneratorParams } from '@elite-dangerous-almanac/core/ships/shields';

declare const gen: ShieldGeneratorParams;

const shields = shieldMetrics({
  hullMass: 400,
  baseShieldStrength: 350,
  generator: gen,
  boosters: [{ shieldBoost: 0.2, kineticResistance: 0 }],
});
shields.strength;                 // -> MJ
shields.resistances.kinetic;      // -> effective kinetic resistance
shields.effectiveHitPoints.kinetic; // -> kinetic damage the shield can soak

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