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 specific roll

Hi everyone, it's first time i post on this forum so I hope it's in the good thread. I want to create a specific roll system who is not in the basic roll. I actually work on a New game and I test it with a few friend. My problem is on the dices. The system run this way : you competences are flat modfiers, and carracteristics modifies the dice you roll. For exemple if you have 3 in Dex, you roll 1d6, with 4 : 1d8 etc... So how can i create this specific roll system? I have basic knowledge in code and the character sheet is functionnal
1588931814
GiGs
Pro
Sheet Author
API Scripter
We'd need to know the full range of possibilities, but you can do this /roll 1d[[@{selected|Dex}*2]] +2 selected lets you click a token, and it will take the stat from the character linked to that token. In this case, it's multiplying the Dex stat by 2, and using that as the sides of the dice. 
I see the logic, but it can't work from a score beyond 6. At 6 in a stat, you roll 1d12. But at 7 it's 1d12 + 1d4, and 8 : 1d12+1d6. Finaly at 9 you roll 1d20. A basic test for exemple : You have 7 in dex and 6 in aim; You will roll 1d12+1d4(stat) + 6 (ability)
I think you can do that with tables. You create one table for each value that your characteristic can take, the table is named something like myroll_ statvalue . Each table has only one result which is the text of the dice code you want to use.
1588975854
GiGs
Pro
Sheet Author
API Scripter
Tables will work up till you divide into two or more dice. Then it won't. julien, you cant do this with a standard macro. I can see two ways you could do it: Make an API script that can do this. As a pro user, you can do it, but if you're making a sheet for others to use, most users wont be able to use rolls. Make a sheet worker on your sheet to take values and return dice rolls, and print that on the sheet. But that requires you to make a character sheet, which is probably a bad idea while still working on a game. The best approach might be to use an API script while developing the game, then switch over to a sheet worker when the system design is settled. 
ok, thanks for your anwers. But I'm not confortable with the API tool if you have a little exemple or advice to help me, I take it
1589018263
GiGs
Pro
Sheet Author
API Scripter
If you give me an example of how dice are rolled, and what you want the output to look like, I can do it for you.