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

[Macro] Roll a die which type is the result of an operation

1604509116

Edited 1604509272
Hi, I'm new in creating macros and I didn't find an answer look in the forum. I'm trying to create a macro that calculate the number of actions I can do in gurps I suppose the formula is an easy one: floor( basic_move / 2) But I can't find a way to use it in a macro to do something like /roll 1dX (where X is the result of the operation). Is it possible to do what I am trying? Is the answer so easy that I can't figure it out? ^_^"""" Thanks for the help
1604510378

Edited 1604510408
David M.
Pro
API Scripter
Maybe try this, assuming "basic_move" is the name of the attribute. Spaces added for readability, but should work with or without. Trick is to wrap the calculation in an inline roll. [[ 1d[[ floor(@{Selected|basic_move}/2) ]] ]]
Thanks *_* I was working on it since this afternoon and I couldn't make it works *_*