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 .
×
The Roll20 Black Friday sale is live now! Up to 30% Off Your Favorite Content!

Nesting Queries and Makros and other questions

Hiho, I need some help: Problem 1: Can I allow my players to place Tokens on their own? Problem 2: I need to use previous results multiple times. How can i reference those results from previous rolls? Lets say i /roll 5d6>5 and get {1,2,2,5,6} = 2Successes Now i want to use these successes in other ways. Maybe i want to add them to other values. I want to insert them in sentences or use them as modifiers for following tests. example: Compiling a Sprite in SR5: I need to roll 3 times. I need to make my own roll. I need to roll the Sprite. Compare them with each other(First use of their Hits).Then i need to roll out the Drain/Fading (which uses the Sprites Hits again). Problem 3: Is there a way to reduce the Initiative of everyone in the Turntracker by a set amount? I can do it individually, but with 10 Tokens in it, i would prefer to do it to all of them at once. Problem 4: Checking for glitches. In Shadowrun you glitch a test when half or more of your dice are 1s and critical glitch if you don't even have one Hit when glitching. Can i check for the amount of 1s and compare them to the dicepools and their Hits? How? Now here is the Makro I want to create, that created Problem 2 and 4: Shadowrun 5, Summon/Bind a Spirit/Sprite Standardroll: [[(?{Attribute|1}+?{Skill|0}+?{Positive Modifiers|0}-?{Penalty|0})d6sdkh?{Limit|1}>5]] Simplified: /r ?{Dicepool|0}d6>5 Step1: Query Ask if I want to Summon or Bind. Step2: Ask what my Dicepool is Step3: Ask for the Rating/Dicepool of the Spirit Step4: Ask if I want to use Edge/Luck on my test (add X dice and explode the complete pool = 2 options, no and yes) Step5: Roll the Summoning/Binding Step6: Show me the result and ask if I want to reroll some dice (reroll all non-Hits or add X dice and only explode the added dice = 3 options, no and yesA or yesB) Step6.5 Reroll the dice if I wanted to reroll Step7: Ask if the Spirit wants to use Edge/Luck on his test Step8: Roll the Defense test by using Rating*1 dice if I chose Summon and use Rating*2 dice if I chose Binding Step9: Show me the result and ask if I want to reroll some dice Step9.5 Reroll the dice if I wanted to reroll Step 10: Compare the Summoning against the Defense and tell me who won with how many excess Hits Step11: Take the amount of Hits in the Defensetest(Spirit) and double it to determine the drain damage. If the result is lower than 2, the drain damage is 2. Step11.5 Tell me how much drain damage I have to resist. Step12: Ask if I want to use Edge/Luck for the drain test Step13: Roll the drain test Step14: Show me the result and ask if I want to reroll some dice Step14.5 Reroll the dice if I want to reroll some dice Step15: Reduce the drain damage by the amount of Hits I got with the draintest. Step16: tell everybody via emote “Tyrannon summoned/bound(depending on the query) a spirit with [result Step 10] tasks/wishes and takes [result Step 15] damage doing it. This is only the most basic things I have to write in the code. I will add limits, exploding dice and modifier myself afterwards but I am unable to write even the basic steps to a working makro. As you can see summoning a spirit is a pain in the ass and it makes sense to makro it. The question is: Is it possible to do it? And if not, what can I do instead? One problem is, that it always asks for the values of all the variables before using them. So, can I make him roll the tests before going forward with the makro? If this is possible I would try to nest macros within querys over and over again. Thanks for your time, Tyrannon
1458189069

Edited 1458189634
Tyrannon said: Problem 1: Can I allow my players to place Tokens on their own? Yup. From the Roll20 Wiki: Default Token The Default Token field gives you the ability to select a token on the tabletop to use as the default token for this Character whenever it is added to the table. Just select a token, then press the "Use Selected Token" button. A copy of the token will be stored, including any notes, player permissions settings, and bar values and links. A GM or a player that can Edit and Control this Character can then drag-and-drop the Character from the Journal listing in the right sidebar onto the tabletop, and a new copy of the Character's default token will be added to the table. Problem 2: I need to use previous results multiple times. How can i reference those results from previous rolls? Unfortunately, it's not possible for a macro to output the results of a single roll in multiple locations without the assistance of an API Script . Access to the API is restricted to games in which the Creator has an active Pro subscription. Problem 3: Is there a way to reduce the Initiative of everyone in the Turntracker by a set amount? I can do it individually, but with 10 Tokens in it, i would prefer to do it to all of them at once. Unfortunately, this would, again, require the assistance of an API Script . Our SR5 game found the Group Initiative script worked well for this. Problem 4: Checking for glitches. In Shadowrun you glitch a test when half or more of your dice are 1s and critical glitch if you don't even have one Hit when glitching. Can i check for the amount of 1s and compare them to the dicepools and their Hits? How? Unfortunately, this would, yet again, require the assistance of an API Script . As of recently, PowerCards can handle this very well .
Hi
1458251795

Edited 1458253706
I really needed a good excuse to stop procrastinating on a SR5 summoning macro... so here we go! <a href="https://gist.github.com/Silvyre/e29822480609ab9d5ee2" rel="nofollow">https://gist.github.com/Silvyre/e29822480609ab9d5ee2</a> RAW: <a href="https://gist.githubusercontent.com/Silvyre/e29822480609ab9d5ee2/raw/" rel="nofollow">https://gist.githubusercontent.com/Silvyre/e29822480609ab9d5ee2/raw/</a> A few things about this macro: It relies heavily on Advanced Usage for Roll Queries and API Command Buttons . As such, it contains HTML entities and therefore must be saved as an Ability . It does not require access to the API. It does not use any Attribute calls. That said, many of the nested Roll Queries could easily be replaced by Attribute calls (highly recommended). Namely, Attributes for the player's Magic, Drain Attribute, Edge, Summoning and Binding ratings. ("Problem 2") Steps 10, 11.5, 15 and 16 could really benefit from the assistance of an API Script (e.g. PowerCards).