Data model
Comprehensive Rules
Every numbered rule, verbatim, with its parents, cross references and examples.
9 columns. Every value below is generated from the provenance registry.
| Field | Type | Source | Updated | Written by |
|---|---|---|---|---|
| rule_number | string | wotc | on demand | scripts/seed-rules.ts |
| Rule number as printed, e.g. '509.1a'. Primary key. | ||||
| rule_text | string | wotc | on demand | scripts/seed-rules.ts |
| The rule's text, verbatim. | ||||
| parent_rule_number | string | null | wotc | on demand | scripts/seed-rules.ts |
| The rule this one sits under, e.g. '509.1' for '509.1a'; NULL at the top level. | ||||
| section_title | string | null | wotc | on demand | scripts/seed-rules.ts |
| Title of the containing section, e.g. 'Attacking'. | ||||
| chapter_title | string | null | wotc | on demand | scripts/seed-rules.ts |
| Title of the containing chapter, e.g. 'Turn Structure'. | ||||
| sort_key | string | null | wotc | on demand | scripts/seed-rules.ts |
| Zero-padded key that sorts rules in printed order, which their numbers do not do lexically. | ||||
| rule_references | string[] | null | wotc | on demand | scripts/seed-rules.ts |
| Other rule numbers this rule cites, parsed from its text. | ||||
| examples | string[] | null | wotc | on demand | scripts/seed-rules.ts |
| The rule's own 'Example:' paragraphs, split out. | ||||
| concept_tags | string[] | null | calculated | on demand | scripts/seed-rules.ts (post-process) |
| Glossary concept names mentioned by this rule, matched during seeding. Links a rule to the taxonomy. | ||||
TypeScript model
interface game_rules {
rule_number: string
rule_text: string
parent_rule_number: string | null
section_title: string | null
chapter_title: string | null
sort_key: string | null
rule_references: string[] | null
examples: string[] | null
concept_tags: string[] | null
}