-
Notifications
You must be signed in to change notification settings - Fork 0
astro.Class.ProceduralSystem
@elite-dangerous-almanac/core / astro / ProceduralSystem
Defined in: src/astro/procedural-system.ts:144
An Elite Dangerous star system, identified by its procedural name and/or system address. Hand-named systems such as Sol are deliberately outside this type.
Instances are immutable. The normal system address is validated and computed by the
factory, so reading a successfully constructed system never throws; the modulated
form is null when its narrower sequence field cannot represent the system.
Failure model — factory failures are deliberately split by cause:
-
ProceduralSystem.fromName returns
nullfor a string that is not a well-formed system name (a parsing outcome, not an error). -
ProceduralSystem.fromSystemAddress / ProceduralSystem.fromModSystemAddress
throw
RangeErrorfor anid64outside the unsigned 64-bit range or one whose sector-grid slot has no assigned procedural name. -
ProceduralSystem.fromModSystemAddress also throws
RangeErrorwhen the modulated layout's sequence cannot fit the normal layout. Every constructed instance guarantees a normal ProceduralSystem.systemAddress. -
ProceduralSystem.fromName throws
RangeErrorimmediately when a syntactically valid name cannot be encoded (unknown naming region, or an address field out of range). -
ProceduralSystem.fromName throws
TypeErrorwhennameis not a string at all, a missing one included — that is a caller bug, not a name the scheme does not cover, so it is not reported asnull.
For the galactic codex region of a system, pass its address to the standalone
findCodexRegionForBoxel (from ./codex-region-lookup) — kept off this facade so
ProceduralSystem does not bundle the region grid.
import { ProceduralSystem } from '@elite-dangerous-almanac/core/astro/procedural-system';
declare const id64: bigint;
declare const x: number;
declare const y: number;
declare const z: number;
// Name -> id64
const sys = ProceduralSystem.fromName('Synuefe EN-H d11-96');
if (sys) sys.systemAddress; // bigint
// id64 -> name (pass coords so hand-authored regions render correctly)
ProceduralSystem.fromSystemAddress(id64, { x, y, z }).name;
readonlyrequiresRegionPermit:boolean
Defined in: src/astro/procedural-system.ts:163
Whether the system's region sits behind a permit lock (Col 70, Bleia, the Cone Sector, …).
This is a region-level flag only. Individually permit-locked systems — Sol,
Shinrarta Dezhra, Achenar and 51 others — are not procedurally named, so they
never reach a ProceduralSystem; check those with permitLockForSystemName from
./permit-locks, which covers both kinds of lock from a name alone.
readonlyusesHandAuthoredRegion:boolean
Defined in: src/astro/procedural-system.ts:151
Whether the name uses a hand-authored region instead of a procedural sector.
get massCode():
string
Defined in: src/astro/procedural-system.ts:358
The mass-code letter a–h.
string
get modSystemAddress():
bigint|null
Defined in: src/astro/procedural-system.ts:421
The 64-bit modulated system address, computed from the region origin, or null
when the system sequence cannot fit the modulated layout.
A null result is explicit and has no deferred failure mode.
bigint | null
get name():
string
Defined in: src/astro/procedural-system.ts:344
The canonical system name, e.g. Synuefe EN-H d11-96.
string
get namingRegionName():
string
Defined in: src/astro/procedural-system.ts:353
The region (sector) name — a procedural sector (Synuefe) or, when the
system is inside a hand-authored region, that region's name
(Pleiades Sector). See ProceduralSystem.usesHandAuthoredRegion to tell which.
string
get parts():
SystemNameParts
Defined in: src/astro/procedural-system.ts:400
A shallow copy of the parsed name parts.
Letters and mass code are zero-based numeric indices, not characters — the form the address encoder consumes (see SystemNameParts). Use ProceduralSystem.name / ProceduralSystem.massCode for the display strings.
import { ProceduralSystem } from '@elite-dangerous-almanac/core/astro/procedural-system';
ProceduralSystem.fromName('Synuefe EN-H d11-96')!.parts;
// { regionName: 'Synuefe', l1: 4, l2: 13, l3: 7, massCode: 3, n1: 11, n2: 96 }get position():
GalacticPosition|null
Defined in: src/astro/procedural-system.ts:380
Galactic position (light-years, Sol at origin), if known.
Only ever the position you supplied to
ProceduralSystem.fromSystemAddress or
ProceduralSystem.fromModSystemAddress — a name or an id64 does not carry
an exact position, so this is null for a system built from either alone. For an
approximate position from an address, use findCodexRegionForBoxel(id64) from
./codex-region-lookup, which returns the boxel corner in light-years.
GalacticPosition | null
A copy of the position, or null when none is known (null, not
undefined — every "absent" result in this library is null).
get sequence():
number
Defined in: src/astro/procedural-system.ts:363
The system's sequence number (N2).
number
get systemAddress():
bigint
Defined in: src/astro/procedural-system.ts:411
The validated 64-bit system address.
Construction validates the naming region and every normal-address field, so this getter has no deferred failure mode.
bigint
staticfromModSystemAddress(id64,position?):ProceduralSystem
Defined in: src/astro/procedural-system.ts:295
Build a system from its 64-bit modulated system address.
The modulated system address, as a bigint, a safe-integer
number, or a decimal string (see SystemAddressInput). Modulated
addresses routinely exceed 2^53; those values must be supplied as a
bigint or string because a JS number has already lost precision.
Galactic position (light-years, Sol at origin). Optional, but required for correct hand-authored-region names.
ProceduralSystem
The system at that address.
If the address is not a usable representation.
If the address is outside 64 bits or its grid slot has no
assigned procedural name, or if its sequence cannot fit the normal address
layout that every ProceduralSystem exposes.
import { ProceduralSystem } from '@elite-dangerous-almanac/core/astro/procedural-system';
declare const modulatedAddress: bigint;
const normal = ProceduralSystem.fromModSystemAddress(modulatedAddress);
normal.systemAddress; // normal-layout id64
staticfromName(name):ProceduralSystem|null
Defined in: src/astro/procedural-system.ts:209
Build a system from a procedural name.
Procedural and catalogued hand-authored region names are re-cased canonically. Unknown naming regions and out-of-range address fields are rejected here rather than creating an object whose address getter fails later.
string
A system name in any casing, with optional surrounding
whitespace, e.g. blae eock kc-c d0.
ProceduralSystem | null
The system, or null when name is not a procedurally named
system. Hand-named systems (Sol, Maia, Shinrarta Dezhra) have no
algorithmic address and so yield null too — that is a "not covered by the
scheme" answer, not "your string was malformed".
If name is not a string. A missing or wrong-typed argument
is a caller bug, not a name the scheme does not cover, so it is not reported as
null.
If a syntactically valid name has no known naming-region origin, or a name field cannot fit the normal system-address layout.
import { ProceduralSystem } from '@elite-dangerous-almanac/core/astro/procedural-system';
ProceduralSystem.fromName('blae eock kc-c d0')?.name; // -> 'Blae Eock KC-C d0'
ProceduralSystem.fromName('Sol'); // -> null (hand-named system)
staticfromSystemAddress(id64,position?):ProceduralSystem
Defined in: src/astro/procedural-system.ts:263
Build a system from its 64-bit system address.
When position is supplied and the system sits inside a hand-authored
region, the name is overridden with the hand-authored one (as the game
displays it). Without position, the procedural name is used.
The system address, as a bigint, a normally parsed journal
number (event.SystemAddress), or a decimal string (see
SystemAddressInput).
Galactic position (light-years, Sol at origin). Optional, but required for correct hand-authored-region names.
ProceduralSystem
The system at that address.
Pass position if you can. An id64 alone encodes only the boxel, not the
exact position, so it cannot tell whether the system falls inside a
hand-authored region (Pleiades, Coalsack, …). Without position, such a system
silently renders under its procedural name instead of the name the game
shows. Coordinates come from an external source you already have the id64
from — the player journal, EDSM or Spansh — in light-years with Sol at origin.
If the address is not a usable representation — a
non-integer, or a number beyond 2^53 - 1 that has already been rounded.
If the address is outside 64 bits or its grid slot has no assigned procedural name.
import { ProceduralSystem } from '@elite-dangerous-almanac/core/astro/procedural-system';
ProceduralSystem.fromSystemAddress(3309179996515n).name;
// -> 'Synuefe EN-H d11-96'Guides
astro
Classes (1)
ProceduralSystem
Properties
Accessors
Methods
Interfaces (16)
Type Aliases (3)
Variables (11)
Functions (37)
- absoluteBoxelToBoxelCode
- boxelCodeToAbsoluteBoxel
- boxelCodeToLetters
- boxelEdgeLy
- boxelInternalSize
- canonicalizeSectorName
- canonicalizeSystemName
- decodeModSystemAddress
- decodeSystemAddress
- encodeModSystemAddress
- encodeSystemAddress
- findHandAuthoredRegionAt
- formatSystemName
- getCodexRegion
- getCodexRegionByName
- getHandAuthoredRegionOrigin
- getNebulaByName
- isPermitLockedRegionName
- isPermitLockedSystemName
- isProceduralSystemName
- lettersToBoxelCode
- massCodeToSizeClass
- nearestNebulae
- nebulaeWithin
- parseSystemName
- permitLockedRegionForSystemName
- permitLockedSystemForAddress
- permitLockedSystemForName
- permitLockForSystemName
- resolveNamingRegionOrigin
- sectorGridPositionFromGalacticPosition
- sectorGridPositionFromName
- sectorNameFromGalacticPosition
- sectorNameFromGridPosition
- sizeClassToMassCode
- toSystemAddress
- tryToSystemAddress
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)
- getBlueprintName
- getCalculationIssueMessage
- getEngineeringGroupName
- getExperimentalEffectDescription
- getExperimentalEffectName
- getLoadoutEditErrorMessage
- getLoadoutIssueMessage
- getLoadoutSlotName
- getMaterialName
- getMicroResourceName
- getModuleName
- getOutfittingFamilyName
- getPreEngineeredVariantName
- getShipManufacturer
- getShipName
- getSlefDiagnosticMessage
- getSlotRestrictionLabel
materials
Enumerations (2)
Interfaces (2)
Type Aliases (2)
Variables (9)
ships
Classes (3)
BuildMetrics
Methods
- armourMetrics()
- buildCost()
- buildMass()
- cellBanks()
- distributorMetrics()
- distributorMetricsResult()
- frameShiftDrive()
- frameShiftDriveMassFactor()
- fuelPerJump()
- heatMetrics()
- heatMetricsResult()
- jumpRange()
- jumpRangeSummary()
- ladenJumpRange()
- loadout()
- maxJumpRange()
- mobilityCapacitorMetrics()
- mobilityCapacitorMetricsResult()
- mobilityMetrics()
- mobilityMetricsResult()
- powerBudget()
- shieldCapacitorMetrics()
- shieldCapacitorMetricsResult()
- shieldMetrics()
- shieldMetricsResult()
- shieldRecovery()
- shieldRecoveryResult()
- standardLoad()
- standardLoadResult()
- thrusters()
- totalRange()
- weaponMetrics()
- weaponsCapacitorMetrics()
- of()
LoadoutEditError
Constructors
Properties
Methods
ShipLoadout
Accessors
- cargoCapacity
- fuelCapacity
- hullValue
- importOutcomes
- modulesValue
- rebuy
- shipIdent
- shipName
- shipSymbol
- sourcePurchase
- unladenMass
Methods
- applyBlueprint()
- availableBlueprints()
- availableExperimentalEffects()
- clearEngineering()
- completeEngineeringGrade()
- fittedModuleAt()
- fittedModules()
- modulesForSlot()
- removeModule()
- repairFixedMount()
- setExperimentalEffect()
- setModule()
- setModuleEnabled()
- setModulePriority()
- setPreEngineeredVariant()
- slots()
- toLoadoutEvent()
- toSlef()
- toSlefString()
- validation()
- default()
- empty()
- fromLoadout()
- fromSlef()
Interfaces (125)
- AmmunitionCapacity
- AmmunitionStats
- ApplyBlueprintOptions
- ArmourInput
- ArmourMetrics
- AvailableBlueprint
- Blueprint
- BlueprintFeature
- BlueprintGrade
- BlueprintModuleEngineering
- BuildCost
- BuildCredits
- BuildMass
- BuildSlotBase
- BuildWeaponMetrics
- BulkheadParams
- CalculationIssue
- CellBankInput
- CellBankMetrics
- CellBankSummary
- CoreBuildSlot
- CoreSlots
- DamageComponents
- DamageDistribution
- DamageResistanceParams
- DamageSplit
- DamageTypeValues
- DistributorCapacitorMetrics
- DistributorInput
- DistributorMetrics
- DistributorOptions
- DistributorPips
- EngineeringMaterial
- EngineeringModifier
- EngineeringNormalizationUnchanged
- EngineeringNormalizationUnsupported
- EngineeringNormalized
- EngineeringOptionGroup
- ExperimentalContribution
- ExperimentalEffect
- ExperimentalEffectUnchanged
- ExperimentalEffectUnsupported
- ExperimentalEffectUpdated
- FittedModule
- FittedWeaponMetrics
- FrameShiftDriveJumpStats
- FrameShiftDriveParams
- FuelCapacity
- GunsightPoint
- HardpointBuildSlot
- HardpointSlotSpec
- HeatInput
- HeatMetrics
- HeatState
- HeatWeapon
- HullReinforcementParams
- JumpOptions
- JumpRangeSummary
- LoadoutCalculationModule
- LoadoutEvent
- LoadoutExportOptions
- LoadoutIssue
- LoadoutMass
- LoadoutModule
- LoadoutValidation
- LoadoutValidationInput
- MassCurveStats
- MobilityCapacitorInput
- MobilityCapacitorMetrics
- MobilityCapacitorOptions
- MobilityInput
- MobilityMetrics
- ModuleLimitEntry
- ModuleLimitIncrease
- ModuleLimitUsage
- ModuleReinforcementParams
- OptionalBuildSlot
- OptionalSlotSpec
- OutfittingModule
- OutfittingModuleIdentity
- OutfittingModuleStats
- ParsedSlot
- PowerBand
- PowerBudget
- PowerConsumer
- PowerConsumerResult
- PowerDistributorStats
- PowerGenerationStats
- PreEngineeredModifier
- PreEngineeredVariant
- ProjectileRangeBoundaries
- ShieldBoosterParams
- ShieldCapacitorInput
- ShieldCapacitorMetrics
- ShieldCapacitorOptions
- ShieldGeneratorParams
- ShieldInput
- ShieldMetrics
- ShieldRecovery
- ShieldRecoveryInput
- ShieldRecoveryOptions
- ShieldRegenerationStats
- Ship
- ShipSlots
- SimpleBuildSlot
- SlefDiagnostic
- SlefEntry
- SlefExportOptions
- SlefHeader
- SlefInspection
- SlefStringifyOptions
- SourceModuleValue
- SourcePurchaseRecord
- StandardLoadInputs
- ThrusterCurveParams
- ThrusterParams
- TotalRangeDetails
- ValidationModule
- WeaponDamageStats
- WeaponMetrics
- WeaponsCapacitorInput
- WeaponsCapacitorMetrics
- WeaponsOptions
- WeaponStats
- WeaponTotals
Type Aliases (44)
- BlueprintGrades
- BuildSlot
- CalculationIssueReason
- CalculationResult
- CoreSlotType
- DamageResistances
- DamageType
- EngineeringGroupId
- EngineeringNormalizationCode
- EngineeringNormalizationResult
- ExperimentalEffectMutationCode
- ExperimentalEffectMutationResult
- FixedMountRepairResult
- GunsightOffset
- HardpointRestriction
- ImmovableReason
- LoadoutEditErrorCode
- LoadoutImportOutcome
- LoadoutIssueCode
- LoadoutIssueParam
- LoadoutIssueParams
- LoadoutSlot
- ModifierMethod
- ModuleCategory
- ModuleEngineering
- ModuleExclusionGroup
- ModuleFitConstraint
- ModuleGuidance
- ModuleLimitGroup
- ModuleMount
- ModuleRating
- ModuleSlot
- OptionalRestriction
- OutfittingFamilyId
- PreEngineeredAcquisition
- ShipGunsight
- ShipGunsightCatalogue
- Slef
- SlefConstraint
- SlefDiagnosticCode
- SlotKind
- SlotRestriction
- StandardLoad
- ThrusterLoad
Variables (10)
Functions (85)
- ammunitionCapacity
- armourMetrics
- armourPiercingFactor
- calculateCargoCapacity
- calculateFuelCapacity
- calculateModuleLimits
- calculateUnladenMass
- cellBankSummary
- combinedRateOfFire
- computeModifiers
- damageFalloff
- damagePerSecond
- distributorMetrics
- effectiveHitPoints
- effectiveWeaponThermalLoad
- energyPerSecond
- enumerateSlots
- equilibriumHeatLevel
- frameShiftDriveMassFactor
- fuelPerJump
- getBlueprint
- getBlueprintGrade
- getBlueprintsForModule
- getBulkheadsForShip
- getEngineeringGroup
- getExperimentalEffect
- getExperimentalsForBlueprint
- getExperimentalsForModule
- getLoadoutModifier
- getModuleBySymbol
- getModulesByName
- getPreEngineeredJournalModifiers
- getPreEngineeredModifiers
- getPreEngineeredStats
- getPreEngineeredVariants
- getShipByName
- getShipBySymbol
- getShipGunsight
- getShipSlots
- getSourceModuleValue
- hasFrameShiftDriveJumpStats
- hasMassCurveStats
- hasPowerDistributorStats
- hasPowerGenerationStats
- hasShieldRegenerationStats
- hasWeaponDamageStats
- heatLevelAtTime
- heatMetrics
- heatPerSecond
- identifyPreEngineeredVariant
- inspectSlef
- isPreEngineered
- mapDamageTypes
- mobilityCapacitorMetrics
- mobilityMetrics
- parseSlef
- parseSlotName
- powerBudget
- projectGunsight
- resolveBlueprintForModule
- secondsToHeatLevel
- shieldCapacitorMetrics
- shieldMassCurveMultiplier
- shieldMetrics
- shieldRecovery
- shieldStrength
- singleJumpRange
- sourcePurchaseFromLoadout
- splitDamage
- stackArmourResistance
- stackShieldResistance
- stringifySlef
- sumMaterials
- sumSourceModuleValues
- sumWeaponMetrics
- sustainedDamagePerSecond
- sustainedFireFactor
- systemsResistance
- thrusterMassCurveMultiplier
- toSlef
- totalRange
- unresolvedModifiers
- validateLoadout
- weaponMetrics
- weaponsCapacitorMetrics