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

Calculate the difference in success

So if a player rolls a 100 die I want second bar which increases by 1 for each 5 above the number requested so I my throw is 40/100 I get 67 I want to increase bar 2 by 5 (if I cannot increase the value of the bar just have the calculation already done) possible with macros? Thx
1712437936
GiGs
Pro
Sheet Author
API Scripter
What do you mean by a bar?
Here's the calculation: [[floor(round({[[[[1d100]]-40]],0}kh1)/5)]] You can check the math:  1d100 = $[[0.computed]] - 40 = $[[1.computed]] / 5 = [[floor(round({[[[[1d100]]-40]],0}kh1)/5)]] If you don't want to hard code the '40', then you need to supply an attribute call or query: Attribute call (replace 'throw_value' with whatever attribute name you need to use - this is dependent on what game you are playing and what character sheet you are using): [[floor(round({[[[[1d100]]-@{selected|throw_value}]],0}kh1)/5)]] Query: [[floor(round({[[[[1d100]]-?{Throw Value?|40}]],0}kh1)/5)]] Without a Mod (API) script, any chat commands (macros) are “read only” and cannot adjust token settings (including bar values).  If the game creator has a Roll20 Pro subscription then you can use TokenMod to do this: !token-mod --set bar2|+[[floor(round({[[[[1d100]]-40]],0}kh1)/5)]]
Jarren said: Here's the calculation: [[floor(round({[[[[1d100]]-40]],0}kh1)/5)]] You can check the math:  1d100 = $[[0.computed]] - 40 = $[[1.computed]] / 5 = [[floor(round({[[[[1d100]]-40]],0}kh1)/5)]] If you don't want to hard code the '40', then you need to supply an attribute call or query: Attribute call (replace 'throw_value' with whatever attribute name you need to use - this is dependent on what game you are playing and what character sheet you are using): [[floor(round({[[[[1d100]]-@{selected|throw_value}]],0}kh1)/5)]] Query: [[floor(round({[[[[1d100]]-?{Throw Value?|40}]],0}kh1)/5)]] Without a Mod (API) script, any chat commands (macros) are “read only” and cannot adjust token settings (including bar values).  If the game creator has a Roll20 Pro subscription then you can use TokenMod to do this: !token-mod --set bar2|+[[floor(round({[[[[1d100]]-40]],0}kh1)/5)]] WOW the second order is exactly what I need! Thank you so much!