Families on Shared Plugins
A family does not need a plugin of its own. Its rulebook can name the plugin that plays it, and declare the keys that plugin reads. Dou Shou Qi is ranked pieces on terrain, which the chess plugin already reads; a second plugin would be the chess plugin twice.
Naming the plugin
engine:
plugin: chess
plugins:
dou-shou-qi:
ranks:
order: { rat: 1, cat: 2, ..., elephant: 8 }
gen-family-defaults.mjs carries the name into play/family-defaults.json, and the engine hands the family to that plugin. No family name is written in code.
Which family uses which
| Plugin | Families |
| Chess | Dou Shou Qi, Surakarta, Agon, Tafl |
| Draughts | Fanorona |
| Race | Royal Game of Ur, Senet, Nyout, Pachisi, Chaupar |
| Hop | Halma, Stern-Halma, Asalto |
Chess plugin keys
| Key | Meaning |
ranks | Capture by rank, with also and never exceptions (Dou Shou Qi) |
terrain.weaken, terrain.noCaptureAcross | A region that changes a piece's rank; a region whose edge no capture may cross |
regions | Named cells, rows, columns, rings from the centre, or {{ not: [...] }} |
{{ type: cross }} | A leap over a region to the first cell beyond it (the river jump) |
{{ type: rail }} | A capture along the lines through a board's arcs (Surakarta) |
inward | A step that never ends further from the centre (Agon) |
custodial | Capture by enclosing, with hostile cells, line captures and an enclosed king (Agon, Tafl) |
capturesTo: owner, dropRegions, dropFirst | A captured piece returned by its owner, where its type may go, in order |
goal | A piece reaching a region, any piece, or one escorted by its own |
quietLimit, loseWithout | A quiet stretch decided on material; a seat that loses without a given piece |
Draughts plugin keys
| Key | Meaning |
captureMethods | [approach, withdrawal]: capture a whole line by moving toward or away from it (Fanorona) |
chain | {{ optional, revisit, repeatDirection }}: a capture chain with a memory of where it has been |
Topology keys
| Key | Meaning |
Grid arcs | Pairs of edge points joined round the outside of the board (Surakarta's loops) |
Graph structure: star, grid-cross | Boards generated with their points on a lattice, so lines and jumps run straight |