ceryliae / DnDAppFiles

Files for the Fifth Edition apps by Lion's Den
613 stars 550 forks source link

Update py script to source Classes from Base/Sub files, content filtering, output controls and more #276

Closed stevenjonescgm closed 1 year ago

stevenjonescgm commented 7 years ago

I added to the create_compendiums.py script because I wanted a compendium that excluded the Modern content and (optionally) flattened out subclasses.

I'm happy to make changes before merging upstream, or I'll just continue to maintain my fork for personal use.

Here are the changes summarized:

  1. Content: Fixed file names in Homebrew and Unearthed Arcana
  2. Script: compiles an Unearthed Arcana Compendium.xml but not add that to Full Compendium.xml to be consistent with previous behavior
  3. Content: Updated Templates.xml to include notes for values and reference newer app features
  4. Script: load and process partial files for BaseClasses and SubClasses
    1. using <baseclass><name>Fighter</name>... <subclass baseclass="Fighter">... as a replacement for <class>...
    2. Base/Sub files expected in directory Character/Classes/<class-name>/<class-name> (<subclass-name>).xml
  5. Script: added argument processing and standard help features python ./create_compendiums.py -h 6 Script: add flags to manage whether subclasses are combined into one and/or are compiled separately (with or without base included) --basetype-format=complete --subtype-format=reference etc
  6. Script: add flags so that certain tagged content can be excluded from compendiums
    1. the script looks for XML attributes which I've named ['UA', 'MF', 'HB', 'PS', 'IL'] for
      • UA Unearthed Arcana
      • MF Modern and Future
      • HB HomeBrew and 3rd Party
      • PS Psuedo Spells - class features added to the Spells list to compensate for lack of support in app, eg Maneuvers and Eldritch Invocations
      • IL Inline Lists - repeated class feature options for later levels (eg Warlock Eldritch Invocations and Sorcerer Metamagic. I'd prefer to use back-references, but upstream excludes level-prerequisite features from early auto-level blocks
    2. without using flags, MF and HB are excluded as they are not core D&D content

TODO:

stevenjonescgm commented 1 year ago

This was a fun exercise in python, but superseded by dndbeyond when that launched many years ago