Homebrew: Subclass

From 5etools Community Wiki
Jump to: navigation, search

framless
v1.1.0

Building a subclass

As with any Homebrew item, make sure you have reviewed the _Meta section. If your file doesn't have it, it won't work.

Basic skeleton

To start, copy the following code block and fill the empty "" values.

Subclass and Subclass Feature code block
"subclass": [
    {
        "name": "",
        "source": "",
        "className": "",
        "classSource": "",
        "shortName": "",
        "subclassFeatures": [
            ""
        ]
    }
],
"subclassFeature": [
    {
        "name": "",
        "source": "",
        "className": "",
        "classSource": "",
        "subclassShortName": "",
        "subclassSource": "",
        "level": 1,
        "entries": [
            ""
        ]
    }
]

To have more than one subclass or subclass feature, add a new object block {} after the last curly brace }. REMEMBER to separate the objects with commas!

Explaining Subclass Features

You will see that subclass features are referenced twice in the code skeleton, first inside the "subclass" and later outside of it, on their own section. This is due to how the features are structured. They are their own data object, just like items or spells are, and these are referenced inside the subclass that uses them. This allows for deeper customization, plus you can have the same feature in different classes/subclasses without code repetition.

Another additional benefit is that you can refer to WotC subclass features, which is really useful if you are doing slight modifications to an official class/subclass.

  • "name" — name of the feature.
  • "source" — make sure it is the same as the "json" key in the _meta.
  • "className" — name of the class the subclass belongs to.
  • "classSource""json" source of the class the subclass belongs to (defaults to PHB).
  • "subclassShortName"shortname of the subclass the feature belongs to.
  • "subclassSource" — make sure it is the same as the "json" key in the _meta.
  • "level" — level at which the feature is gained.
  • "entries" — text of the feature. Can write several text strings ("") separated with commas. For more info on entries, check the Renderer Demo.

Referencing Features in a Class

The identifier for subclass features follows this structure:

<name>|<className>|<classSource>|<subclassShortName>|<subclassSource>|<level>|<source>

So for example, the first features of the Champion fighter subclass are referenced as follows: (note that "source" is not defined, as this is not homebrew content)

"subclassFeatures": [
    "Champion|Fighter|PHB|Champion|PHB|3",
    "Remarkable Athlete|Fighter|PHB|Champion|PHB|7"
]

Notice that the second feature that the champion gains at level 3, improved critical, is not referenced. This is because it is referenced in the "subclassFeature" itself, in the "entries" section. Thus, we can reference all the features a subclass gains in a level from the first one.

{
    "name": "Champion",
    [...]
    "entries": [
        "The archetypal Champion focuses on...",
        {
            "type": "refSubclassFeature",
            "subclassFeature": "Improved Critical|Fighter|PHB|Champion|PHB|3"
        }
    ]
}

More options

Make sure you are adding these blocks in the same level as the "name", "source", etc.

Caster Progression

  • Choose between "full", "1/2", "1/3" or "pact".
"casterProgression": "pact"

Spellcasting Ability

Use the first 3 letters of the characteristic.

"spellcastingAbility": "int"

Subclass Table Groups

Adds extra columns to the class table. Each object can have an optional "title", which will show up over all the columns for that group (see "Spell Slots Per Level" in Wizard)

"subclassTableGroups": [
    {
        "title": "",
        "colLabels": [
            "",
            ""
        ],
        "rows": [
            [
                "",
                ""
            ],
            [
                "",
                ""
            ]
        ]
    }
]
  • "colLabels" — each string ("") is the name of a column. Write as many labels as columns you want, and separate each string with a comma.
  • "rows" — each array ([]) is a different row, and each string ("") is a cell in that row. The cells are in the same order as the columns.

Subclass Spells

  • This allows the website to filter spells by the subclass. Write the name of the spell as a string, separating strings with commas.
"subclassSpells": [
    "Healing Word"
]
  • If the spell is not from the Player's Handbook, the source needs to be defined
"subclassSpells": [
    {
        "name": "Absorb Elements",
        "source": "XGE"
    }
]
  • It is also possible to copy a whole class spell list
"subclassSpells": [
    {
        "class": "Warlock",
        "source": "PHB"
    }
]

Reference Tag

How to link to entries within strings

{@class <name_of_class> | <json_source> | <optional_text_information> | <optional_subclass_name> | <json_source_if_optional_Subclass> | <x-y>}

Where X is the level index (its level); and where Y is feature index for that level.

Example:
{@class artificer|uaartificer}
{@class fighter|phb|optional link text added with another pipe}
{@class fighter|phb|subclasses added|Eldritch Knight}
{@class fighter|phb|and class feature added|Eldritch Knight|phb|2-0}


You can also link to subclass features

{@subclassFeature <name_of_feature> | <name_of_class> | <class_source> | <name_of_subclass> | <subclass_source> | <level> | <subclass_feature_source> | <optional_display_text> }

Class source is assumed to be PHB. Subclass source is assumed to be PHB. Subclass feature source is assumed to be the same as subclass source.

Example:
{@subclassFeature Path of the Berserker|Barbarian||Berserker||3}
{@subclassFeature Alchemist|Artificer|ERLW|Alchemist|ERLW|3}
{@subclassFeature Path of the Battlerager|Barbarian||Battlerager|SCAG|3}
{@subclassFeature Blessed Strikes|Cleric||Life||8|UAClassFeatureVariants}
{@subclassFeature Path of the Berserker|Barbarian||Berserker||3||optional display text}

🗄️ Reference Files:
[[ |🛢️ Requirements Specs (Schemata) ]]
[[ |🧾 Blank Template]]
[[ |📖 Sample JSON]]
[[ |💾 Functional Example]]
[[ |📚 Repository of Other Examples]]

Homebrew Support


Known Issues
Looks like its perfect... (Did we miss anything?)


NAME OF THE ISSUE
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Work Around  : Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


FAQ
Nothing's here (Do you have any suggestions?)
Best Practices
None as yet (Do you have any suggestions?)



Related Features



Did that answer your question(s)?

If not please check the under Support; Troubleshooting or the Known Issues page for further guidance, or go to the Discord community and leave a comment in the issues channel.

If you enjoy the project, please follow this link to see how you can contribute and help make it even better.