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

Blind rolls macro fine tweak help needed

1655676515
Hi all, I have written a macro based on one in the Roll20 wiki, it uses Stylus to display a little bit to the player so they know their button click has been processed, but it sends Skills checks to DM only (ie not a whisper shared between GM and player) for those situations where you want to avoid meta gaming: /w gm &{template:default} {{name=Blind Skills Check}} {{@{selected|character_name} rolls...=}} {{=[Arcana = ](#" id="broll" style="display:none)[[[@{selected|arcana_bonus} +d20)]]](#" id="broll" style="display:none) [Deception = ](#" id="broll" style="display:none)[[[@{selected|deception_bonus} +d20)]]](#" id="broll" style="display:none)  [Insight = ](#" id="broll" style="display:none)[[[@{selected|insight_bonus} +d20)]]](#" id="broll" style="display:none) [Investigation = ](#" id="broll" style="display:none)[[[@{selected|investigation_bonus} +d20)]]](#" id="broll" style="display:none) [Medicine = ](#" id="broll" style="display:none)[[[@{selected|medicine_bonus} +d20)]]](#" id="broll" style="display:none) [Nature = ](#" id="broll" style="display:none)[[[@{selected|nature_bonus} +d20)]]](#" id="broll" style="display:none) [Perception = ](#" id="broll" style="display:none)[[[@{selected|perception_bonus} +d20)]]](#" id="broll" style="display:none) [Persuasion = ](#" id="broll" style="display:none)[[[@{selected|persuasion_bonus} +d20)]]](#" id="broll" style="display:none) [Sleight of Hand = ](#" id="broll" style="display:none)[[[@{selected|sleight_of_hand_bonus} +d20)]]](#" id="broll" style="display:none) [Stealth = ](#" id="broll" style="display:none)[[[@{selected|stealth_bonus} +d20)]]](#" id="broll" style="display:none) [Survival = ](#" id="broll" style="display:none)[[[@{selected|survival_bonus} +d20)]]](#" id="broll" style="display:none) }}" style="color:darkred;background-color:white;border:solid 2px darkred;font-size:17px;border-radius: 5px;padding:2px;display:inline-block) The stylus is #userscript-broll {     display: inline !important;     } After a huge amount of trial and error this works, but what I really want is for it to take one d20 roll and apply that to each bonus, at present I have individual rolls.  I will live with this if it can't be done, but my brain is fried.  Anyone able to help?  I know PRO gives you API for this, but I don't want to go PRO.  All helpful suggestions gratefully received
1655971825

Edited 1655971899
GiGs
Pro
Sheet Author
API Scripter
You can do this in a clunky way with the Reusing Roll technique. You roll d20 and add the first skill value. Then you subtract that skill value, and add the second skill. Then subtract that skill and add the next skill. And so on. It would look something like (I only did the first 4). While doing this, I noticed your inline rolls have a ) without an ( - that might cause issues. /w gm &{template:default} [[ [[ [[ [[ @{selected|arcana_bonus} +d20 ]] - @{selected|arcana_bonus}  + @{selected|deception_bonus} ]] - @{selected|deception_bonus} + @{selected|insight_bonus} ]] - @{selected|insight_bonus} + @{selected|investigation_bonus}]] {{name=Blind Skills Check}} {{@{selected|character_name} rolls...=}} {{=[Arcana = ](#" id="broll" style="display:none)[$[[0]]](#" id="broll" style="display:none) [Deception = ](#" id="broll" style="display:none)[$[[1]]](#" id="broll" style="display:none)  [Insight = ](#" id="broll" style="display:none)[$[[2]]](#" id="broll" style="display:none) [Investigation = ](#" id="broll" style="display:none)[$[[3]]](#" id="broll" style="display:none) [Medicine = ](#" id="broll" style="display:none)[[[@{selected|medicine_bonus} +d20)]]](#" id="broll" style="display:none) [Nature = ](#" id="broll" style="display:none)[[[@{selected|nature_bonus} +d20)]]](#" id="broll" style="display:none) [Perception = ](#" id="broll" style="display:none)[[[@{selected|perception_bonus} +d20)]]](#" id="broll" style="display:none) [Persuasion = ](#" id="broll" style="display:none)[[[@{selected|persuasion_bonus} +d20)]]](#" id="broll" style="display:none) [Sleight of Hand = ](#" id="broll" style="display:none)[[[@{selected|sleight_of_hand_bonus} +d20)]]](#" id="broll" style="display:none) [Stealth = ](#" id="broll" style="display:none)[[[@{selected|stealth_bonus} +d20)]]](#" id="broll" style="display:none) [Survival = ](#" id="broll" style="display:none)[[[@{selected|survival_bonus} +d20)]]](#" id="broll" style="display:none) }}" style="color:darkred;background-color:white;border:solid 2px darkred;font-size:17px;border-radius: 5px;padding:2px;display:inline-block) One potential downside: after 7 or 8 nested inline rolls, the ordering can get a bit wacky, so this method might not work. But it's worth a try - there's no other way to achieve this.
1655994986

Edited 1656007481
Hi and thank you, it isn't working quite right at the moment , the first line is spot on but then it goes awry.  I have cleaned out the extra ) - thank you for spotting those, maybe I should use a text editor and paste rather than try and work directly in Roll20 now that I am ancient!!!  I'm blaming eyes not incompetence anyway This is it following the above format: /w gm &{template:default} [[ [[ [[ [[ [[ [[ [[ [[ [[ [[ [[@{selected|arcana_bonus} +d20 ]] - @{selected|arcana_bonus}  + @{selected|deception_bonus} ]] - @{selected|deception_bonus} + @{selected|insight_bonus} ]] - @{selected|insight_bonus} + @{selected|investigation_bonus} ]] - @{selected|investigation_bonus}  + @{selected|medicine_bonus} ]] - @{selected|medicine_bonus}  + @{selected|nature_bonus} ]] - @{selected|nature_bonus}  + @{selected|perception_bonus} ]] - @{selected|perception_bonus}  + @{selected|persuasion_bonus} ]] - @{selected|persuasion_bonus}  + @{selected|sleight_of_hand_bonus} ]] - @{selected|sleight_of_hand_bonus}  + @{selected|stealth_bonus} ]] - @{selected|stealth_bonus}  + @{selected|survival_bonus} ]]{{name=Blind Skills Check}} {{@{selected|character_name} rolls...=}} {{= [Arcana = ](#" id="broll" style="display:none)[$[[0]]] [Deception = ](#" id="broll" style="display:none)[$[[1]]] [Insight = ](#" id="broll" style="display:none)[$[[2]]] [Investigation = ](#" id="broll" style="display:none)[$[[3]]] [Medicine = ](#" id="broll" style="display:none)[$[[4]]] [Nature = ](#" id="broll" style="display:none)[$[[5]]] [Perception = ](#" id="broll" style="display:none)[$[[6]]] [Persuasion = ](#" id="broll" style="display:none)[$[[7]]] [Sleight of Hand = ](#" id="broll" style="display:none)[$[[8]]] [Stealth = ](#" id="broll" style="display:none)[$[[9]]] [Survival = ](#" id="broll" style="display:none)[$[[10]]] }}" style="color:darkred;background-color:white;border:solid 2px darkred;font-size:17px;border-radius: 5px;padding:2px;display:inline-block) Ill upload a snip in a sec to show where it is going wrong...thanks again though, so very much appreciated :) So, with a d20 roll of 16 the first line is spot on as Isoren has a -3 the [] around the results is the bit that leads to it being hidden in the result, but now seems to just wrap square braces around the result and it is thus no longer hidden from the players.  The text shown comes from hovering the mouse over the Deception line, removing the mod of -3 looks good and the correct +8 is being added, but the opposite side is just a reflection??
1656009111

Edited 1656085730
Hi GiGs, I have played with this a little more and cannot get the $[[x]] entries to behave like they should. Even though the rest of the table is hidden from the players (if it works correctly all they can see is as far as Isoren rolls...), with those entries they just appear as beautiful white numbers on a gorgeous purple background?  I have two versions of this, my original that rolls a d20 for each skill, adjusting with the appropiate bonus, and another that just gives me as DM a single secret d20. I then look up the appropriate bit from the character sheet and have to do maths and stuff.  I will give the players the option of which they want to use, my lot LOVE RNG and rip each other to shreds over duff rolls, so they might love the all or nothing of the latter.  Yes, I am referring to a certain barbarian tripping over the top step whilst trying to push a statue over and that Kenku assassin taking a lit torch into a room full of gas and epically failing the save...If you are totally bored and crack it then I'd love to know how, but this is beyond my skill set. I think the additiional difficulty of not being able to hide the crucial bit is just too much grit in the oyster.  Just want to add my thanks again, loved this game for decades and now love the Roll20 community, faith in humanity fully restored (by a group of people who like pretending to kill stuff roleplay :)
1656010495
GiGs
Pro
Sheet Author
API Scripter
It's possible there are too many inline rolls here for this to work properly, but it seems like your output is going wrong very fast. I hadn't looked closely at the macr construction, and hadn't noticed the way you were construction buttons for stylus. Ive never used that technique, so don't know it's an issue - they way the early entries show the [ ] but later entries don't suggest something is wrong there. It's possibile this technique just doesnt work with reusing rolls. But I do see two things to try: The first thing I'd try is putting round brackets around each subtraction, like /w gm &{template:default} [[ [[ [[ [[ [[ [[ [[ [[ [[ [[ [[@{selected|arcana_bonus} +d20 ]] - (@{selected|arcana_bonus}) + @{selected|deception_bonus} ]] - (@{selected|deception_bonus}) + @{selected|insight_bonus} ]] - (@{selected|insight_bonus}) + @{selected|investigation_bonus} ]] - That's because there is somtimes an issue in rollt20 calculations where you end up with two minus signs in a row, and putting brackets around the negative number forces roll20 to treat it as anegative number properly. The second thing I'd try is removing all the stylus parts, and see if it works properly without them (and then look into adding them back). Like: {{Arcana=$[[0]]}} {{Deception =$[[1]]}} {{ Insight = $[[2]]}} etc This to check the arithemti is operating properly. With an issue like this finding where the problem is is an important step to fixing it.
1656017802
Thanks for that - the use of ( and ) because of the - - issue has definitely made the maths work and all the results are as they should be.  My problem now is how to make those $[[x]] entries disappear like text values do
1656019626
Simon G. said: Thanks for that - the use of ( and ) because of the - - issue has definitely made the maths work and all the results are as they should be.  My problem now is how to make those $[[x]] entries disappear like text values do ... you won't be able to.  The brackets around the $[[x]] entries are going to interfere with the brackets for inserting the html style code to hide them, and the Roll20 Order of Operations will prevent you from using a query or other approach to substitute them.
1656021699
But if you're truly committed to getting a blind roll, you could instead give your player a macro that displays a note to them while providing you a list of buttons that you get to select from to make a blind roll for them: 1. Create a character named 'BlindRoll' 2. On the BlindRoll character, you will have to modify the Advantage Toggle to Query as well as the Whisper settings to 'Always' 3. Then on the BlindRoll character, you will have to modify each of the attributes for rolls to add 'selected|' to each section, except the wtype . This is an example for Arcana: @{wtype}&{template:simple} {{rname=^{arcana-u}}} {{mod=@{selected|arcana_bonus}}} {{r1=[[@{selected|d20}+@{selected|arcana_bonus}[Mods]@{selected|pbd_safe}]]}} {{query=1}} ?{Advantage?|Normal Roll,&#123&#123normal=1&#125&#125 &#123&#123r2=[[0d20|Advantage,&#123&#123advantage=1&#125&#125 &#123&#123r2=[[@{selected|d20}|Disadvantage,&#123&#123disadvantage=1&#125&#125 &#123&#123r2=[[@{selected|d20}}+@{selected|arcana_bonus}[Mods]@{selected|pbd_safe}]]}} {{global=@{selected|global_skill_mod}}} @{selected|charname_output} 4. Then the macro for your player will look like this (if you're using the 'D&D 5E by Roll20' sheet): /w gm &{template:npcaction} {{rname=Blind roll}}  {{description=You make a roll that only the GM can see for ?{Blind Roll for What?|Arcana|Deception|Insight|Nature}... [Arcana](~BlindRoll|arcana" id="broll" style="display:none;) [|](#" id="broll" style="display:none;) [Deception](~BlindRoll|deception" id="broll" style="display:none;) [|](#" id="broll" style="display:none;) [Insight](~BlindRoll|insight" id="broll" style="display:none;) [|](#" id="broll" style="display:none;) [Nature](~BlindRoll|nature" id="broll" style="display:none;)}} 5. Optionally (and I suggest doing this) you can put all of the style information on a separate Macro Mule character (or on the BlindRoll character itself) so that you can greatly simplify your macro and make adjustments to the appearance of your buttons at any time: Make an ability named 'BlindRollStyle' with this in the code: style="color: #ce0f69; text-decoration: none; background: none; background-color: transparent; border: none; padding: 0px; white-space: pre; display: none;" id="broll" The macro in step 4 will now look like this: /w gm &{template:npcaction} {{rname=Blind roll}}  {{description=You make a roll that only the GM can see for ?{Blind Roll for What?|Arcana|Deception|Insight|Nature}... [Arcana](~BlindRoll|arcana" %{BlindRoll|BlindRollStyle}) [|](#" %{BlindRoll|BlindRollStyle}) [Deception](~BlindRoll|deception" %{BlindRoll|BlindRollStyle}) [|](#" %{BlindRoll|BlindRollStyle}) [Insight](~BlindRoll|insight" %{BlindRoll|BlindRollStyle}) [|](#" %{BlindRoll|BlindRollStyle}) [Nature](~BlindRoll|nature" %{BlindRoll|BlindRollStyle})}} What your players see: What the GM sees:
1656031601

Edited 1656071372
Jarren said: Simon G. said: Thanks for that - the use of ( and ) because of the - - issue has definitely made the maths work and all the results are as they should be.  My problem now is how to make those $[[x]] entries disappear like text values do ... you won't be able to.  The brackets around the $[[x]] entries are going to interfere with the brackets for inserting the html style code to hide them, and the Roll20 Order of Operations will prevent you from using a query or other approach to substitute them. It appears the Order of Operations, at least when it concerns HTML entity replacements and roll reference replacement, is a little inconsistent. In regular text chat roll references are replaced by their HTML counterpart before HTML entities; however when using a roll template it's the reverse. So by using HTML entities to replace the square brackets, and using a roll template, you can get a valid roll reference inside link text and then have it replaced by the HTML for the roll. As such the following code should work using the standard blind roll trick /w gm &{template:default} [[ [[ [[ [[ [[ [[ [[ [[ [[ [[ [[d20 + @{selected|arcana_bonus} ]] - (@{selected|arcana_bonus}) + @{selected|deception_bonus} ]] - (@{selected|deception_bonus}) + @{selected|insight_bonus} ]] - (@{selected|insight_bonus}) + @{selected|investigation_bonus} ]] - (@{selected|investigation_bonus}) + @{selected|medicine_bonus} ]] - (@{selected|medicine_bonus}) + @{selected|nature_bonus} ]] - (@{selected|nature_bonus}) + @{selected|perception_bonus} ]] - (@{selected|perception_bonus}) + @{selected|persuasion_bonus} ]] - (@{selected|persuasion_bonus}) + @{selected|sleight_of_hand_bonus} ]] - (@{selected|sleight_of_hand_bonus}) + @{selected|stealth_bonus} ]] - (@{selected|stealth_bonus}) + @{selected|survival_bonus} ]]{{name=Blind Skills Check}} {{@{selected|character_name} rolls...=}} {{=[Arcana = $[[0]]%NEWLINE%](#" id="broll" style="display:none)[Deception = $[[1]]%NEWLINE%](#" id="broll" style="display:none)[Insight = $[[2]]%NEWLINE%](#" id="broll" style="display:none)[Investigation = $[[3]]%NEWLINE%](#" id="broll" style="display:none)[Medicine = $[[4]]%NEWLINE%](#" id="broll" style="display:none)[Nature = $[[5]]%NEWLINE%](#" id="broll" style="display:none)[Perception = $[[6]]%NEWLINE%](#" id="broll" style="display:none)[Persuasion = $[[7]]%NEWLINE%](#" id="broll" style="display:none)[Sleight of Hand = $[[8]]%NEWLINE%](#" id="broll" style="display:none)[Stealth = $[[9]]%NEWLINE%](#" id="broll" style="display:none)[Survival = $[[10]]%NEWLINE%](#" id="broll" style="display:none)}}" I also took the liberty of putting the newlines inside the hidden sections so your players don't see a large empty box. The ability to use a full roll reference inside a link does open some interesting possibilities.
1656042993
RainbowEncoder said: It appears the Order of Operations, at least when it concerns HTML entity replacements and roll reference replacement, is a little inconsistent. In regular text chat roll references are replaced by their HTML counterpart before HTML entities; however when using a roll template it's the reverse. So by using HTML entities to replace the square brackets, and using a roll template, you can get a valid roll reference inside link text and then have it replaced by the HTML for the roll. As such the following code should work using the standard blind roll trick /w gm &{template:default} [[ [[ [[ [[ [[ [[ [[ [[ [[ [[ [[d20 + @{selected|arcana_bonus} ]] - (@{selected|arcana_bonus}) + @{selected|deception_bonus} ]] - (@{selected|deception_bonus}) + @{selected|insight_bonus} ]] - (@{selected|insight_bonus)} + @{selected|investigation_bonus} ]] - (@{selected|investigation_bonus}) + @{selected|medicine_bonus} ]] - (@{selected|medicine_bonus}) + @{selected|nature_bonus} ]] - (@{selected|nature_bonus}) + @{selected|perception_bonus} ]] - (@{selected|perception_bonus}) + @{selected|persuasion_bonus} ]] - (@{selected|persuasion_bonus}) + @{selected|sleight_of_hand_bonus} ]] - (@{selected|sleight_of_hand_bonus}) + @{selected|stealth_bonus} ]] - (@{selected|stealth_bonus}) + @{selected|survival_bonus} ]]{{name=Blind Skills Check}} {{@{selected|character_name} rolls...=}} {{=[Arcana = $[[0]]%NEWLINE%](#" id="broll" style="display:none)[Deception = $[[1]]%NEWLINE%](#" id="broll" style="display:none)[Insight = $[[2]]%NEWLINE%](#" id="broll" style="display:none)[Investigation = $[[3]]%NEWLINE%](#" id="broll" style="display:none)[Medicine = $[[4]]%NEWLINE%](#" id="broll" style="display:none)[Nature = $[[5]]%NEWLINE%](#" id="broll" style="display:none)[Perception = $[[6]]%NEWLINE%](#" id="broll" style="display:none)[Persuasion = $[[7]]%NEWLINE%](#" id="broll" style="display:none)[Sleight of Hand = $[[8]]%NEWLINE%](#" id="broll" style="display:none)[Stealth = $[[9]]%NEWLINE%](#" id="broll" style="display:none)[Survival = $[[10]]%NEWLINE%](#" id="broll" style="display:none)}}" I also took the liberty of putting the newlines inside the hidden sections so your players don't see a large empty box. The ability to use a full roll reference inside a link does open some interesting possibilities. Wow - mind blown.  I tried using bracket replacements and could not get it to work.
1656054222

Edited 1656057767
Hi and thanks to all for your hard work, RainbowEncoder that is awesome and works beautifully.  I had to take out the second reference to insight_bonus (where it is subtracted and investigation is added on) as it came up with a red warning about unable to find, I then re-typed it (because I couldn't see a fault with typos or anything) and it now goes through as it should.  GiGs, cheers, I learned a lot about re-using rolls and Jarren, I was only thinking about the character mule last night...Many thanks all, so glad I posted as I have learned so much to improve our table
1656055205
GiGs
Pro
Sheet Author
API Scripter
Simon G. said: I had to take out the second reference to insight_bonus (where it is subtracted and investigation is added on) as it came up with a red warning about unable to find This might be a fault of the character sheet. You might need to ensure that every attribute has a manually entered value.
1656057847
Hi GiGs, looking at the code from Rainbow Encoder, the second use of insight has )} at the end instead of }), once that is fixed it works a charm
1656059632
GiGs
Pro
Sheet Author
API Scripter
aha, that kind of mistake is so easy to make with such a macro.