From 29e1c3c09e8d98fd5a2f0f11bb9d464cc35abd41 Mon Sep 17 00:00:00 2001 From: Endeavorance Date: Thu, 20 Feb 2025 17:32:38 -0500 Subject: [PATCH] Begin fleshing out readme --- README.md | 58 +++++++++++++++++++++++++++++++++++++++++- src/playbill-schema.ts | 23 ++++++++++++++++- 2 files changed, 79 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0ecb6d6..b09e59f 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,60 @@ This is a CLI tool for compiling YAML files into a validated Playbill for [Prosc ## Usage -todo +``` +Usage: + muse [/path/to/binding.yaml] + +Options: + --check Only load and check the current binding and resources, but do not compile + --write Write the output to a file. If not specified, outputs to stdout + --outfile Specify the output file path [default: playbill.json] + --verbose, -v Verbose output + --help, -h Show this help message +``` + +## Binding File + +```yaml +$binding: playbill +id: the-playbill-id +name: My Playbill +author: My Name +version: 0.0.1 +files: # optional + - "**/*.yaml" +``` + +## Definable Playbill Resources + +- ability +- species +- entity +- item +- tag +- lore +- method +- rule + +### Shape: Ability + +```yaml +$define: ability # Required +id: ability-id # Required +name: Ability Name # Required +description: Some description # Required +type: action | cue | trait # Required +costs: # Optional, and each subfield is optional + ap: 1 + hp: 1 + xp: 1 + ep: 1 +roll: none (default), fate or a talent # Optional +boons: # Optional + - First boon + - Second boon +banes: # Optional + - First bane + - Second bane + +``` diff --git a/src/playbill-schema.ts b/src/playbill-schema.ts index 2412eea..fd88d8c 100644 --- a/src/playbill-schema.ts +++ b/src/playbill-schema.ts @@ -79,6 +79,25 @@ export const PlaybillResourceSchema = z.object({ description: DescriptionSchema, }); +// An object with optional properties to define passive effects +// offered from an ability. These are aggregated by the game +// engine at runtime to determine the final stats of a character. +export const AbilityEffectSchema = z.object({ + bonusMaxHp: z.number().optional(), + bonusMaxAp: z.number().optional(), + muscleProwess: TalentProwessSchema.optional(), + knowledgeProwess: TalentProwessSchema.optional(), + focusProwess: TalentProwessSchema.optional(), + charmProwess: TalentProwessSchema.optional(), + cunningProwess: TalentProwessSchema.optional(), + sparkProwess: TalentProwessSchema.optional(), +}); + +export const BaggageSchema = z.object({ + title: z.string(), + description: z.string(), +}); + // Playbill component shapes export const AbilitySchema = PlaybillResourceSchema.extend({ $define: z.literal("ability"), @@ -89,6 +108,7 @@ export const AbilitySchema = PlaybillResourceSchema.extend({ banes: z.array(z.string()).default([]), boons: z.array(z.string()).default([]), }); + export type PlaybillAbility = z.infer; export const EntitySchema = PlaybillResourceSchema.extend({ @@ -97,8 +117,9 @@ export const EntitySchema = PlaybillResourceSchema.extend({ species: z.string(IDSchema), abilities: z.array(IDSchema), stats: StatSpreadSchema, - statMaxModifiers: StatSpreadSchema, talents: TalentSpreadSchema, + damage: z.number().default(0), + baggage: z.array(BaggageSchema).default([]), }); export const ItemTagSchema = PlaybillResourceSchema.extend({