To start, copy the following code block and fill the empty ""
values.
"subclass": [
{
"name": "",
"source": "",
"className": "",
"classSource": "",
"shortName": "",
"subclassFeatures": [
""
]
}
],
"subclassFeature": [
{
"name": "",
"source": "",
"className": "",
"classSource": "",
"subclassShortName": "",
"subclassSource": "",
"level": 1,
"entries": [
""
]
}
]
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.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"
}
]
}
Make sure you are adding these blocks in the same level as the "name"
, "source"
, etc.
Choose between "full"
, "1/2"
, "1/3"
or "pact"
.
"casterProgression": "pact"
Use the first 3 letters of the characteristic.
"spellcastingAbility": "int"
Adds extra columns to the class table.
"subclassTableGroups": [
{
"title": "",
"colLabels": [
"",
""
],
"rows": [
[
"",
""
],
[
"",
""
]
]
}
]
"title"
— optional string that will show up over all the columns for that group (see “Spell Slots Per Level” in Wizard)"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.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": [
"Absorb Elements|XGE"
]
It is also possible to copy a whole class spell list.
"subclassSpells": [
{
"className": "Warlock",
"classSource": "PHB"
}
]
Originally used for the Land Druid spell options, this allows you to specify the spells that a sub-subclass gets.
"subSubclassSpells": {
"Artic": [
"Hold Person",
"Spike Growth",
"Sleet Storm",
"Slow"
],
"Coast": [
"Mirror Image",
"Misty Step",
"Water Breathing",
"Water Walk"
]
}
The additionalSpells
array enables support for importing spells into foundryvtt and should be used in addition to subclassSpells
/subSubclassSpells
.
"additionalSpells": [
{
"prepared": {
"3": [
"comprehend languages|PHB",
"longstrider|PHB"
],
"5": [
"animal messenger|PHB",
"pass without trace|PHB"
],
"9": [
"haste|PHB",
"water walk|PHB"
],
"13": [
"dimension door|PHB",
"hallucinatory terrain|PHB"
],
"17": [
"passwall|PHB",
"teleportation circle|PHB"
]
}
}
]
"prepared"
— spells which are always prepared"innate"
— Spells which can be innately cast, without expending normal spell resources"known"
— Spells which are always known"expanded"
— Expansions to a class’ default spell list, from which spells can be chosen (e.g. Warlock Patron spells)"ability"
— Optionally specify the ability score used for e.g. racial spellcasting"resourceName"
— Optional resource name for resource-cast spells in this groupThe 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.
Each number represents the amount of cantrips/spells known each level, from level 1 to 20.
"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
]
Some subclass features give various bonuses. These could potentially be automated through active effects and through using the foundrySubclassFeature
object. Before considering doing this, please be knowledgeable of how to manually achieve these effects through the FoundryVTT UI. After doing so, export that actor’s JSON Data and apply it to the 5etools schema as shown in the example.
Documentation:
In the example below, this will create a FoundryVTT Active Effect that grants the user bludgeoning, piercing, and slashing resistance. In addition to this through the use of the Active Auras module, this effect will also apply to other ally tokens within 30 feet of the user.
"foundrySubclassFeature": [
{
"name": "Avatar of the Benevolent",
"source": "Hazmat",
"className": "Paladin",
"classSource": "PHB",
"subclassShortName": "Benevolent",
"subclassSource": "Hazmat",
"level": 20,
"effects": [
{
"name": "Avatar of the Benevolent",
"transfer": true,
"changes": [
{
"key": "system.traits.dr.value",
"mode": 2,
"value": "bludgeoning",
"priority": 20
},
{
"key": "system.traits.dr.value",
"mode": 2,
"value": "piercing",
"priority": 20
},
{
"key": "system.traits.dr.value",
"mode": 2,
"value": "slashing",
"priority": 20
},
{
"key": "system.attributes.ac.bonus",
"mode": 2,
"value": "2",
"priority": 20
}
],
"flags": {
"ActiveAuras": {
"isAura": true,
"aura": "Allies",
"ignoreSelf": false,
"height": false,
"hidden": false,
"displayTemp": true,
"hostile": false,
"onlyOnce": false,
"wallsBlock": "system"
}
}
}
]
}
]
{@class <name_of_class>|<json_source>|<optional_text_information>|<optional_subclass_name>| <json_source_if_optional_subclass>|<x-y>}
X is the level index (the level at which the feature is gained); 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}
{@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, and the 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}