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

Can I assign new variable names to formulas?

Sorry for translator! My Question is this  I'm use api like this command ↓ !sr (number of dice)dx(critical) (ex: 7dx7)  and I made macro like this ↓ [[?{buff}+?{power}]] and this is how calculate number of dice. and I want to make the api also work with this formula like this !sr [[?{buff}+?{power}]]dx?{critical} but the api cannot accept the [[ ]] command. [[ ]] Can't I specify this formula as a different variable so that this api can work right away? 
1641396074
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
The API will need to be updated to be able to parse inline rolls.
Scott C. said: The API will need to be updated to be able to parse inline rolls. oh.. I have to update api for this... thank you for answer!
1641398590
timmaugh
Pro
API Scripter
Unless the script is built like a standard script... in which case ZeroFrame (a metascript) could extract that roll value for you. [[....]].value ...so... !sr [[?{buff}+?{power}]].valuedx?{critical} If it's not built like a standard script, then it will still work as long as ZeroFrame is installed *before* the recipient script.
timmaugh said: Unless the script is built like a standard script... in which case ZeroFrame (a metascript) could extract that roll value for you. [[....]].value ...so... !sr [[?{buff}+?{power}]].valuedx?{critical} If it's not built like a standard script, then it will still work as long as ZeroFrame is installed *before* the recipient script. I did it with this API! Thx so much!!!