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

Help with half damage on token mod

Hey, so I'm using a pretty standard damage macro along side the wonderful Tokenmod API script... !token-mod --set bar1_value|-[[(?{Damage})/?{Resistance?|No,1|Yes,2}*?{Vulnerability?|No,1|Yes,2}]]  --ids @{target|Target 1|token_id} /em damaged @{target|Target 1|token_name} So the problem im trying to fix is when the Monster/PC is resistant to the damage being caused, and an odd number is the damage total.. so for example, a character causes 11 damage to the orc, the orc is resistant so it takes 5.5 damage.. I'm trying to get rid of the .5 so that it takes 5.0 instead... I know that there is the Floor command that gets rid of these decimal point calculations as well as the Ciel command... but I dont where abouts it needs to go into the macro, or if indeed it needs to go in here at all... so anybody got any ideas/solutions ? Thanks
1584285369

Edited 1584285382
The Aaron
Roll20 Production Team
API Scripter
try: !token-mod --set bar1_value|-[[ floor( (?{Damage})/?{Resistance?|No,1|Yes,2}*?{Vulnerability?|No,1|Yes,2} ) ]] --ids @{target|Target 1|token_id} /em damaged @{target|Target 1|token_name}
Omg you are such a legend... thank you so so much :D
There are also api that apply to this topic:&nbsp; <a href="https://www.youtube.com/watch?v=DtHnEWA6WPA" rel="nofollow">https://www.youtube.com/watch?v=DtHnEWA6WPA</a>