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:
commit
fb00954954
37 changed files with 2730 additions and 0 deletions
96
content/schema/resource.yaml
Normal file
96
content/schema/resource.yaml
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
# resource.yaml — schema definition for resource/currency type definitions
|
||||
#
|
||||
# Defines what each resource is, how it behaves, and display metadata.
|
||||
# The economy starts with seven core resources as specified in the concept doc.
|
||||
|
||||
$schema: "xyvera/content-schema/resource/v1"
|
||||
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- name
|
||||
- category
|
||||
- description
|
||||
|
||||
properties:
|
||||
|
||||
id:
|
||||
type: string
|
||||
pattern: "^[a-z][a-z0-9_]*$"
|
||||
description: "Matches the wallet key and all internal references."
|
||||
example: "wood"
|
||||
|
||||
name:
|
||||
type: string
|
||||
example: "Wood"
|
||||
|
||||
description:
|
||||
type: string
|
||||
example: "Basic construction material harvested from forested areas."
|
||||
|
||||
category:
|
||||
type: string
|
||||
enum:
|
||||
- soft_currency # gold, wood, stone — general economy resources
|
||||
- knowledge # research and skill upgrade material
|
||||
- stamina # action budget (not in core 7, reserved for future)
|
||||
- premium # diamond — sparse, monetisation-adjacent
|
||||
- ascension # character ascension materials
|
||||
- event # event-specific temporary currencies
|
||||
- guild # guild and territory tokens
|
||||
description: "Resource family used to group items in UI and apply economy rules."
|
||||
|
||||
is_spendable:
|
||||
type: boolean
|
||||
default: true
|
||||
description: "Can this resource be directly spent by the player? False for passive trackers."
|
||||
|
||||
is_capped:
|
||||
type: boolean
|
||||
default: false
|
||||
description: "Whether this resource has a maximum carry limit."
|
||||
|
||||
carry_cap:
|
||||
type: integer
|
||||
minimum: 1
|
||||
description: "Maximum held quantity. Only meaningful when is_capped is true."
|
||||
|
||||
decay_rate:
|
||||
type: number
|
||||
minimum: 0.0
|
||||
default: 0.0
|
||||
description: "Fraction lost per hour (0 = no decay). Reserved for future scarcity mechanics."
|
||||
|
||||
icon:
|
||||
type: string
|
||||
description: "Path to the icon asset relative to godot/assets/."
|
||||
example: "icons/resources/wood.png"
|
||||
|
||||
color_hex:
|
||||
type: string
|
||||
pattern: "^#[0-9a-fA-F]{6}$"
|
||||
description: "UI accent color for this resource."
|
||||
example: "#8B5E3C"
|
||||
|
||||
sources:
|
||||
type: array
|
||||
description: >
|
||||
Informational list of where this resource comes from.
|
||||
Used to power the inventory help tooltip so players always know
|
||||
how to get more of it. (Economy Rule 4: inventory confusion is an economy bug.)
|
||||
items:
|
||||
type: string
|
||||
example:
|
||||
- "Lumber Camp passive output"
|
||||
- "Manual wood-chopping action"
|
||||
- "Event shop purchase"
|
||||
|
||||
sinks:
|
||||
type: array
|
||||
description: "Informational list of what this resource is spent on."
|
||||
items:
|
||||
type: string
|
||||
example:
|
||||
- "Building upgrades"
|
||||
- "Character ascension materials"
|
||||
- "Construction job slot unlocks"
|
||||
Loading…
Add table
Add a link
Reference in a new issue