From 2c42ebd246905e9a8616e3afaee355d0a22883a9 Mon Sep 17 00:00:00 2001 From: Endeavorance Date: Thu, 20 Mar 2025 14:41:00 -0400 Subject: [PATCH] Improved readme --- README.md | 156 ++++++++++++++++++++++++++++++++------------ src/define/index.ts | 6 +- 2 files changed, 116 insertions(+), 46 deletions(-) diff --git a/README.md b/README.md index e6b84a3..cc4ca57 100644 --- a/README.md +++ b/README.md @@ -18,19 +18,66 @@ Options: ## Binding File +Each Muse project should specify a `binding.yaml` file with the following shape: ```yaml -name: My Playbill # Required -author: My Name # Required -version: 0.0.1 # Required -files: # Optional +name: My Playbill # Required +author: My Name # Required +version: 0.0.1 # Required +extend: ../another-playbill # Optional +files: # Optional - "**/*.yaml" -styles: # Optional +styles: # Optional - stylesheet.css -terms: # Optional +terms: # Optional Some Term: Some Definition Another Term: Another Definition ``` +The **Binding** file is used to specify the metadata for the Playbill, as well as the files to be compiled. It is also the entry point for a project. + +When using the `muse` CLI, you must provide either a path to a `binding.yaml` file or a directory which contains a `binding.yaml` file. + +## Common Types + +Many Playbill components share common properties that expect a value +from a predefined list. These are the common types used in the Playbill. + +### `Roll` Options + +- `none` +- `attack` +- `fate` +- `muscle` +- `focus` +- `knowledge` +- `charm` +- `cunning` +- `spark` + +### `Damage Type` Options + +- `phy` (denotes "physical damage") +- `arc` (denotes "arcane damage") + +### `Prowess` Options + +- `novice` +- `adept` +- `master` + +### `Challenge` Options + +- `novice` +- `adept` +- `master` +- `theatrical` + +### `Ability Type` Options + +- `action` +- `cue` +- `trait` + ## Definition Shapes These YAML representations of definitions show the properties available for each Playbill component. @@ -51,54 +98,71 @@ categories: # default: No categories ```yaml $define: ability -type: action | cue | trait -ap: 0 -hp: 0 -ep: 0 -xp: 0 -damage: 0 -damageType: phy | arc -roll: none | attack | fate | +type: # Default: action +ap: 0 # AP cost to use this ability (default: 0) +hp: 0 # HP cost to use this ability (default: 0) +ep: 0 # EP cost to use this ability (default: 0) +xp: 0 # XP cost to learn this ability (default: 1) +damage: 0 # Damage dealt by this ability (default: 0) +damageType: # Type of damage dealt by this ability (default: phy) +roll: # Roll type for this ability (default: none) ``` ### Blueprint Definition ```yaml $define: blueprint -species: some-hypenated-id -items: +species: species-id # ID of the species this blueprint is for +items: # List of item IDs (default: empty) - item-id - - item-id-two - - item-id-three -abilities: +abilities: # List of ability IDs (default: empty) - ability-id - - ability-id-two - - ability-id-three -ap: 0 -hp: 0 -ep: 0 -xp: 0 -muscle: novice | adept | master -focus: novice | adept | master -knowledge: novice | adept | master -charm: novice | adept | master -cunning: novice | adept | master -spark: novice | adept | master +ap: 0 # Starting AP (default: 4) +hp: 0 # Starting HP (default: 5) +ep: 0 # Starting EP (default: 1) +xp: 0 # Starting XP (default: 0) +muscle: # Starting muscle prowess (default: novice) +focus: # Starting focus prowess (default: novice) +knowledge: # Starting knowledge prowess (default: novice) +charm: # Starting charm prowess (default: novice) +cunning: # Starting cunning prowess (default: novice) +spark: # Starting spark prowess (default: novice) ``` ### Item Definition ```yaml $define: item -type: wielded | worn | trinket -rarity: common | uncommon | rare | legendary -affinity: none | attack | fate | +type: +rarity: +affinity: damage: 0 -damageType: phy | arc +damageType: hands: 1 | 2 # Only for wielded items -slot: headgear | outfit | gloves | boots | adornment | unique # Only for worn items +slot: # Only for worn items ``` +#### `Item Type` Options + +- `wielded` +- `worn` +- `trinket` + +#### `Rarity` Options + +- `common` +- `uncommon` +- `rare` +- `legendary` + +#### `Item Slot` Options + +- `headgear` +- `outfit` +- `gloves` +- `boots` +- `adornment` + ### Method Definition ```yaml @@ -113,11 +177,17 @@ abilities: ```yaml $define: resource -type: text | image | table +type: url: https://example.com/image.jpeg # Only for image resources data: # Only for table resources ``` +#### `Resource Type` Options + +- `text` +- `image` +- `table` + ### Rule Definition ```yaml @@ -138,10 +208,10 @@ ap: 0 hp: 0 ep: 0 xp: 0 -muscle: novice | adept | master -focus: novice | adept | master -knowledge: novice | adept | master -charm: novice | adept | master -cunning: novice | adept | master -spark: novice | adept | master +muscle: +focus: +knowledge: +charm: +cunning: +spark: ``` diff --git a/src/define/index.ts b/src/define/index.ts index c44c120..e527948 100644 --- a/src/define/index.ts +++ b/src/define/index.ts @@ -41,9 +41,9 @@ const BlueprintSchema = Base.extend({ species: z.string(), items: z.array(z.string()).default([]), abilities: z.array(z.string()).default([]), - ap: z.number().int().default(0), - hp: z.number().int().default(0), - ep: z.number().int().default(0), + ap: z.number().int().default(4), + hp: z.number().int().default(5), + ep: z.number().int().default(1), xp: z.number().int().default(0), muscle: z.string().default("novice"), focus: z.string().default("novice"),