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

Damage Macro

1540423972

Edited 1540424001
Come someone list a macro for rolling weapon damage that is variable but defaults to what you place in it.  Example  Rolling 1d8+5 as defined in an attribute as default but allows you to input a different amount as a variable Thanks for any assistance
1540424986
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
/roll ?{Enter roll formula|@{character_name|Attribute_name}} For this to work, Attribute_name must contain a legal roll expression, as must anything entered manually.
Thanks Keith! I got it to work this way /roll ?{|@{WeaponDamage_1}} -AV x BF used but could not seem to get it to work with an emote prior to it. Ara
1540450312
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I'm assuming that's a shorthand for the actual macro? I'll use it as the base expression, but drop the /roll and use /em and place your expression in brackets: /em [[?{|@{WeaponDamage_1}} -AV x BF used]] In the case of the one I used above, it would be: /em [[?{Enter roll formula|@{selected|Attribute_name}}]] I switched "character_name" for "selected" so I would actually be posting working code.
Awesome thank you so much!