Skip to content

ships.Function.shieldMassCurveMultiplier

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

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

Function: shieldMassCurveMultiplier()

shieldMassCurveMultiplier(hullMass, generator): number

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

A shield generator's strength multiplier at a given hull mass.

Parameters

hullMass

number

The hull's mass, in tonnes (not the loaded ship's). Finite and non-negative.

generator

ShieldGeneratorParams

The generator's mass/multiplier curve, post-engineering. Either all six curve fields, or a record the catalogue left incomplete — see the 0 cases below.

Returns

number

The multiplier to apply to the hull's base shield strength: minMultiplier for a hull sitting exactly on maxMass, no more than maxMultiplier for a featherweight one, and 0 past maxMass — a generator cannot raise a shield around a hull heavier than it is rated for. Also 0 for a generator whose record is missing part of its curve.

Throws

If hullMass is not a finite number of zero or more, or if the generator carries all six curve fields and they are not a physical curve: every one has to be finite and non-negative, the masses strictly ordered minMass < optMass < maxMass (or all equal, for a constant curve), the multipliers strictly ordered minMultiplier < optMultiplier < maxMultiplier (or all equal), and an all-equal mass curve must have equal multipliers. A curve that is merely absent still answers 0: a catalogue record missing any of the six fields is incomplete data, not a non-physical curve, and this is the only mass-curve outcome that is not a number or a throw.

Remarks

The curve is a power law fitted through the generator's three declared points: normalize the mass into [0, 1] between maxMass and minMass, raise it to the exponent that makes the curve pass through (optMass, optMultiplier), then interpolate between minMultiplier and maxMultiplier. It is the same curve thrusterMassCurveMultiplier reads a thruster's performance off, and the two agree on every input they both accept.

Examples

import { shieldMassCurveMultiplier } from '@elite-dangerous-almanac/core/ships/shields';

// A 6A generator (opt 540 t) on a 400 t Anaconda performs slightly above spec
shieldMassCurveMultiplier(400, {
  minMass: 270, optMass: 540, maxMass: 1350,
  minMultiplier: 0.7, optMultiplier: 1.2, maxMultiplier: 1.7,
}); // -> 1.434…
import { shieldMassCurveMultiplier } from '@elite-dangerous-almanac/core/ships/shields';

// A generator whose optimal mass sits on its maximum is not a curve at all
try {
  shieldMassCurveMultiplier(400, {
    minMass: 270, optMass: 1350, maxMass: 1350,
    minMultiplier: 0.7, optMultiplier: 1.2, maxMultiplier: 1.7,
  });
} catch (error) {
  (error as Error).message;
  // -> 'shieldMassCurveMultiplier: generator: masses must be strictly ordered minMass < optMass < maxMass, or all equal'
}

// A record the catalogue left incomplete is data that is missing, not data that is wrong
shieldMassCurveMultiplier(400, { optMass: 540, optMultiplier: 1.2 }); // -> 0

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