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 .
×

A (Probably) Simple Question (Please help, I'm a newbie!)

1625579072

Edited 1625580067
I'm working up some character abilities for a game of Slayers, from Gila RPGs. One of the character classes has an attack where you roll a weapon die and on a result of 4 or more you score a "Hit" and roll again, stopping when you fail to roll a hit with your die. You then deal a certain amount of damage per hit. I've figured out enough to get this for the ability text: You hit [[ [[@{character|Weapon Dice}>4!]] ]] time(s), for $[[0]] x [[@{character|Damage}]] damage! It seems to work and be perfectly functional. The player just has to multiply the last two numbers themself and they have their end result. However, I would prefer if the app could do that for them. But I can't figure out how to make that work. Any tips would be appreciated!
1625579212
Finderski
Pro
Sheet Author
Compendium Curator
Try this: You hit [[ [[@{character|Weapon Dice}>4!]] ]] time(s), for [[ $[[0]] * [[@{character|Damage}]] ]] damage!
That displays: You hit&nbsp; 2 &nbsp;time(s), for [[&nbsp; <span class="inlinerollresult showtip tipsy-n-right" title=" Rolling 2d6>4! = ( 5 + 5 )" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(254, 246, 142); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em; color: rgb(64, 64, 64); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;">2 &nbsp;* 2 ]] damage!
Try this: You do [[ [[@{character|Weapon Dice}&gt;4!]] * [[@{character|Damage}]] ]] damage, hitting $[[0]] times!
1625581271

Edited 1625581283
David M.
Pro
API Scripter
You could also put it into a template and use the trick of putting the rolls outside of the display brackets if you want the info in a different order. &amp;{template:default} [[ [[@{character|Weapon Dice}&gt;4]]*[[@{character|Damage}]] ]]&nbsp;{{name=Some Attack}} {{Num Hits=$[[0]]}} {{Damage per hit=$[[1]]}} {{Total Damage=$[[2]]}}
Jarren K. said: Try this: You do [[ [[@{character|Weapon Dice}&gt;4!]] * [[@{character|Damage}]] ]] damage, hitting $[[0]] times! I was air coding a bit too quickly: You do [[ [[@{character|weapon_dice}&gt;4!]] * [[@{character|damage}]] ]] damage, hitting $[[0]] times for $[[1]] damage each!
1625581804

Edited 1625583490
Hey, that's a clever way to switch things around and make it work! Thanks for your help.
1625585693
GiGs
Pro
Sheet Author
API Scripter
Finderski said: Try this: You hit [[ [[@{character|Weapon Dice}&gt;4!]] ]] time(s), for [[ $[[0]] * [[@{character|Damage}]] ]] damage! Just a note: you can never do any math or other operations with $[[0]] entities. They are no longer numbers, they are objects that can only be displayed. Character sheet rolltemplates are able to use the objects in logic tests (rollGreater, rollLess, etc), but that's the only time you can use them as numbers.
1625587616
Finderski
Pro
Sheet Author
Compendium Curator
GiGs said: Finderski said: Try this: You hit [[ [[@{character|Weapon Dice}&gt;4!]] ]] time(s), for [[ $[[0]] * [[@{character|Damage}]] ]] damage! Just a note: you can never do any math or other operations with $[[0]] entities. They are no longer numbers, they are objects that can only be displayed. Character sheet rolltemplates are able to use the objects in logic tests (rollGreater, rollLess, etc), but that's the only time you can use them as numbers. Interesting...good to know. :)