Update readme and clean up
This commit is contained in:
parent
6a3157762a
commit
435d555394
17 changed files with 320 additions and 486 deletions
225
README.md
225
README.md
|
@ -1,6 +1,20 @@
|
|||
# Playbill Builder CLI
|
||||
# Muse
|
||||
|
||||
This is a CLI tool for compiling Markdown and YAML files into a validated Playbill for [Proscenium](https://proscenium.game)
|
||||
A CLI for wrangling directories of source files.
|
||||
|
||||
Like a static generator, but for whatever.
|
||||
|
||||
## Overview
|
||||
|
||||
**Muse** is a CLI and toolchain for operating on directories of
|
||||
json, yaml, toml, and markdown files. Each file can specify any shape
|
||||
of data. Muse scans included files, parses them into data, and streams
|
||||
the loaded data through processors and plugins.
|
||||
|
||||
Each processor can modify the data at compile time, as well as enact
|
||||
side effects such as writing files to disk.
|
||||
|
||||
Muse does not edit source files, it only reads them in.
|
||||
|
||||
## Usage
|
||||
|
||||
|
@ -9,209 +23,24 @@ Usage:
|
|||
muse [/path/to/binding.yaml] <options>
|
||||
|
||||
Options:
|
||||
--check Only load and check the current binding and resources, but do not compile
|
||||
--outfile, -o Specify the output file path. If not specified, output to stdout
|
||||
--watch, -w Watch the directory for changes and recompile
|
||||
--renderer, -r Specify the output renderer. Options: json, html
|
||||
--stdout -s Output final data to stdout
|
||||
--verbose, -v Enable verbose logging
|
||||
--help, -h Show this help message
|
||||
```
|
||||
|
||||
## Binding File
|
||||
|
||||
Each Muse project should specify a `binding.yaml` file with the following shape:
|
||||
Each Muse project should specify a `binding` file with the following shape:
|
||||
```yaml
|
||||
name: My Playbill # Required
|
||||
author: My Name # Required
|
||||
version: 0.0.1 # Required
|
||||
extend: ../another-playbill # Optional
|
||||
include:
|
||||
- ../another-project # Optional
|
||||
files: # Optional
|
||||
- "**/*.yaml"
|
||||
styles: # Optional
|
||||
- stylesheet.css
|
||||
terms: # Optional
|
||||
Some Term: Some Definition
|
||||
Another Term: Another Definition
|
||||
contentKey: "content" # Optional
|
||||
options: # Optional
|
||||
someOption: someValue
|
||||
processors:
|
||||
- first-processor
|
||||
- second-processor
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
Note that every Playbill component definition can define the following properties:
|
||||
|
||||
```yaml
|
||||
id: an-id # defaults to a slugified version of the file name
|
||||
name: Component Name # defaults to the file name
|
||||
description: Markdown description # defaults to a placeholder
|
||||
categories: # defaults to no categories
|
||||
- list
|
||||
- of
|
||||
- categories
|
||||
```
|
||||
|
||||
### Ability Definition
|
||||
|
||||
```yaml
|
||||
$define: ability
|
||||
type: <ability type> # Defaults to 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: <damage type> # Type of damage dealt by this ability (default phy)
|
||||
roll: <roll type> # Roll type for this ability (default none)
|
||||
```
|
||||
|
||||
### Blueprint Definition
|
||||
|
||||
```yaml
|
||||
$define: blueprint
|
||||
species: species-id # ID of the species this blueprint is for
|
||||
items: # List of item IDs (default empty)
|
||||
- item-id
|
||||
abilities: # List of ability IDs (default empty)
|
||||
- ability-id
|
||||
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: <prowess> # Starting muscle prowess (default novice)
|
||||
focus: <prowess> # Starting focus prowess (default novice)
|
||||
knowledge: <prowess> # Starting knowledge prowess (default novice)
|
||||
charm: <prowess> # Starting charm prowess (default novice)
|
||||
cunning: <prowess> # Starting cunning prowess (default novice)
|
||||
spark: <prowess> # Starting spark prowess (default novice)
|
||||
```
|
||||
|
||||
### Item Definition
|
||||
|
||||
```yaml
|
||||
$define: item
|
||||
type: <item type> # Defaults to wielded
|
||||
rarity: <rarity> # Defaults to common
|
||||
affinity: <roll type> # Defaults to none
|
||||
damage: 0 # Defaults to 0
|
||||
damageType: <damage type> # Defaults to phy
|
||||
hands: 1 | 2 # Only for wielded items
|
||||
slot: <item 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
|
||||
$define: method
|
||||
curator: Someone # The name of the curator
|
||||
abilities: # A 2-d array of ability IDs
|
||||
- [rank-1-ability-id-one, rank-1-ability-id-two]
|
||||
- [rank-2-ability-id-one]
|
||||
```
|
||||
|
||||
### Resource Definition
|
||||
|
||||
```yaml
|
||||
$define: resource
|
||||
type: <resource type> # Defaults to text
|
||||
url: https://url.com/image.jpeg # Only for image resources
|
||||
data: <a 2-d array of strings> # Only for table resources
|
||||
```
|
||||
|
||||
#### `Resource Type` Options
|
||||
|
||||
- `text`
|
||||
- `image`
|
||||
- `table`
|
||||
|
||||
### Rule Definition
|
||||
|
||||
```yaml
|
||||
$define: rule
|
||||
overrule: another-rule-id # Optional
|
||||
order: 0 # Optional
|
||||
```
|
||||
|
||||
### Species Definition
|
||||
|
||||
```yaml
|
||||
$define: species
|
||||
hands: 2 # Defaults to 2
|
||||
abilities: # A list of innate ability IDs
|
||||
- some-ability-id
|
||||
- another-ability-id
|
||||
ap: 0 # Starting AP modifier
|
||||
hp: 0 # Starting HP modifier
|
||||
ep: 0 # Starting EP modifier
|
||||
xp: 0 # Starting XP modifier
|
||||
muscle: <prowess> # Defaults to novice
|
||||
focus: <prowess> # Defaults to novice
|
||||
knowledge: <prowess> # Defaults to novice
|
||||
charm: <prowess> # Defaults to novice
|
||||
cunning: <prowess> # Defaults to novice
|
||||
spark: <prowess> # Defaults to novice
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue