@underpostnet/cyberia 3.3.73 → 3.3.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +17 -5
- package/.github/workflows/coverall.cyberia.ci.yml +10 -0
- package/.github/workflows/docker-image.cyberia-client.ci.yml +1 -1
- package/.github/workflows/docker-image.cyberia-client.dev.ci.yml +1 -1
- package/.github/workflows/docker-image.cyberia-server.ci.yml +1 -1
- package/.github/workflows/docker-image.cyberia-server.dev.ci.yml +1 -1
- package/.github/workflows/docker-image.engine-cyberia.ci.yml +1 -1
- package/.github/workflows/docker-image.engine-cyberia.dev.ci.yml +1 -1
- package/.github/workflows/engine-cyberia.ci.yml +1 -1
- package/.github/workflows/publish.cyberia.ci.yml +44 -0
- package/AGENTS.md +61 -12
- package/CHANGELOG.md +159 -161
- package/CLI-HELP.md +20 -13
- package/Dockerfile +1 -1
- package/Dockerfile.dev +1 -1
- package/Dockerfile.test +2 -2
- package/README.md +28 -28
- package/bin/build.js +96 -21
- package/bin/cyberia.js +1247 -1373
- package/bin/index.js +1247 -1373
- package/compose.env +17 -5
- package/conf.js +7 -4
- package/deploy/cyberia-client/deploy.sh +10 -11
- package/deploy/cyberia-client/package.sh +0 -1
- package/deploy/cyberia-client/state.sh +3 -2
- package/deploy/cyberia-server/deploy.sh +10 -11
- package/deploy/cyberia-server/package.sh +0 -1
- package/deploy/cyberia-server/state.sh +3 -2
- package/deploy/dd-cyberia/deploy.sh +5 -5
- package/deploy/dd-cyberia/init.sh +15 -14
- package/deploy/dd-cyberia/package.sh +0 -1
- package/deploy/dd-cyberia/state.sh +2 -2
- package/deploy/dd-cyberia/sync-deploy.sh +139 -75
- package/deploy/lib/config.sh +29 -0
- package/deploy/lib/github-actions-logging.sh +92 -76
- package/deploy/lib/host.sh +28 -19
- package/deploy/lib/state.sh +4 -1
- package/deploy/pwa-microservices-template/deploy.sh +10 -8
- package/deploy/release/deploy.sh +0 -2
- package/deployment.yaml +1 -1
- package/docker-compose.yml +23 -17
- package/docs/coverage/cyberia/api/cyberia-instance/cyberia-fallback-capture.js.html +1591 -0
- package/docs/coverage/cyberia/api/cyberia-instance/index.html +116 -0
- package/docs/coverage/cyberia/api/cyberia-server-defaults/cyberia-server-defaults.js.html +4138 -0
- package/docs/coverage/cyberia/api/cyberia-server-defaults/index.html +116 -0
- package/docs/coverage/cyberia/api/object-layer/index.html +116 -0
- package/docs/coverage/cyberia/api/object-layer/object-layer.model.js.html +1393 -0
- package/docs/coverage/cyberia/base.css +362 -0
- package/docs/coverage/cyberia/block-navigation.js +82 -0
- package/docs/coverage/cyberia/favicon.png +0 -0
- package/docs/coverage/cyberia/index.html +161 -0
- package/docs/coverage/cyberia/prettify.css +101 -0
- package/docs/coverage/cyberia/prettify.js +937 -0
- package/docs/coverage/cyberia/projects/cyberia/atlas-sprite-sheet-generator.js.html +1315 -0
- package/docs/coverage/cyberia/projects/cyberia/index.html +176 -0
- package/docs/coverage/cyberia/projects/cyberia/instance-backup.js.html +715 -0
- package/docs/coverage/cyberia/projects/cyberia/instance-data.js.html +2182 -0
- package/docs/coverage/cyberia/projects/cyberia/shape-generator.js.html +3265 -0
- package/docs/coverage/cyberia/projects/cyberia/stat-balance.js.html +328 -0
- package/docs/coverage/cyberia/sort-arrow-sprite.png +0 -0
- package/docs/coverage/cyberia/sorter.js +205 -0
- package/hardhat/package-lock.json +2 -2
- package/hardhat/package.json +1 -1
- package/manifests/cronjobs/dd-cron/dd-cron-backup.yaml +1 -1
- package/manifests/cronjobs/dd-cron/dd-cron-vultr.yaml +1 -1
- package/manifests/deployment/dd-cyberia-development/deployment.yaml +1 -1
- package/manifests/deployment/dd-default-development/deployment.yaml +2 -2
- package/manifests/deployment/mongo-express/deployment.yaml +46 -27
- package/manifests/deployment/mongo-express/kustomization.yaml +9 -0
- package/manifests/deployment/mongo-express/mongo-express-nodeport.yaml +18 -0
- package/manifests/deployment/mongo-express/service.yaml +16 -0
- package/manifests/deployment/mongo-express-no-auth/disable-mongodb-auth.yaml +16 -0
- package/manifests/deployment/mongo-express-no-auth/kustomization.yaml +16 -0
- package/package.json +19 -17
- package/scripts/test-monitor.sh +3 -3
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.controller.js +14 -9
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.model.js +36 -5
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.router.js +5 -0
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.service.js +88 -184
- package/src/api/cyberia-action/cyberia-action.router.js +2 -2
- package/src/api/cyberia-action/cyberia-action.service.js +3 -4
- package/src/api/cyberia-audio/cyberia-audio.controller.js +6 -0
- package/src/api/cyberia-audio/cyberia-audio.model.js +61 -0
- package/src/api/cyberia-audio/cyberia-audio.router.js +21 -0
- package/src/api/cyberia-audio/cyberia-audio.service.js +220 -0
- package/src/api/cyberia-client-hints/cyberia-client-hints.controller.js +1 -3
- package/src/api/cyberia-client-hints/cyberia-client-hints.model.js +10 -19
- package/src/api/cyberia-client-hints/cyberia-client-hints.router.js +12 -34
- package/src/api/cyberia-client-hints/cyberia-client-hints.service.js +15 -32
- package/src/api/cyberia-dialogue/cyberia-dialogue.model.js +1 -1
- package/src/api/cyberia-dialogue/cyberia-dialogue.router.js +1 -1
- package/src/api/cyberia-entity/cyberia-entity.model.js +2 -0
- package/src/api/cyberia-entity/cyberia-entity.service.js +1 -1
- package/src/api/cyberia-entity-type-default/cyberia-entity-type-default.controller.js +8 -2
- package/src/api/cyberia-entity-type-default/cyberia-entity-type-default.model.js +31 -20
- package/src/api/cyberia-entity-type-default/cyberia-entity-type-default.router.js +16 -1
- package/src/api/cyberia-entity-type-default/cyberia-entity-type-default.service.js +466 -3
- package/src/api/cyberia-instance/cyberia-fallback-capture.js +87 -51
- package/src/api/cyberia-instance/cyberia-fallback-world.js +21 -40
- package/src/api/cyberia-instance/cyberia-instance-boot.service.js +5 -5
- package/src/api/cyberia-instance/cyberia-instance-items.js +98 -0
- package/src/api/cyberia-instance/cyberia-instance-map.service.js +34 -141
- package/src/api/cyberia-instance/cyberia-instance.controller.js +1 -4
- package/src/api/cyberia-instance/cyberia-instance.model.js +0 -14
- package/src/api/cyberia-instance/cyberia-instance.router.js +3 -16
- package/src/api/cyberia-instance/cyberia-instance.service.js +3 -43
- package/src/api/cyberia-instance/cyberia-world-generator.js +8 -13
- package/src/api/cyberia-instance-conf/cyberia-instance-conf.model.js +49 -75
- package/src/api/cyberia-instance-conf/cyberia-instance-conf.service.js +74 -1
- package/src/api/cyberia-map/cyberia-map.service.js +6 -2
- package/src/api/cyberia-map-audio-conf/cyberia-map-audio-conf.controller.js +31 -0
- package/src/api/cyberia-map-audio-conf/cyberia-map-audio-conf.model.js +56 -0
- package/src/api/cyberia-map-audio-conf/cyberia-map-audio-conf.router.js +33 -0
- package/src/api/cyberia-map-audio-conf/cyberia-map-audio-conf.service.js +189 -0
- package/src/api/cyberia-quest/cyberia-quest.router.js +3 -3
- package/src/api/cyberia-quest/cyberia-quest.service.js +3 -3
- package/src/api/cyberia-quest-progress/cyberia-quest-progress.model.js +1 -1
- package/src/api/cyberia-server-defaults/cyberia-server-defaults.js +403 -188
- package/src/api/cyberia-skill/cyberia-skill.model.js +6 -6
- package/src/api/file/file.ref.js +153 -0
- package/src/api/file/file.ref.json +11 -2
- package/src/api/object-layer/object-layer.model.js +47 -12
- package/src/api/object-layer/object-layer.router.js +10 -3
- package/src/api/object-layer/object-layer.service.js +113 -120
- package/src/cli/app.js +12 -1
- package/src/cli/client.js +2 -2
- package/src/cli/cluster.js +80 -18
- package/src/cli/deploy.js +215 -34
- package/src/cli/docker-compose.js +1 -1
- package/src/cli/fs-selection.js +115 -0
- package/src/cli/fs.js +158 -342
- package/src/cli/index.js +22 -10
- package/src/cli/release.js +3 -1
- package/src/cli/repository.js +35 -9
- package/src/cli/run.js +80 -199
- package/src/cli/test.js +4 -0
- package/src/cli/wireguard.js +32 -31
- package/src/client/components/core/Badge.js +0 -1
- package/src/client/components/core/CssCore.js +8 -1
- package/src/client/components/core/Docs.js +77 -100
- package/src/client/components/core/Modal.js +77 -23
- package/src/client/components/core/ToolTip.js +15 -0
- package/src/client/components/cryptokoyn/AppShellCryptokoyn.js +0 -2
- package/src/client/components/cyberia/ActionEngineCyberia.js +12 -36
- package/src/client/components/cyberia/EntityEngineCyberia.js +492 -121
- package/src/client/components/cyberia/InstanceEngineCyberia.js +129 -160
- package/src/client/components/cyberia/InstanceSelectionView.js +7 -1
- package/src/client/components/cyberia/MapEngineCyberia.js +175 -69
- package/src/client/components/cyberia/ObjectLayerEngine.js +1011 -97
- package/src/client/components/cyberia/ObjectLayerEngineModal.js +81 -155
- package/src/client/components/cyberia/ObjectLayerEngineViewer.js +113 -98
- package/src/client/components/cyberia/SharedDefaultsCyberia.js +215 -56
- package/src/client/components/cyberia-portal/AppShellCyberiaPortal.js +0 -34
- package/src/client/components/cyberia-portal/CssCyberiaPortal.js +1 -1
- package/src/client/components/cyberia-portal/MainBodyCyberiaPortal.js +712 -76
- package/src/client/components/cyberia-portal/RouterCyberiaPortal.js +0 -4
- package/src/client/components/cyberia-portal/TranslateCyberiaPortal.js +0 -4
- package/src/client/components/default/AppShellDefault.js +1 -4
- package/src/client/components/itemledger/AppShellItemledger.js +0 -2
- package/src/client/components/underpost/AppShellUnderpost.js +1 -1
- package/src/client/public/cyberia-docs/ARCHITECTURE.md +15 -15
- package/src/client/public/cyberia-docs/CYBERIA-CLI.md +280 -24
- package/src/client/public/cyberia-docs/CYBERIA-CLIENT.md +51 -29
- package/src/client/public/cyberia-docs/CYBERIA-SAGA.md +52 -53
- package/src/client/public/cyberia-docs/CYBERIA-SERVER.md +16 -11
- package/src/client/public/cyberia-docs/CYBERIA.md +28 -28
- package/src/client/public/cyberia-docs/ENTITY-PROFILE.md +11 -5
- package/src/client/public/cyberia-docs/ROADMAP.md +1 -1
- package/src/client/public/cyberia-docs/STATS-PROGRESSION.md +217 -0
- package/src/client/public/cyberia-docs/WHITE-PAPER.md +20 -12
- package/src/client/services/cyberia-audio/cyberia-audio.service.js +99 -0
- package/src/client/services/cyberia-entity-type-default/cyberia-entity-type-default.service.js +38 -0
- package/src/client/services/cyberia-instance/cyberia-instance.management.js +5 -4
- package/src/client/services/cyberia-instance/cyberia-instance.service.js +0 -40
- package/src/client/services/cyberia-map/cyberia-map.management.js +5 -4
- package/src/client/services/cyberia-map-audio-conf/cyberia-map-audio-conf.service.js +138 -0
- package/src/client/services/object-layer/object-layer.management.js +6 -10
- package/src/client/services/object-layer/object-layer.service.js +3 -1
- package/src/client/ssr/views/Cyberia404.js +3 -3
- package/src/client-builder/client-build-docs.js +52 -52
- package/src/client-builder/client-build.js +67 -44
- package/src/client-builder/client-bundle.js +347 -0
- package/src/db/mongo/MongoExpress.js +187 -0
- package/src/grpc/cyberia/grpc-server.js +5 -7
- package/src/index.js +1 -1
- package/src/projects/cyberia/atlas-sprite-sheet-generator.js +143 -146
- package/src/projects/cyberia/atlas-sprite-sheet-store.js +391 -0
- package/src/projects/cyberia/besu-genesis-generator.js +5 -14
- package/src/projects/cyberia/boot-contract-fixtures.js +32 -0
- package/src/projects/cyberia/catalog-cyberia.js +3 -2
- package/src/projects/cyberia/gemini-client.js +3 -3
- package/src/projects/cyberia/generate-saga.js +4 -11
- package/src/projects/cyberia/hot-reload-trigger.js +17 -28
- package/src/projects/cyberia/instance-backup.js +210 -0
- package/src/projects/cyberia/instance-data.js +177 -257
- package/src/projects/cyberia/map-preview-generator.js +32 -68
- package/src/projects/cyberia/object-layer.js +152 -319
- package/src/projects/cyberia/seed-audio.js +139 -0
- package/src/projects/cyberia/semantic-layer-generator-skin.js +2 -8
- package/src/projects/cyberia/semantic-layer-generator.js +2 -18
- package/src/projects/cyberia/stat-balance.js +81 -0
- package/src/projects/cyberia/stat-commands.js +23 -0
- package/src/projects/cyberia/stat-contract-generator.js +101 -0
- package/src/runtime/cyberia-client/Dockerfile +8 -4
- package/src/runtime/cyberia-client/Dockerfile.dev +5 -2
- package/src/runtime/cyberia-server/Dockerfile +9 -2
- package/src/runtime/cyberia-server/Dockerfile.dev +8 -1
- package/src/runtime/engine-cyberia/Dockerfile +1 -1
- package/src/runtime/engine-cyberia/Dockerfile.dev +1 -1
- package/src/runtime/engine-cyberia/Dockerfile.test +2 -2
- package/src/runtime/engine-cyberia/compose.env +17 -5
- package/src/runtime/engine-cyberia/docker-compose.yml +23 -17
- package/src/server/build/coverage.js +113 -42
- package/src/server/build/package.js +55 -12
- package/src/server/build/testing.js +59 -9
- package/src/server/network/middlewares.js +8 -2
- package/src/server/network/underpost-gateway.js +113 -14
- package/src/server/ops/logger.js +70 -35
- package/src/server/runtime/conf.js +40 -9
- package/src/server/runtime/start.js +11 -2
- package/src/server/storage/data-query.js +16 -0
- package/src/server/storage/downloader.js +62 -14
- package/src/server/storage/zip.js +153 -0
- package/test/integration/app/cyberia/atlas-sprite-sheet-store.test.js +402 -0
- package/test/integration/app/cyberia/atlas-sprite-sheet.test.js +86 -0
- package/test/integration/app/cyberia/cyberia-cli-plain-reads.test.js +34 -0
- package/test/integration/app/cyberia/cyberia-entity-type-default.test.js +842 -0
- package/test/integration/app/cyberia/cyberia-instance-conf-coerce.test.js +53 -0
- package/test/integration/app/cyberia/cyberia-instance-conf-defaults.test.js +16 -22
- package/test/integration/app/cyberia/cyberia-instance-items.test.js +90 -0
- package/test/integration/app/cyberia/cyberia-load.test.js +6 -7
- package/test/integration/app/cyberia/cyberia-map-audio-conf.test.js +256 -0
- package/test/integration/app/cyberia/cyberia-stats.test.js +150 -0
- package/test/integration/app/cyberia/fallback-world-capture.test.js +87 -2
- package/test/integration/app/cyberia/object-layer-item-selection.test.js +56 -0
- package/test/integration/app/cyberia/object-layer-natural-key.test.js +32 -0
- package/test/integration/app/cyberia/seed-audio.test.js +275 -0
- package/test/integration/infra/2-network/wireguard-cli.test.js +33 -9
- package/test/integration/infra/2-network/wireguard-edge.test.js +58 -18
- package/test/integration/infra/3-cluster/mongo-express-deploy.test.js +156 -0
- package/test/integration/infra/4-ingress/api-cross-origin.test.js +79 -0
- package/test/integration/infra/4-ingress/underpost-ingress.test.js +1 -1
- package/test/unit/catalog.test.js +13 -2
- package/test/unit/client-build-docs.test.js +97 -70
- package/test/unit/client-bundle.test.js +313 -0
- package/test/unit/conf-resolution.test.js +58 -7
- package/test/unit/coverage-artifact.test.js +120 -29
- package/test/unit/cyberia/instance-backup.test.js +183 -0
- package/test/unit/cyberia/instance-data.test.js +314 -0
- package/test/unit/cyberia/instance-object-layer-items.test.js +46 -0
- package/test/unit/cyberia/publish-workflow.test.js +22 -0
- package/test/unit/cyberia/stat-balance.test.js +69 -0
- package/test/unit/deploy-legacy-gateway-sweep.test.js +63 -0
- package/test/unit/deploy-log-table.test.js +76 -5
- package/test/unit/downloader-integrity.test.js +98 -0
- package/test/unit/file-reference-registry.test.js +141 -0
- package/test/unit/fs-storage-paths.test.js +596 -0
- package/test/unit/gateway-pod-fetch.test.js +95 -0
- package/test/unit/letsencrypt-issuer.test.js +101 -0
- package/test/unit/logger-redaction.test.js +29 -0
- package/test/unit/package.test.js +70 -16
- package/test/unit/prepare-host.test.js +84 -1
- package/test/unit/release-bump.test.js +3 -1
- package/test/unit/start-options.test.js +12 -0
- package/test/unit/test-tiers.test.js +27 -0
- package/test/unit/zip-archive.test.js +142 -0
- package/vitest.config.js +11 -3
- package/src/api/cyberia-instance/cyberia-fallback-default-items.js +0 -63
- package/src/client/components/cyberia/FallbackWorldEngineCyberia.js +0 -368
|
@@ -217,10 +217,17 @@ Other message types — init data (0x02), FCT (0x04), ItemFCT (0x05) — carry t
|
|
|
217
217
|
|
|
218
218
|
The client speaks REST directly to engine-cyberia for content. None of these calls go through cyberia-server.
|
|
219
219
|
|
|
220
|
+
The atlas blob is the minified render, at one pixel per cell, and the atlas metadata describes that
|
|
221
|
+
same render. The engine keeps a second, human-resolution render for viewing; the client never
|
|
222
|
+
downloads it. The idle still is the first down-idle frame cut out of that render, and is what the
|
|
223
|
+
interact overlay and every engine editor show as an item's picture. `cyberia ol --minify` refreshes
|
|
224
|
+
the minified render and the idle still of stored items.
|
|
225
|
+
|
|
220
226
|
| Endpoint | Purpose |
|
|
221
227
|
| -------------------------------------------------------------- | ------------------------------------------ |
|
|
222
228
|
| `GET /api/atlas-sprite-sheet/metadata/:itemKey` | Frame layout JSON for a sprite atlas |
|
|
223
|
-
| `GET /api/atlas-sprite-sheet/blob/:itemKey` |
|
|
229
|
+
| `GET /api/atlas-sprite-sheet/blob/:itemKey` | Minified atlas PNG, one pixel per cell |
|
|
230
|
+
| `GET /api/atlas-sprite-sheet/idle-preview/:itemKey` | Down-idle still PNG, the item's picture |
|
|
224
231
|
| `GET /api/object-layer/:itemId` | ObjectLayer JSON metadata |
|
|
225
232
|
| `GET /api/cyberia-dialogue/code/default-:itemId` | Dialogue lines for an NPC |
|
|
226
233
|
| `GET /assets/ui-icons/:iconId.png` | Status-bar icons |
|
|
@@ -238,7 +245,8 @@ The Instance Map is a strategic overlay, not a minimap. It visualises the instan
|
|
|
238
245
|
|
|
239
246
|
One integrated widget with two modes, split across two modules:
|
|
240
247
|
|
|
241
|
-
- **Toolbar** (`ui/toolbar`) — the top HUD strip: the compact map readout left-aligned, and the right-hand toggle row `[quest][map][fullscreen]`. The quest button shows/hides the Quest Journal
|
|
248
|
+
- **Toolbar** (`ui/toolbar`) — the top HUD strip: the compact map readout left-aligned, and the right-hand toggle row `[quest][map][fullscreen]`. The quest button shows/hides the Quest Journal and the map button shows/hides the minimap; both are hidden by default and stay open together. The coordinate readout opens the expanded Instance Map, which morphs to the full screen with an eased transition and retracts the same way on close.
|
|
249
|
+
- **Side stack** (`ui/hud_side_stack`) — the right-hand column both panels live in: the minimap on top, the Quest Journal beneath, between the toolbar and the inventory bar. The column sizes to the room the bar leaves. When both are open the minimap gives way to at most half of the column so the journal keeps room, and the journal takes only what its content needs. Each panel keeps its own state across toggles: the journal its scroll, sections and pages, the minimap its zoom.
|
|
242
250
|
- **Container** (`ui/modal_map`) — compact mode is the always-on readout (map code, position, fps) hosted inside the toolbar; expanded mode is the full-screen morph target.
|
|
243
251
|
- **Content** (`ui/modal_instance_map`) — renders the Instance Map inside the container: a non-blocking translucent full-screen panel (the world keeps rendering behind it).
|
|
244
252
|
|
|
@@ -253,36 +261,50 @@ Strict independence from the gameplay renderer:
|
|
|
253
261
|
|
|
254
262
|
Data lifecycle:
|
|
255
263
|
|
|
256
|
-
1. Opening the overlay fetches the **static** payload once: graph nodes, portal edges, and authored `presencePois` carrying map-cell presence status
|
|
264
|
+
1. Opening the overlay fetches the **static** payload once: graph nodes, portal edges, and authored `presencePois` carrying map-cell presence status and static action/quest capability membership. The instance code arrives in the simulation server's `metadata` message.
|
|
257
265
|
2. While open, the client polls the **dynamic** endpoint (~1/s, `?playerId=`) only for per-player capability activity: `acceptable` / `active` quests and active actions.
|
|
258
266
|
3. Closing the overlay stops polling immediately; late responses are discarded.
|
|
259
267
|
|
|
260
268
|
Live player position never travels through this API — engine-cyberia holds no simulation state. The overlay marks the player's node (and cell fraction within it) from the client's own predicted position, refreshed every frame.
|
|
261
269
|
|
|
262
|
-
At normal zoom, POIs render only their authored presence-status icon. At inspection zoom, static action and quest capability icons appear
|
|
270
|
+
At normal zoom, POIs render only their authored presence-status icon. At inspection zoom, static action and quest capability icons appear; dynamic activity only changes capability emphasis. The local player's live presence and authoritative stats sum remain client-side. Decorative map content without a presence status is not rendered as a POI.
|
|
263
271
|
|
|
264
272
|
---
|
|
265
273
|
|
|
274
|
+
## Stats and progression
|
|
275
|
+
|
|
276
|
+
Every living entity's overhead HUD shows `[stats] lv.<level>` and `[stack] <stats sum>` above its nameplate, and a gold XP bar under its HP bar. The local player's bar fills with its progress through the current level and carries an `XP n / m` label in a smaller font; entities whose XP the client cannot read show an empty, unlabeled bar.
|
|
277
|
+
|
|
278
|
+
The Stats tab of the interact modal draws one shared stat panel per block: the stats icon, the signed sum, and a two-column grid with one icon per stat. Every entity gets its effective stats. The local player also gets the OL modifiers, base stats, and temporary modifiers from the self snapshot. The inventory modal draws the same panel for one item.
|
|
279
|
+
|
|
280
|
+
An XP award floats as gold `+N XP` combat text over the earner only. A server level increment triggers a `LEVEL UP` aura: shaded gold sparks stream from the entity's feet up past its head for 3 s under a spinning star and a label, and the whole effect follows the entity as it moves, for any entity in view. First sight, repeated snapshots, and lower levels do not trigger it.
|
|
281
|
+
|
|
282
|
+
A defeat of a player or bot triggers the death cue: shaded red sparks burst out of the body and fall while a `skull` icon rises over it for 2.6 s, following the body. It fires once, when an entity seen alive in the prior snapshot is dead in this one. An entity first seen dead, or still dead, triggers nothing. A resource is extracted, not slain: it goes straight to its extracted state with no cue.
|
|
283
|
+
|
|
284
|
+
While either cue runs, the entity's whole overhead stack, presence icon included, yields the space to it and returns when the cue ends.
|
|
285
|
+
|
|
286
|
+
The cues are visual only. Their sounds arrive as `audio_event` messages the server broadcasts to every player whose area of interest covers the event, so a defeat, an extraction, or a level gained sounds the same for everyone in reach. The client plays the id through the map's audio bindings.
|
|
287
|
+
|
|
288
|
+
Item slots badge an object layer with the `stack` icon and its signed stat sum, red when negative.
|
|
289
|
+
|
|
290
|
+
The server sends six values in canonical order. The client displays these values and uses the supplied movement speed.
|
|
291
|
+
|
|
266
292
|
## Build and run
|
|
267
293
|
|
|
268
294
|
```bash
|
|
269
295
|
cd cyberia-client
|
|
270
296
|
|
|
271
|
-
# Development build (
|
|
297
|
+
# Development build (BUILD_MODE=DEBUG, localhost websocket URL)
|
|
272
298
|
make -f Web.mk clean && make -f Web.mk all
|
|
273
299
|
|
|
274
|
-
# Release build
|
|
275
|
-
make -f Web.mk clean && make -f Web.mk all BUILD_MODE=RELEASE
|
|
276
|
-
WS_URL=wss://server.cyberiaonline.com/ws \
|
|
277
|
-
API_BASE=https://www.cyberiaonline.com
|
|
278
|
-
|
|
279
|
-
# Build + serve locally on dev port :8082 (DEBUG, localhost)
|
|
280
|
-
./dev-server.sh # or: ./dev-server.sh <port>
|
|
300
|
+
# Release build
|
|
301
|
+
make -f Web.mk clean && make -f Web.mk all BUILD_MODE=RELEASE
|
|
281
302
|
```
|
|
282
303
|
|
|
283
|
-
`
|
|
284
|
-
[Compile-time configuration](#compile-time-configuration).
|
|
285
|
-
|
|
304
|
+
`BUILD_MODE` picks the websocket URL baked into the WASM — see
|
|
305
|
+
[Compile-time configuration](#compile-time-configuration). The Data Server URL
|
|
306
|
+
is not a build argument: the client reads it from its own command line at
|
|
307
|
+
startup.
|
|
286
308
|
|
|
287
309
|
The build is part of the Underpost Platform static + PWA pipeline; production deploys go through `underpost client` and `underpost deploy`.
|
|
288
310
|
|
|
@@ -300,23 +322,23 @@ bin/
|
|
|
300
322
|
|
|
301
323
|
## Compile-time configuration
|
|
302
324
|
|
|
303
|
-
### Server URLs
|
|
325
|
+
### Server URLs
|
|
304
326
|
|
|
305
|
-
`WS_URL`
|
|
306
|
-
|
|
307
|
-
|
|
327
|
+
`WS_URL` in `src/config.h` holds both websocket endpoints. `BUILD_MODE` picks
|
|
328
|
+
one: DEBUG takes `ws://localhost:8081/ws`, RELEASE takes
|
|
329
|
+
`wss://server.cyberiaonline.com/ws`. `window.CYBERIA_WS_ORIGIN`, injected by
|
|
330
|
+
`wasm-driver.py`, overrides it at runtime.
|
|
308
331
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
332
|
+
The Data Server URL is a command line argument, not a build argument:
|
|
333
|
+
|
|
334
|
+
```
|
|
335
|
+
wasm-driver.py --data-server-url=<origin>
|
|
336
|
+
-> window.CYBERIA_ARGV -> Module.arguments -> main(argc, argv)
|
|
337
|
+
```
|
|
313
338
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
> (or Docker build-args wired through to `make`), or the client ships pointing
|
|
318
|
-
> at localhost. If unset, `src/config.h` falls back to bare `"ws://"` /
|
|
319
|
-
> `"https://"` stubs.
|
|
339
|
+
`config_init()` reads `--data-server-url=<origin>` from `argv`. The argument is
|
|
340
|
+
required: the client asserts and stops if it is absent. There is no environment
|
|
341
|
+
fallback, no config file and no runtime override.
|
|
320
342
|
|
|
321
343
|
### Constants (`src/config.h`)
|
|
322
344
|
|
|
@@ -100,11 +100,11 @@ security presence, taxes, historical scars — never the subject.
|
|
|
100
100
|
To make a faction the **central driver** of the saga, name one or more with
|
|
101
101
|
`--faction-context` (comma-separated). Valid keys:
|
|
102
102
|
|
|
103
|
-
| Key | Confederation
|
|
104
|
-
| --------- |
|
|
105
|
-
| `zenith` | the Zenith Empire (Red)
|
|
106
|
-
| `nova` | the Nova Republic (Blue)
|
|
107
|
-
| `atlas` | the Atlas Confederation (Yellow)
|
|
103
|
+
| Key | Confederation |
|
|
104
|
+
| --------- | ------------------------------------------------ |
|
|
105
|
+
| `zenith` | the Zenith Empire (Red) |
|
|
106
|
+
| `nova` | the Nova Republic (Blue) |
|
|
107
|
+
| `atlas` | the Atlas Confederation (Yellow) |
|
|
108
108
|
| `neutral` | unaligned independent enclaves / neutral parties |
|
|
109
109
|
|
|
110
110
|
```bash
|
|
@@ -133,23 +133,23 @@ Two optional flags steer it; **both default to random** when unset:
|
|
|
133
133
|
from (unset → a random non-empty subset, so runs vary their cultural mix).
|
|
134
134
|
Unknown keys warn and are skipped. Valid keys:
|
|
135
135
|
|
|
136
|
-
| Key
|
|
137
|
-
|
|
|
138
|
-
| `low_level_synthetics`
|
|
139
|
-
| `high_fidelity_synthetics`
|
|
140
|
-
| `global_latin_diaspora`
|
|
141
|
-
| `east_asian_pacific_diaspora`
|
|
142
|
-
| `middle_eastern_turkish_diaspora` | Middle-Eastern / Turkish-descended
|
|
143
|
-
| `sub_saharan_african_diaspora`
|
|
144
|
-
| `classic_western_scifi`
|
|
145
|
-
| `mutagen_clans`
|
|
136
|
+
| Key | Flavor |
|
|
137
|
+
| --------------------------------- | ------------------------------------------------- |
|
|
138
|
+
| `low_level_synthetics` | serialized / technical utility-frame designations |
|
|
139
|
+
| `high_fidelity_synthetics` | refined, near-human synthetic names |
|
|
140
|
+
| `global_latin_diaspora` | Latin / Iberian-descended |
|
|
141
|
+
| `east_asian_pacific_diaspora` | East-Asian / Pacific-descended |
|
|
142
|
+
| `middle_eastern_turkish_diaspora` | Middle-Eastern / Turkish-descended |
|
|
143
|
+
| `sub_saharan_african_diaspora` | Sub-Saharan African-descended |
|
|
144
|
+
| `classic_western_scifi` | gritty Anglo operators / enforcers |
|
|
145
|
+
| `mutagen_clans` | organic, mutation-flavored clan names |
|
|
146
146
|
|
|
147
147
|
- **`--cultural-exposure <mode>`** — how mixed the population is (unset → random):
|
|
148
148
|
|
|
149
|
-
| Mode
|
|
150
|
-
|
|
|
151
|
-
| `cosmopolitan` | heavy mixing, hybrid surnames, intermarriage — maximizes variety
|
|
152
|
-
| `local`
|
|
149
|
+
| Mode | Effect |
|
|
150
|
+
| -------------- | ------------------------------------------------------------------------------ |
|
|
151
|
+
| `cosmopolitan` | heavy mixing, hybrid surnames, intermarriage — maximizes variety |
|
|
152
|
+
| `local` | isolated clans/enclaves, strong local naming traditions, internally consistent |
|
|
153
153
|
|
|
154
154
|
```bash
|
|
155
155
|
# Latin + East-Asian diaspora names in a highly mixed, cosmopolitan population
|
|
@@ -166,26 +166,26 @@ node bin/cyberia.js generate-saga --character-context 'mutagen_clans' --cultural
|
|
|
166
166
|
The theme commits to one of four broad narrative types — chosen **uniformly
|
|
167
167
|
(~25% each)** unless forced with `--tone`:
|
|
168
168
|
|
|
169
|
-
| Tone | Register
|
|
170
|
-
| ----------- |
|
|
171
|
-
| `adventure` | noir high-risk missions: covert ops, sabotage, combat, rogue AI, mystery
|
|
169
|
+
| Tone | Register |
|
|
170
|
+
| ----------- | ----------------------------------------------------------------------------------------------------------------- |
|
|
171
|
+
| `adventure` | noir high-risk missions: covert ops, sabotage, combat, rogue AI, mystery |
|
|
172
172
|
| `politics` | power & ideology at any scale — councils, clans, enclaves, revolutions (confederation geopolitics only sometimes) |
|
|
173
|
-
| `tragic` | heartbreaking, intimate: family, bonds, loss, grief
|
|
174
|
-
| `comedy` | everyday absurdity and silliness, played for humor
|
|
173
|
+
| `tragic` | heartbreaking, intimate: family, bonds, loss, grief |
|
|
174
|
+
| `comedy` | everyday absurdity and silliness, played for humor |
|
|
175
175
|
|
|
176
176
|
#### Spatial context (physical vs. hyperspace)
|
|
177
177
|
|
|
178
178
|
Cyberia has two equally important layers — the **Physical Layer** (fleets,
|
|
179
179
|
colonies, logistics, force) and the **Hyperspace Layer** (persistent Instances,
|
|
180
|
-
memory-cities, digital ecosystems). Because the lore is titled
|
|
181
|
-
|
|
180
|
+
memory-cities, digital ecosystems). Because the lore is titled _The Frontier of
|
|
181
|
+
Hyperspace_, an unconstrained model drifts to hyperspace-only premises. So the
|
|
182
182
|
auto-theme picks a spatial context **explicitly and uniformly (~33.3% each)**:
|
|
183
183
|
|
|
184
|
-
| Context | Premise lives in…
|
|
185
|
-
| ------------ |
|
|
186
|
-
| `physical` | the material frontier only — no hyperspace
|
|
187
|
-
| `mixed` | the porous interplay where events bleed between both layers
|
|
188
|
-
| `hyperspace` | inside the Instances only — not the physical frontier
|
|
184
|
+
| Context | Premise lives in… |
|
|
185
|
+
| ------------ | ----------------------------------------------------------- |
|
|
186
|
+
| `physical` | the material frontier only — no hyperspace |
|
|
187
|
+
| `mixed` | the porous interplay where events bleed between both layers |
|
|
188
|
+
| `hyperspace` | inside the Instances only — not the physical frontier |
|
|
189
189
|
|
|
190
190
|
Force one with `--space-context <physical\|mixed\|hyperspace>`; an invalid value
|
|
191
191
|
warns and falls back to random. This applies to auto-generation only (with
|
|
@@ -265,25 +265,25 @@ overwritten and codes are never duplicated.
|
|
|
265
265
|
|
|
266
266
|
Options:
|
|
267
267
|
|
|
268
|
-
| Flag
|
|
269
|
-
|
|
|
270
|
-
| `--prompt <theme>`
|
|
271
|
-
| `--import <file>`
|
|
272
|
-
| `--lore-path <path>`
|
|
273
|
-
| `--space-context <ctx>`
|
|
274
|
-
| `--tone <tone>`
|
|
275
|
-
| `--faction-context <keys>`
|
|
276
|
-
| `--character-context <keys>` | Comma-separated `CHARACTER_NAMES_POOL` keys for name inspiration (else random subset).
|
|
277
|
-
| `--cultural-exposure <mode>` | `cosmopolitan` \| `local` naming-diversity mode (else random).
|
|
278
|
-
| `--temperature <value>`
|
|
279
|
-
| `--model <id>`
|
|
280
|
-
| `--timeout <ms>`
|
|
281
|
-
| `--thinking-level <level>`
|
|
282
|
-
| `--out <file>`
|
|
283
|
-
| `--dry-run`
|
|
284
|
-
| `--env-path <path>`
|
|
285
|
-
| `--mongo-host <host>`
|
|
286
|
-
| `--dev`
|
|
268
|
+
| Flag | Description |
|
|
269
|
+
| ---------------------------- | -------------------------------------------------------------------------------------------------- |
|
|
270
|
+
| `--prompt <theme>` | Theme seed. Omit to auto-generate from the lore. |
|
|
271
|
+
| `--import <file>` | Load a generated payload file into the DB. |
|
|
272
|
+
| `--lore-path <path>` | Override the base-lore doc (auto-generate mode). |
|
|
273
|
+
| `--space-context <ctx>` | Force `physical` \| `mixed` \| `hyperspace` (else random). |
|
|
274
|
+
| `--tone <tone>` | Force `adventure` \| `politics` \| `tragic` \| `comedy` (else random). |
|
|
275
|
+
| `--faction-context <keys>` | Comma-separated `zenith` \| `nova` \| `atlas` \| `neutral` that DRIVE the theme (else background). |
|
|
276
|
+
| `--character-context <keys>` | Comma-separated `CHARACTER_NAMES_POOL` keys for name inspiration (else random subset). |
|
|
277
|
+
| `--cultural-exposure <mode>` | `cosmopolitan` \| `local` naming-diversity mode (else random). |
|
|
278
|
+
| `--temperature <value>` | Sampling temperature for every model call (default `1.3`). |
|
|
279
|
+
| `--model <id>` | Gemini model id (default `gemma-4-26b-a4b-it`). |
|
|
280
|
+
| `--timeout <ms>` | Per-request timeout in ms (default `10000`). |
|
|
281
|
+
| `--thinking-level <level>` | `low` \| `medium` \| `high` (default `high`). |
|
|
282
|
+
| `--out <file>` | Payload dump path (default `./engine-private/cyberia-sagas/<saga-code>.json`). |
|
|
283
|
+
| `--dry-run` | Normalize only; no database writes. |
|
|
284
|
+
| `--env-path <path>` | Env file to load (`GEMINI_API_KEY`, deploy vars). |
|
|
285
|
+
| `--mongo-host <host>` | Mongo host override. |
|
|
286
|
+
| `--dev` | Force the development environment. |
|
|
287
287
|
|
|
288
288
|
`GEMINI_API_KEY` must be available in the environment or the `--env-path` file.
|
|
289
289
|
|
|
@@ -294,8 +294,7 @@ A single JSON object with these interrelated sections:
|
|
|
294
294
|
- **saga** — `code`, `name`, `description`, `mapCodes[]`, `itemIds[]`, `questCodes[]`.
|
|
295
295
|
- **instance** — the playable `CyberiaInstance` shell derived from the saga
|
|
296
296
|
metadata: `code`, `name`, `description`, `tags[]`, `cyberiaMapCodes[]` (the
|
|
297
|
-
saga's map codes), `
|
|
298
|
-
`topologyMode`. Spatial topology (`portals`) and the tuning ref (`conf`) are
|
|
297
|
+
saga's map codes), `topologyMode`. Spatial topology (`portals`) and the tuning ref (`conf`) are
|
|
299
298
|
left empty here and bound by downstream spatial synthesis.
|
|
300
299
|
- **maps[]** — narrative zones the quest chain visits: `code`, `name`,
|
|
301
300
|
`description` (text only — grid/cells/entities stay at schema defaults). Their
|
|
@@ -338,7 +337,7 @@ normalization slugifies every code/id so they line up:
|
|
|
338
337
|
minimal `skill`-type item for any summoned id the model omitted;
|
|
339
338
|
- `saga.questCodes` / `saga.itemIds` are reconciled to include every generated
|
|
340
339
|
quest and item (including appended skill items), and `instance.cyberiaMapCodes`
|
|
341
|
-
|
|
340
|
+
mirrors the saga's.
|
|
342
341
|
|
|
343
342
|
### `talk` objectives (guaranteed fulfillable)
|
|
344
343
|
|
|
@@ -38,7 +38,7 @@ persisted maps + rules tick + AOI + snapshots render
|
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
- Each service is supervised independently and owns its own monitor and reconnector.
|
|
41
|
-
- `cyberia-server` dials
|
|
41
|
+
- `cyberia-server` dials the Data Server gRPC at boot; on dial or load failure it retries over the REST boot fallback (`--data-server-url`, `/api/cyberia-instance/boot/*`) and exits only when both transports fail rather than fabricate a world.
|
|
42
42
|
- On reconnect, world configuration is reloaded via `GetFullInstance(instanceCode)`.
|
|
43
43
|
- If any one of the three services is unhealthy, the game moves to standby until all three recover.
|
|
44
44
|
|
|
@@ -232,7 +232,7 @@ Paths are relative to `cyberia-server/`. Gameplay logic lives under `src/`; the
|
|
|
232
232
|
| `src/economy.go` | Fountain & Sink coin economy |
|
|
233
233
|
| `src/life_regen.go` | HP regeneration |
|
|
234
234
|
| `src/ai.go` | Bot AI |
|
|
235
|
-
| `src/stats.go` |
|
|
235
|
+
| `src/stats.go` | Signed stat aggregation and effective floors |
|
|
236
236
|
| `src/entity_status.go` | Entity Status Indicator (ESI) numeric IDs |
|
|
237
237
|
| `src/frozen_state.go` | FrozenInteractionState |
|
|
238
238
|
| `src/handlers.go` | WebSocket lifecycle, binary uplink decoder, JSON-uplink back-compat adapter |
|
|
@@ -262,15 +262,20 @@ All content data (ObjectLayer metadata, asset blobs, optional client hints, the
|
|
|
262
262
|
|
|
263
263
|
## Environment
|
|
264
264
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
|
269
|
-
|
|
|
270
|
-
| `
|
|
271
|
-
| `
|
|
272
|
-
|
|
273
|
-
|
|
|
265
|
+
Two endpoints are command-line flags, not variables. Both are required, and
|
|
266
|
+
each is const for the life of the process.
|
|
267
|
+
|
|
268
|
+
| Flag | Example | Description |
|
|
269
|
+
| -------------------- | ------------------------------- | ------------------------- |
|
|
270
|
+
| `--data-server-url` | `https://www.cyberiaonline.com` | Data Server REST origin |
|
|
271
|
+
| `--data-server-grpc` | `localhost:50051` | Data Server gRPC endpoint |
|
|
272
|
+
|
|
273
|
+
| Variable | Default | Description |
|
|
274
|
+
| --------------------------------- | ------------ | --------------------------------------- |
|
|
275
|
+
| `INSTANCE_CODE` | `default` | Instance code to load on startup |
|
|
276
|
+
| `ENGINE_GRPC_RELOAD_INTERVAL_SEC` | _(disabled)_ | ObjectLayer hot-reload polling interval |
|
|
277
|
+
| `SERVER_PORT` | `8081` | WebSocket + HTTP listen port |
|
|
278
|
+
| `STATIC_DIR` | `./public` | Directory for static WASM client files |
|
|
274
279
|
|
|
275
280
|
---
|
|
276
281
|
|
|
@@ -20,7 +20,7 @@ _Stackable Rendering Layers as a Unified Tokenized Reality_
|
|
|
20
20
|
<!-- CI/CD and health -->
|
|
21
21
|
<div align="center">
|
|
22
22
|
|
|
23
|
-
[](https://github.com/underpostnet/engine-cyberia/actions/workflows/docker-image.engine-cyberia.ci.yml) [](https://github.com/underpostnet/engine-cyberia/actions/workflows/coverall.cyberia.ci.yml) [](https://coveralls.io/github/underpostnet/engine-cyberia?branch=main) [](https://github.com/underpostnet/engine-cyberia/actions/workflows/docker-image.engine-cyberia.ci.yml) [](https://github.com/underpostnet/engine-cyberia/actions/workflows/coverall.cyberia.ci.yml) [](https://coveralls.io/github/underpostnet/engine-cyberia?branch=main) [](https://socket.dev/npm/package/cyberia/overview/3.3.77)
|
|
24
24
|
|
|
25
25
|
</div>
|
|
26
26
|
|
|
@@ -45,26 +45,26 @@ Go server and the WASM client with data — it does not run the simulation or th
|
|
|
45
45
|
|
|
46
46
|
```text
|
|
47
47
|
┌───────────────────────────────────────────────┐
|
|
48
|
-
│ UNDERPOST PLATFORM
|
|
49
|
-
│ toolchain · deploy · PWA build · static
|
|
50
|
-
│ delivery · cluster/image/db · monitoring
|
|
51
|
-
│
|
|
52
|
-
│ underpost CLI ──▶ builds & deploys all
|
|
48
|
+
│ UNDERPOST PLATFORM │
|
|
49
|
+
│ toolchain · deploy · PWA build · static │
|
|
50
|
+
│ delivery · cluster/image/db · monitoring │
|
|
51
|
+
│ │
|
|
52
|
+
│ underpost CLI ──▶ builds & deploys all │
|
|
53
53
|
└───────────────────────────────────────────────┘
|
|
54
54
|
│ hosts / delivers
|
|
55
55
|
▼
|
|
56
|
-
╔═══════════════════════════════ CYBERIA MMO
|
|
56
|
+
╔═══════════════════════════════ CYBERIA MMO ═══════════════════════════════════╗
|
|
57
57
|
║ ║
|
|
58
|
-
║ ┌──────────────────┐ gRPC ┌──────────────────┐ WebSocket
|
|
59
|
-
║ │ engine-cyberia │ ────────▶ │ cyberia-server │ ───────────┐
|
|
60
|
-
║ │ (Node.js) │ │ (Go) │ │
|
|
61
|
-
║ │ │ │ │ ▼
|
|
62
|
-
║ │ content │ │ authoritative │
|
|
63
|
-
║ │ validation │ │ simulation │
|
|
64
|
-
║ │ persistence │ │ world tick │
|
|
65
|
-
║ │ gRPC/REST data │ │ AOI replication │
|
|
66
|
-
║ │ asset metadata │ │ │
|
|
67
|
-
║ └──────────────────┘ └──────────────────┘
|
|
58
|
+
║ ┌──────────────────┐ gRPC ┌──────────────────┐ WebSocket ║
|
|
59
|
+
║ │ engine-cyberia │ ────────▶ │ cyberia-server │ ───────────┐ ║
|
|
60
|
+
║ │ (Node.js) │ │ (Go) │ │ ║
|
|
61
|
+
║ │ │ │ │ ▼ ║
|
|
62
|
+
║ │ content │ │ authoritative │ ┌──────────────────┐ ║
|
|
63
|
+
║ │ validation │ │ simulation │ │ cyberia-client │ ║
|
|
64
|
+
║ │ persistence │ │ world tick │ │ (C / WASM) │ ║
|
|
65
|
+
║ │ gRPC/REST data │ │ AOI replication │ │ │ ║
|
|
66
|
+
║ │ asset metadata │ │ │ │ rendering │ ║
|
|
67
|
+
║ └──────────────────┘ └──────────────────┘ │ input │ ║
|
|
68
68
|
║ │ │ prediction │ ║
|
|
69
69
|
║ └──────────────── REST (content/assets) ─────▶│ presentation │ ║
|
|
70
70
|
║ └──────────────────┘ ║
|
|
@@ -157,17 +157,17 @@ Three supervised processes run in parallel, each with its own monitor and reconn
|
|
|
157
157
|
|
|
158
158
|
```text
|
|
159
159
|
┌──────────────────────────────────────────────────────────────┐
|
|
160
|
-
│ SUPERVISION (parallel)
|
|
161
|
-
│
|
|
162
|
-
│ engine-cyberia cyberia-server cyberia-client
|
|
163
|
-
│ ┌────────────┐ ┌────────────┐ ┌────────────┐
|
|
164
|
-
│ │ monitor │ │ monitor │ │ monitor │
|
|
165
|
-
│ │ +reconnect │ │ +reconnect │ │ +reconnect │
|
|
166
|
-
│ └─────┬──────┘ └─────┬──────┘ └─────┬──────┘
|
|
167
|
-
│ │ │ │
|
|
168
|
-
│ └──────────┬──────────┴──────────┬──────────┘
|
|
169
|
-
│ ▼ ▼
|
|
170
|
-
│ all three up & connected?
|
|
160
|
+
│ SUPERVISION (parallel) │
|
|
161
|
+
│ │
|
|
162
|
+
│ engine-cyberia cyberia-server cyberia-client │
|
|
163
|
+
│ ┌────────────┐ ┌────────────┐ ┌────────────┐ │
|
|
164
|
+
│ │ monitor │ │ monitor │ │ monitor │ │
|
|
165
|
+
│ │ +reconnect │ │ +reconnect │ │ +reconnect │ │
|
|
166
|
+
│ └─────┬──────┘ └─────┬──────┘ └─────┬──────┘ │
|
|
167
|
+
│ │ │ │ │
|
|
168
|
+
│ └──────────┬──────────┴──────────┬──────────┘ │
|
|
169
|
+
│ ▼ ▼ │
|
|
170
|
+
│ all three up & connected? │
|
|
171
171
|
└────────────────────────────┬─────────────────────────────────┘
|
|
172
172
|
│
|
|
173
173
|
┌─────────────────────┼─────────────────────┐
|
|
@@ -70,7 +70,7 @@ type PlayerState struct {
|
|
|
70
70
|
FreezeReason string // "dialogue" | "inventory" | ...
|
|
71
71
|
Path []PointI // A* path (for smooth movement)
|
|
72
72
|
AOI Rectangle // current area-of-interest bounds
|
|
73
|
-
|
|
73
|
+
Progression EntityProgression // level, total XP, and progression freeze
|
|
74
74
|
}
|
|
75
75
|
```
|
|
76
76
|
|
|
@@ -131,13 +131,19 @@ z-order type
|
|
|
131
131
|
|
|
132
132
|
## Stat Aggregation
|
|
133
133
|
|
|
134
|
-
|
|
134
|
+
Players, bots, NPCs, and resources share the same progression and stat module.
|
|
135
|
+
Bots, NPCs, and resources have frozen XP. Their authored level selects the same base curve as players.
|
|
135
136
|
|
|
136
|
-
|
|
137
|
+
```text
|
|
138
|
+
Effective = max(floor, Base(Level) + ActiveOL + Temporary)
|
|
139
|
+
```
|
|
137
140
|
|
|
138
|
-
|
|
141
|
+
Each active layer with positive quantity contributes once. Each OL stat is an integer in `[-100, +100]`.
|
|
142
|
+
The server applies floors after the full sum. Equipment rules control active slots and item types.
|
|
139
143
|
|
|
140
|
-
The
|
|
144
|
+
The self snapshot carries `level`, `xp`, `levelXp`, `nextLevelXp`, and four stat arrays.
|
|
145
|
+
Other living entities carry `level` and `effectiveStats`. `statsSum` is an uncapped display summary.
|
|
146
|
+
The overhead HUD and the Stats tab display the server values. XP and level never belong to `data.stats`.
|
|
141
147
|
|
|
142
148
|
---
|
|
143
149
|
|