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

EliteDangerousAlmanac / Ships / Engineering

Class: Engineering

Defined in: dotnet/src/EliteDangerousAlmanac/Ships/Engineering.cs:153

The engineering calculator: data-free arithmetic that turns a blueprint grade, a quality roll and an optional experimental effect into stat modifiers.

Remarks

A blueprint feature bounds a modifier by the engineering quality roll, and an experimental effect adds a fixed contribution. Each contribution names a journal modifier label and an apply method, and ComputeModifiers folds every contribution to a label onto one base value.

A handful of stats are percentages of a multiplier and compound on that multiplier instead, whatever method the recipe names: hull boost and shield boost on one plus the value, and the four resistances on their damage multiplier. That is why an eighty percent bulkhead engineered by a thirty-two percent blueprint reads 137.6 percent and not 105.6.

The primitive labels a recipe actually changes are preserved. Frontier's own Rapid Fire and High Capacity recipes shorten the burst interval, for example, rather than raising the rate of fire directly. Values use the game's 32-bit float arithmetic.

The catalogues live in BlueprintCatalogue and ExperimentalEffectCatalogue; this type holds no data.

Methods

ComputeModifiers()

static ComputeModifiers(baseStats, grade, quality?, experimental?): IReadOnlyList<EngineeringModifier>

Defined in: dotnet/src/EliteDangerousAlmanac/Ships/Engineering.cs:187

Computes the stat modifiers a blueprint grade and an effect produce.

Parameters

baseStats

IReadOnlyDictionary<string, double>

The module's base stat values, keyed by journal modifier label. Only the labels present here can be scaled; a contribution to an absent stat is skipped unless it sets or adds to it. Two labels are also read without being modified: Range resolves the Long Range falloff flag, and BurstSize rounds an engineered clip to whole bursts.

grade

BlueprintGrade

The blueprint grade to roll.

quality

double = 1

The engineering system's shared quality roll, from zero through one. It defaults to one, the best roll. A legacy-engineered module advanced each attribute independently and cannot be reconstructed from its single reported quality; import its stated modifiers.

experimental

ExperimentalEffect? = null

The experimental effect to apply, when there is one.

Returns

IReadOnlyList<EngineeringModifier>

One modifier per modified label.

Exceptions

ArgumentNullException

baseStats or grade is null.

ArgumentOutOfRangeException

quality is not a finite number from zero through one.

ComputeModifiers()

static ComputeModifiers(baseStats, features, quality?, experimental?): IReadOnlyList<EngineeringModifier>

Defined in: dotnet/src/EliteDangerousAlmanac/Ships/Engineering.cs:212

Computes the stat modifiers a feature list and a contribution list produce.

Parameters

baseStats

IReadOnlyDictionary<string, double>

The module's base stat values, keyed by journal modifier label.

features

IReadOnlyList<BlueprintFeature>

The blueprint features to roll. This overload is for a caller assembling modifiers without a catalogue record.

quality

double = 1

The quality roll, from zero through one.

experimental

IReadOnlyList<ExperimentalContribution>? = null

The experimental contributions to apply, when there are any.

Returns

IReadOnlyList<EngineeringModifier>

One modifier per modified label.

Exceptions

ArgumentNullException

baseStats or features is null.

ArgumentOutOfRangeException

quality is not a finite number from zero through one.

SumMaterials()

static SumMaterials(lists): IReadOnlyList<EngineeringMaterial>

Defined in: dotnet/src/EliteDangerousAlmanac/Ships/Engineering.cs:383

Combines several material lists into one, summing the shared counts.

Parameters

lists

params IReadOnlyList<EngineeringMaterial>[]

The material lists to merge, each of which may be empty. Materials match on their symbol, case-insensitively.

Returns

IReadOnlyList<EngineeringMaterial>

One entry per distinct material, in first-seen order, with summed counts.

Remarks

Use it to fold a blueprint's cost together with an experimental effect's. The two catalogues stay decoupled, so pass in whichever lists you have.

Exceptions

ArgumentNullException

lists is null.

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