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] Is there a way to make a critical hit table API?

1474268317

Edited 1474274828
Hello, and thanks for any help anyone can give! To start things off, I'll preface this with the fact that I am awful at script making... But I'd like to TRY and make, or use one... So, I have a few Critical Hit Table's (Slashing, Bludgeoning, Piercing, and Fumbles); and while its easy enough to make players roll 1d100 to see what they get, then consulting the sheet... I was wondering if there was a way to make a script that will automatically post what the result.  eg. >Player Crits, rolls 1d100 on Slashing table. >Player Rolls a 94. > Script shows "94: Severe Chest Injury, death in 1d8+1 turns unless healed." I'm not even sure if something like this is possible, let alone how one could do this for multiple crit tables.  If possible, thanks for the help! 
1474269930
Tetsuo
Forum Champion
Sure. You can use the power cards api for this. Though, it is a Pro subscriber perk. The command would look something like: !power {{ --name|Attack Roll --Attack |[[ [$Roll] 1d20]] vs AC --Damage|[[1d6+@{str-mod} ]] --?? Roll.base == 20 ?? Crit Confirm| [[1d20]] --?? Roll.base == 20 ?? Crit Damage|[[1d6 + @{str-mod} ]] --?? Roll.base == 20 ?? Crit Effect| [[1t[crit-table]]] }}
Aha, that makes some sense to me. Well, when I do eventually go Pro, I'll set it up! 
You could also use Rollable Tables for this.
1474271212
Tetsuo
Forum Champion
Silvyre said: You could also use Rollable Tables for this. My mistake! I assumed he had rollable tables set up, and was asking for a macro that would include them in the attack! Yes, you can set up a rollable table as Silvyre mentioned, then have the players roll [[ 1 t [crit-table] ]] to roll a result from it. The first script I posted simply uses the API to incorporate this directly into the attack macro.
For all the hundreds of hours I've played and GM'd, I've never noticed the Rollable Table...  Well that answers my question! I just made a whole bunch of those for the crit table. Thank you all for your help!