Begin fleshing out readme

This commit is contained in:
Endeavorance 2025-02-20 17:32:38 -05:00
parent cb5e0396e2
commit 29e1c3c09e
2 changed files with 79 additions and 2 deletions

View file

@ -4,4 +4,60 @@ This is a CLI tool for compiling YAML files into a validated Playbill for [Prosc
## Usage ## Usage
todo ```
Usage:
muse [/path/to/binding.yaml] <options>
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
```

View file

@ -79,6 +79,25 @@ export const PlaybillResourceSchema = z.object({
description: DescriptionSchema, 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 // Playbill component shapes
export const AbilitySchema = PlaybillResourceSchema.extend({ export const AbilitySchema = PlaybillResourceSchema.extend({
$define: z.literal("ability"), $define: z.literal("ability"),
@ -89,6 +108,7 @@ export const AbilitySchema = PlaybillResourceSchema.extend({
banes: z.array(z.string()).default([]), banes: z.array(z.string()).default([]),
boons: z.array(z.string()).default([]), boons: z.array(z.string()).default([]),
}); });
export type PlaybillAbility = z.infer<typeof AbilitySchema>; export type PlaybillAbility = z.infer<typeof AbilitySchema>;
export const EntitySchema = PlaybillResourceSchema.extend({ export const EntitySchema = PlaybillResourceSchema.extend({
@ -97,8 +117,9 @@ export const EntitySchema = PlaybillResourceSchema.extend({
species: z.string(IDSchema), species: z.string(IDSchema),
abilities: z.array(IDSchema), abilities: z.array(IDSchema),
stats: StatSpreadSchema, stats: StatSpreadSchema,
statMaxModifiers: StatSpreadSchema,
talents: TalentSpreadSchema, talents: TalentSpreadSchema,
damage: z.number().default(0),
baggage: z.array(BaggageSchema).default([]),
}); });
export const ItemTagSchema = PlaybillResourceSchema.extend({ export const ItemTagSchema = PlaybillResourceSchema.extend({