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

Use the result of a dice roll in macro

1461862550

Edited 1461862616
Hey we'r rolling with my group since a bit of time and now trying to use mechanics like Life, armor etc so I was wondering (I'm new to the macro world) How could I use the result of a dice roll in a macro something like /R1D100+'Result'*0.5 ! I can't find anything to put as the "Result" so hope someone can help me out with this ! Thanks for reading have a good roll ! (PS: Sry for the english I'm a foreign little adventurer) Lok-Tar Ogar !
You can't. Not without an api script which requires a pro subscription.
How about this? /r 1d100 * 1.5
1461865820
Diana P
Pro
Sheet Author
/R1D100+'Result'*0.5&nbsp; is mathematically equivalent to /r (1d100)*1.5&nbsp; as something + .5 of something is the same as something * 1.5 If you're looking to use a different value, you could use a query:&nbsp;&nbsp; /r 1d100 +(?{result?|0}*0.5) which would ask you to input a value every time you roll. If you have an attribute on a character sheet (whether using a character sheet template or not), you can reference that attribute:&nbsp; /r 1d100 +(@{selected|Int-value}*0.5)&nbsp;&nbsp; Assuming that the attribute you wish to access is Int-value and that you have a token representing (and linked to ) that character selected.&nbsp; If you don't wish or can not select the token, you can remove the selected| part but then the roll would need to be made from the Ability button on the character sheet or you would have to replace the selected with the character's name. More on rolling in the wiki: <a href="https://wiki.roll20.net/Dice_Reference" rel="nofollow">https://wiki.roll20.net/Dice_Reference</a>
1461866975

Edited 1462004858
The fact is It was just an exemple cause I'm gonna use a value wich isn't gonna be always 0.5 like X the result of the roll and Y a choosen value so I need to do X-X*Y. Actually in my macro X represent the Attack of an enemy and Y the parade or dodge wich is a pourcentage divided like if there is 50 attack from the mob and 20% dodge 50-50*0.2 = 25 the player takes 25 dmgs . I don't know If I'm clear, Math is already hard for me in french so how about in englishx)... &nbsp;But as I see I can't reuse the roll result so I'm gonna have to find another way. Anyway thanks a lot for answering so fast !&nbsp;
Jester said: The fact is It was just an exemple cause I'm gonna use a value wich isn't gonna be always 0.5 like X the result of the roll and Y a choosen value so I need to do X-X*Y. You can use the fact that X - X * Y = X * (1 - Y)
&lt;oh god yeah this is obvious x) Thanks a lot