Aetheria/Aetheria.State/README.md

111 lines
6.3 KiB
Markdown
Raw Normal View History

2026-06-13 00:31:22 +01:00
# Aetheria.State
`Aetheria.State` is the replacement owner for durable Aetheria game state.
It uses modern `GameCult.Caching`, `GameCult.Caching.MessagePack`, and
`GameCult.Mesh`. It does not reference the old `Assets/Scripts/ServerShared`
tree, RethinkDB, JsonKnownTypes, or Newtonsoft.Json.
2026-06-13 06:52:19 +01:00
The first live state file is `GameData/aetheria-world.cc`. It is generated by
`Aetheria.State.Import` from checked-in legacy catalog inputs without embedding
machine-local absolute paths. Legacy files such as `GameData/AetherDB.msgpack`
are migration inputs only.
2026-06-13 00:31:22 +01:00
2026-06-13 06:27:59 +01:00
The typed runtime state model is split into player settings, run state, zone
state, entity snapshots, item slots, weapon groups, action-bar bindings, and
stat grids. Do not preserve `SavedGame` or `EntityPack` as opaque payloads in
the new store; they are source shapes for migration, not portable state
authority.
2026-06-13 04:00:10 +01:00
2026-06-13 05:21:22 +01:00
The Unity client no longer writes `PlayerSettings.msgpack`, `.loadout`, or
`.zone` files. Until `Aetheria.State` is available to Unity as a runtime Verse
package, player settings and loadout edits are session-local and run saving is
disabled. That is intentional: the missing runtime package is the owner gap, and
the old bespoke file formats must not keep acting as durable truth while the
state spine is being rebuilt.
2026-06-13 05:39:06 +01:00
The old `SavedGame`/`SavedZone` DTOs and `Galaxy` loader constructor have also
2026-06-13 06:27:59 +01:00
been deleted; the new document family is live Verse run/zone state, not a
bespoke save-file format.
The dead `SavedStory` JSON DTO is gone. `ZonePack` and `EntityPack` remain
in-memory construction/loadout snapshots for Unity runtime code, but no longer
carry MessagePack persistence attributes.
2026-06-13 05:21:22 +01:00
2026-06-13 05:28:34 +01:00
Keyboard layout rendering now reads the checked-in Unity text asset directly.
The old generated `GameData/KeyboardLayouts/*.msgpack` cache was deleted; layout
edits are runtime-only until Verse owns a typed layout/settings document.
2026-06-13 05:33:34 +01:00
The old IMGUI CultCache database editor has been deleted, and `NameTools` no
longer exports `NameFile/*.msgpack`. `AetherDB.msgpack` and existing name files
remain legacy catalog inputs only; typed catalog migration is the next owner
move.
2026-06-13 05:53:18 +01:00
`Aetheria.State.Import` captures the legacy catalog files into typed quarantine
state: path, size, and SHA-256 fingerprint for `AetherDB.msgpack` plus
2026-06-13 06:15:55 +01:00
`NameFile/*.msgpack`, and a migration ledger update. It also performs a bounded
raw MessagePack union pass that maps stable catalog fields into typed
item/faction/name-file documents without compiling Unity's legacy domain model
into `Aetheria.State`. The current checked-in catalog maps to 115 item
2026-06-13 08:09:41 +01:00
definitions, 12 factions, and 12 name files. Typed item definitions include
2026-06-13 09:32:24 +01:00
legacy manufacturer IDs, price, shape dimensions, occupied cell counts, full
shape-cell masks, interior shape masks for hull/cargo equipment, hull hardpoint
2026-06-13 10:01:20 +01:00
definitions, behavior kind fingerprints, typed recursive behavior payloads, and
stable equipment facets: hardpoint type, hull type, stack size, durability, and
weapon range/caliber/type/fire/modifier classifications.
2026-06-13 08:09:41 +01:00
Typed corporation documents include the legacy short name, the true description
field from key 3, name-file and boss-hull legacy IDs, influence distance,
2026-06-13 10:01:20 +01:00
allegiance count, and music bank IDs. Runtime object graphs, typed behavior
factory construction, and simulation state remain legacy until dedicated typed
runtime documents exist.
2026-06-13 08:24:37 +01:00
Legacy GUID references that are `Guid.Empty` are imported as absent references,
not as resolvable catalog links.
`AetheriaCatalogSnapshot` is the typed read surface over materialized catalog
documents. It exposes trade items, legacy-ID lookup, manufacturer lookup,
2026-06-13 09:01:13 +01:00
corporation prefix lookup, corporation name-file lookup, equipment items,
behavior lookup, and hardpoint lookup without reading `DatabaseEntry` objects.
2026-06-13 05:53:18 +01:00
2026-06-13 08:37:10 +01:00
`AetheriaCatalogSurfaceProjector` publishes the first Eve-compatible provider
surface from typed catalog state. The importer materializes
`gamecult.eve.surface.v1` at `eve:surface:aetheria.catalog.operator` with
summary, trade-catalog, and corporation views. This is a typed CultCache
provider document and a local mirror of the Eve contract until the shared Eve
Unity UI Toolkit lowering package exists.
2026-06-13 09:15:59 +01:00
`Aetheria.State.Unity` is the Unity-facing runtime read facade over typed state.
It opens `aetheria-world.cc`, emits immutable catalog read models for trade,
equipment, behavior, hardpoint, manufacturer, corporation, and name-file
2026-06-13 09:32:24 +01:00
queries, exposes typed item shape masks for layout and fitting consumers, and
exposes typed interior masks and hardpoints for equipment/cargo layout
2026-06-13 10:01:20 +01:00
consumers, exposes typed behavior payload read models, and can read the
published Eve catalog surface. It does not deserialize legacy `DatabaseEntry`
objects and does not write state. Unity can use this as the first package
boundary once CultLib/Eve runtime packaging is available.
2026-06-13 09:15:59 +01:00
2026-06-13 07:54:30 +01:00
`Aetheria.State.Verify` opens a materialized state file and checks that the
typed migration ledger matches the actual item, corporation, and name-file
records in the `.cc` store. It also verifies the canonical legacy-ID lookup API
2026-06-13 08:09:41 +01:00
for one migrated record of each catalog kind and checks that expanded item and
2026-06-13 08:24:37 +01:00
corporation catalog facts survived materialization. The verifier also exercises
2026-06-13 09:32:24 +01:00
the typed catalog snapshot query surface, shape-mask invariants, and the
2026-06-13 10:01:20 +01:00
typed behavior payload tree, and the published Eve catalog surface. The current
catalog materializes 65 behavior payloads, 661 behavior fields, and 18
behavior-side legacy-ID references. Legacy content currently includes at least
one overhanging hardpoint; the verifier preserves the payload and checks
hardpoint local masks rather than silently converting content repair into
migration.
2026-06-13 08:37:10 +01:00
Use it after import when `GameData/aetheria-world.cc` changes.
2026-06-13 07:54:30 +01:00
2026-06-13 09:15:59 +01:00
`Aetheria.State.Unity.Smoke` opens the materialized state through the runtime
facade and proves read-only Unity-facing catalog access without the legacy
catalog reader.
2026-06-13 00:31:22 +01:00
Current rebuild notes:
- `MessagePack` 3.1.4 is pulled transitively through CultLib and is currently
flagged by NuGet advisory `GHSA-hv8m-jj95-wg3x`; update CultLib's
`GameCult.Caching.MessagePack` package ownership rather than adding a local
Aetheria override.
- `CultRecordRef<T>` should become the persisted reference shape once the
MessagePack source-generator path handles the GameCult formatter cleanly.
Until then, v1 profile documents store explicit record-key strings at the
persistence boundary.