xyvera/content/schema/event.yaml

92 lines
2.4 KiB
YAML
Raw Normal View History

# 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.