DotNet.Ships.Class.PreEngineeredStats - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki

EliteDangerousAlmanac / Ships / PreEngineeredStats

Class: PreEngineeredStats

Defined in: dotnet/src/EliteDangerousAlmanac/Ships/PreEngineeredStats.cs:25

Resolves a pre-engineered variant into a fittable module: the base module's registry record with the variant's hand-set stat changes applied.

Remarks

A variant on its own is a pairing rather than a module. It names the base symbol and the engineering baked into it, and building a ship with one needs the resolved article: mass, power draw, integrity and the rest as the variant actually arrives.

The outfitting registry carries the mechanical, defence and weapon stats. UnresolvedLabels reports any label that cannot be resolved rather than dropping it silently.

Methods

Identify()

static Identify(module): PreEngineeredVariant?

Defined in: dotnet/src/EliteDangerousAlmanac/Ships/PreEngineeredStats.cs:254

Identifies the fixed article a captured fitted module describes.

Parameters

module

LoadoutModule

A module from a journal event or a SLEF export.

Returns

PreEngineeredVariant?

The one catalogue variant the capture answers to, or null when the evidence names none or names more than one.

Remarks

A reward article carries hand-set values that an ordinary roll of the named blueprint does not reproduce, so the reported stats decide rather than the blueprint identity alone. A captured experimental effect is composed with each candidate before the comparison, because some fixed articles accept an effect after purchase.

A Mercenary article is the exception. Its bespoke blueprint is on sale only after the article is bought, and its unpublished purchase block cannot identify it, so the module symbol and the blueprint identify the purchase at grade 1 and at every grade it was upgraded to since. The fitted grade and effect stay the build's current state, and the variant carries the original purchase grade, price and baked effect: read the capture for what is fitted now, and the variant for what was bought.

A locked article is also identified by its own symbol, blueprint, grade and effect where a capture states no modifiers at all: being final, no ordinary roll could have written that combination. A stated but empty or partial list does not take that shortcut, because an older export can carry an ordinary roll under the same identity and its values must not be replaced by reward figures.

A journal may leave out a derived modifier, so one predicted value may be absent. Every stated predicted value must agree to within one part in ten thousand of the stat's unmodified base, which is wide enough for a producer that stores the multiplier and re-derives the value, and narrow enough that no other candidate fits. Ambiguous or incomplete evidence answers nothing rather than guessing.

Exceptions

ArgumentNullException

module is null.

JournalModifiers()

static JournalModifiers(variant): IReadOnlyList<EngineeringModifier>

Defined in: dotnet/src/EliteDangerousAlmanac/Ships/PreEngineeredStats.cs:210

The journal-shaped fixed modifiers a variant reports when fitted.

Parameters

variant

PreEngineeredVariant

The variant to read.

Returns

IReadOnlyList<EngineeringModifier>

The modifiers as a journal writes them, the damage shares a baked conversion adds included. It is empty when the variant's symbol is unknown.

Remarks

These are the same changes Modifiers reports, presented the way a capture states them: a burst pattern reads as the rate of fire the game derives from it, and a weapon reports its damage per second.

Exceptions

ArgumentNullException

variant is null.

Modifiers()

static Modifiers(variant): IReadOnlyList<EngineeringModifier>

Defined in: dotnet/src/EliteDangerousAlmanac/Ships/PreEngineeredStats.cs:45

The primitive fixed modifiers a variant applies to its base module.

Parameters

variant

PreEngineeredVariant

The variant to read.

Returns

IReadOnlyList<EngineeringModifier>

One modifier per computable label. It is empty when the variant carries neither a stat block nor a baked effect that moves a stat, and when its symbol is unknown.

Remarks

The variant's baked experimental effect is included. Labels stay in their recipe form, so a burst-pattern internal is not converted into the rate of fire a journal derives from it; use Resolve when the resolved module stats are wanted.

Exceptions

ArgumentNullException

variant is null.

Resolve()

static Resolve(variant): OutfittingModule?

Defined in: dotnet/src/EliteDangerousAlmanac/Ships/PreEngineeredStats.cs:105

Resolves a variant into a module record ready to fit.

Parameters

variant

PreEngineeredVariant

The variant to resolve.

Returns

OutfittingModule?

The base module's record with every stat the variant moves, and that the registry carries, replaced by its engineered value; or null when the variant's symbol is not in the outfitting registry.

Remarks

The symbol, name, class, rating and price stay the base module's throughout: a pre-engineered variant is the same article with different numbers, not a different module. A final variant also carries its engineering lock, so fitting the resolved article keeps that restriction.

Exact damage components scale with an engineered damage value, so their proportions and the anti-xeno overlay stay coherent with the resolved scalar. A caller-supplied variant with no stat block resolves to the base record with its baked experimental effect applied.

The rate of fire follows a moved firing cycle even though no recipe names it. An article whose burst interval, burst size or within-burst rate moves resolves the rate those parts produce.

Exceptions

ArgumentNullException

variant is null.

UnresolvedLabels()

static UnresolvedLabels(variant): IReadOnlyList<string>

Defined in: dotnet/src/EliteDangerousAlmanac/Ships/PreEngineeredStats.cs:62

The labels a variant modifies that cannot be computed for its base module.

Parameters

variant

PreEngineeredVariant

The variant to read.

Returns

IReadOnlyList<string>

The unresolvable labels, in the variant's own order.

Remarks

These are the labels the registry does not model at all, and the known stats whose base value this particular module leaves out. Reporting them separates "this variant changes nothing else" from "this catalogue cannot say". Every catalogued variant answers empty.

Exceptions

ArgumentNullException

variant is null.

⚠️ **GitHub.com Fallback** ⚠️