Classes are among the most complex types of data 5eTools has. This wiki page only covers the very basics: even ignoring that the template below elides many of the features described further on in this page, this wiki page ignores many more of 5eTools’ and Plutonium’s features!
When converting classes for the first time, it’s recommended that you compare against existing files in the homebrew repo. You’re also welcome to ask for clarification on the Discord server.
To start, copy the following code block and fill the empty ""
values.
"class": [
{
"name": "",
"source": "",
"classFeatures": [
""
]
}
],
"classFeature": [
{
"name": "",
"source": "",
"className": "",
"classSource": "",
"level": 0,
"entries": [
""
]
}
]
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 because class features are their own datatype, just like items or spells are; you can consider a class to be a ‘container’ of class features (with extra metadata, like proficiencies!). 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 official class features, which is really useful if you are doing slight modifications to an official class/subclass.
Class features are defined with the following properties:
"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.The basic identifier for class features is a string in the following format: <featureName>|<className>|<classSource>|<level>
. Features that indicate the class gains a subclass feature are instead indicated with an object:
{
"classFeature": "Martial Archetype|Fighter|PHB|3",
"gainSubclassFeature": true
}
For example, the artificer class’ first three levels are referenced as follows:
"classFeatures": [
"Magical Tinkering|Artificer|TCE|1",
"Spellcasting|Artificer|TCE|1",
"Infuse Item|Artificer|TCE|2",
{
"classFeature": "Artificer Specialist|Artificer|TCE|3",
"gainSubclassFeature": true
}
]
Whether you are converting a subclass that is part of an official class or a homebrew one, they will be two independent entities. While they are similar to classes, to not clog this page they have been separated to their own page.
For more information about the structure of subclasses, see Subclass.
Make sure you are adding these blocks in the same level as the "name"
, "source"
, etc.
faces
is the size of the die. number
represents the number of hit dice you roll (1 in all official classes—it’s there to satisfy homebrew classes with a 2d6 hit die!).
"hd": {
"number": 1,
"faces": 10
}
Write the first 3 letters of the ability in lowercase.
"proficiency": [
"dex",
"int"
]
You can add extra columns to the class table using the format below. Each object can have an optional "title"
, which will show up over all the columns for that group (see “Spell Slots Per Level” in the wizard class).
"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.Proficiencies can be defined for armor, weapons, tools and skills. They are all located inside the same "startingProficiencies": {}
object, separated by commas.
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"
}
]
"simple"
and "martial"
are rendered as “x weapons”, but you can write any string that you want.
"weapons": [
"simple",
"martial"
]
Write the name of any tool or artisan tools. Multiple tools are different strings (“”) separated with commas.
"tools": [
"alchemical supplies"
]
Write the name of the skill followed by the word "true"
.
"skills": [
{
"arcana": true,
"history": true
}
]
You can also choose from a list. "count"
is the number of skills you can pick.
"skills": [
{
"choose": {
"from": [
"arcana",
"history",
"investigation"
],
"count": 2
}
}
]
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.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": [
""
]
}
}
"proficienciesGained"
— follows the same structure as the Starting ProficienciesChoose between "full"
, "1/2"
, "1/3"
or "pact"
"casterProgression": "pact"
Use the first three letters of the ability used.
"spellcastingAbility": "int"
This will appear under the “Info” tab
"fluff": {
"entries": [
{
"type": "section",
"name": "",
"entries": [
""
]
}
],
"images": [
{
"type": "external",
"href": {
"type": "external",
"url": "https://.../"
}
}
]
}
For more information about how text entries work, check the Renderer Demo under the ‘Utilities’ menu on 5eTools.
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": [
"Absorb Elements|XGE"
]
It is also possible to copy a whole class spell list:
"classSpells": [
{
"className": "Warlock",
"classSource": "PHB"
}
]
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
]
You can create a hoverable hyperlink to a class or subclass using the @class
tag. Its format is a little complex:
{@class <class name>|<json source>|<optional display text>}
.{@class <class name>|<json source>|<optional display text>|<subclass name>|<subclass source>}
.{@class <class name>|<json source>|<optional display text>|<subclass name>|<subclass source>|<feature level>-<feature index>}
, where the ‘feature index’ is the place that feature appears in that level (counting from 0). For instance, if a subclass grants 3 features at level 2, and you want to have the link automatically jump to the 2nd feature, use 2-1
.You can also link to class features directly: {@classFeature <feature name>|<class name>|<class source>|<feature level>|<class feature source>|<optional display text>}
. The default class source (if you leave it blank) is the PHB. If you leave the class feature source blank, it defaults to the same as the class source.