Could I ask for a revisit, review, and revision to this page as it was last updated 2 years ago? This forum thread is the single resource for snippets but it is not an exhaustive list of snippets, it doesn't provide where we can use snippets within each type of homebrew (magic item vs feat vs subclass, etc), nor does it provide many complex examples. A page committed to being an exhaustive and holistic snippet documentation would be really helpful and probably prevent a lot of work from the moderators in the long term.
Snippet Codes {{spellattack}} - your spell "to hit" {{scalevalue}} - a class-specific value, such as Rage Damage for a barbarian {{modifier:str}} - a modifier for an ability score (str, dex, con, int, wis, cha) {{modifier:str,dex}} - returns the higher value of the two ability score modifiers (str, dex, con, int, wis, cha) {{savedc:str}} - generates your Save DC using the specified ability modifier (str, dex, con, int, wis, cha) {{fixedvalue}} - the fixed number from the feature or trait {{classlevel}} - level in the contextual class {{characterlevel}} - total character level {{proficiency}} - your proficiency bonus {{maxhp}} - your maximum hit points {{limiteduse}} - total number of uses for the contextual feature or trait {{abilityscore:str}} - the actual ability score (change to the ability required from str, dex, con, int, wis, cha.)
"(DC {{savedc:***}})" = "(DC ##)" "{{savedc:***}}" = "##" {{savedc:***}} calculates a save dc based on the ability given (marked by the ***) at 8+***+proficiency. {{savedc:***+proficiency}} does the same as above but adds your proficiency again (like expertise) and isn't something you'd want to do. It highly inflates the dc. {{savedc}} won't work because savedc is always based on an ability and this has no way of knowing which to use. Modifier: Bonus->Subtype: Ability Score Maximum->Ability Score: [ABIL]->Fixed Value: X
Calculations You can perform fairly simple maths with a snippet. Examples include:
{{10+modifier:str}} - the character's strength bonus + 10. {{maxhp/2}} - half the character's hitpoints. {{2*abilityscore:con}} - double the characters Constitution score. Additionally there are modifiers to calculations that can be used:
@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. #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. @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.
{{abilityscore:str}} {{2*abilityscore:str}} {{spellattack}} {{classlevel*5#unsigned}} {{classlevel*3#unsigned}} {{classlevel#unsigned}} {{modifier:cha@min:1}} {{modifier:int@min:1#unsigned}} {{modifier:str}} ({{modifier:int}}) {{modifier:dex}} {{modifier:dex:+13#unsigned}} {{modifier:con+5}} {{modifier:cha}} {{(modifier:cha+classlevel)@min:1#unsigned}} (DC {{savedc:cha}}) (DC {{savedc:wis}}) (DC {{savedc:str,dex+proficiency}}) (DC {{savedc:str,dex}}) (DC {{savedc:int+proficiency}}) (DC {{savedc:wis+proficiency}}) protection from evil and good, sanctuary Sleight of Hand (Sleight of Hand) Stealth (Stealth) (Perception) [Tooltip Not Found] charmed incapacitated {{scalevalue}} {{(classlevel/2)@roundup}} {{classlevel}} {{(classlevel/2)}} {{(proficiency/2)@roundup#signed}} <em>Amplify.</em> write a sentence {{(maxhp/2)@rounddown} from <strong>1</strong> to {{(maxhp/2)@rounddown}} {{(1+modifier:con)@min:1#signed}} <strong><em>Marine Layer.</em></strong> <strong>ft.</strong>
Alright, I think I'm understanding it. However, what I don't know is if there is a snippet I need to use in order to make the player decide which ability score gets the increase. Like choosing between Dexterity or Constitution. How exactly would I go about this?
Snippets don’t actually “do” anything, they just display calculated data on the character sheet. (And Tooltips like haste just provide “internal links.”) What you want is a “Modifier.” Specifically the “Bonus” modifier and you would just need to select the appropriate “Modifier Subtype” that grants the choice you want hem to have access to.
So... you're saying I don't need a snippet for either of them? I'm confused... I'm trying to add a racial trait that adds to the base stats, not show a modifier.
So... you're saying I don't need a snippet for either of them? I'm confused... I'm trying to add a racial trait that adds to the base stats, not show a modifier.
I suggest you create a new thread for that question. It's unrelated to Snippets, but very related to Homebrew. (It'll involve a Modifier, just so you know.)
So... you're saying I don't need a snippet for either of them? I'm confused... I'm trying to add a racial trait that adds to the base stats, not show a modifier.
I suggest you create a new thread for that question. It's unrelated to Snippets, but very related to Homebrew. (It'll involve a Modifier, just so you know.)
This.👆 A Modifier ≠ a modifier. A Modifier (big “M”) “modifies” the character sheets that equip a certain homebrew, this is a DDB system thing. A modifier (small “m”) is the bonus applied by an Ability score, this is a D&D game thing.
Hey. I have tried this snippet half a dozen different ways and it isn’t cooperating. Either I’m missing something obvious or 2 isn’t a number. 🤷♂️
Try this:
{{(1+modifier:wis)@min:2#unsigned}}
Finalmente. Tanti grazie.
It's a shame your original snippet won't work, as it makes some types of math more difficult.
For example, let's say you wanted to multiply or divide a number by a player's INT modifier, you'd want to set a minimum value of 1 within the calculation to prevent a multiply/divide by zero (or negative) but we can't do that if @min has to be outside all of the brackets. ☹️
Not that I've needed to (yet), and there might still be a way to fudge it somehow (e.g- add 10 to both sides first) but this makes it harder to use when the intuitive way doesn't work. I get why #unsigned and #signed come last (as they only affect final formatting) but I think the @ modifiers really ought to be usable within the calculation.
Former D&D Beyond Customer of six years: With the axing of piecemeal purchasing, lack of meaningful development, and toxic moderation the site isn't worth paying for anymore. I remain a free user only until my groups are done migrating from DDB, and if necessary D&D, after which I'm done. There are better systems owned by better companies out there.
I have unsubscribed from all topics and will not reply to messages. My homebrew is now 100% unsupported.
Hey. I have tried this snippet half a dozen different ways and it isn’t cooperating. Either I’m missing something obvious or 2 isn’t a number. 🤷♂️
Try this:
{{(1+modifier:wis)@min:2#unsigned}}
Finalmente. Tanti grazie.
It's a shame your original snippet won't work, as it makes some types of math more difficult.
For example, let's say you wanted to multiply or divide a number by a player's INT modifier, you'd want to set a minimum value of 1 within the calculation to prevent a multiply/divide by zero (or negative) but we can't do that if @min has to be outside all of the brackets. ☹️
Not that I've needed to (yet), and there might still be a way to fudge it somehow (e.g- add 10 to both sides first) but this makes it harder to use when the intuitive way doesn't work. I get why #unsigned and #signed come last (as they only affect final formatting) but I think the @ modifiers really ought to be usable within the calculation.
The @ modifiers can be usable within parentheses, but the snippet tag parser is kinda hinky and not a proper context-free grammar, and so it takes finagling to set it up in a way that works. Usually the problem happens when @min comes after a paren-statement, so something like {{characterlevel/(modifier:int@min:1)#unsigned}} works.
Rollback Post to RevisionRollBack
Helpful rewriter of Japanese->English translation and delver into software codebases (she/e/they)
Hey. I have tried this snippet half a dozen different ways and it isn’t cooperating. Either I’m missing something obvious or 2 isn’t a number. 🤷♂️
Try this:
{{(1+modifier:wis)@min:2#unsigned}}
Finalmente. Tanti grazie.
It's a shame your original snippet won't work, as it makes some types of math more difficult.
For example, let's say you wanted to multiply or divide a number by a player's INT modifier, you'd want to set a minimum value of 1 within the calculation to prevent a multiply/divide by zero (or negative) but we can't do that if @min has to be outside all of the brackets. ☹️
Not that I've needed to (yet), and there might still be a way to fudge it somehow (e.g- add 10 to both sides first) but this makes it harder to use when the intuitive way doesn't work. I get why #unsigned and #signed come last (as they only affect final formatting) but I think the @ modifiers really ought to be usable within the calculation.
The @ modifiers can be usable within parentheses, but the snippet tag parser is kinda hinky and not a proper context-free grammar, and so it takes finagling to set it up in a way that works. Usually the problem happens when @min comes after a paren-statement, so something like {{characterlevel/(modifier:int@min:1)#unsigned}} works.
I had previously tried {{(1+modifier:wis@min:2)#unsigned}} (among other variations) and that hadn’t worked either. 🤷♂️
I am trying to a Channel Divinity to work that will be a 2d6+ level damage roll how do I write the snippet to make that happen ?
Snippets don’t actually “do” anything, they just display calculations. The snippet for that would be <strong>2d6+</strong>{{classlevel}}, but that would simply display that calculation within the snippet itself. To actually change the die roll, follow the instructions I left for you in that other thread.
"When you hit a target with an unarmed strike or monk weapon, you can spend up to 2 ki points to cause the weapon to deal extra lightning damage to the target equal to your martial arts die per ki point spent."
When I tell you I've SEARCHED THE INTERNET, I have no idea how to do any of this. :/
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Could I ask for a revisit, review, and revision to this page as it was last updated 2 years ago? This forum thread is the single resource for snippets but it is not an exhaustive list of snippets, it doesn't provide where we can use snippets within each type of homebrew (magic item vs feat vs subclass, etc), nor does it provide many complex examples. A page committed to being an exhaustive and holistic snippet documentation would be really helpful and probably prevent a lot of work from the moderators in the long term.
Codes That I know.
Snippet Codes
{{spellattack}} - your spell "to hit"
{{scalevalue}} - a class-specific value, such as Rage Damage for a barbarian
{{modifier:str}} - a modifier for an ability score (str, dex, con, int, wis, cha)
{{modifier:str,dex}} - returns the higher value of the two ability score modifiers (str, dex, con, int, wis, cha)
{{savedc:str}} - generates your Save DC using the specified ability modifier (str, dex, con, int, wis, cha)
{{fixedvalue}} - the fixed number from the feature or trait
{{classlevel}} - level in the contextual class
{{characterlevel}} - total character level
{{proficiency}} - your proficiency bonus
{{maxhp}} - your maximum hit points
{{limiteduse}} - total number of uses for the contextual feature or trait
{{abilityscore:str}} - the actual ability score (change to the ability required from str, dex, con, int, wis, cha.)
"(DC {{savedc:***}})" = "(DC ##)"
"{{savedc:***}}" = "##"
{{savedc:***}} calculates a save dc based on the ability given (marked by the ***) at 8+***+proficiency.
{{savedc:***+proficiency}} does the same as above but adds your proficiency again (like expertise) and isn't something you'd want to do. It highly inflates the dc.
{{savedc}} won't work because savedc is always based on an ability and this has no way of knowing which to use.
Modifier: Bonus->Subtype: Ability Score Maximum->Ability Score: [ABIL]->Fixed Value: X
Calculations
You can perform fairly simple maths with a snippet. Examples include:
{{10+modifier:str}} - the character's strength bonus + 10.
{{maxhp/2}} - half the character's hitpoints.
{{2*abilityscore:con}} - double the characters Constitution score.
Additionally there are modifiers to calculations that can be used:
@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.
#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.
@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.
{{abilityscore:str}}
{{2*abilityscore:str}}
{{spellattack}}
{{classlevel*5#unsigned}}
{{classlevel*3#unsigned}}
{{classlevel#unsigned}}
{{modifier:cha@min:1}}
{{modifier:int@min:1#unsigned}}
{{modifier:str}}
({{modifier:int}})
{{modifier:dex}}
{{modifier:dex:+13#unsigned}}
{{modifier:con+5}}
{{modifier:cha}}
{{(modifier:cha+classlevel)@min:1#unsigned}}
(DC {{savedc:cha}})
(DC {{savedc:wis}})
(DC {{savedc:str,dex+proficiency}})
(DC {{savedc:str,dex}})
(DC {{savedc:int+proficiency}})
(DC {{savedc:wis+proficiency}})
protection from evil and good, sanctuary
Sleight of Hand
(Sleight of Hand)
Stealth
(Stealth)
(Perception)
[Tooltip Not Found]
charmed
incapacitated
{{scalevalue}}
{{(classlevel/2)@roundup}}
{{classlevel}}
{{(classlevel/2)}}
{{(proficiency/2)@roundup#signed}}
<em>Amplify.</em> write a sentence
{{(maxhp/2)@rounddown}
from <strong>1</strong> to {{(maxhp/2)@rounddown}}
{{(1+modifier:con)@min:1#signed}}
<strong><em>Marine Layer.</em></strong>
<strong>ft.</strong>
[spell]
[skill]
[rule]
[condition]
[action]
For the highlighted codes.
Alright, I think I'm understanding it. However, what I don't know is if there is a snippet I need to use in order to make the player decide which ability score gets the increase. Like choosing between Dexterity or Constitution. How exactly would I go about this?
Snippets don’t actually “do” anything, they just display calculated data on the character sheet. (And Tooltips like haste just provide “internal links.”) What you want is a “Modifier.” Specifically the “Bonus” modifier and you would just need to select the appropriate “Modifier Subtype” that grants the choice you want hem to have access to.
Creating Epic Boons on DDB
DDB Buyers' Guide
Hardcovers, DDB & You
Content Troubleshooting
So... you're saying I don't need a snippet for either of them? I'm confused... I'm trying to add a racial trait that adds to the base stats, not show a modifier.
I suggest you create a new thread for that question. It's unrelated to Snippets, but very related to Homebrew. (It'll involve a Modifier, just so you know.)
Helpful rewriter of Japanese->English translation and delver into software codebases (she/e/they)
This.👆 A Modifier ≠ a modifier. A Modifier (big “M”) “modifies” the character sheets that equip a certain homebrew, this is a DDB system thing. A modifier (small “m”) is the bonus applied by an Ability score, this is a D&D game thing.
Creating Epic Boons on DDB
DDB Buyers' Guide
Hardcovers, DDB & You
Content Troubleshooting
Hey. I have tried this snippet half a dozen different ways and it isn’t cooperating. Either I’m missing something obvious or 2 isn’t a number. 🤷♂️
Creating Epic Boons on DDB
DDB Buyers' Guide
Hardcovers, DDB & You
Content Troubleshooting
Try this:
Helpful rewriter of Japanese->English translation and delver into software codebases (she/e/they)
Finalmente. Tanti grazie.
Creating Epic Boons on DDB
DDB Buyers' Guide
Hardcovers, DDB & You
Content Troubleshooting
It's a shame your original snippet won't work, as it makes some types of math more difficult.
For example, let's say you wanted to multiply or divide a number by a player's INT modifier, you'd want to set a minimum value of 1 within the calculation to prevent a multiply/divide by zero (or negative) but we can't do that if @min has to be outside all of the brackets. ☹️
Not that I've needed to (yet), and there might still be a way to fudge it somehow (e.g- add 10 to both sides first) but this makes it harder to use when the intuitive way doesn't work. I get why #unsigned and #signed come last (as they only affect final formatting) but I think the @ modifiers really ought to be usable within the calculation.
Former D&D Beyond Customer of six years: With the axing of piecemeal purchasing, lack of meaningful development, and toxic moderation the site isn't worth paying for anymore. I remain a free user only until my groups are done migrating from DDB, and if necessary D&D, after which I'm done. There are better systems owned by better companies out there.
I have unsubscribed from all topics and will not reply to messages. My homebrew is now 100% unsupported.
The @ modifiers can be usable within parentheses, but the snippet tag parser is kinda hinky and not a proper context-free grammar, and so it takes finagling to set it up in a way that works. Usually the problem happens when @min comes after a paren-statement, so something like {{characterlevel/(modifier:int@min:1)#unsigned}} works.
Helpful rewriter of Japanese->English translation and delver into software codebases (she/e/they)
I had previously tried {{(1+modifier:wis@min:2)#unsigned}} (among other variations) and that hadn’t worked either. 🤷♂️
Creating Epic Boons on DDB
DDB Buyers' Guide
Hardcovers, DDB & You
Content Troubleshooting
It's... complicated. Like I said, the parser has issues.
Edit: But {{(1+modifier:wis@min:2)#unsigned}} doesn't give an error. It's just not the result that you want to have.
Helpful rewriter of Japanese->English translation and delver into software codebases (she/e/they)
Then it should be in therapy.
Creating Epic Boons on DDB
DDB Buyers' Guide
Hardcovers, DDB & You
Content Troubleshooting
i think it needs to be {{15+(modifier:dex@max:2)}}
I am trying to a Channel Divinity to work that will be a 2d6+ level damage roll how do I write the snippet to make that happen ?
Snippets don’t actually “do” anything, they just display calculations. The snippet for that would be <strong>2d6+</strong>{{classlevel}}, but that would simply display that calculation within the snippet itself. To actually change the die roll, follow the instructions I left for you in that other thread.
Creating Epic Boons on DDB
DDB Buyers' Guide
Hardcovers, DDB & You
Content Troubleshooting
Can anyone help me with a snippet that can do:
"When you hit a target with an unarmed strike or monk weapon, you can spend up to 2 ki points to cause the weapon to deal extra lightning damage to the target equal to your martial arts die per ki point spent."
When I tell you I've SEARCHED THE INTERNET, I have no idea how to do any of this. :/