factions
Interfaces
Section titled “Interfaces”FactionConfigSnapshot
Section titled “FactionConfigSnapshot”Defined in: packages/sage/src/factions/index.ts:116
Immutable optional standing and territory-yield configuration.
Example
Section titled “Example”declare const config: FactionConfigSnapshot;console.log(config.standingBps);Extends
Section titled “Extends”FactionConfigAccountData
Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/factions/index.ts:118
readonly bump: number;Defined in: packages/sage/src/internal/c4/factions.ts:112
Inherited from
Section titled “Inherited from”FactionConfigAccountData.bumpdailyCap
Section titled “dailyCap”readonly dailyCap: number;Defined in: packages/sage/src/internal/c4/factions.ts:114
Inherited from
Section titled “Inherited from”FactionConfigAccountData.dailyCapdecayPerDay
Section titled “decayPerDay”readonly decayPerDay: number;Defined in: packages/sage/src/internal/c4/factions.ts:113
Inherited from
Section titled “Inherited from”FactionConfigAccountData.decayPerDaydiminishingReturnsHalfLifeRaw
Section titled “diminishingReturnsHalfLifeRaw”readonly diminishingReturnsHalfLifeRaw: bigint;Defined in: packages/sage/src/internal/c4/factions.ts:116
Inherited from
Section titled “Inherited from”FactionConfigAccountData.diminishingReturnsHalfLifeRawdiminishingReturnsScaleRaw
Section titled “diminishingReturnsScaleRaw”readonly diminishingReturnsScaleRaw: bigint;Defined in: packages/sage/src/internal/c4/factions.ts:117
Inherited from
Section titled “Inherited from”FactionConfigAccountData.diminishingReturnsScaleRawdockMinimumBand
Section titled “dockMinimumBand”readonly dockMinimumBand: number;Defined in: packages/sage/src/internal/c4/factions.ts:120
Inherited from
Section titled “Inherited from”FactionConfigAccountData.dockMinimumBandreadonly game: EntityRef<"game">;Defined in: packages/sage/src/factions/index.ts:119
readonly kind: "factionConfig";Defined in: packages/sage/src/factions/index.ts:117
standingBps
Section titled “standingBps”readonly standingBps: number;Defined in: packages/sage/src/internal/c4/factions.ts:115
Inherited from
Section titled “Inherited from”FactionConfigAccountData.standingBpsstandingEpochCap
Section titled “standingEpochCap”readonly standingEpochCap: number;Defined in: packages/sage/src/internal/c4/factions.ts:118
Inherited from
Section titled “Inherited from”FactionConfigAccountData.standingEpochCapstandingEpochLengthSeconds
Section titled “standingEpochLengthSeconds”readonly standingEpochLengthSeconds: bigint;Defined in: packages/sage/src/internal/c4/factions.ts:119
Inherited from
Section titled “Inherited from”FactionConfigAccountData.standingEpochLengthSecondsterritoryYieldPerTick
Section titled “territoryYieldPerTick”readonly territoryYieldPerTick: number;Defined in: packages/sage/src/internal/c4/factions.ts:121
Inherited from
Section titled “Inherited from”FactionConfigAccountData.territoryYieldPerTickterritoryYieldTickSeconds
Section titled “territoryYieldTickSeconds”readonly territoryYieldTickSeconds: number;Defined in: packages/sage/src/internal/c4/factions.ts:122
Inherited from
Section titled “Inherited from”FactionConfigAccountData.territoryYieldTickSecondsversion
Section titled “version”readonly version: number;Defined in: packages/sage/src/internal/c4/factions.ts:111
Inherited from
Section titled “Inherited from”FactionConfigAccountData.versionMethods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): unknown;Defined in: packages/sage/src/factions/index.ts:120
Returns
Section titled “Returns”unknown
FactionEconomicsSnapshot
Section titled “FactionEconomicsSnapshot”Defined in: packages/sage/src/factions/index.ts:131
Immutable per-Game NPC and capture economics.
Example
Section titled “Example”declare const economics: FactionEconomicsSnapshot;console.log(economics.captureCostAtlas); // ATLAS for displayconsole.log(economics.captureCostAtlasRaw); // exact Floyds for arithmeticExtends
Section titled “Extends”Omit<FactionEconomicsConfigAccountData,"game">
Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/factions/index.ts:136
readonly bump: number;Defined in: packages/sage/src/internal/c4/factions.ts:127
Inherited from
Section titled “Inherited from”Omit.bumpcaptureCostAtlas
Section titled “captureCostAtlas”readonly captureCostAtlas: number;Defined in: packages/sage/src/internal/c4/factions.ts:136
Dynamic-capture cost in ATLAS.
Inherited from
Section titled “Inherited from”Omit.captureCostAtlascaptureCostAtlasRaw
Section titled “captureCostAtlasRaw”readonly captureCostAtlasRaw: bigint;Defined in: packages/sage/src/internal/c4/factions.ts:134
Exact dynamic-capture cost in ATLAS Floyds.
Inherited from
Section titled “Inherited from”Omit.captureCostAtlasRawfactionCaptureCooldownSeconds
Section titled “factionCaptureCooldownSeconds”readonly factionCaptureCooldownSeconds: bigint;Defined in: packages/sage/src/internal/c4/factions.ts:137
Inherited from
Section titled “Inherited from”Omit.factionCaptureCooldownSecondsreadonly game: EntityRef<"game">;Defined in: packages/sage/src/factions/index.ts:137
readonly kind: "factionEconomicsConfig";Defined in: packages/sage/src/factions/index.ts:135
npcMintCostAtlas
Section titled “npcMintCostAtlas”readonly npcMintCostAtlas: number;Defined in: packages/sage/src/internal/c4/factions.ts:130
Inherited from
Section titled “Inherited from”Omit.npcMintCostAtlasnpcMintCostAtlasRaw
Section titled “npcMintCostAtlasRaw”readonly npcMintCostAtlasRaw: bigint;Defined in: packages/sage/src/internal/c4/factions.ts:129
Inherited from
Section titled “Inherited from”Omit.npcMintCostAtlasRawnpcRespawnCostAtlas
Section titled “npcRespawnCostAtlas”readonly npcRespawnCostAtlas: number;Defined in: packages/sage/src/internal/c4/factions.ts:132
Inherited from
Section titled “Inherited from”Omit.npcRespawnCostAtlasnpcRespawnCostAtlasRaw
Section titled “npcRespawnCostAtlasRaw”readonly npcRespawnCostAtlasRaw: bigint;Defined in: packages/sage/src/internal/c4/factions.ts:131
Inherited from
Section titled “Inherited from”Omit.npcRespawnCostAtlasRawversion
Section titled “version”readonly version: number;Defined in: packages/sage/src/internal/c4/factions.ts:126
Inherited from
Section titled “Inherited from”Omit.versionMethods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): unknown;Defined in: packages/sage/src/factions/index.ts:138
Returns
Section titled “Returns”unknown
FactionOwnershipSnapshot
Section titled “FactionOwnershipSnapshot”Defined in: packages/sage/src/factions/index.ts:218
Immutable dynamic ownership sidecar for one territory asset.
A Starbase sidecar always carries capturedSystemSequenceId, the Star
System generation at capture; generation 0 is valid. A sidecar is current
only while that equals the System’s sequenceId. Fleet and Region sidecars
omit it. An absent controllingFactionId means the legacy Starbase owner
controls.
Example
Section titled “Example”declare const ownership: FactionOwnershipSnapshot;console.log(ownership.asset.kind, ownership.controllingFactionId);Extends
Section titled “Extends”Omit<FactionOwnershipAccountData, |"game"|"asset"|"controllingFactionId"|"previousControllerFactionId"|"contestedUntilUnixSeconds"|"capturedSystemSequenceId"|"lastYieldTickUnixSeconds">
Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/factions/index.ts:229
readonly asset: FactionOwnershipTarget;Defined in: packages/sage/src/factions/index.ts:231
readonly bump: number;Defined in: packages/sage/src/internal/c4/factions.ts:189
Inherited from
Section titled “Inherited from”Omit.bumpcapturedAtUnixSeconds
Section titled “capturedAtUnixSeconds”readonly capturedAtUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/factions.ts:194
Inherited from
Section titled “Inherited from”Omit.capturedAtUnixSecondscapturedSystemSequenceId?
Section titled “capturedSystemSequenceId?”readonly optional capturedSystemSequenceId?: bigint;Defined in: packages/sage/src/factions/index.ts:235
contestedUntilUnixSeconds?
Section titled “contestedUntilUnixSeconds?”readonly optional contestedUntilUnixSeconds?: bigint;Defined in: packages/sage/src/factions/index.ts:234
controllingFactionId?
Section titled “controllingFactionId?”readonly optional controllingFactionId?: number;Defined in: packages/sage/src/factions/index.ts:232
readonly game: EntityRef<"game">;Defined in: packages/sage/src/factions/index.ts:230
readonly kind: "factionOwnership";Defined in: packages/sage/src/factions/index.ts:228
lastYieldTickUnixSeconds?
Section titled “lastYieldTickUnixSeconds?”readonly optional lastYieldTickUnixSeconds?: bigint;Defined in: packages/sage/src/factions/index.ts:236
previousControllerFactionId?
Section titled “previousControllerFactionId?”readonly optional previousControllerFactionId?: number;Defined in: packages/sage/src/factions/index.ts:233
version
Section titled “version”readonly version: number;Defined in: packages/sage/src/internal/c4/factions.ts:188
Inherited from
Section titled “Inherited from”Omit.versionMethods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): unknown;Defined in: packages/sage/src/factions/index.ts:237
Returns
Section titled “Returns”unknown
FactionRelationsSnapshot
Section titled “FactionRelationsSnapshot”Defined in: packages/sage/src/factions/index.ts:148
Immutable diplomacy and territory-gating configuration.
Example
Section titled “Example”declare const relations: FactionRelationsSnapshot;console.log(relations.dynamicCaptureEnabled);Extends
Section titled “Extends”Omit<FactionRelationTrackerAccountData,"game">
Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/factions/index.ts:153
alliedTollBps
Section titled “alliedTollBps”readonly alliedTollBps: number;Defined in: packages/sage/src/internal/c4/factions.ts:147
Inherited from
Section titled “Inherited from”Omit.alliedTollBpsreadonly bump: number;Defined in: packages/sage/src/internal/c4/factions.ts:142
Inherited from
Section titled “Inherited from”Omit.bumpceasefireMinimumDurationSeconds
Section titled “ceasefireMinimumDurationSeconds”readonly ceasefireMinimumDurationSeconds: bigint;Defined in: packages/sage/src/internal/c4/factions.ts:149
Inherited from
Section titled “Inherited from”Omit.ceasefireMinimumDurationSecondscombatGatingEnabled
Section titled “combatGatingEnabled”readonly combatGatingEnabled: boolean;Defined in: packages/sage/src/internal/c4/factions.ts:144
Inherited from
Section titled “Inherited from”Omit.combatGatingEnabledcontestedWindowSeconds
Section titled “contestedWindowSeconds”readonly contestedWindowSeconds: number;Defined in: packages/sage/src/internal/c4/factions.ts:152
Inherited from
Section titled “Inherited from”Omit.contestedWindowSecondscrossFactionEconomicsEnabled
Section titled “crossFactionEconomicsEnabled”readonly crossFactionEconomicsEnabled: boolean;Defined in: packages/sage/src/internal/c4/factions.ts:146
Inherited from
Section titled “Inherited from”Omit.crossFactionEconomicsEnableddynamicCaptureEnabled
Section titled “dynamicCaptureEnabled”readonly dynamicCaptureEnabled: boolean;Defined in: packages/sage/src/internal/c4/factions.ts:151
Inherited from
Section titled “Inherited from”Omit.dynamicCaptureEnabledreadonly game: EntityRef<"game">;Defined in: packages/sage/src/factions/index.ts:154
readonly kind: "factionRelationTracker";Defined in: packages/sage/src/factions/index.ts:152
nemesisActive
Section titled “nemesisActive”readonly nemesisActive: boolean;Defined in: packages/sage/src/internal/c4/factions.ts:153
Inherited from
Section titled “Inherited from”Omit.nemesisActiveneutralTollBps
Section titled “neutralTollBps”readonly neutralTollBps: number;Defined in: packages/sage/src/internal/c4/factions.ts:148
Inherited from
Section titled “Inherited from”Omit.neutralTollBpsreCeasefireCooldownSeconds
Section titled “reCeasefireCooldownSeconds”readonly reCeasefireCooldownSeconds: bigint;Defined in: packages/sage/src/internal/c4/factions.ts:150
Inherited from
Section titled “Inherited from”Omit.reCeasefireCooldownSecondsrelations
Section titled “relations”readonly relations: readonly { ceasefireUntilUnixSeconds: bigint | null; factions: readonly [number, number]; relationship: FactionRelationship;}[];Defined in: packages/sage/src/internal/c4/factions.ts:154
Inherited from
Section titled “Inherited from”Omit.relationsterritoryAccessEnabled
Section titled “territoryAccessEnabled”readonly territoryAccessEnabled: boolean;Defined in: packages/sage/src/internal/c4/factions.ts:145
Inherited from
Section titled “Inherited from”Omit.territoryAccessEnabledversion
Section titled “version”readonly version: number;Defined in: packages/sage/src/internal/c4/factions.ts:141
Inherited from
Section titled “Inherited from”Omit.versionMethods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): unknown;Defined in: packages/sage/src/factions/index.ts:155
Returns
Section titled “Returns”unknown
FactionSnapshot
Section titled “FactionSnapshot”Defined in: packages/sage/src/factions/index.ts:87
Immutable faction identity, lifecycle, and NPC capacity state.
Example
Section titled “Example”declare const faction: FactionSnapshot;console.log(faction.factionId, faction.status);Extends
Section titled “Extends”Omit<FactionAccountData, |"game"|"operatorProfile"|"controller"|"homeRegionId"|"nameHash"|"contentUriHash"|"lastCaptureAtUnixSeconds">
Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/factions/index.ts:98
alignment
Section titled “alignment”readonly alignment: FactionAlignment;Defined in: packages/sage/src/internal/c4/factions.ts:93
Inherited from
Section titled “Inherited from”Omit.alignmentauthorityBump
Section titled “authorityBump”readonly authorityBump: number;Defined in: packages/sage/src/internal/c4/factions.ts:96
Inherited from
Section titled “Inherited from”Omit.authorityBumpreadonly bump: number;Defined in: packages/sage/src/internal/c4/factions.ts:90
Inherited from
Section titled “Inherited from”Omit.bumpcapabilityFlags
Section titled “capabilityFlags”readonly capabilityFlags: number;Defined in: packages/sage/src/internal/c4/factions.ts:94
Inherited from
Section titled “Inherited from”Omit.capabilityFlagscontentUriHash?
Section titled “contentUriHash?”readonly optional contentUriHash?: readonly number[];Defined in: packages/sage/src/factions/index.ts:104
controller?
Section titled “controller?”readonly optional controller?: Address;Defined in: packages/sage/src/factions/index.ts:101
createdAtUnixSeconds
Section titled “createdAtUnixSeconds”readonly createdAtUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/factions.ts:103
Inherited from
Section titled “Inherited from”Omit.createdAtUnixSecondsfactionId
Section titled “factionId”readonly factionId: number;Defined in: packages/sage/src/internal/c4/factions.ts:92
Inherited from
Section titled “Inherited from”Omit.factionIdreadonly game: EntityRef<"game">;Defined in: packages/sage/src/factions/index.ts:99
homeRegionId?
Section titled “homeRegionId?”readonly optional homeRegionId?: number;Defined in: packages/sage/src/factions/index.ts:102
readonly kind: "faction";Defined in: packages/sage/src/factions/index.ts:97
lastCaptureAtUnixSeconds?
Section titled “lastCaptureAtUnixSeconds?”readonly optional lastCaptureAtUnixSeconds?: bigint;Defined in: packages/sage/src/factions/index.ts:105
maxAllies
Section titled “maxAllies”readonly maxAllies: number;Defined in: packages/sage/src/internal/c4/factions.ts:98
Inherited from
Section titled “Inherited from”Omit.maxAlliesmaxNpcFleets
Section titled “maxNpcFleets”readonly maxNpcFleets: number;Defined in: packages/sage/src/internal/c4/factions.ts:107
Inherited from
Section titled “Inherited from”Omit.maxNpcFleetsnameHash?
Section titled “nameHash?”readonly optional nameHash?: readonly number[];Defined in: packages/sage/src/factions/index.ts:103
npcFleetCount
Section titled “npcFleetCount”readonly npcFleetCount: number;Defined in: packages/sage/src/internal/c4/factions.ts:106
Inherited from
Section titled “Inherited from”Omit.npcFleetCountoperatorProfile?
Section titled “operatorProfile?”readonly optional operatorProfile?: EntityRef<"profile">;Defined in: packages/sage/src/factions/index.ts:100
status
Section titled “status”readonly status: FactionLifecycleStatus;Defined in: packages/sage/src/internal/c4/factions.ts:95
Inherited from
Section titled “Inherited from”Omit.statustreasuryCount
Section titled “treasuryCount”readonly treasuryCount: number;Defined in: packages/sage/src/internal/c4/factions.ts:99
Inherited from
Section titled “Inherited from”Omit.treasuryCountversion
Section titled “version”readonly version: number;Defined in: packages/sage/src/internal/c4/factions.ts:89
Inherited from
Section titled “Inherited from”Omit.versionMethods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): unknown;Defined in: packages/sage/src/factions/index.ts:106
Returns
Section titled “Returns”unknown
FactionStandingSnapshot
Section titled “FactionStandingSnapshot”Defined in: packages/sage/src/factions/index.ts:165
Immutable optional Profile standing with one faction.
Example
Section titled “Example”declare const standing: FactionStandingSnapshot;console.log(standing.profile.address, standing.standing);Extends
Section titled “Extends”Omit<FactionStandingAccountData,"game"|"profile"|"storylineExpiresAtUnixSeconds">
Properties
Section titled “Properties”accrualToday
Section titled “accrualToday”readonly accrualToday: number;Defined in: packages/sage/src/internal/c4/factions.ts:171
Inherited from
Section titled “Inherited from”Omit.accrualTodayaddress
Section titled “address”readonly address: Address;Defined in: packages/sage/src/factions/index.ts:170
bandFloor
Section titled “bandFloor”readonly bandFloor: number;Defined in: packages/sage/src/internal/c4/factions.ts:168
Inherited from
Section titled “Inherited from”Omit.bandFloorbandFloorReachedAtUnixSeconds
Section titled “bandFloorReachedAtUnixSeconds”readonly bandFloorReachedAtUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/factions.ts:174
Inherited from
Section titled “Inherited from”Omit.bandFloorReachedAtUnixSecondsreadonly bump: number;Defined in: packages/sage/src/internal/c4/factions.ts:163
Inherited from
Section titled “Inherited from”Omit.bumpdayAnchorUnixSeconds
Section titled “dayAnchorUnixSeconds”readonly dayAnchorUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/factions.ts:172
Inherited from
Section titled “Inherited from”Omit.dayAnchorUnixSecondsfactionId
Section titled “factionId”readonly factionId: number;Defined in: packages/sage/src/internal/c4/factions.ts:166
Inherited from
Section titled “Inherited from”Omit.factionIdreadonly game: EntityRef<"game">;Defined in: packages/sage/src/factions/index.ts:171
readonly kind: "factionStanding";Defined in: packages/sage/src/factions/index.ts:169
lastUpdateUnixSeconds
Section titled “lastUpdateUnixSeconds”readonly lastUpdateUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/factions.ts:173
Inherited from
Section titled “Inherited from”Omit.lastUpdateUnixSecondslifetimeEarnedRaw
Section titled “lifetimeEarnedRaw”readonly lifetimeEarnedRaw: bigint;Defined in: packages/sage/src/internal/c4/factions.ts:170
Inherited from
Section titled “Inherited from”Omit.lifetimeEarnedRawprofile
Section titled “profile”readonly profile: EntityRef<"profile">;Defined in: packages/sage/src/factions/index.ts:172
standing
Section titled “standing”readonly standing: number;Defined in: packages/sage/src/internal/c4/factions.ts:169
Inherited from
Section titled “Inherited from”Omit.standingstorylineActive
Section titled “storylineActive”readonly storylineActive: boolean;Defined in: packages/sage/src/internal/c4/factions.ts:167
Inherited from
Section titled “Inherited from”Omit.storylineActivestorylineExpiresAtUnixSeconds?
Section titled “storylineExpiresAtUnixSeconds?”readonly optional storylineExpiresAtUnixSeconds?: bigint;Defined in: packages/sage/src/factions/index.ts:173
version
Section titled “version”readonly version: number;Defined in: packages/sage/src/internal/c4/factions.ts:162
Inherited from
Section titled “Inherited from”Omit.versionMethods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): unknown;Defined in: packages/sage/src/factions/index.ts:174
Returns
Section titled “Returns”unknown
FactionTreasurySnapshot
Section titled “FactionTreasurySnapshot”Defined in: packages/sage/src/factions/index.ts:184
Immutable faction ATLAS and cargo reserve state.
Example
Section titled “Example”declare const treasury: FactionTreasurySnapshot;console.log(treasury.atlasBalance, treasury.reserves.length);Extends
Section titled “Extends”Omit<FactionTreasuryAccountData,"game">
Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/factions/index.ts:189
atlasBalance
Section titled “atlasBalance”readonly atlasBalance: number;Defined in: packages/sage/src/internal/c4/faction-treasury.ts:23
Inherited from
Section titled “Inherited from”Omit.atlasBalanceatlasBalanceRaw
Section titled “atlasBalanceRaw”readonly atlasBalanceRaw: bigint;Defined in: packages/sage/src/internal/c4/faction-treasury.ts:22
Inherited from
Section titled “Inherited from”Omit.atlasBalanceRawatlasOutCapPerEpoch
Section titled “atlasOutCapPerEpoch”readonly atlasOutCapPerEpoch: number;Defined in: packages/sage/src/internal/c4/faction-treasury.ts:29
Inherited from
Section titled “Inherited from”Omit.atlasOutCapPerEpochatlasOutCapPerEpochRaw
Section titled “atlasOutCapPerEpochRaw”readonly atlasOutCapPerEpochRaw: bigint;Defined in: packages/sage/src/internal/c4/faction-treasury.ts:28
Inherited from
Section titled “Inherited from”Omit.atlasOutCapPerEpochRawatlasOutThisEpoch
Section titled “atlasOutThisEpoch”readonly atlasOutThisEpoch: number;Defined in: packages/sage/src/internal/c4/faction-treasury.ts:27
Inherited from
Section titled “Inherited from”Omit.atlasOutThisEpochatlasOutThisEpochRaw
Section titled “atlasOutThisEpochRaw”readonly atlasOutThisEpochRaw: bigint;Defined in: packages/sage/src/internal/c4/faction-treasury.ts:26
Inherited from
Section titled “Inherited from”Omit.atlasOutThisEpochRawreadonly bump: number;Defined in: packages/sage/src/internal/c4/faction-treasury.ts:19
Inherited from
Section titled “Inherited from”Omit.bumpepochLengthSeconds
Section titled “epochLengthSeconds”readonly epochLengthSeconds: bigint;Defined in: packages/sage/src/internal/c4/faction-treasury.ts:25
Inherited from
Section titled “Inherited from”Omit.epochLengthSecondsepochStartedAtUnixSeconds
Section titled “epochStartedAtUnixSeconds”readonly epochStartedAtUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/faction-treasury.ts:24
Inherited from
Section titled “Inherited from”Omit.epochStartedAtUnixSecondsfactionId
Section titled “factionId”readonly factionId: number;Defined in: packages/sage/src/internal/c4/faction-treasury.ts:21
Inherited from
Section titled “Inherited from”Omit.factionIdreadonly game: EntityRef<"game">;Defined in: packages/sage/src/factions/index.ts:190
readonly kind: "factionTreasury";Defined in: packages/sage/src/factions/index.ts:188
reserves
Section titled “reserves”readonly reserves: readonly { cargoId: number; floorRaw: bigint; quantityRaw: bigint;}[];Defined in: packages/sage/src/internal/c4/faction-treasury.ts:30
Inherited from
Section titled “Inherited from”Omit.reservesversion
Section titled “version”readonly version: number;Defined in: packages/sage/src/internal/c4/faction-treasury.ts:18
Inherited from
Section titled “Inherited from”Omit.versionMethods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): unknown;Defined in: packages/sage/src/factions/index.ts:191
Returns
Section titled “Returns”unknown
KingSystemOwnership
Section titled “KingSystemOwnership”Defined in: packages/sage/src/factions/index.ts:247
One King system with its current effective faction owner.
Example
Section titled “Example”declare const system: KingSystemOwnership;console.log(system.system.address, system.factionId);Properties
Section titled “Properties”factionId?
Section titled “factionId?”readonly optional factionId?: number;Defined in: packages/sage/src/factions/index.ts:250
system
Section titled “system”readonly system: EntityRef<"starSystem">;Defined in: packages/sage/src/factions/index.ts:249
systemId
Section titled “systemId”readonly systemId: number;Defined in: packages/sage/src/factions/index.ts:248
KingSystemsSnapshot
Section titled “KingSystemsSnapshot”Defined in: packages/sage/src/factions/index.ts:260
Immutable King-system ownership catalog.
Example
Section titled “Example”declare const tracker: KingSystemsSnapshot;console.log(tracker.systems.length);Extends
Section titled “Extends”Omit<KingSystemTrackerAccountData,"game"|"systems">
Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/factions/index.ts:265
readonly bump: number;Defined in: packages/sage/src/internal/c4/factions.ts:204
Inherited from
Section titled “Inherited from”Omit.bumpconfiguredAtUnixSeconds
Section titled “configuredAtUnixSeconds”readonly configuredAtUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/factions.ts:206
Inherited from
Section titled “Inherited from”Omit.configuredAtUnixSecondsreadonly game: EntityRef<"game">;Defined in: packages/sage/src/factions/index.ts:266
readonly kind: "kingSystemTracker";Defined in: packages/sage/src/factions/index.ts:264
majorFactionCounts
Section titled “majorFactionCounts”readonly majorFactionCounts: Readonly<{ mud: number; oni: number; ustur: number;}>;Defined in: packages/sage/src/internal/c4/factions.ts:207
Inherited from
Section titled “Inherited from”Omit.majorFactionCountssystems
Section titled “systems”readonly systems: readonly KingSystemOwnership[];Defined in: packages/sage/src/factions/index.ts:267
version
Section titled “version”readonly version: number;Defined in: packages/sage/src/internal/c4/factions.ts:203
Inherited from
Section titled “Inherited from”Omit.versionMethods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): unknown;Defined in: packages/sage/src/factions/index.ts:268
Returns
Section titled “Returns”unknown
ProfileFactionSnapshot
Section titled “ProfileFactionSnapshot”Defined in: packages/sage/src/factions/profile-faction.ts:33
Immutable faction enrollment associated with a Profile across Games.
Example
Section titled “Example”declare const enrollment: ProfileFactionSnapshot;console.log(enrollment.profile.address, enrollment.faction);Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/factions/profile-faction.ts:35
faction
Section titled “faction”readonly faction: ProfileFactionAlignment;Defined in: packages/sage/src/factions/profile-faction.ts:37
factionId
Section titled “factionId”readonly factionId: number;Defined in: packages/sage/src/factions/profile-faction.ts:38
readonly kind: "profileFaction";Defined in: packages/sage/src/factions/profile-faction.ts:34
profile
Section titled “profile”readonly profile: EntityRef<"profile">;Defined in: packages/sage/src/factions/profile-faction.ts:36
version
Section titled “version”readonly version: number;Defined in: packages/sage/src/factions/profile-faction.ts:39
Methods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): unknown;Defined in: packages/sage/src/factions/profile-faction.ts:40
Returns
Section titled “Returns”unknown
TerritoryRegionsSnapshot
Section titled “TerritoryRegionsSnapshot”Defined in: packages/sage/src/factions/index.ts:306
Immutable nested RegionTracker ownership catalog.
Example
Section titled “Example”declare const tracker: TerritoryRegionsSnapshot;console.log(tracker.regions.length);Extends
Section titled “Extends”Omit<RegionTrackerAccountData,"game"|"regions">
Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/factions/index.ts:311
readonly game: EntityRef<"game">;Defined in: packages/sage/src/factions/index.ts:312
gridExponent
Section titled “gridExponent”readonly gridExponent: number;Defined in: packages/sage/src/internal/c4/factions.ts:258
Inherited from
Section titled “Inherited from”Omit.gridExponentreadonly kind: "regionTracker";Defined in: packages/sage/src/factions/index.ts:310
regions
Section titled “regions”readonly regions: readonly TerritoryRegionSummary[];Defined in: packages/sage/src/factions/index.ts:313
version
Section titled “version”readonly version: number;Defined in: packages/sage/src/internal/c4/factions.ts:256
Inherited from
Section titled “Inherited from”Omit.versionMethods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): unknown;Defined in: packages/sage/src/factions/index.ts:314
Returns
Section titled “Returns”unknown
TerritoryRegionSummary
Section titled “TerritoryRegionSummary”Defined in: packages/sage/src/factions/index.ts:291
Region ownership and geometry summary with edge-aligned neighbor ids.
Example
Section titled “Example”declare const region: TerritoryRegionSummary;console.log(region.id, region.owner);Extends
Section titled “Extends”Omit<FactionRegionData,"systems"|"coreSystems">
Properties
Section titled “Properties”border
Section titled “border”readonly border: readonly { x: number; y: number;}[];Defined in: packages/sage/src/internal/c4/factions.ts:243
Inherited from
Section titled “Inherited from”Omit.borderboundingBox
Section titled “boundingBox”readonly boundingBox: { maxX: number; maxY: number; minX: number; minY: number;};Defined in: packages/sage/src/internal/c4/factions.ts:237
readonly maxX: number;readonly maxY: number;readonly minX: number;readonly minY: number;Inherited from
Section titled “Inherited from”Omit.boundingBoxconnections
Section titled “connections”readonly connections: readonly number[];Defined in: packages/sage/src/internal/c4/factions.ts:248
Inherited from
Section titled “Inherited from”Omit.connectionscoreSystems
Section titled “coreSystems”readonly coreSystems: readonly TerritoryRegionSystem[];Defined in: packages/sage/src/factions/index.ts:296
readonly id: number;Defined in: packages/sage/src/internal/c4/factions.ts:229
Inherited from
Section titled “Inherited from”Omit.idminingResearchRequirementTagIds
Section titled “miningResearchRequirementTagIds”readonly miningResearchRequirementTagIds: readonly number[];Defined in: packages/sage/src/internal/c4/factions.ts:252
Inherited from
Section titled “Inherited from”Omit.miningResearchRequirementTagIdsreadonly name: string;Defined in: packages/sage/src/internal/c4/factions.ts:230
Inherited from
Section titled “Inherited from”Omit.nameneighborsByEdge
Section titled “neighborsByEdge”readonly neighborsByEdge: readonly (number | null)[];Defined in: packages/sage/src/internal/c4/factions.ts:247
Inherited from
Section titled “Inherited from”Omit.neighborsByEdgereadonly owner: FactionAlignment;Defined in: packages/sage/src/internal/c4/factions.ts:231
Inherited from
Section titled “Inherited from”Omit.ownerreadonly risk: | { faction: FactionAlignment; kind: "low";} | { kind: "medium" | "high";};Defined in: packages/sage/src/internal/c4/factions.ts:233
Inherited from
Section titled “Inherited from”Omit.risksafety
Section titled “safety”readonly safety: "safe" | "border";Defined in: packages/sage/src/internal/c4/factions.ts:232
Inherited from
Section titled “Inherited from”Omit.safetyscanningResearchRequirementTagIds
Section titled “scanningResearchRequirementTagIds”readonly scanningResearchRequirementTagIds: readonly number[];Defined in: packages/sage/src/internal/c4/factions.ts:251
Inherited from
Section titled “Inherited from”Omit.scanningResearchRequirementTagIdssystems
Section titled “systems”readonly systems: readonly TerritoryRegionSystem[];Defined in: packages/sage/src/factions/index.ts:295
xpMultiplier
Section titled “xpMultiplier”readonly xpMultiplier: FactionFixedValueData;Defined in: packages/sage/src/internal/c4/factions.ts:236
Inherited from
Section titled “Inherited from”Omit.xpMultiplierTerritoryRegionSystem
Section titled “TerritoryRegionSystem”Defined in: packages/sage/src/factions/index.ts:278
Compact region system ownership linked to a StarSystem reference.
Example
Section titled “Example”declare const system: TerritoryRegionSystem;console.log(system.systemId, system.faction);Properties
Section titled “Properties”faction
Section titled “faction”readonly faction: FactionAlignment;Defined in: packages/sage/src/factions/index.ts:281
system
Section titled “system”readonly system: EntityRef<"starSystem">;Defined in: packages/sage/src/factions/index.ts:280
systemId
Section titled “systemId”readonly systemId: number;Defined in: packages/sage/src/factions/index.ts:279
Type Aliases
Section titled “Type Aliases”FactionOwnershipAsset
Section titled “FactionOwnershipAsset”type FactionOwnershipAsset = | { address: Address; kind: Exclude<FactionOwnershipKind, "region">;} | { kind: "region"; regionId: number;};Defined in: packages/sage/src/factions/index.ts:73
A requested asset whose optional ownership sidecar can be derived.
Example
Section titled “Example”declare const address: Address;const asset: FactionOwnershipAsset = { kind: 'fleet', address };FactionOwnershipDiscoveryOptions
Section titled “FactionOwnershipDiscoveryOptions”type FactionOwnershipDiscoveryOptions = Omit<DiscoveryRequest, "filters" | "strategy">;Defined in: packages/sage/src/factions/index.ts:61
Options accepted by targeted FactionOwnership discovery.
Example
Section titled “Example”const options: FactionOwnershipDiscoveryOptions = { commitment: 'confirmed' };FactionOwnershipTarget
Section titled “FactionOwnershipTarget”type FactionOwnershipTarget = | { kind: "starbase"; system: EntityRef<"starSystem">;} | { fleet: EntityRef<"fleet">; kind: "fleet";} | { kind: "region"; regionId: number;};Defined in: packages/sage/src/factions/index.ts:201
Typed ownership target retaining the underlying capability reference.
Example
Section titled “Example”declare const asset: FactionOwnershipTarget;console.log(asset.kind);ProfileFactionAlignment
Section titled “ProfileFactionAlignment”type ProfileFactionAlignment = "unaligned" | "mud" | "oni" | "ustur";Defined in: packages/sage/src/factions/profile-faction.ts:24
Stored Profile enrollment, including unaligned state that the initial-choice planner does not offer.
Example
Section titled “Example”const alignment: ProfileFactionAlignment = 'ustur';Functions
Section titled “Functions”getFaction()
Section titled “getFaction()”function getFaction( context, factionId,options?): Promise<FactionSnapshot>;Defined in: packages/sage/src/factions/index.ts:583
Derives and reads one faction identity.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
factionId | number |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<FactionSnapshot>
Example
Section titled “Example”declare const ctx: SageContext;const faction = await getFaction(ctx, 4);getFactionEconomics()
Section titled “getFactionEconomics()”function getFactionEconomics(context, options?): Promise<FactionEconomicsSnapshot>;Defined in: packages/sage/src/factions/index.ts:634
Derives and reads per-Game faction economics.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<FactionEconomicsSnapshot>
Example
Section titled “Example”declare const ctx: SageContext;const economics = await getFactionEconomics(ctx);getFactionForProfile()
Section titled “getFactionForProfile()”function getFactionForProfile( ctx, profile,options?): Promise<ProfileFactionSnapshot>;Defined in: packages/sage/src/factions/profile-faction.ts:89
Derives and reads a Profile’s faction enrollment independently of Game.
Returns the ProfileFaction enrollment snapshot (unaligned, MUD, ONI, or Ustur).
This does not read a Game or its dynamic FactionAccount; use getFaction
with a Game-scoped faction id for that state. Missing enrollment throws
ACCOUNT_NOT_FOUND; use maybeGetFactionForProfile when absence is expected.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
ctx | SageContext |
profile | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<ProfileFactionSnapshot>
Example
Section titled “Example”Illustrative: supply a context and an existing Profile address.
declare const ctx: SageContext;declare const profile: Address;const enrollment = await getFactionForProfile(ctx, profile);console.log(enrollment.faction);getFactionOwnerships()
Section titled “getFactionOwnerships()”function getFactionOwnerships( context, kind,options?): Promise<readonly FactionOwnershipSnapshot[]>;Defined in: packages/sage/src/factions/index.ts:798
Discovers validated ownership sidecars for one asset kind.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
kind | FactionOwnershipKind |
options? | FactionOwnershipDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly FactionOwnershipSnapshot[]>
Example
Section titled “Example”declare const ctx: SageContext;const fleets = await getFactionOwnerships(ctx, 'fleet');getFactionRelations()
Section titled “getFactionRelations()”function getFactionRelations(context, options?): Promise<FactionRelationsSnapshot>;Defined in: packages/sage/src/factions/index.ts:657
Derives and reads the diplomacy relation tracker.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<FactionRelationsSnapshot>
Example
Section titled “Example”declare const ctx: SageContext;const relations = await getFactionRelations(ctx);getFactionTreasury()
Section titled “getFactionTreasury()”function getFactionTreasury( context, factionId,options?): Promise<FactionTreasurySnapshot>;Defined in: packages/sage/src/factions/index.ts:716
Derives and reads one faction treasury.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
factionId | number |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<FactionTreasurySnapshot>
Example
Section titled “Example”declare const ctx: SageContext;const treasury = await getFactionTreasury(ctx, 4);getKingSystems()
Section titled “getKingSystems()”function getKingSystems(context, options?): Promise<KingSystemsSnapshot>;Defined in: packages/sage/src/factions/index.ts:821
Derives and reads current King-system ownership.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<KingSystemsSnapshot>
Example
Section titled “Example”declare const ctx: SageContext;const systems = await getKingSystems(ctx);getTerritoryRegions()
Section titled “getTerritoryRegions()”function getTerritoryRegions(context, options?): Promise<TerritoryRegionsSnapshot>;Defined in: packages/sage/src/factions/index.ts:853
Derives and reads compact nested region ownership summaries.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<TerritoryRegionsSnapshot>
Example
Section titled “Example”declare const ctx: SageContext;const regions = await getTerritoryRegions(ctx);maybeGetFactionConfig()
Section titled “maybeGetFactionConfig()”function maybeGetFactionConfig(context, options?): Promise< | FactionConfigSnapshot| undefined>;Defined in: packages/sage/src/factions/index.ts:613
Derives and reads the optional per-Game standing configuration.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<
| FactionConfigSnapshot
| undefined>
Example
Section titled “Example”declare const ctx: SageContext;const config = await maybeGetFactionConfig(ctx);maybeGetFactionForProfile()
Section titled “maybeGetFactionForProfile()”function maybeGetFactionForProfile( ctx, profile, options?): Promise< | ProfileFactionSnapshot| undefined>;Defined in: packages/sage/src/factions/profile-faction.ts:115
Reads optional Profile faction enrollment independently of Game.
Returns the ProfileFaction enrollment snapshot, or undefined when the
Profile is not enrolled. Malformed accounts still fail validation. This does
not load Game or resolve its dynamic FactionAccount; use getFaction with a
Game-scoped faction id for that state.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
ctx | SageContext |
profile | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<
| ProfileFactionSnapshot
| undefined>
Example
Section titled “Example”Illustrative: supply a context and an existing Profile address.
declare const ctx: SageContext;declare const profile: Address;const enrollment = await maybeGetFactionForProfile(ctx, profile);console.log(enrollment?.faction ?? 'not enrolled');maybeGetFactionOwnership()
Section titled “maybeGetFactionOwnership()”function maybeGetFactionOwnership( context, asset, options?): Promise< | FactionOwnershipSnapshot| undefined>;Defined in: packages/sage/src/factions/index.ts:747
Derives and reads an optional ownership sidecar for one asset.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
asset | FactionOwnershipAsset |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<
| FactionOwnershipSnapshot
| undefined>
Example
Section titled “Example”declare const ctx: SageContext;declare const address: Address;const ownership = await maybeGetFactionOwnership(ctx, { kind: 'fleet', address });maybeGetFactionStanding()
Section titled “maybeGetFactionStanding()”function maybeGetFactionStanding( context, profile, factionId, options?): Promise< | FactionStandingSnapshot| undefined>;Defined in: packages/sage/src/factions/index.ts:681
Derives and reads optional standing for one Profile/faction pair.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
profile | Address |
factionId | number |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<
| FactionStandingSnapshot
| undefined>
Example
Section titled “Example”declare const ctx: SageContext;declare const profile: Address;const standing = await maybeGetFactionStanding(ctx, profile, 4);