Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

How to use this variable [$Dmg] - help request

I use this variable often:  [$Dmg] within !powercards like this:   --Damage:|[[ [$Dmg] ((?{Spell Slot Level|3}+5)d6cf<0cs>21) ]] ``fire`` damage! When I call it back it becomes [^Dmg]. But when I try to roll a dice and include it such as [[0d0+ [^Dmg] ]] I get 0.  Any suggestions? Thank you!
1695343061

Edited 1695343218
GiGs
Pro
Sheet Author
API Scripter
That syntax is part of the powercards script, and doesn't work for anything else. There are ways to use modifiers from a character in standard roll20 macros (which look like @{attack} or @{selected|attack}), and ask for numbers (like  [[1d20+?{what bonus?|0}]] ). Check out the wiki for more details.
1695344279

Edited 1695349279
Andrew R.
Pro
Sheet Author
Questions about the PowerCards mod (API) should go to the Mods (API) forum. However, IIRC you can't use a Roll ID like that in PowerCards. Use ScriptCards instead.  Roll IDs (results of rolls assigned to names that can be used in output as placeholders for the roll value) are NOT variables. All rolls are processed before the output portion of any PowerCard tag takes place, and Roll IDs from one roll are not available in other rolls. Roll IDs are only used to include the result of a roll in output or to compare the result in a conditional tag.