Homebrew: Class

From 5etools Community Wiki
Jump to: navigation, search

framless
v1.1.0

Building a class

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

Classes have a complex data structure. The basic skeleton is a very stripped down code section; while it works, it lacks many of the functionalities 5eTools offers (such as hit dice, proficiencies, fluff, etc.) Make sure you go through this whole page, and if you have any questions feel free to ask them on the Discord server.

Basic skeleton

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

Class and Class Feature code block
"class": [
    {
        "name": "",
        "source": "",
        "classFeatures": [
            ""
        ]
    }
],
"classFeature": [
    {
        "name": "",
        "source": "",
        "className": "",
        "classSource": "",
        "level": 1,
        "entries": [
            ""
        ]
    }
]

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

Explaining Class Features

You will see that class features are referenced twice in the code skeleton, first inside the "class" 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 class 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 class 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 feature belongs to (note that you can reference features from different classes).
  • "classSource""json" source of the class the feature belongs to.
  • "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 class features follows this structure:

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

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

"classFeatures": [
    "Fighting Style|Fighter|PHB|1",
    "Second Wind|Fighter|PHB|1",
    "Action Surge|Fighter|PHB|2"
]

For features in which the class would gain a subclass feature, they should be described as follows:

"classFeatures": [
    {
        "classFeature": "Martial Archetype|Fighter|PHB|3",
        "gainSubclassFeature": true
    }
]


Subclasses

There are 2 different ways to write subclasses, although the internal structure of them is basically the same. They can either be their own data block, like "class", or be inside the class they belong to. When using the latter method, the structure is:

"subclasses": [
    {
        "name": "",
        "source": "",
        "shortName": "",
        "subclassFeatures": [
            ""
        ]
    }
]

For more information about the structure of subclasses, see Subclass

  • When writing a subclass inside a class, the keys "className" and "classSource" are not needed, as it defaults to the class it is in.

More options

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

Hit Dice

  • The "number" is the ammount of hit dice you roll (1 in all official classes), and the "faces" the size of the die.
"hd": {
    "number": 1,
    "faces": 10
}

Saves proficiency

  • The saves in which the class is proficient. Write the first 3 letters of the characteristic.
"proficiency": [
    "dex",
    "int"
]

Class 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)
"classTableGroups": [
    {
        "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.

Starting Proficiencies

Proficiencies can be defined for armor, weapons, tools and skills. They are all located inside the same "startingProficiencies": {} object, separated by commas.

Armor

  • Choose between "light", "medium", "heavy" and "shields".
"startingProficiencies": {
    "armor": [
        "light",
        "shields"
    ]
}
  • You can also choose to render a different string of text that will override the default ones, while keeping the data intact.
"armor": [
    {
        "proficiency": [
            "light",
            "shields"
        ],
        "full": "The complete text for this proficiency"
    }
]

Weapons

  • "simple" and "martial" are rendered as "x weapons", but you can write any string that you want.
"weapons": [
    "simple",
    "martial"
]

Tools

  • Write the name of any tool or artisan tools. Multiple tools are different strings ("") separated with commas.
"tools": [
    "alchemical supplies"
]

Skills

  • Write the name of the skill followed by the word "true".
"skills": [
    {
        "arcana": true,
        "history": true
    }
]
  • You can also choose from a list. <code"count" is the ammount of skills you can pick.
"skills": [
    {
        "choose": {
            "from": [
                "arcana",
                "history",
                "investigation"
            ],
            "count": 2
        }
    }
]

Starting Equipment

  • The different strings in "default" will appear as a list in the corresponding section.
"startingEquipment": {
    "default": [
        ""
    ],
    "additionalFromBackground": true,
    "goldAlternative": ""
}
  • "additionalFromBackground""true" or "false" depending on if you get the equipment from your background.
  • "goldAlternative" — an optional line, in case you want to describe the alternative starting gold option. The format should be a {@dice } tag.

Multiclassing

  • For the requirements you can mix between strict ones, or several options.Always use the first three letters of the characteristic.
"multiclassing": {
    "requirements": {
        "int": 13,
        "or": [
            {
                "str": 13,
                "dex": 13
            }
        ]
    },
    "proficienciesGained": {
        "armor": [
            ""
        ]
    }
}

Caster Progression

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

Spellcasting Ability

"spellcastingAbility": "int"

Fluff

  • This will appear under the "Info" tab
"fluff": [
    {
        "name": "",
        "type": "section",
        "entries": [
            ""
        ]
    }
]
  • For more information about how text entries work, check the Renderer Demo

Class Spells

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

Cantrip and Spell Progression

The amount of cantrips and spells known per level, to be used with FoundryVTT and 5eTools Character Sheet. This allows homebrew classes to import spell lists.

"cantripProgression": [
    3,
    3,
    3,
    4,
    4,
    4,
    4,
    4,
    4,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5,
    5
],
"spellsKnownProgression": [
    0,
    3,
    4,
    5,
    6,
    7,
    8,
    9,
    10,
    10,
    11,
    11,
    12,
    12,
    13,
    13,
    14,
    14,
    15,
    15
]
  • Each number represents the amount of cantrips/spells known each level, from level 1 to 20.

Reference Tag

How to link to entries within strings

{@class <name_of_class> | <json_source> | <optional_text_information> | <optional_subclass_shortName> | <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 class features

{@classFeature <name_of_feature>|<name_of_class>|<class_source>|<level>|<class_feature_source>|<optional_display_text>}

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

Example:
{@classFeature Rage|Barbarian||1}
{@classFeature Infuse Item|Artificer|ERLW|2}
{@classFeature Survival Instincts|Barbarian||2|UAClassFeatureVariants}
{@classFeature Rage|Barbarian||1||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?)


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.

Do you have time to take a Survey?