ebullient / ttrpg-convert-cli

Utility to convert JSON data (for content you own) from 5etools or pf2etools into Obsidian-friendly Markdown.
https://www.ebullient.dev/projects/ttrpg-convert-cli/
Apache License 2.0
202 stars 42 forks source link

🐛 Homebrew subraces aren't included #512

Open Suamppa opened 3 months ago

Suamppa commented 3 months ago

If a homebrew race includes subraces as well, those subraces don't get included in the resulting files even if they work on 5eTools. I tested this with both separate subrace definition JSON files and by including the subraces in the same file as the main race. I also tested this with a race from the 5eTools homebrew repository called Middle Finger of Vecna; Archon, which includes subraces defined in the same file. Only the base race is included in all cases. I'm considering this a bug because I'm at a point where all other homebrews I'm including work as expected except subraces.

Homebrew subrace parsing should work the same as core subraces, generating files such as elf.md, elf-high.md, and elf-wood.md. This should happen for any homebrew race that works as expected on 5eTools, where subraces are generated in the format Base (Sub), e.g. Elf (High).

Instead, in the case of the Archon example file, a single file called archon-mfov-archon.md is generated with no info on the subraces.

Configuration

Config: This is the config that reproduces the issues with the example from the 5eTools homebrew repository.

{
  "from": ["HAT-LMI", "MCV2DC", "TCE", "XGE"],
  "paths": {
    "compendium": "/z_Reference/compendium/",
    "rules": "/z_Reference/rules/"
  },
  "template": {
    "background": "../examples/templates/tools5e/images-background2md.txt",
    "monster": "../examples/templates/tools5e/monster2md-yamlStatblock-body.txt",
    "object": "../examples/templates/tools5e/object2md-yamlStatblock-body.txt",
    "item": "../examples/templates/tools5e/images-item2md.txt",
    "race": "../examples/templates/tools5e/images-race2md.txt",
    "spell": "../examples/templates/tools5e/images-spell2md.txt",
    "vehicle": "../examples/templates/tools5e/images-vehicle2md.txt"
  },
  "useDiceRoller": true,
  "yamlStatblocks": true,
  "tagPrefix": "reference",
  "full-source": {
    "book": ["DMG", "MM", "PHB"],
    "homebrew": [
      "C:/Users/sampp/OneDrive/Tiedostot/Dungeons and Dragons/Homebrew/Middle Finger of Vecna; Archon.json"
    ]
  }
}

Log

ttrpg-convert.out.txt