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

Setting dice above a certain value to a higher number

October 10 (2 years ago)

I have a player that is using Fate Sphere from Sphere of Power which when they use a D20 roll allows them to set numbers such as 18s and 19s to be a 20. For the time being we've been making do with the cs command for macros but i was curious if there was any way to make it so that rather than having to do the very slight bit of math manually to give the higher number if there was a way for it to just display the final roll as being a 20 in a macro.

October 11 (2 years ago)
Kraynic
Pro
Sheet Author

That is one thing that you can use rollable tables for.  You could make a table named Fate20 that has each number 1-17 on it as an entry with the weight for all of them being 1.  Then you would have an entry for 20 with a weight of 3 (since it is taking the place of 18, 19, and 20).  Then you can call it in a macro as 1t[Fate20] or [[1t[Fate20]]].  If you roll multiples, it will sum just like rolling a die, you just won't get the 3D dice roll (if you have that enabled).

October 11 (2 years ago)

Edited October 11 (2 years ago)
GiGs
Pro
Sheet Author
API Scripter

The Rollable Table method doesnt cope with modifiers to the roll, which I expect you have. Since you're a Pro subscriber, you can use the API to handle this. A Mod script like Scriptcards could be programmed to do this.

October 11 (2 years ago)
Kraynic
Pro
Sheet Author

Maybe so. From the description, I thought it was for the dice roll itself without or before modifiers.

October 11 (2 years ago)

would you by chance be able to assist me in regards to getting an API setup to handle rolls like this GiGs? I've never messed with API's before

October 11 (2 years ago)
GiGs
Pro
Sheet Author
API Scripter

David M might be the best person there, as the resident ScriptCrads expert and afficianado. I generally make custom sheets and my own Sheet Workers when i have a weird dice string to deal with. There's a dedicated ScriptCards thread - the people there will be happy to help you. It seems like it would be pretty easy.

October 12 (2 years ago)
David M.
Pro
API Scripter

For a given roll, it is pretty easy to do this with scriptcards, but the downside is you'd have to create either multiple macros for every type of check, or one mega multi-query on-to-rule-them-all macro. Just depends on how much work you want to put into it weighed against the return, seeing as you already have something that does most of what you want.

Anyway, here's one way to change the roll result using scriptcards. Note I used attributes found in the 5e by Roll20 sheet since that is what my test game is. You can change the "--=result" line appropriately.

NOTE: you may need to get the latest version of scriptcards (v2..1.12 or greater) found here and manually install it for the mouseover tooltips to work properly. I had 2.1.7 when testing this at first and it was wonky, but corrected with the latest. Full documentation of scriptcards can be found here. It's a lot of information at once, so feel free to post on the scriptcards forum thread if/when you have questions if you decide to go down this path. 

!script {{
  --#title|Fate Sphere Example

  --=nat20|20
  --=d20|1d20

  --?[$d20] -ge 18 -and [$d20] -ne 20|[
      --+original roll|[$d20]
      --+Fate Sphere intervenes!|[$d20]->[$nat20]!
      --=d20|[$nat20]
  --]| 
  --=result|[$d20] +@{selected|pb}[PB] + @{selected|strength_mod}[STR]
  --+Result|[$result]
}}

Example output, with tooltips shown for the manipulated roll (18-->20) on the right