1 starter character economy bootstrap
forgejo-actions edited this page 2026-07-11 12:38:13 +00:00

Starter Character Economy Bootstrap

Starter character bootstrap is the login-server path that creates or seeds characters with deterministic placement and starter economy records. It is intentionally separate from runtime game-data loadout rules.

Purpose

Use this page when new accounts spawn without expected gold, seeded characters are missing, or starter placement differs between login and game server.

Created Versus Seeded Characters

Created characters come from normal account flows. Seeded characters are deterministic fixtures used for local/dev startup. Both must land in the same durable schema so handoff and game-server snapshots can treat them the same after login.

Do not rely on runtime encounter or quest rewards to create starter economy state. Starter bootstrap runs before the player enters the game server.

Deterministic Seed IDs

Seeded accounts and characters should use deterministic ids so local databases can be recreated without changing known dev fixtures. This is helpful for tests, screenshots, and operator docs.

If a seed changes identity, update dependent local-playtest assumptions and any docs that name the seed roster.

Start Placement Resolution

Login bootstrap resolves start zone and tile from configuration and scene data. default_spawn_tile_for_asset_root can derive a default tile from zone scene data. That start placement becomes the handoff target used by game-server activation.

If a character enters the wrong zone, check login placement before debugging movement authority.

Starter Currency Grants

Starter gold is inserted into character_currencies. The operation should be idempotent: repeated startup should not multiply starter balances. Existing rows are preserved unless an explicit migration or admin action changes them.

If starter gold is missing, confirm migration 0006 has run, the bootstrap path inserted the canonical currency id, and the login database is the one used by the game server.

Starter Inventory Hook

Starter inventory currently has a durable table and bootstrap hook even when the default starter inventory is empty. Keep the hook documented so adding starter items later does not become a one-off SQL script.

Starter items should use item ids that exist in game-data catalogs and can be loaded by runtime inventory snapshots.

Handoff Expectations

By the time login prepares a handoff, character location, appearance, starter currency, and starter inventory rows should already be durable. The game server should only load and activate that state; it should not silently patch missing starter economy.

Debugging Missing Starter Gold

Inspect character creation/seed logs, character_currencies, the configured realm/database URL, and canonical currency id. If only seeded characters fail, inspect startup seeding. If only newly created characters fail, inspect the account creation path.