Skip to content

ships.Function.ammunitionCapacity

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

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

Function: ammunitionCapacity()

ammunitionCapacity(stats): AmmunitionCapacity | null

Defined in: src/ships/ammunition.ts:108

What a module holds when fully rearmed.

Parameters

stats

AmmunitionStats | null | undefined

The module's stats. A catalogue record works as-is; pass a post-engineering record (FittedModule.effectiveStats, effectiveModule) to get the capacity a build actually flies with. Fifteen blueprints move one figure or both — High Capacity, the chaff, heat-sink and point-defence capacity recipes among them — and three experimental effects move the reserve: Corrosive Shell costs a fifth of it, and Plasma Slug (in both its forms) empties it, because the weapon then reloads from ship fuel.

Returns

AmmunitionCapacity | null

The AmmunitionCapacity, or null for a module that carries no ammunition at all — the lasers, which state neither figure because they draw from the weapons capacitor instead.

Remarks

Figures are reported as the stats give them. When engineering is simulated, its calculator makes both ammunition figures whole: a clip rounds up to a whole burst and a reserve rounds to the nearest whole round. A small cannon under High Capacity at grade 3 therefore loads an 11-round clip and carries a 202-round reserve. A journal states the engineered figures themselves, so imported values pass through untouched.

Example

import { ammunitionCapacity } from '@elite-dangerous-almanac/core/ships/ammunition';
import { getModuleBySymbol } from '@elite-dangerous-almanac/core/ships/modules';
import { HARDPOINT_MODULES } from '@elite-dangerous-almanac/core/ships/modules-hardpoint';
import { UTILITY_MODULES } from '@elite-dangerous-almanac/core/ships/modules-utility';

ammunitionCapacity(getModuleBySymbol('Hpt_ChaffLauncher_Tiny', UTILITY_MODULES)!);
// -> { clipSize: 1, hopper: 10, total: 11, unlimited: false }

ammunitionCapacity(getModuleBySymbol('Hpt_BeamLaser_Fixed_Small', HARDPOINT_MODULES)!);
// -> null — a beam laser has no ammunition to count

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