Initial scaffold: Nakama backend, Godot client, content schema

Sets up the Step 1 (Project Foundation) and Step 2 (Content Schemas) scaffold
from the implementation sequence. Includes Docker Compose stack, Nakama
TypeScript module stubs, PostgreSQL migration, Godot 4 project shell with
scene stubs and NakamaClient singleton, YAML content schemas for all entity
types, and example data for 3 characters, 2 jobs, and all 7 core resources.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
caoimhinr 2026-06-02 23:33:06 +02:00
commit fb00954954
37 changed files with 2730 additions and 0 deletions

91
content/schema/event.yaml Normal file
View file

@ -0,0 +1,91 @@
# event.yaml — schema definition for live-ops event entries
#
# Events are content-defined, not code-defined. Adding a new event of an
# existing template type requires only a new YAML file, no code changes.
#
# PoC event templates (from spec):
# - resource_push: multiplied resource gain window
# - combat_score: score-attack combat ranking
# - profession_spotlight: boosted output for one profession
$schema: "xyvera/content-schema/event/v1"
type: object
required:
- id
- name
- template
- schedule
- rewards
properties:
id:
type: string
pattern: "^[a-z][a-z0-9_]*$"
name:
type: string
description:
type: string
template:
type: string
enum: [resource_push, combat_score, profession_spotlight]
description: >
Determines which server-side event handler processes this event.
New templates require code; new instances of existing templates do not.
schedule:
type: object
required: [start, end]
properties:
start:
type: string
format: date-time
end:
type: string
format: date-time
timezone_note:
type: string
description: "Optional human-readable timezone note for players."
template_params:
type: object
description: >
Template-specific configuration. Contents depend on the template value.
resource_push: { resource_id, multiplier }
combat_score: { stage_id, score_formula }
profession_spotlight: { profession, bonus_multiplier }
additionalProperties: true
rewards:
type: array
description: "Milestone reward tiers. Players claim each tier once."
items:
type: object
required: [milestone, reward]
properties:
milestone:
type: integer
minimum: 1
description: "Cumulative event score or points required to unlock this reward tier."
reward:
type: object
description: "Map of resource_id to amount granted at this milestone."
additionalProperties:
type: integer
minimum: 1
banner_id:
type: string
description: "Optional linked banner that runs alongside this event."
calendar_visible_from:
type: string
format: date-time
description: >
When this event appears on the player's calendar preview.
Must be earlier than schedule.start. Ensures low-FOMO scheduling
visibility per design spec.