-
Notifications
You must be signed in to change notification settings - Fork 0
RPG Systems
Sistemas RPG são plug-ins que vêm de pacotes npm independentes do monorepo público gmcr-srd-systems.
Todos sob @lippelt/srd-*:
| ID | Pacote | Licença do conteúdo |
|---|---|---|
dnd-3.5 |
@lippelt/srd-dnd-3.5 |
OGL 1.0a |
dnd5e-2014 |
@lippelt/srd-dnd5e-2014 |
CC-BY 4.0 |
dnd5e-2024 |
@lippelt/srd-dnd5e-2024 |
CC-BY 4.0 |
pathfinder-1e |
@lippelt/srd-pathfinder-1e |
OGL 1.0a |
pathfinder-2e |
@lippelt/srd-pathfinder-2e |
ORC |
starfinder-1e |
@lippelt/srd-starfinder-1e |
OGL 1.0a |
starfinder-2e |
@lippelt/srd-starfinder-2e |
ORC |
lancer |
@lippelt/srd-lancer |
Lancer 3PP |
gumshoe |
@lippelt/srd-gumshoe |
CC-BY 3.0 |
daggerheart |
@lippelt/srd-daggerheart |
DPCGL |
candela-obscura |
@lippelt/srd-candela-obscura |
DPCGL |
Em @lippelt/srd-core:
interface System {
id: string
name: string
ruleVersion: string
attribution: string
dicePresets: DicePreset[]
conditions: ConditionDef[]
trackerFields: TrackerField[]
rules?: SystemRules // opcional — rolls customizados (advantage, crit, etc)
}Botões rápidos no Dice Roller. Categoria pode ser check, attack, damage, save, special.
{ id: 'd20-adv', label: 'd20 com vantagem', notation: '2d20kh1', category: 'check' }Opções no dropdown de status do Combat Tracker:
{ id: 'poisoned', label: 'Envenenado', summary: 'Desvantagem em ataques e testes de atributo.' }Campos extras por combatente:
{ key: 'ac', label: 'AC', kind: 'integer', min: 0, max: 30, default: 10 }
{ key: 'inspiration', label: 'Insp', kind: 'boolean', default: false }Funções puras de roll/dano:
rules?: {
roll?: (kind: string, params: any) => RollResult | null
applyDamage?: (incoming: number, target?: any) => { final: number; notes: string[] }
}kind é convenção do sistema (ex.: 'attack', 'save', 'damage'). O caller passa params; o sistema retorna um RollResult pra ir pro histórico.
- Crie
packages/<nome>/nogmcr-srd-systems. - Implemente o contrato.
- Adicione ao
npm installeregister()nogm-control-room/client/src/features/systems/registerSystems.ts. - Use
"system": "<nome>"em campaigns/*.json.
Veja packages/dnd5e-2014/ como referência.
Repositório separado gmcr-srd-systems-private — fan content, não publicado no npm. Setup local-only documentado lá.
registerSystems() em client/src/features/systems/registerSystems.ts é chamado uma vez no bootstrap (main.tsx) antes da UI montar. register() é idempotente.
import { register, getSystem } from '@lippelt/srd-core'
// 1. registrar
register(dnd5e2014)
// 2. resolver (sync — sem await)
const sys = getSystem('dnd5e-2014')useActiveSystem() é o hook React que resolve baseado em campaign.system. Retorna null se não houver sistema, e a UI cai pros defaults genéricos.
Campanhas sem "system" declarado:
- Dice Roller só tem o input de notação livre.
- Tracker não tem
trackerFields. - Status dropdown usa
STATUS_PRESETSgenéricos.
Funcionam mesmo assim — sistema é opcional, não obrigatório.
Setup
Conteúdo
Ferramentas
- Combat Tracker
- Creature Library
- Encounter Library
- Clocks
- Party Resources
- Random Tables
- Dice and Roll History
- GM Notes
- RPG Systems
Display
Arquitetura