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

Need Macro - Roll (Dice Query) x 3d6 x 100gp

Trying to make a macro to ask for number of pieces of jewelry and then make the input number of 3d6 rolls x 100 (gp).  Ideally giving each 3d6 x 100 as it's own line item.
1612926449
Oosh
Sheet Author
API Scripter
To make all those separate rolls, you either need API (easy way) or a long Query - what's the maximum reasonable number that is likely to be input? A total is very simple, but probably not what you want: [[(?{Pieces of jewellery}*3)d6*100]]
1612928355

Edited 1612930461
David M.
Pro
API Scripter
I think KS backers have api access, right? I would use the new scriptcards script to do it. Once the script is installed, here's a macro to generate the above. I just modified Kurt's Magic Missile macro a bit ;) !scriptcard {{ --#title|Jewelry Generator --=Count|?{How many Pieces?|1} --=DisplayCount|1 --=TotalValue|0 --#leftsub|[$Count] pieces --#rightsub|3d6 x 100GP each --:Loop| -->GenerateItem| --=DisplayCount|[$DisplayCount] + 1 --?[$DisplayCount] -le [$Count]|Loop --+|[c][b]Total Value = [$TotalValue] GP[/b][/c] --X| --:GenerateItem| --=ThisPiece|3d6 * 100 --=TotalValue|[$TotalValue] + [$ThisPiece] --+Item [$DisplayCount.Total]| [$ThisPiece] [b]GP[/b] --<| }} If the die roll colors are off-putting to you, you can replace the last line of the GenerateItem function with this to make them all black. --+Item [$DisplayCount.Total]| [b][$ThisPiece.Total] GP[/b] EDIT 2 (placed up here because relevant to above) - I also just realized that you can force the die rolls to always be yellow by re-assigning the roll value as 0+CurrentValue, like this:       --=ThisPiece|3d6 * 100       --=ThisPiece|0+[$ThisPiece] EDIT - I just realized you would probably want to whisper this to yourself. Just add this line somewhere near the top (like under the title line)   --#whisper|GM EDIT 3 - You could also combine with a rollable table of Item names/types and add to the GenerateItem function, something like: --:GenerateItem| --=ThisPiece|3d6 * 100 --=Type|[T#JewelryTypes] --=TotalValue|[$TotalValue] + [$ThisPiece] --+Item [$DisplayCount.Total]| [b][#990000][$ThisPiece][/#] GP[/b] - [$Type.tableEntryText] --<|
KS backers don't have API access (I believe!).  Thanks though!   Oosh, I think I am going with a total as you pointed to, it's easier and I can see the values when I mouseover anyway.
1612965723

Edited 1612966039
David M.
Pro
API Scripter
Hmm, this problem aside, you should probably double check for api access anyway. According to this , you should have it, and there are so many useful tools available to make your GM'ing life easier. Most api scripts are much much simpler to implement than the scriptcards solution I posted earlier, btw. To check, go into your game page and look for this entry in the Settings drop-down
  What I see as a KS Backer.
1612968728
David M.
Pro
API Scripter
Bummer! I posted a question on the Pro forum to see if the information I linked re: KS perks was incomplete/incorrect. Will let you know what I find out.
1612969000

Edited 1612969108
David M.
Pro
API Scripter
Just got confirmation from TheAaron that the KS backer info should be accurate. Question came up: Are you the creator of the game for which you checked the access?
1612969070
David M.
Pro
API Scripter
Not sure why I didn't ask this question on a public forum, haha. Can you access the Pro forum? Here is the Pro thread in question.
Yes, it's my game.
1612973234
David M.
Pro
API Scripter
OK, this sounds like it might be something that would require a support ticket to get you access. I pointed TheAaron to this thread, so we'll see if he has any ideas on additional troubleshooting steps.
Thanks!
1613162386

Edited 1613162415
David M.
Pro
API Scripter
OK Kelly, the general consensus regarding KS api script access is... maybe? Some thoughts either way, but no actual KS backers replied.  I would go ahead and start a Help Desk request if you haven't already. You can give the link to the wiki article I posted above and ask if it is accurate or not. And if so, are they able to grant access.  Good luck, and let us know what happens. The folks commenting on the other thread are curious, too!
OK, submitted.  Fingers crossed!
1613673559

Edited 1613673675
David M.
Pro
API Scripter
Good luck! Hope it works out for you. If you don't mind, report back with the answer, as there are several folks interested.  EDIT - side note: since I last posted the scriptcard solution, there has been an update that can optionally disable all of the High/Low/Mixed die roll colors if you are interested.
I have now been given API access!
1614685175
David M.
Pro
API Scripter
Woohoo, awesome!!!
1614685499
David M.
Pro
API Scripter
There are a ton of useful scripts out there. Here is my standard blurb on some popular ones.