Have you spotted on the character sheet that it tells you what each feature of your class/race does? Those are snippets.
When creating a homebrew race, subclass, or feat, you can add these snippets yourself, to indicate to anyone using them what the homebrew content does. They provide an abbreviated version of the rules (see below). You can type whatever you want into these - it's just text. However, you can also use something we call Snippet Codes that calculate a value, based on the character.
If you want to see the full text of what a feature or ability does, you should always click on it and read the full text in the sidebar.
So what do Snippet Codes actually do?
Some of those features include calculations, based on a variety of things. It may be an armor class based on your DEX and CON, or it may be a saving throw DC. They allow you to insert calculated numbers into the character sheet where the text for class/race features are shown.
You might have a feature in your homebrew subclass that allows the character to vertically jump their strength score in feet as a bonus actions. You would represent that by writing in the snippet box of the homebrew:
As a bonus action, you jump vertically up to {{abilityscore:str}} ft. in height
If the character has a strength score of 19, this would show on their character sheet as, under the features and traits section as:
As a bonus action, you jump vertically up to 19 ft. in height
Pretty cool, huh? What if you decided that at higher level, they could jump vertically double their strength score in height? You can do that too, by adding in a multiplier so you would have
As a bonus action, you jump vertically up to {{2*abilityscore:str}} ft. in height
On the character sheet, for the character with 19 strength, that would now show as:
As a bonus action, you jump vertically up to 38 ft. in height
Snippet Codes don't change or update your character!
This is important to note. Snippets just surface information for the player to read. If you want a feat to grant the character +1 to their strength, you configure that through a modifier instead.
What snippet codes are available?
{{spellattack:int}} - your spell "to hit" - you have to specify the ability score. e.g. here is intelligence. Spell attack rules. {{scalevalue}} - a class-specific value, such as Rage Damage for a barbarian {{modifier:str}} - a modifier for an ability score. e.g. here is strength {{savedc:wis}} - generates your Saving Throw DC using the specified ability modifier. e.g. here is wisdom {{fixedvalue}} - the fixed number from the feature or trait {{classlevel}} - level in the contextual class (only use for subclass homebrew) {{characterlevel}} - total character level {{proficiency}} - character proficiency bonus {{maxhp}} - character maximum hit points {{limiteduse}} - total number of uses for the contextual feature or trait {{abilityscore:str}} - the actual ability score. e.g. here is strength
General Rules
Specifying Ability Score/Modifier
When a snippet requires you to specify an ability score, you always use the three letter abbreviation: str, dex, con, int, wis, cha.
Automatically taking the Best Modifier
Several snippet codes allow you to specify an ability score. You can actually specify multiple ability scores, and the snippet will use the highest of them for the calculation. E.g. {{modifier:str,dex}} returns the larger modifier out of strength and dexterity for the character.
Modifiers
Additionally there are modifiers to calculations that can be used to affect them. These change how the calculation happens or is displayed.
Calculation Modifiers
Calculation modifiers change how the result is treated. They control rounding of numbers and bounding with minimum and maximum results.
@rounddown - causes a calculation to round down to a whole number. Example: {{(classlevel/3)@rounddown}} - a third of the character level, rounded down
@roundup - causes a calculation to round up to a whole number. Example:{{(maxhp/2)@roundup}} - half the character max hitpoints, rounded up.
@min:x - ensures a calculation has a minimum value of x. Example: {{modifier:int@min:1}} - returns the intelligence ability modifier, with a minimum of 1.
@max:x - ensures a calculation has a maximum value of x. Example: {{modifier:dex@max:2}} - returns the dexterity ability modifier, with a maximum value of 2.
Note that you only specify the calculation modifier section once, but you can have multiple modifiers in there.
Sign Modifiers
The purpose of sign modifiers is to determine whether the value should include a plus or minus sign infront of it.
The sign modifier always goes at the end of the snippet code.
#signed - forces a calculation to show the appropriate plus or minus sign infront of it. Example: {{proficiency#signed}} - shows the proficiency amount with a plus sign infront of it.
#unsigned - forces a calculation to not show a plus or minus sign infront of it. Example: {{12+proficiency#unsigned}} - calculates 12 plus the proficiency, without placing a plus or minus infront of the result.
Example Calculations
You can perform fairly simple maths with a snippet. Here's a bunch of examples:
{{10+modifier:str}} - the character's strength bonus + 10.
{{maxhp/2}} - half the character's maximum hitpoints.
{{2*abilityscore:con}} - double the characters Constitution score.
{{(2*modifier:str,dex,con)@min:2}} - takes the highest modifier from strength, dexterity, and constitution, then multiplies it by 2 and applies a minimum of 2 to the result.
{{(4*modifier:wis)@min:4,max:20}} - this multiplies the character's wisdom modifier by 4, it then applies a minimum result of 4 and a maximum result of 20 to the calculation.
{{(characterlevel/2)@roundup,min:2,max:9}} - this calculates half of the character level, then rounds the result up and applies a minimum of 2 and a maximum of 9 to the result.
{{(classlevel-2)/7)@rounddown}} - if used in a barbarian subclass feature, this will calculate the bonus rage damage (as per the table in the PHB).
Snippet Codes are Abbreviations
Another purpose of snippet codes is to present a lengthy piece of rules text as simply as possible.
As an example, you might have a feat that reads as follows:
As a bonus action, you may leap vertically a number of feet into the air equal to the double the larger value of your strength or dexterity ability score. You may use this feature a number of times equal to your proficiency bonus, regaining those uses on a long rest.
The snippet for that feat could look something like this:
{{proficiency#unsigned}}x per day, you may jump {{(2*abilityscore:str,dex)}} ft. vertically as a bonus action.
Major Change Log
Apr 24th, 2024: Updated to clarify and add examples of some of the more complex calculations. At this point, this shouldn't be considered a placeholder. This thread is 4.5 years old, has reached nearly 50 pages in length, and I haven't been an employee of Wizards of the Coast since January 2023, so consider this to be an update from a very knowledgeable homebrew user. 😂
Jan 31st, 2019: Expanded to add further modifiers. Huge thanks to Scott & Pasquale - you're both heroes. 🏆
Important note for use of division: You'll probably want to round up or down. If you do choose to round you will append @rounddown or @roundup to the end of your equation. However you must also remember to put your equation into brackets for this to be effective.
For example, a 6th level moon Druid's wild shape CR is dependant on class level/3 rounded down. So your equation would be so: {{(classlevel/3)@rounddown}}
When creating homebrew, you'll see various fields named "snippet" - these are the fields that display data on the character sheet. These codes can be used in those fields.
Ah, just to be clear - the snippet code doesn't alter the stats of the character - it is a method of presenting calculated data on the character sheet for your homebrew feat.
When using the modifier snippet is there a way to prevent the + showing? I know there is a way, it was mentioned before by a user who found it out but after hours of searching forums I cannot find that post again and I wasn't using snippet codes then so didn't commit it to memory or save it or anything.
Basically if a homebrew subclass feature, for example, was to say give points equal to your Charisma modifier and I put in the Snippet box "You have {{modifier:cha}} points to use." It will come up as "You have +5 points to use."
How do I get rid of that +?
Rollback Post to RevisionRollBack
Click ✨ HERE ✨ For My Youtube Videos featuring Guides, Tips & Tricks for using D&D Beyond. Need help with Homebrew? Check out ✨ thisFAQ/Guide thread ✨ by IamSposta.
When using the modifier snippet is there a way to prevent the + showing? I know there is a way, it was mentioned before by a user who found it out but after hours of searching forums I cannot find that post again and I wasn't using snippet codes then so didn't commit it to memory or save it or anything.
Basically if a homebrew subclass feature, for example, was to say give points equal to your Charisma modifier and I put in the Snippet box "You have {{modifier:cha}} points to use." It will come up as "You have +5 points to use."
How do I get rid of that +?
I'm wondering this, too. I just assumed there wasn't.
Doing it that way won't replace the "obsolete" ability on the character sheet though, right? In other words, in your example, at 8th level, it will show the 8th level boost and the (now obsolete) 2nd level boost?
Doing it that way won't replace the "obsolete" ability on the character sheet though, right? In other words, in your example, at 8th level, it will show the 8th level boost and the (now obsolete) 2nd level boost?
Correct. The snippet does not allow for you to make certain things visible/invisible based on any qualification, level or otherwise.
What is a Snippet?
Have you spotted on the character sheet that it tells you what each feature of your class/race does? Those are snippets.
When creating a homebrew race, subclass, or feat, you can add these snippets yourself, to indicate to anyone using them what the homebrew content does. They provide an abbreviated version of the rules (see below). You can type whatever you want into these - it's just text. However, you can also use something we call Snippet Codes that calculate a value, based on the character.
If you want to see the full text of what a feature or ability does, you should always click on it and read the full text in the sidebar.
So what do Snippet Codes actually do?
Some of those features include calculations, based on a variety of things. It may be an armor class based on your DEX and CON, or it may be a saving throw DC. They allow you to insert calculated numbers into the character sheet where the text for class/race features are shown.
You might have a feature in your homebrew subclass that allows the character to vertically jump their strength score in feet as a bonus actions. You would represent that by writing in the snippet box of the homebrew:
As a bonus action, you jump vertically up to {{abilityscore:str}} ft. in height
If the character has a strength score of 19, this would show on their character sheet as, under the features and traits section as:
As a bonus action, you jump vertically up to 19 ft. in height
Pretty cool, huh? What if you decided that at higher level, they could jump vertically double their strength score in height? You can do that too, by adding in a multiplier so you would have
As a bonus action, you jump vertically up to {{2*abilityscore:str}} ft. in height
On the character sheet, for the character with 19 strength, that would now show as:
As a bonus action, you jump vertically up to 38 ft. in height
Snippet Codes don't change or update your character!
This is important to note. Snippets just surface information for the player to read. If you want a feat to grant the character +1 to their strength, you configure that through a modifier instead.
What snippet codes are available?
{{spellattack:int}} - your spell "to hit" - you have to specify the ability score. e.g. here is intelligence. Spell attack rules.
{{scalevalue}} - a class-specific value, such as Rage Damage for a barbarian
{{modifier:str}} - a modifier for an ability score. e.g. here is strength
{{savedc:wis}} - generates your Saving Throw DC using the specified ability modifier. e.g. here is wisdom
{{fixedvalue}} - the fixed number from the feature or trait
{{classlevel}} - level in the contextual class (only use for subclass homebrew)
{{characterlevel}} - total character level
{{proficiency}} - character proficiency bonus
{{maxhp}} - character maximum hit points
{{limiteduse}} - total number of uses for the contextual feature or trait
{{abilityscore:str}} - the actual ability score. e.g. here is strength
General Rules
Specifying Ability Score/Modifier
When a snippet requires you to specify an ability score, you always use the three letter abbreviation: str, dex, con, int, wis, cha.
Automatically taking the Best Modifier
Several snippet codes allow you to specify an ability score. You can actually specify multiple ability scores, and the snippet will use the highest of them for the calculation. E.g. {{modifier:str,dex}} returns the larger modifier out of strength and dexterity for the character.
Modifiers
Additionally there are modifiers to calculations that can be used to affect them. These change how the calculation happens or is displayed.
Calculation Modifiers
Calculation modifiers change how the result is treated. They control rounding of numbers and bounding with minimum and maximum results.
Example: {{(classlevel/3)@rounddown}} - a third of the character level, rounded down
Example: {{(maxhp/2)@roundup}} - half the character max hitpoints, rounded up.
Example: {{modifier:int@min:1}} - returns the intelligence ability modifier, with a minimum of 1.
Example: {{modifier:dex@max:2}} - returns the dexterity ability modifier, with a maximum value of 2.
Note that you only specify the calculation modifier section once, but you can have multiple modifiers in there.
Sign Modifiers
The purpose of sign modifiers is to determine whether the value should include a plus or minus sign infront of it.
The sign modifier always goes at the end of the snippet code.
Example: {{proficiency#signed}} - shows the proficiency amount with a plus sign infront of it.
Example: {{12+proficiency#unsigned}} - calculates 12 plus the proficiency, without placing a plus or minus infront of the result.
Example Calculations
You can perform fairly simple maths with a snippet. Here's a bunch of examples:
Snippet Codes are Abbreviations
Another purpose of snippet codes is to present a lengthy piece of rules text as simply as possible.
As an example, you might have a feat that reads as follows:
The snippet for that feat could look something like this:
{{proficiency#unsigned}}x per day, you may jump {{(2*abilityscore:str,dex)}} ft. vertically as a bonus action.
Major Change Log
Pun-loving nerd | Faith Elisabeth Lilley | She/Her/Hers | Profile art by Becca Golins
If you need help with homebrew, please post on the homebrew forums, where multiple staff and moderators can read your post and help you!
"We got this, no problem! I'll take the twenty on the left - you guys handle the one on the right!"🔊
Thank you for this post, I have bookmarked it for easy access.
What kind of calculations can be done to snippets, and how do we format them?
I've added some example above - I'll collate some more examples and add them later.
Pun-loving nerd | Faith Elisabeth Lilley | She/Her/Hers | Profile art by Becca Golins
If you need help with homebrew, please post on the homebrew forums, where multiple staff and moderators can read your post and help you!
"We got this, no problem! I'll take the twenty on the left - you guys handle the one on the right!"🔊
Important note for use of division: You'll probably want to round up or down. If you do choose to round you will append @rounddown or @roundup to the end of your equation. However you must also remember to put your equation into brackets for this to be effective.
For example, a 6th level moon Druid's wild shape CR is dependant on class level/3 rounded down. So your equation would be so: {{(classlevel/3)@rounddown}}
Thank you both!
Where do you put these in the homebrew feats.?
When creating homebrew, you'll see various fields named "snippet" - these are the fields that display data on the character sheet. These codes can be used in those fields.
Pun-loving nerd | Faith Elisabeth Lilley | She/Her/Hers | Profile art by Becca Golins
If you need help with homebrew, please post on the homebrew forums, where multiple staff and moderators can read your post and help you!
"We got this, no problem! I'll take the twenty on the left - you guys handle the one on the right!"🔊
Ok that's what I thought but when I try to put in any thing with {{maxhp}}, for example {{5+maxhp}}, nothing happens.
What do you see in the character sheet? Is there an error?
Pun-loving nerd | Faith Elisabeth Lilley | She/Her/Hers | Profile art by Becca Golins
If you need help with homebrew, please post on the homebrew forums, where multiple staff and moderators can read your post and help you!
"We got this, no problem! I'll take the twenty on the left - you guys handle the one on the right!"🔊
no errors, there is no change to the max hp up or down.
Ah, just to be clear - the snippet code doesn't alter the stats of the character - it is a method of presenting calculated data on the character sheet for your homebrew feat.
Pun-loving nerd | Faith Elisabeth Lilley | She/Her/Hers | Profile art by Becca Golins
If you need help with homebrew, please post on the homebrew forums, where multiple staff and moderators can read your post and help you!
"We got this, no problem! I'll take the twenty on the left - you guys handle the one on the right!"🔊
When using the modifier snippet is there a way to prevent the + showing? I know there is a way, it was mentioned before by a user who found it out but after hours of searching forums I cannot find that post again and I wasn't using snippet codes then so didn't commit it to memory or save it or anything.
Basically if a homebrew subclass feature, for example, was to say give points equal to your Charisma modifier and I put in the Snippet box "You have {{modifier:cha}} points to use." It will come up as "You have +5 points to use."
How do I get rid of that +?
Click ✨ HERE ✨ For My Youtube Videos featuring Guides, Tips & Tricks for using D&D Beyond.
Need help with Homebrew? Check out ✨ this FAQ/Guide thread ✨ by IamSposta.
I'm wondering this, too. I just assumed there wasn't.
You can use #signed or #unsigned
I've updated the documentation in the first post with this information.
Pun-loving nerd | Faith Elisabeth Lilley | She/Her/Hers | Profile art by Becca Golins
If you need help with homebrew, please post on the homebrew forums, where multiple staff and moderators can read your post and help you!
"We got this, no problem! I'll take the twenty on the left - you guys handle the one on the right!"🔊
Is there a way to do level dependent dice rolls (similar to sneak attack damage)? For example, you do 1d6 damage at level one, 2d6 at level 5, etc.?
Not in the snippets, though this can be built into the core of the class. For the snippets the format I've seen used is:
Description of class feature as it is given at this level. [2nd] Higher level boost. [8th] Higher level boost.
Etc.
Doing it that way won't replace the "obsolete" ability on the character sheet though, right? In other words, in your example, at 8th level, it will show the 8th level boost and the (now obsolete) 2nd level boost?
Correct. The snippet does not allow for you to make certain things visible/invisible based on any qualification, level or otherwise.
If I wanted to display AC using this how would I go about adding a maximum of 2 to the snippet calculation? Is that possible?
AC of 15 + Dexterity (max +2)
Is it possible to do less than or equal to 2 and if so, how would one format that in this code? {{15+modifier:dex<=2}} ?
Can use these codes for items?
Like if an item had a DC based on the user's casting ability or did bonus damage based on their level?