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 .
Advertisement Create a free account Compendium in Game, Join Today

Stupid Roll20 Tricks (and some clever ones)

1596367173

Edited 1596375284
GiGs
Pro
Sheet Author
API Scripter
Reusing Rolls - Rolltemplate Helper functions Note: &nbsp;This is specifically for character sheet designers, but it's an implementation of an earlier trick from this thread that is only documented here. Remember the Reusing Rolls &nbsp;trick from here&nbsp; <a href="https://app.roll20.net/forum/permalink/8747581/" rel="nofollow">https://app.roll20.net/forum/permalink/8747581/</a> &nbsp;and here&nbsp; <a href="https://app.roll20.net/forum/permalink/8761813/" rel="nofollow">https://app.roll20.net/forum/permalink/8761813/</a> &nbsp;? Here's another nifty and counter-intuitive thing about them: When using them in a rolltemplate, you can use them with logic functions, like rollGreater(). For instance: &amp;{template:custom}&nbsp;[[&nbsp;[[1d100]]&nbsp;-&nbsp;?{Target&nbsp;Number?|50}]] {{target=[[?{Target&nbsp;Number?}]]}}&nbsp;{{raw_roll=$[[0]]}}&nbsp;{{difference=$[[1]]}} and a rolltemplate &lt;rolltemplate&nbsp;class="sheet-rolltemplate-custom"&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div&nbsp;class="sheet-content"&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div&nbsp;class="sheet-key"&gt;Target&lt;/div&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div&nbsp;class="sheet-value"&gt;{{target}}&lt;/div&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div&nbsp;class="sheet-key"&gt;Raw&nbsp;Roll&lt;/div&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div&nbsp;class="sheet-value"&gt;{{raw_roll}}&nbsp;{{#rollGreater()&nbsp;raw_roll&nbsp;target}}&nbsp;(above&nbsp;Target)&nbsp;{{/rollGreater()&nbsp;raw_roll&nbsp;target}}&lt;/div&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div&nbsp;class="sheet-key"&gt;Difference&lt;/div&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div&nbsp;class="sheet-value"&gt;{{difference}}&lt;/div&gt; &nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt; &lt;/rolltemplate&gt; This will show the text (above Target) &nbsp;for raw_rolls that roll above the target - even though row_roll is one of these weird pseudo-inline rolls. This makes these quantities even more useful for character sheet design.
1596372318

Edited 1596375435
but how does one inject the Roll Template? your trick is incomplete because it&nbsp; lacks key information. Edit: much better.
1596375185

Edited 1596375313
GiGs
Pro
Sheet Author
API Scripter
What do you mean? This works as is. You need to be building a character sheet, but this thread has tricks for all sorts of things (including API tricks) and this is an implementation of the earlier stupid trick that isnt at all obvious that it would work. I added a note to this effect in the previous post.
1596393391

Edited 1596411080
Reusing Rolls—Two Unique Roll Results Making use of this trick: <a href="https://app.roll20.net/forum/permalink/8747581/" rel="nofollow">https://app.roll20.net/forum/permalink/8747581/</a> I was trying to find a way to roll 2d8, getting both results separately without getting the same result twice, when I remembered this trick. Turns out it works for inline rolls that are nested inside each other. [[1d8r[[1d8]]]], $[[0]] The outer nesting is treated as the last one in the line, so $[[0]] gives you the result of the first inline roll in the deepest layer of the roll while $[[1]] gives you the same result as the complete roll. If the nested 1d8 results in a 4, the outer roll becomes 1d8r4 so it rerolls any results of 4. The $[[0]] will show an output of 4 and the inline roll will have a result of any number between 1 and 8, except for 4. I haven't yet tested multiple nested layers or multiple inline rolls within the main roll, but I suspect preventing more than 2 rolls from matching would get quite complex, if at all possible.
1596393813

Edited 1596393870
GiGs
Pro
Sheet Author
API Scripter
It took me longer than it should to realise what this trick was doing. I'd have called it something like "Multiple Rolls - Each Unique ", though it may have been just me being dense. People have asked how to get unique rolls before, so this is cool. This is the trick that keeps on giving. Multiple levels of nesting are possible, but it does seem to break down and give inaccurate results after a while. The rolls do have to be very complex before that happens.
1596393982
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Many more of these and the top index will need a sub-category. :D
Here are my two tips Sneak attack query for Rogues Go to settings cogwheel and enable global damage modifier &nbsp;checkbox. Add a custom global damage modifier Name it: Sneak attack Put into the damage section without the quote marks: " ?{Sneak Attack|No, 0|Yes, [[ ceil((@{base_level}) / 2) ]]d6 [Sneak Attack]} " Check the box beside your sneak attack global damage modifier. This will automatically calculate your sneak attack based on your level scaling so you will never have to touch this script anymore. Every time you cast an attack it will ask you whether you want to add sneak attack or not. You can turn that off by unchecking the box beside the global damage modifier. Also for flow and candy: You can put this without the quote marks into the type tab for a flow text/picture&nbsp; "[x](<a href="https://i.imgur.com/Fvm56lU.png" rel="nofollow">https://i.imgur.com/Fvm56lU.png</a>) Sneak&nbsp; [x](<a href="https://i.imgur.com/4wgf0s4.png" rel="nofollow">https://i.imgur.com/4wgf0s4.png</a>) Attack&nbsp; [x](<a href="https://i.imgur.com/Fvm56lU.png" rel="nofollow">https://i.imgur.com/Fvm56lU.png</a>)" These are not my pictures credit goes to some redditor that posted them in the forums. If you have the username or source I'd gladly share it. Arrow counting without the pro feature (still needs manual adjustments) Now this is a bit tricky but I believe you can handle it. Let me know if something is unclear Have a ranged weapon Put your type of ammunition (bolts/arrow etc.) into the equipment tab . E.g.: (quantity | name | weight) (20 | Arrows | 0.1) When you're done with that hover over the ammunition item you just created . There should be a little circle with and i around the bottom right corner . Click that. Check the " use as a resource " button. When you check the box there should be a change on the right hand side at the resources place of your character sheet . Add a number of arrows you want into the middle of your resource . Now go to your ranged weapon of choice and put this into the description without the quote marks : &nbsp;" ➸ ➸ ** `` Arrows left [[((@{other_resource}) - 1)]]/20&nbsp; `` ** ➸ ➸ " (the reason for the flowtext is it makes it more clear and puts the counter more to the middle making it look more natural.) raw script without the flow text: " [[((@{other_resource}) - 1)]]/20 " What this command basically does is just counting the resources you currently have and just subtracts it by 1. So sadly you still have to reduce your arrows manually after shooting them.&nbsp; The maximum ammunition in my case is 20. You can replace the number "20" in the script (step 9) by any maximum ammunition number you need . The flow text is unimportant. What is more important is that you have your resource correct. I think if you didn't add any resources this script should work, but if it doesn't read the steps onward. Now you have to test around if your resource is linked right. To do that, just hover over the middle of your resource you created in steps 2-6. There should be a tool-tip (a small square box) coming up. It should be similar to what I have as my resource name. So something like " @{other_resource}". If it's not the same replace the " @{other_resource} " in your script with the " @{example} " whatever you got.&nbsp; Now every time you make an attack roll the system will display the number of ammunition you have after your shot. So you will have to subtract 1 ammunition after your shot from your resources tab.&nbsp; I hope I was clear enough. Have fun with these.
GiGs said: It took me longer than it should to realise what this trick was doing. I'd have called it something like "Multiple Rolls - Each Unique ", though it may have been just me being dense. I was a bit stumped trying to come up with a brief enough explanation, haha. Edited to hopefully be more clear.
1596423527

Edited 1598080729
Using Images as Links So there seemed to be a method of doing this which broke a while back. Here's an easy way to do it - apologies if this is old news, I couldn't find it anywhere though. This trick is so stupid it isn't even what I was trying to do... I was messing about trying to get sub-header anchors to work from chat links, for example [Dodge]( <a href="https://roll20.net/compendium/dnd5e/Rules:Actions%20in%20Combat" rel="nofollow">https://roll20.net/compendium/dnd5e/Rules:Actions%20in%20Combat</a> #h-Dodge ) will happily create a link which pops the "Actions in Combat" page out in a tabletop window, but flatly refuses to open anywhere but the top of the page. The threads I found had no solution - does anyone know a workaround? I tried all the other anchors on the page, and copied and pasted the strings from inspecting the actual compendium links - nothing worked. Anyway, using images as links: &amp;{template:default} {{name=Image Link}} {{Link=[Button]( <a href="https://app.roll20.net/forum" rel="nofollow">https://app.roll20.net/forum</a> " style="font-size:0px"&gt;&lt;img src=" <a href="https://app.roll20.net/v2/images/roll20-logo.png?v=2" rel="nofollow">https://app.roll20.net/v2/images/roll20-logo.png?v=2</a> ) }} the whitespace property will stop the nonbreaking space text link from using a new line... I couldn't find a cleaner way to get rid of it (without using Stylus). Setting font size to 0 px was a smarter way to do it. Just replace the two underlined bits with your link and your image. Make sure you don't put the closing "&gt; on the image source field - the []() chat link does this itself to try to close out the initial a href. Hooray! You now have a clickable Roll20 logo which links back to the forums.
thank you how ever made this tricks
1597601178
Robert D.
Pro
Sheet Author
Here's a trick for someone who needs to count something during a game... We have a wild mage and I use an house rule where we roll either at the beginning of the day or entering a new area (depending on if the stability of magic changes daily like weather, or is location based like in Faerun where the weave is damaged). Depending on the result changes the chance of wild surge but the most common result is that every time the wild mage casts, the chance of surge goes up one until a surge happens, then it reset. So I needed a counter. Status markers only count up to 9 and using two for two digits takes a lot of token real estate. I was going to make a multi-sided token of a d20 1-20, but that would be sitting on the map and we'd have to drag it around with the party to keep it in view. I wanted something floating on the UI. So I created a deck with d20 art I stole from the internet. I made the front and back the same image, gave it one card and infinite draw. Let players draw. Now I can just deal to myself or the player, or the player can, every time that number goes up. Hide the hand so it isn't in the way, and the number of cards makes a nice visual counter. As such:
1597699734

Edited 1597700754
Using Values Stored in Initiative Tracker as Pointers This trick builds on the same model that was used in GiGs' Reusing Rolls trick ( <a href="https://app.roll20.net/forum/permalink/8768261/" rel="nofollow">https://app.roll20.net/forum/permalink/8768261/</a> ).&nbsp; The point of this trick is instead of storing the results of a roll in the initiative tracker, you can instead use the initiative tracker to store an entire character sheet... or at least, a reference to one.&nbsp; The way this works is quite straight forward:&nbsp; you use the Turn Tracker to store the name of the character sheet, then use the prefix system to call attributes and abilities from that character sheet.&nbsp; For this version of the prefix system, you need an attribute or ability with just @{ or %{ in it, depending on whether you want to invoke an attribute or ability.&nbsp; Then, for the name of the character you're calling the ability on, you put @{tracker|&lt;name of character in the tracker&gt;}.&nbsp; To make this generic for all characters, we need the following abilities: Name: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Value: trackerprefix&nbsp;&nbsp;&nbsp;&nbsp; @{tracker| equipped&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; @{trackerprefix}@{character_name}} prefix&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @{&nbsp;&nbsp; (or %{ if used for abilities) prefix2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @{prefix} So the final command for invoking a attribute/ability of a character stored in the turn tracker is @{prefix2}@{equipped}|&lt;ability to be invoked&gt;}.&nbsp; Seems simple, right?&nbsp; Here is the point where this trick gets real stupid.&nbsp; So, while the turn tracker is perfectly capable of storing text values, the &amp;{tracker} modifier is only capable of storing numbers in the turn tracker. This means to switch equipment either you need to manually type in the exact name every time... or name all of the equipment sets numbers.&nbsp; For example, you can have the character sheet for dual wielding a sword that increases strength and a dagger be named "1", then the sheet for sword and shield be named "2".&nbsp; Then you can simply provide a button that changes the character's initiative to 1 or 2 and everything is just fine.&nbsp; For personal sanity I found it easiest to have two sheets, one of which has a normal name and contains all the values, and another with the numerical name that simply links back to the normally named sheet, but that does require some additional setup. If you want an example of an actual use case for this, I'm running a Fire Emblem game on roll20, and in Fire Emblem character weapons can impact all of their base stats (particularly in the case of items like dragonstones) as well as indirectly effect them through weapon weight and similar stats.&nbsp; Additionally, swapping weapons can happen all the time in Fire Emblem, so I needed a good way to keep track of all of these changes. Now characters only need a single attack button regardless of how many weapons are in their inventory and also get the correct boosts and penalties from their equipped weapons. While I have you, another quick tip for setting this up:&nbsp; put trackerprefix, prefix, and prefix2 in a universal sheet and give all players edit permissions (though not "in journal" permissions, so they can't actually edit it), then just have each individual sheet call these abilities from the universal sheet.&nbsp; Saves a lot of typing/setup.&nbsp; "equipped" will have to be on the character in question, however.
1597844160

Edited 1597844232
Reusing Rolls (advanced) I always wanted to be able to re-use a Roll in a subsidiary Roll, but as stated by Scott C. here <a href="https://app.roll20.net/forum/permalink/8747581/" rel="nofollow">https://app.roll20.net/forum/permalink/8747581/</a> , it breaks the inline Roll. So, here I thought of a workaround : why not call an Ability depending of the result of my Roll through a button ? It might ask a lot of work most of the time, but in some cases it's pretty simple and quick to put in place. However, it didn't work through my firt attempt. Here is an example : I have a trap which when you fall in it make you hit by 1d4 spikes, each spike doing 1d4+2 damages. Then, I wanna have something like this : [[1d4]] [[ $[[0]]d4 + 2*$[[0]] ]] Of course, it doesn't work as is. So, I put them in different abilities with a call through a button like this : Trap : &amp;{template:default} {{name=Trap}} {{Pikes=[[1d4]]}} {{Damages=[Throw](~PikesDamages$[[0]])}} PikesDamages1 : &amp;{template:default} {{name=Pikes Damages}} {{Damages=[[1d4+2]]}} PikesDamages2 : &amp;{template:default} {{name=Pikes Damages}} {{Damages=[[2d4+4]]}} PikesDamages3 : &amp;{template:default} {{name=Pikes Damages}} {{Damages=[[3d4+6]]}} PikesDamages4 : &amp;{template:default} {{name=Pikes Damages}} {{Damages=[[4d4+8]]}} The trick is that the previous Roll shall be replace by 1, 2, 3 or 4 in the name of my Ability, making the button call the correct one. Yet, as I said, my first try didn't work for a pretty simple reason : When you pu the caller to the previous roll $[[0]] in the parenthesis for the name of the ability, it is replaced by a text such like this : [Throw](~PikesDamages Rolling 1d4 = (1)'&gt;1) This text is specifically for a call to a Roll of 1d4 which resulted in a 1. So here is the workaround : Rather than calling the abilities PikesDamages1 to PikesDamages4 , I called them PikesDamages Rolling 1d4 = (1)'&gt;1 to PikesDamages&nbsp; Rolling 1d4 = (4)'&gt;4 , and it works perfectly ! For you to have spaces in the name of an Ability, you can simply write the name you want anywhere and then simply copy/past it. Spaces are replaced by dashes only while you type them, the copy/past bypass this. Rollistically, Gib'. NB : I haven't found why, but it seems that the button need to be put at the end of the RollTemplate. He might not appear in the chat otherwise. And be carefull if your RollTemplate has many intricated Inline Rolls, try to always put the one you want to Reuse first, and your button last in the RollTemplate.
1597855485

Edited 1597857432
I wonder... If rather than calling functions for the result you wanted, you instead had the function just return the value of the rolled number, could you then have completely general purpose reused rolls? Like, PikesDamages Rolling 1d4 = (1)'&gt;1 just equal to 1, then (2)'&gt;2 equal to 2, etc. Edit:&nbsp; Looks like no, since this is using a link name, and we can't do math in a link.
1598024166
Andrew said: This is superb, thank you! Brian M. said: I've found a hacky way to find large files in your library for cleanup. In chrome you can hit F12 to open the developers console and execute arbitrary javascript. I opened my library and looked at my recent uploads and just kept scrolling down till my entire library was loaded into the list.&nbsp; This list has each HTML element tagged with a specific class "recentupload".&nbsp; The developers were so kind as to add an attribute to these elements saying the size of the file right in the html element.&nbsp; Almost like they were going to add it to the list but didn't for some nefarious reason.&nbsp; Executing the following code will print to the console the file names and file sizes. You can then copy it out into a spreadsheet, sort and finally pick the files that are too big. Copy their file names and go back to roll20 and use Ctrl + f to find that file and delete it. $('.recentupload').each(function(index) {console.log(this.textContent + ": " + $(this).attr('data-filesize'))}) Note that the textContent prefixes each entry with Drag, but it is easy enough to manually drop it.&nbsp; You then enter the file name in the library search and delete away.&nbsp; Thanks for pointing out this data attribute exists! You could also use: $('.recentupload').each(function(index, item) {console.log(item.querySelector('.namecontainer').textContent + ": " + $(this).attr('data-filesize'))}); To get the name and size without the preceding "Drag" text. I have also written a user style to expose the sizes: Full details of the user style are here: <a href="https://app.roll20.net/forum/permalink/8824230/" rel="nofollow">https://app.roll20.net/forum/permalink/8824230/</a>
1598128109
Ziechael
Forum Champion
Sheet Author
API Scripter
Catering for 'missing attributes' when summing values When working with unknown quantities such as repeating sections there are often times when you'll want to potentially do math with attributes contained within those sections... "But Ziechael, you fool, how can I know how many rows the section has? I'll end up with a million 'no attribute found' messages in the chat and my macro will just fail... thanks a lot, you've ruined my life!" Well, here's a handy little tip to deal with such nonsense... using the 5e OGL sheet as an example, specifically the spells section and performing a count of prepared spells in a section: Gorath has [[ 0 @{Gorath|repeating_spell-1_$0_spellprepared} + 0 @{Gorath|repeating_spell-1_$1_spellprepared} + 0 @{Gorath|repeating_spell-1_$2_spellprepared} + 0 @{Gorath|repeating_spell-1_$3_spellprepared} + 0 @{Gorath|repeating_spell-1_$4_spellprepared} + 0 @{Gorath|repeating_spell-1_$5_spellprepared} + 0 @{Gorath|repeating_spell-1_$6 _spellprepared} + 0 @{Gorath|repeating_spell-1_$7_spellprepared} + 0 @{Gorath|repeating_spell-1_$8_spellprepared} + 0 @{Gorath|repeating_spell-1_$9_spellprepared} + 0 @{Gorath|repeating_spell-1_$10_spellprepared} &amp;{noerror} ]] level 1 spells prepared! As a basic example the above counts the boolean/binary values of the 'prepared' toggle. Of particular note the macro utilises the &amp;{noerror} command to prevent the chat being flooded with 'no attribute' messages. However, the twist is the '0' prefix on each attribute call... the character | used only had 7 spells added to the section but the macro was able to run and return the correct value regardless. By turning null into 0null, 0 into 00 and 1 into 01 we are able to still run a calculation as they are all valid in the eyes of Roll20... win! Naturally this could be expanded to crazy levels to account for that one player who likes to add ALL the spells to their sheet, or the quartermaster who still has that 'winter blanket' and it's associated weight on his level 17 character's sheet.
1598128713
GiGs
Pro
Sheet Author
API Scripter
A tip so good it was listed twice!
1598172776

Edited 1598172998
Ziechael
Forum Champion
Sheet Author
API Scripter
GiGs said: A tip so good it was listed twice! LOL, Roll20 was struggling but I only clicked submit once... must have just loved my tip! [edit] Can't prove anything now ;)
1598172929
GiGs
Pro
Sheet Author
API Scripter
Ziechael said: GiGs said: A tip so good it was listed twice! Oh, already been done... didn't think to check the index lol, mentioned it elsewhere and managed to surprise the great keithcurtis with it so assumed it wasn't listed ;) I was making a joke about the fact your post got posted twice.
1598173037
Ziechael
Forum Champion
Sheet Author
API Scripter
Stop being so quick... took me longer to scroll up and realise that and check the index than it did for you to reply!
1598173689
GiGs
Pro
Sheet Author
API Scripter
hehe, sorry! (not really)
1598357842

Edited 1598675432
Overwriting template fields in macros This probably isn't new to some people, but Brian C pointed out that it wasn't in this thread yet, so here we go. This trick can be handy for forcing some behaviour out of a sheet that isn't possible using the input fields on the sheet itself. There's also a &amp;{template:default } trick which is closely related. The basics are.... basic. The following macro has two entries for the {{name}} field: &amp;{template:default} {{name=Original}} {{Content=Interesting story}} {{name=Overwrite}} Running it gives a fairly intuitive outcome: the {{name}} field which is parsed last (underlined) is the one which makes it to the template as it's sent to the chat log. The first {{name}} field is overwritten and lost. Now we can get a bit trickier with the default template. Here is something that doesn't quite work: &amp;{template:default} {{name=Overwrite rows}} {{[[1d1]]=Original}} {{[[1d1]]=Overwrite}} Inline rolls don't work as column labels with regards to overwriting, so "Overwrite" fails to overwrite "Original". But if we convert it to a link, it does work: &amp;{template:default} {{name=Overwrite rows}} {{ [[[1d1]]](#) =Original}} {{ [[[1d1]]](#) =Overwrite}} This leads to being able to achieve a few things, like a simple conditional. The underlined section overwrites one of the two lines with a blank entry: &amp;{template:default} {{name=Binary}} {{[1](#)=You survived.}} {{[2](#)=You died.}} {{[[[1d2]]](#)=}} Or a more complex multiattack macro with a drop-down prompt: &amp;{template:default} {{name=Multiattack}} {{Number of attacks=?{Attacks|1|2|3|4}}} {{[1](#)=[[1d20+5]]}} {{[[[{2,?{Attacks}}kl1]]](#)=[[1d20+5]]}} {{[[[{3,?{Attacks}}kl1]]](#)=[[1d20+5]]}} {{[[[{4,?{Attacks}}kl1]]](#)=[[1d20+5]]}} Bear in mind that if you make a 30-attack macro like this, and only attack twice, it is still rolling 30 attacks and will output very slowly. Attacks 2 through to 30 just keep overwriting the {{2=....}} line 29 times. The final roll (line 30) is the roll that will be output as line 2. D&amp;D 5e sheet specific stuff Probably the most useful place to use an overwrite on the 5e sheet is the NPC actions. They're missing a few entries on the sheet which can be useful for homebrew, or buffing a monster a little, or even correcting an error. Take the Giant Spider or Scorpion, for example. Their secondary damage requires a saving throw, half damage on a successful one - this damage shouldn't crit. But with nowhere on the sheet to modify the crit damage, both the primary damage and the saving throw damage will roll extra dice on a critical hit. But if we modify the description field, we can overwrite the {{crit2}} field to stop it automatically rerolling the {{dmg2}} dice: &lt;Spider description SNIP&gt; ...... is paralyzed while poisoned in this way. }} {{crit2=[[0]] The sheet wraps this section with {{description= at the start, and }} at the end before sending it to chat as a macro. It's only expecting the meat of the description field to be inserted in between, but it will happily parse the double braces }}, closing the description field, and letting you insert whatever you want afterwards. Another two fields not available directly through the sheet are {{type}} and {{typec}} . These are automatically assigned as "[Attack](~repeating_npcaction_npc_dmg/crit)" (you don't need the character name or $id here, it assumes both... in fact it won't work if you put them in), giving you the clickable word Attack so you can roll damage. If you want to change either the word "Attack" or, for some reason, link to a different damage macro, you can throw this into the "To Hit" field. This is the Giant Spider again, with its +5 to hit being the first character in the field: 5)]]}} {{type=[Cuddle](~repeating_npcaction_npc_dmg)}} {{typec=[Cuddle](~repeating_npcaction_npc_crit)}} You could also modify the Crit Range of the NPC here if you wanted to, though both {{r1}} and @{rtype} now properly reference the @{d20} Attribute, so you're better off changing it there to make it fully Advantage compatible. Unless you specifically wanted to change ONE particular attack, and not the others - then you would have to throw this into the "To Hit" field, forcing&nbsp; your own {{r1}} and {{r2}} into the template: 5)]]}} {{r1=[[1d20cs&gt;11 + 5]]}} {{r2=[[1d20cs&gt;11 + 5]]}} We can also restore the {{description}} area to the npcatk template, since there's no longer a way to do this from the sheet. This modified Spider now annoys players even if it misses with its web, because players are horrible people who attack spiders even when they're giving away free hugs: 5)]]}} {{description=Hit or miss, a 10ft. area around the target becomes Difficult Terrain as it is covered in sticky webs.}} All of the above 5e template examples could be achieved with a custom macro. But the advantage of doing it straight through the sheet is that it will all work straight from universal NPC chat menus.
1598365614
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
You never cease to amaze me, Oosh.
1598532383

Edited 1598532465
HTML Styles in chat So I was messing about with some other stuff, and came across this trick. Generally, R20 will ignore any HTML you try to type into chat. But as my old man used to say, "if it doesn't fit, force it". So here's how to force a little bit of HTML style into chat. The trick is basic - when you create a chat link or button, we send: [Brown Bear] (<a href="https://roll20.net/compendium/dnd5e/Brown" rel="nofollow">https://roll20.net/compendium/dnd5e/Brown</a> Bear) to chat, and at some point it gets turned into: &lt;a href=" <a href="https://roll20.net/compendium/dnd5e/Brown" rel="nofollow">https://roll20.net/compendium/dnd5e/Brown</a> Bear "&gt; Brown Bear &lt;/a&gt; So, I thought, what if we close the href property while still inside the () parentheses, then throw an inline style in there? I'll bet it doesn't work. But it does... quite a few styles will work in there (but some won't). A very basic example: &amp;{template:default}{{name=Simple Styles}}{{=[Blue](#" style="color:blue) [Red Border](#" style="color:red;border:1px dashed red) [Big background](#" style="color:cyan;font-size:30px;line-height:40px;background-color:black;padding:2px) [Blurred](#" style="color:rgba(0,0,0,0&amp;rpar;;text-shadow:5px 0px 10px black,-5px 0px 10px black;font-size:20px;line-height:40px) (blurred) [Font/margin change](#" style="color:gray;font-family:comic sans ms;font-size:25px;font-style:italic;display:block;text-align:center;line-height:25px;display:block;text-align:left;margin-left:-55px) }} So all we're doing is closing the href property early ( using a # makes a null link which can't be clicked , you can use an actual link though) and then putting inline style="property1: value; property2: value1, value2; property3: value; after it. We don't need to close the style field, as the R20 parser puts a "&gt; on there for us, so we just end the final style entry with the usual ) brace to close the link from the R20 parser's point of view. One big caveat with &amp;{template:default} : you can't use this trick on the left side of a row. The '=' after style will end the left side of the row, and move to the right side, breaking the style attempt. Escaping with &amp;equals; doesn't work either - if anyone figures a way around this, comment away! Or is there another inline html syntax that doesn't use "="? Anyway, so we can use this trick in other templates too, like the npcaction template from 5e - just a bit of prettying up: &amp;{template:npcaction} {{rname=[Wildshape](#" style="color:#7e2d40;font-size:22px;display:block;text-align:center;margin-bottom:5px)}} {{name=[Bob, lvl @{bob|base_level} @{bob|class}](#" style="display:block;text-align:center;border:1px solid)}} {{description=&amp;nbsp; [**Bob transforms into a...**](#" style="display:block;text-align:center) &amp;nbsp; ?{Wildshape Form?| Brown Bear,[img](<a href="https://s3.amazonaws.com/files.d20.io/images/28450281/heCscf51qjn8zRRwUPHYjA/original.png" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/28450281/heCscf51qjn8zRRwUPHYjA/original.png</a>) &amp;nbsp; [Hungry Brown Bear!](<a href="https://roll20.net/compendium/dnd5e/Brown" rel="nofollow">https://roll20.net/compendium/dnd5e/Brown</a> Bear" style="color:brown;font-size:25px;font-weight:bold;display:block;text-align:center;line-height:25px)| Other options,blah blah} &amp;nbsp; [[[@{bob|other_resource}-1]]/@{bob|other_resource|max} uses remain until short rest](#" style="border:1px solid black;background-color:beige;margin:1px;text-align:center;user-select:none;display:block)}} Obviously you can achieve more with CSS, but the advantage of this method is that all players will see the Styles, regardless of whether they have Stylus or other extensions installed. We can also combine the trick with Stylus so different players see different things in the same message, though you would have to pre-share a style with your players for this to work. It could be rolled in with other style changes so they don't notice, of course: &amp;{template:default} {{name=Scrawled message}} {{=[At the ](#" style="color:gray;font:italic 18px Impact;padding:2px)[first](#" style="display:none;color:gray;font:italic 18px Impact;padding:2px" id="alice)[second](#" style="display:none;color:gray;font:italic 18px Impact;padding:2px" id="bob)[third](#" style="color:gray;font:italic 18px Impact;padding:2px" id="default)[ junction, head ](#" style="color:gray;font:italic 18px Impact;padding:2px)[north](#" style="display:none;color:gray;font:italic 18px Impact;padding:2px" id="alice)[south](#" style="display:none;color:gray;font:italic 18px Impact;padding:2px" id="bob)[west](#" style="color:gray;font:italic 18px Impact;padding:2px" id="default)}} Alice has this in her Stylus: #userscript-alice { &nbsp;&nbsp;&nbsp; display:inline!important; } #userscript-default { &nbsp;&nbsp;&nbsp; display:none!important; } And Bob has: #userscript-bob { &nbsp;&nbsp;&nbsp; display:inline!important; } #userscript-default { &nbsp;&nbsp;&nbsp; display:none!important; } The exact same message in public chat is seen differently by Alice, Bob, and a player with no styles installed: Another use might be languages. Here's an unreadable wall plaque: &amp;{template:default} {{name=Wall Plaque}} {{=[I can read Elvish](#" style="color:rgba(0,0,0,0&amp;rpar;;text-shadow:10px 0px 10px black,-10px 0px 10px black;font-size:25px;font-family:comic sans ms;margin-left:-55px;line-height:40px" id="Elvish)}} Unless you can read Elvish and the GM gave you this: .textchatcontainer #userscript-Elvish { &nbsp;&nbsp;&nbsp; color:cyan!important; } A note on using id tags in the link: Roll20 puts " userscript- " in front of whatever you enter in the field, so you can't use this trick to play funny buggers with Roll20's pre-set id's. Same goes for classes if you try to use one. As mentioned in this blind roll trick , if you don't want the id for your hidden/blurred text to be obvious to any player looking at your macro code, you can hide it in an Attribute field of a character sheet that no one has permissions on. That's probably about a long enough post. Oh! One more thing. You can actually use this trick to recreate the NPC Chat Menu with Keith's inline link fix, *and* hiding invalid actions, all without installing Stylus. I don't think you can hide the line-breaks using this method, so the Stylus one is probably still better. But at least this works out of the box and doesn't require anything to be installed, I guess: /w gm &amp;{template:npcaction} &amp;{noerror} {{rname=@{selected|character_name}}} {{name=@{selected|npc_type}}} {{description=[@{selected|repeating_npcaction_$0_name}&amp;nbsp;](~@{selected|character_name}|repeating_npcaction_$0_npc_action" style="border:none;background-color:rgba(0,0,0,0&amp;rpar;;color:blue;font-weight:bold;display:none;display:@{selected|repeating_npcaction_$0_name|max}inline) [@{selected|repeating_npcaction_$1_name}&amp;nbsp;](~@{selected|character_name}|repeating_npcaction_$1_npc_action" style="border:none;background-color:rgba(0,0,0,0&amp;rpar;;color:blue;font-weight:bold;display:none;display:@{selected|repeating_npcaction_$1_name|max}inline) [@{selected|repeating_npcaction_$2_name}&amp;nbsp;](~@{selected|character_name}|repeating_npcaction_$2_npc_action" style="border:none;background-color:rgba(0,0,0,0&amp;rpar;;color:blue;font-weight:bold;display:none;display:@{selected|repeating_npcaction_$2_name|max}inline) [@{selected|repeating_npcaction_$3_name}&amp;nbsp;](~@{selected|character_name}|repeating_npcaction_$3_npc_action" style="border:none;background-color:rgba(0,0,0,0&amp;rpar;;color:blue;font-weight:bold;display:none;display:@{selected|repeating_npcaction_$3_name|max}inline) [@{selected|repeating_npcaction_$4_name}&amp;nbsp;](~@{selected|character_name}|repeating_npcaction_$4_npc_action" style="border:none;background-color:rgba(0,0,0,0&amp;rpar;;color:blue;font-weight:bold;display:none;display:@{selected|repeating_npcaction_$4_name|max}inline) [@{selected|repeating_npcaction_$5_name}&amp;nbsp;](~@{selected|character_name}|repeating_npcaction_$5_npc_action" style="border:none;background-color:rgba(0,0,0,0&amp;rpar;;color:blue;font-weight:bold;display:none;display:@{selected|repeating_npcaction_$5_name|max}inline)}}
1598536543
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
You, Oosh, are a genius. I feel this only scratches the surface of the possibilities.
1598561500
GiGs
Pro
Sheet Author
API Scripter
Your last two tricks are very intriguing indeed (though very high on the Clunkiness Index, lol). Good finds, Oosh.
Oh yeah, there's lots of Clunk! But yeah Keith, I'd say there's lots of possibilities buried in there...
Damn this is pretty good
1598669094
Didn't know the site could be manipulated like this.&nbsp; Pretty cool stuff.
&nbsp;I shall provide my own Currency Conversion Macro
1599146122

Edited 1599149037
Dynamic Lighting Windows (that you can't move through)! So, I'm sure you all have tried, asked, and wrote scripts for the better part of making Windows for your games right? Using a code to allow sight and then restrict movement. Well I'm only a plus level member so there goes the Scripting codes. But ANYWHO..I've figured it out with normal Dynamic Lighting, and soundly surprised no one has yet?? I've looked and I've not found a post in regards to them but if so, the Post is not on the Doc Listing in the beginning of this Thread. Anyways, to achieve a Window Barrier , all you have to do is use the Dynamic Lighting Layer and make an&nbsp; Eclipse/Cirlce!!&nbsp; Don't ask me how or why it happens that way, I can't figure it out. But I thought about this method when I tried to use a circle shape for Pillars and the Lighting didn't stop when I placed it. I never TRIED to go through it since i was upset about it allowing light so i just deleted, but I just did and it works. This MAY be a bug but I figured I'd start pushing this around for you all fine players who'd wanna utilize it! I double checked myself like 7 times before I posted this just in case. I logged out, logged in, different maps and asDM/Player. The only thing I have found while doing so, is the circle is Incomplete on the Bottom-Left &nbsp; Quarter . This means players can enter the circle there. 3rd photo for reference. The best thing to Restrict access inside the circle is to make it skinnier like the WHITE &nbsp;outlined window next to the PC in the 3rd Photo because if they DO get into the inner circle, the right walls will stop them as well so the skinny circles work&nbsp; (edit: you can also just make smaller circles clustered together in the area you don't want to be passed so the corner isn't wide enough either for like a Pit scenario or if your windows are at angles that the circles won't function for). PLEASE call me out or try it yourself to verify. If I'm wrong, then I guess only my account is bugged and I'll remove the post to not cause false hope!&nbsp; :`(
1599149962
DM Steven A. said: Dynamic Lighting Windows (that you can't move through)! Hey, it worked for me, testing it on a game I run, which was originally on Legacy lighting and converted over to New Dynamic Lighting.&nbsp;&nbsp; Neat feature/bug?&nbsp; you have discovered Steven A.&nbsp;&nbsp;
1599150377

Edited 1599150402
WOOT WOOT! Glad I'm not THAT insane lol. And I'm not sure if its permanent or not. Would be nice if it was intended, but I've not seen any release about it. I have seen people post that the Circle is bugged in dynamic lighting and wont restrict sight for pillars, so here's to hoping they leave it alone lol.
1599152449
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi Drae Acevedo, This was noted in early tests of the Updated Dynamic Lighting system (it might have been back when it was on the dev server, even). It's an emergent feature and may not last through the final release version of UDL. Note also, that circles can cause severe problems in LDL. I'll hold off indexing this one until after LDL sunset. Hopefully the "feature" will still exist by then. Until then, if it's working for you and you are using UDL, enjoy!
1599153536

Edited 1599154922
ah bummer! Thanks for the insight! And yes, I'm currently on UDL. I haven't tried this on LDL
1599184279

Edited 1599237862
No Meta-Gaming Help mostly just for a DM/GM who may be cautious of players who are trying to sneak some peeks at the NPC/Monster Stats. Anyone can use Target macros/chat box entries. Now instead of changing the actual term of say ARMOR &nbsp;in the attributes of the each individual sheet, you can just use the Invisible Token Effect over top of your NPCs. This will restrict your own Macro use if you have Target or Selected buttons available so id suggest keeping the sheet open. 1st: check out the invisible token&nbsp;rig and upload into said game. 2nd: drag and drop said token into area with NPCs. 3rd: for not losing said token, you can change the Aura and just leave to Edit so only you can see the aura. 4th: right click your Invisible token and go to&nbsp; Advance&gt;Bring to Front. 5th: Over Lap Invisible token with NPC, and click/drag multi select both tokens. 6th: Right click&nbsp; Group Now when I go to move the Token, it still shows the npc, but when I use&nbsp; target|ac &nbsp;or what ever the actual code is for any said game, it'll show up blank since the Target selected was actually the Invisible token! Just do some trial and errors with Moving your NPC now as a grouped item. I found Clicking it, waiting without holding down the clicker, and then dragging to said future spot, kept the tokens over lapping instead of doing the Glitch Spread stuff. Hope it helps!! oh and to recap, keeping the invisible token over the npc will void all your click macros per selected/targets for npcs, that's why youd wanna keep their sheet open ahead of time to do their attacks and such.
1599255943

Edited 1599256021
Interactible Mooks with Token Actions enabled I don't know if this is explained here before but I recently figured this out and wanted to share with the community. As a GM one of the most annoying things for me was the Mook/Character dilemma. I either make mooks which are not linked to character sheets, thus cannot use character sheet actions (via %{selected|attacks} for example) or I make seperate character sheets for every single NPC there is, which is quite time consuming. Then I found this thread and nice tricks called prefix trick and macro mule With those tricks it is possible to make interactible mooks as long as mook name is same as NPC name on the sheet. Note that my only experience is with PF-community-sheet. It might be different with other sheets but the idea should be the same. Here is the process: This first part is done only once: First of all we make a macro mule character name "Macro". It is an empty character with two additional atttributes: prefix = %{ prefix2 = @{ Then we begin making our token action macros. Normally "attacks" macro for a character-linked-token is like this: (I use NPC-attacks as GM to hide from PC's) %{selected|NPC-attacks} We will use prefix trick here and use this line instead and define it as token action: @{Macro|prefix}@{selected|token_name}|NPC-attacks} I use Abilities, All-Menus, Attacks, Defenses, Perception, Skills and Spells Actions as token actions. In general all token action macros are in this format: @{Macro|prefix}@{selected|token_name}|ACTION-NAME-HERE} There are two exceptions for this. One is initiative. For Initiative I use one of the token bars (bar 2) as +init container. /w gm [[1d20 + @{selected|bar2}&amp;{tracker}]],@{selected|token_name} Other is opening char sheet. To quickly access char sheet use this macro to generate a link in chat window /w gm [@{selected|token_name} Sheet](<a href="https://journal.roll20.net/character/@{Macro|prefix2}@{selected|token_name}|character_id" rel="nofollow">https://journal.roll20.net/character/@{Macro|prefix2}@{selected|token_name}|character_id</a>}) Now that your system is set up for interactible mooks, you can easily create them. Create your NPC's as usual. I usually have a DM page where I keep all "master" tokens. Link your tokens as usual, assign AC, Init and HP to bars 1, 2 and 3 respectively. (Or whatever else you find useful but Init needs to be there). Then Unlink the token. Finally set this token as default token for that character. As long as your Token name is same as character name, your token actions will keep functioning. You can easily drag and drop your NPC's from your journal and they will keep full token functionality and have their own HP values.
1599257427

Edited 1599257529
Scott C.
Forum Champion
Sheet Author
API Scripter
Ender, you may want to look at the linking tokens to journals wiki page . You can accomplish what you're after much more simply by just having the token represent the character and NOT linking the bars to an attribute.
1599263450
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Here's a video on the process if you'd prefer to look at it that way:&nbsp; Roll20TnT Linking Tokens and Journals
1599274172

Edited 1599274335
To be fair, Ender's trick will also stop players from using @{target} calls on the token - it is achieving something that normal mook linking does not. I don't think the effort is worth it just for that, there's plenty of ways for a player to cheat if they really want to - but it's an option for people who are concerned about that.
Scott, Keith; thats also part of what I do. But I have the following issue with that: When you normally select a mook and try to issue a %{selected|ACTIONNAME} macro you get this error: " You attempted to use a roll command looking for a selected token ability, but the selected token does not represent a Character, and therefore has no abilities. " They only work if your token is actually linked to a sheet... When that mook needs to attack and is set up the way you described. I need to open journal, find and open character sheet of that mook, find suitable action and select it. This really takes time and causes me to lose concentration. As GM I want things to flow and having multiple windows open does not help. So I always tried to use %{selected|ACTIONNAME} macros for faster gameflow, which required me to have all "mooks" to have character sheets (mook1, mook2, mook3...mook n etc.) Well...not anymore..I changed all my % macros the way I described and all my mooks have macro functionality now :) It is a one time change only so in the long run I saved a lot of time. P.S. Again this might be a quirk with PF-community-sheet as it has the action buttons which generate a list things a character can do and put it on chat window. I don't really know how 5e or pf2e or other ones look like.
1599287557
GiGs
Pro
Sheet Author
API Scripter
You can link a token to the attributes and abilities on a character sheet, by setting the character in the represents dropdown. You dont have to link the token bars so they each have individual hit points or whatever, but token actions, abilities, etc will work perfectly.
Ah now I see..I always unlinked whole character when making mooks. Just unlinking HP is WAY easier. Sorry for wasting your time :)
1599868762

Edited 1600128009
Comparing numbers, greater than or equal to When I need to compare values, like damage versus armor, I use this. Usually I want to know if I got any points above armor. But today I wanted to know if damage was equal to or greater than armor. Maybe it's too well-known to be a trick, but I didn't know about the problem (and workaround) with comparing to 0 until today. Is X ≥ V? (Returns 0 for false, 1 for true.) This works if V is not 0. {0,x}&gt;v for example: [[{0,@{me|attack}-@{you|armor)}}&gt;1 But if I need to see if X ≥ 0, so I can see that x is not a negative number, I use: {0,1+x}&gt;1 If this isn't enough of a trick, just delete it Keith, no harm, no foul.
1599869104

Edited 1599869174
Scott C.
Forum Champion
Sheet Author
API Scripter
Mike, you just need to change the 0 in your group to something that you would never ever have, e.g.: {-10000000,x}&gt;v edit, or for a dynamic method: {v-1,x}&gt;v
Thank you so much, this was very helpful