xyvera/content/schema/job.yaml
caoimhinr fb00954954 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>
2026-06-02 23:33:06 +02:00

99 lines
2.9 KiB
YAML

# job.yaml — schema definition for village job/assignment slot definitions
#
# Jobs define what characters can be assigned to and what passive resources
# they generate. All tuning values should be content-driven so the economy
# can be rebalanced without code changes.
#
# PoC jobs (from spec): mining, woodcutting, research, construction, farming
$schema: "xyvera/content-schema/job/v1"
type: object
required:
- id
- name
- profession
- output_resource
- base_output_per_hour
- max_slots
properties:
id:
type: string
pattern: "^[a-z][a-z0-9_]*$"
example: "lumber_camp"
name:
type: string
example: "Lumber Camp"
description:
type: string
example: "Workers harvest wood from the forest edge. Essential for construction and upgrades."
profession:
type: string
enum: [miner, lumberjack, researcher, construction, farmer, trainer]
description: "Determines which characters receive the suitability bonus when assigned here."
output_resource:
type: string
description: "Resource ID produced passively by characters in this job slot."
example: "wood"
secondary_output:
type: object
description: "Optional secondary resource produced at a lower rate."
properties:
resource:
type: string
rate_fraction:
type: number
minimum: 0.0
maximum: 1.0
description: "Fraction of base_output_per_hour for the secondary resource."
additionalProperties: false
base_output_per_hour:
type: number
minimum: 0.0
description: >
Base resource units generated per assigned character per hour.
Actual output = base * suitability_multiplier * character_level_factor.
Level factor formula: (level / max_level) ^ 0.5 — tunable in constants.yaml.
max_slots:
type: integer
minimum: 1
maximum: 10
description: "Maximum number of characters that can be simultaneously assigned to this job."
unlock_condition:
type: object
description: "What the player must have done before this job slot is available."
properties:
building_level:
type: integer
minimum: 0
description: "Village building level required to unlock this slot."
prerequisite_job_id:
type: string
description: "Another job that must be unlocked first."
additionalProperties: false
manual_work_eligible:
type: boolean
default: false
description: >
If true, this job can be targeted by the manual micro-management action.
Only one or two jobs should have this enabled in PoC to keep the system focused.
passive_cap_hours:
type: number
minimum: 1.0
default: 8.0
description: >
Hours after which passive accumulation stops until the player collects.
Prevents long absences from breaking the economy. Default is 8 hours
matching the server-side MAX_PASSIVE_HOURS constant.