DND Engine Registry

race

Registers under Races · source: modules/race/v1

`stat_growth` maps a stat id to a percentage growth-rate bonus (e.g. `{"strength": 25.0}` for 125% Strength growth vs. a 100% baseline — see combat-engine-readme.md → Stat Growth). `matchup_tag`, if set, is what a damage type's TypeEffectiveness lookup checks against (e.g. "undead" for Radiant's bonus) — intentionally never surfaced to the player. `player_selectable=False` marks an enemy-only race. `favored_essence_type_id`/`essence_bonus_percent` — Race's resolved Essence-contribution formula (see combat-engine-readme.md → Race): Class grants *access* only (which EssenceType(s) a character can even have, via WeaponCategory); Race grants *magnitude* via a single favored EssenceType + percentage bonus, mirroring `stat_growth`'s own favored-stat-not-a-map-across-everything shape rather than inventing a different pattern. See gamemaster/engine/essence.py's storage_capacity for where this actually feeds the formula — omit `favored_essence_type_id` (leave it None) for a race with no Essence favor at all; `essence_bonus_percent` is meaningless without it and defaults to 0.

Example Usage

resource "bird_man" {
  source: modules/race/v1
  id: "bird_man"
  name: "bird man"
  player_selectable: true
  favored_essence_type_id: "ammo"
  description: "a horific mutation caused by crazy scientist DR. Bord Crawh, He crossed human and dodo DNA and gave birth to the bird men  "
}

Arguments Reference

The following arguments are supported:

  • id - (Required) The unique id this record is registered and referenced under — what a `.resource` file's own filename-independent identity is, and what any other content's foreign-key-style field (a dungeon node's `next`, a skill node's `parent_id`, and so on) points at. community
  • name - (Required) The player-facing display label — shown everywhere a player sees this record (shop listings, inventory, character sheet, etc.); the raw id is never shown directly. community
  • stat_growth - (Optional) `stat_growth` maps a stat id to a percentage growth-rate bonus (e.g. Defaults to None. developer
  • matchup_tag - (Optional) `matchup_tag`, if set, is what a damage type's TypeEffectiveness lookup checks against (e.g. "undead" for Radiant's bonus) — intentionally never surfaced to the player. Defaults to None. community
  • player_selectable - (Optional) Defaults to True. community
  • favored_essence_type_id - (Optional) `favored_essence_type_id`/`essence_bonus_percent` — Race's resolved Essence-contribution formula (see combat-engine-readme.md → Race): Class grants *access* only (which EssenceType(s) a character can even have, via WeaponCategory); Race grants *magnitude* via a single favored EssenceType + percentage bonus, mirroring `stat_growth`'s own favored-stat-not-a-map-across-everything shape rather than inventing a different pattern. Currently registered: ammo, mana and stamina. Defaults to None. community
  • essence_bonus_percent - (Optional) Defaults to 0.0. developer
  • description - (Optional) Flavor text shown to players — pure display data with no effect on game mechanics. community