Skip to content

[BUG] Add missing subtype field to Creature model #936

@calumbell

Description

@calumbell

Bug description

Many creatures in the O5e dataset contain a creature subtype in their document sources. Take the example of the Merfolk flagged in issue #923

Compare its entry in the WotC SRD 5.1 (pp. 332)
Image

To the representation on the Open5e site (https://open5e.com/monsters/srd_merfolk)

Image

Notice that the Creature's subtype in the source document (the merfolk in parenthesis underneath the creature's name) is not included in the API response. Looking into the Creature model and things are a little confusing:

  "key": "srd_merfolk",
   "name": "Merfolk",
   "document": {
       "name": "System Reference Document 5.1",
       "key": "srd-2014",
        ...
   },
   "type": {
       "name": "Humanoid",
       "key": "humanoid"
   },
  "category": "Monsters",
   "subcategory": null,

There seems to be some muddiness of terms here: type (a FK to the CreatureType model) represents a creatures type (ie. humanoid, aberration) while category intended to be the list it is included in the source document. ie. in the srd-2014 there are Monster, Miscellaneous Creatures and Nonplayer Characters lists. subcategory seems to convey how certain statblocks are grouped together in certain documents (ie. skeletons in SRD 2014:

Image

A field to include subtype information appears to be absent from the Creature model, best I can tell. The addition of a subtype field is probably called for to support the resolution of this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions