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

Roll20 Tips and Tricks (Innovative Solutions to Common Problems)

1680540110
Kraynic
Pro
Sheet Author
Wall Lops. said: how can I roll any dice and depending on the number generate a predefined text, example, roll 1d4 in case 1 Acid, case 2 Electricity, case 3 ice, case 4 fire. I was able to do this by rolling 1d3 using the crit settings, but for any dice greater than d3 it doesn't work. &{template:custom}{{name=Type}}{{secondname=chosen damage type}}{{theroll=[[1d3]]}}{{criticalname=Damage}}{{ifcritical=Acid}}{{notcritical=Electric}}{{ifcriticalerror=Ice}} This is a thread for tricks to use on Roll20.  You should create a thread for your question since it doesn't fit the purpose of this thread.  Post your own thread so that conversation has it's own space.
1680543925
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Wall Lops. said: how can I roll any dice and depending on the number generate a predefined text, example, roll 1d4 in case 1 Acid, case 2 Electricity, case 3 ice, case 4 fire. I was able to do this by rolling 1d3 using the crit settings, but for any dice greater than d3 it doesn't work. &{template:custom}{{name=Type}}{{secondname=chosen damage type}}{{theroll=[[1d3]]}}{{criticalname=Damage}}{{ifcritical=Acid}}{{notcritical=Electric}}{{ifcriticalerror=Ice}} Hi Wall Lops! This thread is for sharing finished tricks that use the Roll20 interface in a creative or novel way. A better place to post such a question is in the "Specific Use Questions and Macros" forum.
In case you want Character Sheets to open "Bio & Info" as first tab, enable the option to "pop out character sheets". It even takes you back to "Bio & Info" after editing! (just tested and it really is the case!)
1680968450

Edited 1681511068
TheMarkus1204 said: In case you want Character Sheets to open "Bio & Info" as first tab, enable the option to "pop out character sheets". It even takes you back to "Bio & Info" after editing! (just tested and it really is the case!) I hate to disappoint, but that's just any time you open from anything non-journal currently, meaning the Shift+Double-Click on any Linked Token will open to Bio & Info Page too, though I suspect this might change eventually. Edit: It's their website, of course Roll20 can change this, changing it to Character Sheet was a more difficult change to (safely) implement.
1681454620

Edited 1681466613
Why should I be disappointed? AND why should I use Shift+Click to open Bio&Info ONLY to be brought back to Character Sheet after editing when I could use Popped out sheets and see this directly? And even more, after editing seeing Bio&Info directly! (And THAT is the main reason this should be known!) And since it has been a while this change was made, I do NOT believe that it will be the same for popped out sheets! Why? IF they wanted to change it, they had done it by now! (That is - of course - only if they can change this) Blue64 said: TheMarkus1204 said: In case you want Character Sheets to open "Bio & Info" as first tab, enable the option to "pop out character sheets". It even takes you back to "Bio & Info" after editing! (just tested and it really is the case!) I hate to disappoint, but that's just any time you open from anything non-journal currently, meaning the Shift+Double-Click on any Linked Token will open to Bio & Info Page too, though I suspect this might change eventually.
1681511152

Edited 1681511203
Huh, I guess it isn't normal for that fault point to fail, I thought it was strange my sheets never re-opened when open in a new window … odd. No idea why. (This is likely why I had no information on Character Sheet in New Window, well, that and the countess other errors it has when using one monitor)
As the Pathfinder 2E macro templates are somewhat different, here are a couple of useful macros. Below is a macro that will make four rolls for a character that are standardly secret in P2E. If it is saved as a general macro enabled as a token action, it should pop up as a button for every token. &{template:rolls} {{charactername=GM}} {{header=secret rolls}}  {{info01_name=Secret}} {{info01=Secret rolls made!}} /w GM &{template:rolls} {{charactername=@{selected|character_name}}} {{header=Secret Rolls}} {{subheader=Each Individually}}}  {{info01_name=perception}} {{info01=[[1d20cs20cf1 + [@{selected|perception_proficiency_display}] (@{selected|perception})[@{selected|text_modifier}] + (@{selected|query_roll_bonus})[@{selected|text_bonus}]]]}} {{info02_name=Stealth}} {{info02=[[1d20cs20cf1 + [@{selected|stealth_proficiency_display}] (@{selected|stealth})[@{selected|text_modifier}] + (@{selected|query_roll_bonus})[@{selected|text_bonus}]]]}} {{info03_name=Deception}} {{info03=[[1d20cs20cf1 + [@{selected|deception_proficiency_display}] (@{selected|deception})[@{selected|text_modifier}] + (@{selected|query_roll_bonus})[@{selected|text_bonus}]]]}}  {{desc=}} Below is a macro for Recall Knowledge, using the Skills most likely to be used for the check (if something is not on this list, it usually has the same bonus as one of these skills). &{template:rolls} {{charactername=GM}} {{header=secret rolls}}  {{info01_name=Secret}} {{info01=Secret rolls made for @{selected|character_name}!}} /w GM &{template:rolls} {{charactername=@{selected|character_name}}} {{header=Secret Recall Knowledge}} {{subheader=Each Individually}}  {{info01_name=Arcana}} {{info01=[[1d20cs20cf1 + [@{selected|arcana_proficiency_display}] (@{selected|arcana})[@{selected|text_modifier}] + (@{selected|query_roll_bonus})[@{selected|text_bonus}]]]}} {{info02_name=Nature}} {{info02=[[1d20cs20cf1 + [@{selected|nature_proficiency_display}] (@{selected|nature})[@{selected|text_modifier}] + (@{selected|query_roll_bonus})[@{selected|text_bonus}]]]}} {{info03_name=Occultism}} {{info03=[[1d20cs20cf1 + [@{selected|occultism_proficiency_display}] (@{selected|occultism})[@{selected|text_modifier}] + (@{selected|query_roll_bonus})[@{selected|text_bonus}]]]}} {{info04_name=Religion}} {{info04=[[1d20cs20cf1 + [@{selected|religion_proficiency_display}] (@{selected|religion})[@{selected|text_modifier}] + (@{selected|query_roll_bonus})[@{selected|text_bonus}]]]}} {{desc=}} If a character has one that isn't on this list that I have to roll regularly, then I would make one specifically for that character on their sheet. I made one, but soon realized that the roll did not need to be secret.
Hi keithcurtis this is my suggestion, when you see with the PC view you can see the familia's token in the map Switching Familiar Sight with Token Mod Macro darkvision /w "@{selected|character_name}" &{template:npcaction} {{rname=Familiar Perception}} {{description=[See Through Familiar's Eyes](!token-mod --set has_bright_light_vision|on has_night_vision|on night_vision_distance|60 has_limit_field_of_vision|off  --ignore-selected --current-page --ids @{FAMILIARNAME|character_id} !token-mod --set has_bright_light_vision|off has_night_vision|off --ignore-selected --current-page --ids @{PCNAME|character_id}) [See Through PCs Eyes](!token-mod --set has_bright_light_vision|on has_night_vision|off has_limit_field_of_vision|on bright_distance|0 limit_field_of_vision_total|0 --ignore-selected --current-page  --ids @{FAMILIARNAME|character_id} !token-mod --set has_bright_light_vision|on has_night_vision|on night_vision_distance|60 --ignore-selected --current-page --ids @{PCNAME|character_id})}}
1683125202
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Mauro D. said: Hi keithcurtis this is my suggestion, when you see with the PC view you can see the familia's token in the map Switching Familiar Sight with Token Mod Macro darkvision /w "@{selected|character_name}" &{template:npcaction} {{rname=Familiar Perception}} {{description=[See Through Familiar's Eyes](!token-mod --set has_bright_light_vision|on has_night_vision|on night_vision_distance|60 has_limit_field_of_vision|off  --ignore-selected --current-page --ids @{FAMILIARNAME|character_id} !token-mod --set has_bright_light_vision|off has_night_vision|off --ignore-selected --current-page --ids @{PCNAME|character_id}) [See Through PCs Eyes](!token-mod --set has_bright_light_vision|on has_night_vision|off has_limit_field_of_vision|on bright_distance|0 limit_field_of_vision_total|0 --ignore-selected --current-page  --ids @{FAMILIARNAME|character_id} !token-mod --set has_bright_light_vision|on has_night_vision|on night_vision_distance|60 --ignore-selected --current-page --ids @{PCNAME|character_id})}} Hi Mauro! For reference, can you describe where the macro above diverges from this tip ?
this way you keep seeing where the familiar is, and you can double-click to open the Character Sheet but you can't see through its eyes because the total viewing angle is 0
1683129934

Edited 1683129991
/w "@{selected|character_name}" &{template:npcaction} {{rname=Familiar Perception}} {{description=[See Through Familiar's Eyes](!token-mod --set has_bright_light_vision|on has_night_vision|on night_vision_distance|60 has_limit_field_of_vision|off  --ignore-selected --current-page --ids @{FAMILIARNAME|character_id} !token-mod --set has_bright_light_vision|off has_night_vision|off --ignore-selected --current-page --ids @{PCNAME|character_id}) [See Through PCs Eyes](!token-mod --set has_bright_light_vision|on has_night_vision|off has_limit_field_of_vision|on bright_distance|0 limit_field_of_vision_total|0 --ignore-selected --current-page  --ids @{FAMILIARNAME|character_id} !token-mod --set has_bright_light_vision|on has_night_vision|on night_vision_distance|60 --ignore-selected --current-page --ids @{PCNAME|character_id})}}
1683131807
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Cool. I'll add it to the line for this trick next time I update the index post. Thanks!
1684898436

Edited 1684898615
Hey fellas, I know there is a way for a game owner to give players the ability to edit character tabs on the journal, but is there a way for a game owner to give a player the ability to add character tabs? I'd love to create character sheets for NPCs we encounter so we can add notes and keep their visuals up to date and so on. Obviously this is generally the GM's job, but he's dragging his feet.
1684900688
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi Robert! This thread is for sharing finished tricks that use the Roll20 interface in novel or creative ways. If you want to create your own thread (probably in the Specific Use Questions & Macros forum, I'm sure you will get some answers there.
I have ran across the problem to quickly calculate the straight line distance of a character to another flying or elevated character in several sessions now. This macro solves the problem by calculating the hypotenuse: The straight line distance to the target is [[ceil((?{Height of target in feet?|}**2+?{Ground distance to the target in feet?|}**2)**0.5)]] feet.
Having issues with players with older computers not being able to be heard or seen. We are playing with our Audio through discord but it sucks that we have to do that. What can he do?
1688604336
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi Rudy! This thread is for sharing finished tricks that use the Roll20 interface in a creative or novel way. A better place to post such a question is in the "Specific Use Questions and Macros" forum.
Selectively search forum categories You can create a bookmark to search specific categories so that you can pay attention only to posts that you're likely to be interested in, instead of going through each category or all forum posts individually. It looks like this to search only for posts in Announcements, Mods (API Scripts), Pro, and Specific Use Questions and Macros (my usual bookmark): <a href="https://app.roll20.net/forum/alldiscussions/?catids=19,24,46806,1434153" rel="nofollow">https://app.roll20.net/forum/alldiscussions/?catids=19,24,46806,1434153</a> Then you just need to know the category ids for the specific forums you are interested in: 18 =&nbsp; Bug Reports &amp; Technical Issues 19 = Specific Use Questions &amp; Macros 22 =&nbsp; Looking For Group: Free Games 24 = Pro 46806 = Mods (API Scripts) 1434153 = Announcements 1434154 =&nbsp; Roll20 Marketplace &amp; Creative Content &nbsp; 277980 =&nbsp; Character Sheets &amp; Compendium 385189 =&nbsp; Suggestions &amp; Ideas 11873711 =&nbsp; Looking For Group: Paid Games
Embossed Tokens? Why Not? How to use PowerPoint to make the nice token borders... I'm relatively new to Roll20, and love the opportunity to use tech to support my games.&nbsp; Also, a DnD to PF2 refugee. As a tech geek in a management role (more Manager now, than Engineer; twisted and evil), my natural go-to for graphics is PowerPoint.&nbsp; Here goes... Start with a PowerPoint blank slide, and insert the graphic you'd like to use for the token. then crop the image to be roughly square &gt;&gt;&gt; Next, use the Picture Format ribbon to drop down the Crop menu, and select Crop to Shape, Oval. Somewhere else on the slide, go ahead and create a circle, Insert &gt;&gt; Shapes &gt;&gt; Basic Shapes &gt;&gt; Oval. Then apply a 3D Format of Top Bevel &gt;&gt; Cutout to the shape&nbsp; Next, Arrange the graphic to the front, and drag it on top of the Shape. Use the resizing handles to make the graphic properly fit the inside of the Shape. Select both of the objects and right-click, then Save As Picture. If you save it as a png file, it should retain the proper transparency. Play with the effects as necessary.
Rein P. said: Embossed Tokens? Why Not? How to use PowerPoint to make the nice token borders... I'm relatively new to Roll20, and love the opportunity to use tech to support my games.&nbsp; Also, a DnD to PF2 refugee. As a tech geek in a management role (more Manager now, than Engineer; twisted and evil), my natural go-to for graphics is PowerPoint.&nbsp; I've done a lot of PowerPoint stuff and I'm embarrassed I didn't think of this. Thanks for the tip!
Rein I love your PowerPoint instructions and example, especially the ending! :D However, since I didn’t see it mentioned in the top post on this thread yet, I should note that the Token Stamp website is also a super-easy way to get nice tokens for those who aren’t as proficient with PowerPoint. Just drop an image file on the page, pick your frame, tint color, etc, crop to taste, and Download the resulting PNG file. 👍🏻 <a href="https://rolladvantage.com/tokenstamp/" rel="nofollow">https://rolladvantage.com/tokenstamp/</a> Rein P. said: Embossed Tokens? Why Not? How to use PowerPoint to make the nice token borders...
1690654578
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Thanks for the reminder Joe! When this thread was young and very busy, I updated the index a lot more often. I've let it slide to 3-4 times a year. I'll see if I can get that fixed this weekend.
1697426337
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi MPG! There are lots of users who would be happy to work with you on this, but please start a new thread with your question. This thread is for finished tips and tricks that users would like to share. We try to keep it focused on that, so that people can get the most use out of it. Thanks!
Hello. I am trying to create a macro that will list an npc's traits and actions in the chat bar and allow me to click them (and whisper them) much like how the spell button is set up in the token action suite. Is this possible? The idea is to privately double check npc abilities without broadcasting them to my players or using the query whisper option.
1698351482

Edited 1698351563
GiGs
Pro
Sheet Author
API Scripter
Create a separate post for that question. This thread is not for Q/A, it's for posting completed solutions for others to use. Amazingly, the comments directly before your question where explaining that.
Just a tiny hint using rollable tables: Suppose you want to randomly tell the characters various random rumors, but there is a specific rumor that you want them to know in any case. If you tell this specific rumor explicitely, the players do notice that an have more attention on it. If the players mouseover the result of the table roll, they will see how it was generated, including the name of the table. The GM may not want to reveal that he gave the one rumor specifically. In such a case I create a table with all possible rumors named "RUMORS" and another one named "RUMOR5" containing only the specific rumor. Note the last character of the respective names. So the names are different but appear very similar. With a not very close look via mouseover, the differences are probably not noticeable and the "manipulation" remains hidden. This hint can be made in any other circumstances. Only change a sign or add a dot, use ö instead of o&nbsp; ...
Note: Of course, it is possible to increase the weight of a rumor. But this does not make 100% sure that the rumor will appear.
If you do opt to increase the weight, I suggest going overboard and setting the Weight to 999999. Meaning: if you've got 500 rumors with a weight of 1, and 1 rumor with a weight of 999999, then there is a 500/1,000,499 chance the rumor won't be the one rumor you want the players to find; or, to put it in more recognizable terms: a %000.0499750624 chance that the players won't find the Rumor you want them to find; just make sure you change the Weight immediately after the Rumor is revealed, or it will be extremely obvious you manipulated the odds; alternatively you might be able to blame it on a typo when making the rumor.
1701647113

Edited 1701647355
Hitpoint Descriptions Instead of Numbers or Percentages - Using Rollable Tables &nbsp; &nbsp; &nbsp;( From the 'Hitpoints in ranges to prevent metagaming' thread . And t his trick is fairly similar to the ' Conditional Text ' trick, but I think different enough to warrant it's own post.) &nbsp; &nbsp; &nbsp;(And further down in the thread there is a specific use case for the D&amp;D 5E by Roll20 sheet using the 'mancerroll' template, that doesn't require any rollable tables at all.) If you want a way to display a variable message based on the current hit point percentage of a character, such as 'Bloodied' or 'Lightly Wounded', this is what it will look like: Create 6 rollable tables, each with a single entry: 0Wounded Dead 1Wounded Near Death 2Wounded Severely Wounded 3Wounded Slightly Wounded 4Wounded Barely Wounded 5Wounded Not Wounded Then you can use this macro for a selected token if hit points are being tracked in Bar 1&nbsp; /w gm @{selected|token_name} is [[1t[[[ [[{[[ceil(0@{selected|bar1} / 0@{selected|bar1|max} * 100)]],-1}&gt;1]] + [[{[[0@{selected|bar1} / 0@{selected|bar1|max} * 100]],-1}&gt;10]] + [[{[[0@{selected|bar1} / 0@{selected|bar1|max} * 100]],-1}&gt;25]] + [[{[[0@{selected|bar1} / 0@{selected|bar1|max} * 100]],-1}&gt;50]] + [[{[[0@{selected|bar1} / 0@{selected|bar1|max} * 100]],-1}&gt;100]] ]]Wounded]]] Or this if you want it displayed in the 'npaction' roll template&nbsp; (this is for the 'D&amp;D 5E by Roll20 sheet, but it should work with any other roll template): : /w gm &amp;{template:npcaction} {{rname=@{selected|token_name} Health}} {{description=@{selected|token_name} is [[1t[[[ [[{[[ceil(0@{selected|bar1} / 0@{selected|bar1|max} * 100)]],-1}&gt;1]] + [[{[[0@{selected|bar1} / 0@{selected|bar1|max} * 100]],-1}&gt;10]] + [[{[[0@{selected|bar1} / 0@{selected|bar1|max} * 100]],-1}&gt;25]] + [[{[[0@{selected|bar1} / 0@{selected|bar1|max} * 100]],-1}&gt;50]] + [[{[[0@{selected|bar1} / 0@{selected|bar1|max} * 100]],-1}&gt;100]] ]]Wounded]]]}} This will only whisper the result to the GM. If you want to whisper it only to the player who is calling the macro, then I would suggest using&nbsp; the Macro Overloading trick . Otherwise just remove the '/w gm' and it will be displayed publicly in chat.
1702491662

Edited 1702563699
Token Bubble Visual Indicator - Display Full Bar With Any Value in 'Current' field If you want to use the a token bubble that displays as a full bar when there is any value, such as for temporary hit points. This requires the token to be linked to a character sheet attribute. Change the 'max' field to be the same attribute as the 'current' value. Example: Using Bar 3 for Temporary Hitpoints&nbsp; on the D&amp;D 5E by Roll20 sheet: Link Bar 3 to 'hp_temp' Change the 'max field to be ' @{hp_temp}' That way the bar is only visible whenever there is a Temp HP value. If the Temp HP value is set to 0 then the bar disappears. It becomes a visual indicator that there is temporary HP available to be used. This could be used for other attributes that shouldn't have a visible bar when they are set to 0, but you want to use the bar itself as a visual indicator that the attribute is present without worrying about 'how much' is available. Caveat: after setting this up, you cannot change Bar 3 from the Token Settings page, or else the automatic adjustment of the bar will no longer happen. Make sure to only change the value from the token bubble itself. From this discussion: <a href="https://app.roll20.net/forum/permalink/11724942/" rel="nofollow">https://app.roll20.net/forum/permalink/11724942/</a>
Show/Hide a set of template fields If you put template fields inside of a roll they will be turned into a roll comment at which point they won't appear as part of the final template. So by using a query to control whether they are inside a roll or not you can show or hide multiple template fields at once and without any HTML entity problems that normally plague such macros. Bonus fields example: &amp;{template:default} {{Attack=[[d20]]}} {{Damage=[[1d8]]}} ?{Attack Type|Standard,[[0|Special} {{Special Attack!}} {{Bonus Damage=[[1d4]]}} ]] This can also make use of overwriting template fields Overwriting example: &amp;{template:default} {{name=Standard Attack}} {{Attack=[[d20]]}} {{Damage=[[1d8]]}} ?{Attack Type|Standard,[[0|Deadly} {{name=Deadly Attack}} {{Attack=[[d20-4]]}} {{Damage=[[1d8+2]]}} ]] There are a couple of caveats. Firstly any rolls made after the toggle-able section behave oddly, so it only works this way once. Secondly you cannot reuse rolls since trying to reuse a roll inside another tends to break the roll which prevents it from hiding the template fields. There are also other ways to make or break rolls which could allow for more advanced usage. A short write including a method for toggling multiple sections that supports roll reuse is now available on the wiki under Toggleable template fields
1705790508
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
You never cease to amaze, Rainbow Encoder!
I had tinkered with this idea early on with an attempt to dynamically generate template results based upon query answers; but I couldn't get it uniformly performing the way I wanted, otherwise I likely would've stumbled upon this concept a few years ago.
RainbowEncoder said: Show/Hide a set of template fields If you put template fields inside of a roll they will be turned into a roll comment at which point they won't appear as part of the final template. So by using a query to control whether they are inside a roll or not you can show or hide multiple template fields at once and without any HTML entity problems that normally plague such macros. Bonus fields example: &amp;{template:default} {{Attack=[[d20]]}} {{Damage=[[1d8]]}} ?{Attack Type|Standard,[[0|Special} {{Special Attack!}} {{Bonus Damage=[[1d4]]}} ]] This can also make use of overwriting template fields Overwriting example: &amp;{template:default} {{name=Standard Attack}} {{Attack=[[d20]]}} {{Damage=[[1d8]]}} ?{Attack Type|Standard,[[0|Deadly} {{name=Deadly Attack}} {{Attack=[[d20-4]]}} {{Damage=[[1d8+2]]}} ]] There are a couple of caveats. Firstly any rolls made after the toggle-able section behave oddly, so it only works this way once. Secondly you cannot reuse rolls since trying to reuse a roll inside another tends to break the roll which prevents it from hiding the template fields. There are also other ways to make or break rolls which could allow for more advanced usage. So are you saying you couldn’t ask another question or nest another set of code after this because that doesn’t behave appropriately? I have been wanting to continue asking questions within a given macro so my players can select all their various options at once
I've now done a short write up of toggling template fields on the wiki under Toggleable template fields . This also includes a method for handling multiple sections and supports roll reuse.
This one feels really stupid, but I wanted to give my players the options to select multiple targets with a spell.&nbsp; I also wanted to let them select the same target more than once without the client removing duplicates (This seems like what it is doing. I am not sure). Here is my example with Magic Missiles: I decided to use abilities in the character's sheet that has Magic Missiles in their spell list.&nbsp; Yes I know MM is supposed to be one roll to rule them all, but it is just not the way my player likes to do it. This is the caller ability: &amp;{template:npcaction} &amp;{noerror}{{rname=Magic Missile}} {{name=Choose your Level}} {{description=[1st](~selected|Magic-Missile-1) [2nd](~selected|Magic-Missile-2) [3rd](~selected|Magic-Missile-3) [4th](~selected|Magic-Missile-4) [5th](~selected|Magic-Missile-5) [6th](~selected|Magic-Missile-6) [7th](~selected|Magic-Missile-7) [8th](~selected|Magic-Missile-8) [9th](~selected|Magic-Missile-9)}} This is the Level 9 sub ability.&nbsp; Essentially all you have to do is put the target in braces with parens after it as if you were creating a button, but leave a special character in the parens.&nbsp; It seems to treat this as its own unique object and does not see it as a repeat target.&nbsp; If you use the same special character it does remove the "repeat" target &amp;{template:default} {{name=Magic Missiles}} {{***11 arcane darts fly out towards their targets***}} {{[@{target|1|token_name}](#) = [[1d4+1[Force]]]}} {{[@{target|2|token_name}](~) = [[1d4+1[Force]]]}} {{[@{target|3|token_name}](!) = [[1d4+1[Force]]]}} {{[@{target|4|token_name}](@) = [[1d4+1[Force]]]}}{{[@{target|5|token_name}]($) = [[1d4+1[Force]]]}}{{[@{target|6|token_name}](%) = [[1d4+1[Force]]]}} {{[@{target|7|token_name}](^) = [[1d4+1[Force]]]}} {{[@{target|8|token_name}](&amp;) = [[1d4+1[Force]]]}}{{[@{target|9|token_name}](*) = [[1d4+1[Force]]]}}{{[@{target|10|token_name}](?) = [[1d4+1[Force]]]}} {{@{target|11|token_name} = [[1d4+1[Force]]]}} Caveat:&nbsp; The output has a bunch of things that look like buttons, but I am sure there are some people here that know how to suppress that who could maybe add to this. Cool Add On: If there was a way to sum up the "same target" without an API that would be cool
1707491064

Edited 1707634208
Extra Calculations &amp; Display Based on Total Spell Level Cast Used in Spells and Global Damage Mods "Non Auto damage Version (Free), Auto damage Version (ChatSetAttr Script needed)" - Template used: D&amp;D 5E by Roll20 - Why? What can you do with it, and why do I post the macros here? I'm playing in a campaign where we have to pay with hp to cast spells, if the "mana stones / foci" are empty or you do not want to use it. This is the reason why you get prompted to choose if a Focus is been used. If "No" then the damage calculation happens (1d6+&lt;spell level&gt;) otherwise the damage gets set to 0, and shows up as such. The next piece of info that gets shown is the Actual level of the spell used + up casting, since this is by default not tracked. The Result looks like this and shows up where you put the macro: (-&lt;dmg&gt; HP, Lvl. &lt;total spell level used&gt;) Since I'm lazy and do not want to look up what I got to roll for damage, and we all forgot to roll for damage for over 1 year of playing the campaign. Repurpose it for your needs and hope it helps someone, the nested queries are a nightmare. Since the sheet and roll templates got updated and behave differently. For example, depending as what&nbsp; the Up cast die is set as (NONE / Valid Die) the calculations of spell levels etc. seem to be different. It took me a long time to find all the weird edge cases, this is why there are multiple macros depending on the settings. The Walls of Text with instructions and Macros KEYWORD INFO: raw = Pure Macro without Auto damage, no Script needed. plug = Version with Auto damage, Script required. This can be used without setting up the custom Abilities. inna = Version I put into the Innate Field of Spells. Remember to Replace the Name in ability calls like this %{Zic Nethercut|p1} with your character name. And make sure you got the custom abilities p1 - p7 set up. IMPORTANT: I USE THE INNATE FIELD AND OVERWRITE THE TEMPLATE OF THIS FIELD. IN THE "plug" &amp; "custom abilities", look for these macro pieces. I break out of the current Template Field at the beginning with }} Then put in the script commands starting with "!" since you can't call them from within a template field without it also showing up. After that I start to overwrite the Field I put the macro in. see the {{innate= piece in the macros. This is where the overwrite happens and ends with }} IMPORTANT: POSTING THE SPELLS DESCRIPTION TRIGGERS THE MACRO TOO IF YOU USE THE INNATE FIELD. I COULD NOT FIGURE OUT HOW TO PREVENT EXECUTION IF ONLY POSTING THE DESCRIPTION. Custom Abilities (OPTIONAL) &nbsp;Used ONLY in "inna" keyword. NOT needed for raw/plug keyword macros. Copy as is, white space at the end are required, those are Macro snippets. Name: p1 }} !modattr --silent --name @{character_name} --HP|{{innate=([[-1*(?{Use Focus?|No, Name: p2 &amp;#124; Level 1&amp;#44; 1&amp;#124;Level 2&amp;#44; 2&amp;#124;Level 3&amp;#44; 3&amp;#124;Level 4&amp;#44; 4&amp;#124;Level 5&amp;#44; 5&amp;#124;Level 6&amp;#44; 6&amp;#124;Level 7&amp;#44; 7&amp;#124;Level 8&amp;#44; 8&amp;#124;Level 9&amp;#44; 9&amp;#125;]]+1d6|Yes, 0})]] HP, Lvl ?{Cast at what level? Name: p3 )}} !!! Name: p4 [[?{Cast at what level? Name: p5 +1d6|Yes, 0})]] HP, Lvl Name: p6 [[{?{Cast at what level?&amp;#124; Level 1&amp;#44; 1&amp;#124;Level 2&amp;#44; 2&amp;#124;Level 3&amp;#44; 3&amp;#124;Level 4&amp;#44; 4&amp;#124;Level 5&amp;#44; 5&amp;#124;Level 6&amp;#44; 6&amp;#124;Level 7&amp;#44; 7&amp;#124;Level 8&amp;#44; 8&amp;#124;Level 9&amp;#44; 9&amp;#125; Name: p7 &amp;#125;k1]]+1d6|Yes, 0})]] HP, Lvl [[?{Cast at what level?} Macros for the Spell page . Put them where you want. I used the Innate Field for it. Used for spells that can be Up cast, got the OUTPUT of "Spellcard" and prompts you with "Cast at what level ? &lt;spell level &gt; " . Since the Sheet update new spells add the level after the question raw: ([[-1*(?{Use Focus?|No, [[?{Cast at what level? @{spelllevel}&amp;#124; Level 1&amp;#44; 1&amp;#124;Level 2&amp;#44; 2&amp;#124;Level 3&amp;#44; 3&amp;#124;Level 4&amp;#44; 4&amp;#124;Level 5&amp;#44; 5&amp;#124;Level 6&amp;#44; 6&amp;#124;Level 7&amp;#44; 7&amp;#124;Level 8&amp;#44; 8&amp;#124;Level 9&amp;#44; 9&amp;#125;]]+1d6|Yes, 0})]] HP, Lvl ?{Cast at what level? @{spelllevel}}) plug: }} !modattr --silent --name @{character_name} --HP|{{innate=([[-1*(?{Use Focus?|No, [[?{Cast at what level? @{spelllevel}&amp;#124; Level 1&amp;#44; 1&amp;#124;Level 2&amp;#44; 2&amp;#124;Level 3&amp;#44; 3&amp;#124;Level 4&amp;#44; 4&amp;#124;Level 5&amp;#44; 5&amp;#124;Level 6&amp;#44; 6&amp;#124;Level 7&amp;#44; 7&amp;#124;Level 8&amp;#44; 8&amp;#124;Level 9&amp;#44; 9&amp;#125;]]+1d6|Yes, 0})]] HP, Lvl ?{Cast at what level? @{spelllevel}})}} !!! inna: %{Zic Nethercut|p1}%{Zic Nethercut|p4} @{spelllevel}%{Zic Nethercut|p2} @{spelllevel}}%{Zic Nethercut|p3} Used for spells that can be Up cast, got the OUTPUT of "Spellcard" and prompts you with "Cast at what level ? " . This is used by Spells that did not get updated by the Sheet yet. You can force an update by just Switching the Output mode to Attack and back. This is here for compatibility reasons. raw: ([[-1*(?{Use Focus?|No, [[?{Cast at what level?&amp;#124; Level 1&amp;#44; 1&amp;#124;Level 2&amp;#44; 2&amp;#124;Level 3&amp;#44; 3&amp;#124;Level 4&amp;#44; 4&amp;#124;Level 5&amp;#44; 5&amp;#124;Level 6&amp;#44; 6&amp;#124;Level 7&amp;#44; 7&amp;#124;Level 8&amp;#44; 8&amp;#124;Level 9&amp;#44; 9&amp;#125;]]+1d6|Yes, 0})]] HP, Lvl ?{Cast at what level?}) plug: plug: }} !modattr --silent --name @{character_name} --HP|{{innate=([[-1*(?{Use Focus?|No, [[?{Cast at what level?&amp;#124; Level 1&amp;#44; 1&amp;#124;Level 2&amp;#44; 2&amp;#124;Level 3&amp;#44; 3&amp;#124;Level 4&amp;#44; 4&amp;#124;Level 5&amp;#44; 5&amp;#124;Level 6&amp;#44; 6&amp;#124;Level 7&amp;#44; 7&amp;#124;Level 8&amp;#44; 8&amp;#124;Level 9&amp;#44; 9&amp;#125;]]+1d6|Yes, 0})]] HP, Lvl ?{Cast at what level?})}} !!! inna: %{Zic Nethercut|p1}%{Zic Nethercut|p4}%{Zic Nethercut|p2}}%{Zic Nethercut|p3} Used for spells that can be Up cast, got the OUTPUT of "Attack" and the "HIGHER LVL CAST DMG" dice is set to a dice. This is where the funny businesses begins with templates changing their behavior and calculations for seemingly no reason. The built in query for up casting spells returns here not the value of the drop down item, but instead a 0 based index based on the first selection possibility. How to get the real spell slot level used: I.e. a level 2 spell will start with the level 2 selection item and value 0, the spell level attribute has value 2 and adding them together. Then we compare the result and spell level, and are keeping the higher number between those two. This results in the correct total spell slot level used, and only needs to be done with certain spell settings like these, the others seem to return the correct Query value. raw: ([[-1*(?{Use Focus?|No, [[{?{Cast at what level?&amp;#124; Level 1&amp;#44; 1&amp;#124;Level 2&amp;#44; 2&amp;#124;Level 3&amp;#44; 3&amp;#124;Level 4&amp;#44; 4&amp;#124;Level 5&amp;#44; 5&amp;#124;Level 6&amp;#44; 6&amp;#124;Level 7&amp;#44; 7&amp;#124;Level 8&amp;#44; 8&amp;#124;Level 9&amp;#44; 9&amp;#125;+@{spelllevel}&amp;#44; @{spelllevel}&amp;#125;k1]]+1d6|Yes, 0})]] HP, Lvl [[?{Cast at what level?}+@{spelllevel}]]) plug: }} !modattr --silent --name @{character_name} --HP|{{innate=([[-1*(?{Use Focus?|No, [[{?{Cast at what level?&amp;#124; Level 1&amp;#44; 1&amp;#124;Level 2&amp;#44; 2&amp;#124;Level 3&amp;#44; 3&amp;#124;Level 4&amp;#44; 4&amp;#124;Level 5&amp;#44; 5&amp;#124;Level 6&amp;#44; 6&amp;#124;Level 7&amp;#44; 7&amp;#124;Level 8&amp;#44; 8&amp;#124;Level 9&amp;#44; 9&amp;#125;+@{spelllevel}&amp;#44; @{spelllevel}&amp;#125;k1]]+1d6|Yes, 0})]] HP, Lvl [[?{Cast at what level?}+@{spelllevel}]])}} !!! inna: %{Zic Nethercut|p1}%{Zic Nethercut|p6}+@{spelllevel}&amp;#44; @{spelllevel}%{Zic Nethercut|p7}+@{spelllevel}]]%{Zic Nethercut|p3} Used for spells that can be Up cast, got the OUTPUT of "Attack" and the "HIGHER LVL CAST DMG" dice is set to NONE. raw: ([[-1*(?{Use Focus?|No, [[{?{Cast at what level?&amp;#124; Level 1&amp;#44; 1&amp;#124;Level 2&amp;#44; 2&amp;#124;Level 3&amp;#44; 3&amp;#124;Level 4&amp;#44; 4&amp;#124;Level 5&amp;#44; 5&amp;#124;Level 6&amp;#44; 6&amp;#124;Level 7&amp;#44; 7&amp;#124;Level 8&amp;#44; 8&amp;#124;Level 9&amp;#44; 9&amp;#125;&amp;#44; @{spelllevel}&amp;#125;k1]]+1d6|Yes, 0})]] HP, Lvl ?{Cast at what level?}) plug: }} !modattr --silent --name @{character_name} --HP|{{innate=([[-1*(?{Use Focus?|No, [[{?{Cast at what level?&amp;#124; Level 1&amp;#44; 1&amp;#124;Level 2&amp;#44; 2&amp;#124;Level 3&amp;#44; 3&amp;#124;Level 4&amp;#44; 4&amp;#124;Level 5&amp;#44; 5&amp;#124;Level 6&amp;#44; 6&amp;#124;Level 7&amp;#44; 7&amp;#124;Level 8&amp;#44; 8&amp;#124;Level 9&amp;#44; 9&amp;#125;&amp;#44; @{spelllevel}&amp;#125;k1]]+1d6|Yes, 0})]] HP, Lvl ?{Cast at what level?})}} !!! inna: %{Zic Nethercut|p1}%{Zic Nethercut|p6}&amp;#44; @{spelllevel}%{Zic Nethercut|p7}]]%{Zic Nethercut|p3} Used for spells that can not be Up cast . raw: ([[-1*(?{Use Focus?|No, @{spelllevel}+1d6|Yes, 0})]] HP, Lvl @{spelllevel}) plug: }} !modattr --silent --name @{character_name} --HP|{{innate=([[-1*(?{Use Focus?|No, @{spelllevel}+1d6|Yes, 0})]] HP, Lvl @{spelllevel})}} !!! inna: %{Zic Nethercut|p1}@{spelllevel}%{Zic Nethercut|p5}@{spelllevel}%{Zic Nethercut|p3} Macros for Global Damage Mod . The shown Macros are used for my Divine Smite. Put this into the Damage and Crit Damage Field. [[1+?{Cast at what level?|Level 1, 1|Level 2, 2|Level 3, 3|Level 4, 4}+?{Undead/fiend target|No, 0|Yes, 1}]]d8 Put this into the Type Field. raw: Radiant (-[[?{Use Focus?|No, [[?{Cast at what level?&amp;#124; Level 1&amp;#44; 1&amp;#124;Level 2&amp;#44; 2&amp;#124;Level 3&amp;#44; 3&amp;#124;Level 4&amp;#44; 4&amp;#125;]]+1d6|Yes, 0}]] HP, Lvl ?{Cast at what level?|Level 1, 1|Level 2, 2|Level 3, 3|Level 4, 4}) plug: }} !modattr --silent --name @{character_name} --HP|{{rname=Radiant ([[-1*(?{Use Focus?|No, [[?{Cast at what level?&amp;#124; Level 1&amp;#44; 1&amp;#124;Level 2&amp;#44; 2&amp;#124;Level 3&amp;#44; 3&amp;#124;Level 4&amp;#44; 4&amp;#125;]]+1d6|Yes, 0})]] HP, Lvl ?{Cast at what level?|Level 1, 1|Level 2, 2|Level 3, 3|Level 4, 4})}} !!!
1709971136

Edited 1709982448
Tore my hair out trying to figure out a way to call a random macro from a macro. Couldn't find a solution from my own searching, so here this is. &nbsp;Is there a better way to do it? Probably, but I'm a bit dense. Anyway; An extremely roundabout way to: Use a macro to run a random "macro" (ft. rollable tables and character attributes) CONSIDERATIONS : Requires The Aaron's "Recursive Tables" script . Unable to run macros with API scripts (may be a workaround but idk) Limited to one-line macros. Can be worked around, see bottom. Steps: 1. Pick a character or make a dummy one that will "hold" your macros. Even if a player doesn't have access to this sheet, they can still use this method so long as they have access to the rollable table we'll create later. 2. Go to their "Attributes &amp; Abilities" tab. Add an attribute (remember the name!) then replace its "Current" field with the text of your macro. Do this for every macro you want to roll from. These attributes will be the "macros" you roll from. For this example, we have a character, "Random Macro Man" and I've called the attributes: "random_macro_1", "random_macro_2", &amp; "random_macro_3". The text in the fields is, respectively: This is output from random_macro_1! [[1d20+100]] This is output from random_macro_2! [[1d20+200]] This is output from random_macro_3! [[1d20+300]] Note: Using this method limits you to one-line macros only. I'll add a way to add multi-line macros at the end of this post. 3. Create a rollable table. Fill the name field with "@{Character Name|attribute-name}" without the quotes and, of course, putting in the dummy character's name and replacing "attribute-name" with the name of the attribute you added. Here's an example image using the character from earlier: 4. Create a macro with the following text: !rt [[ 1t[random-macro-table] ]] 5. Run the macro and marvel as it rolls the table and outputs an attribute, which then turns into the value of that attribute, which is a macro we disguised as an attribute. Not limited to simple uses, you can even run templates. I copy-pasted a Currency-tracking macro I made into one of Random Macro Man's attributes and added it to the table, behold: Here's the macro's contents to give context: &amp;{template:dnd4epower} {{other=1}} {{name=Currency}} {{class=100㊎/wk}} {{type=[**Gold:**](#" style="background-color: transparent; padding: 1px; color: #000000; display: inline-block; border: none; text-decoration: none; width: 130px;)&nbsp; [[@{Ryugen Dovik|gold}]]㊎&nbsp; [**Rations (Days):**](#" style="background-color: transparent; padding: 1px; color: #000000; display: inline-block; border: none; text-decoration: none; width: 130px;)&nbsp; [[@{Ryugen Dovik|rations}]]&nbsp; [**Yokai Materials:**](#" style="background-color: transparent; padding: 1px; color: #000000; display: inline-block; border: none; text-decoration: none; width: 130px;)&nbsp; [[@{Ryugen Dovik|yokai}]]&nbsp; [**Screaming Beads:**](#" style="background-color: transparent; padding: 1px; color: #000000; display: inline-block; border: none; text-decoration: none; width: 130px;)&nbsp; [[@{Ryugen Dovik|screaming}]] ☯&nbsp; [**Heavenly Beads:**](#" style="background-color: transparent; padding: 1px; color: #000000; display: inline-block; border: none; text-decoration: none; width: 130px;)&nbsp; [[@{Ryugen Dovik|heavenly}]] }} Getting Multi-Line Macros to work: Basically, you just have an attribute assigned to a textarea and call on that attribute. Since textareas allow you to have multiple lines and save as multiple lines. Here's what that looks like on the sheet I use: The multiple lines, when called by the method above, output exactly as you'd expect. To call it, all I'd do is add an entry "@{Character Name|power-100-macro}" to my rollable table. If your sheet doesn't have this, you can add it somewhere and even hide it somehow if you'd like to keep it clean. Here's what it looks like in the HTML code of the sheet I use: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;textarea name="attr_power-100-macro"&gt;/me uses @{power-100-name} [[1d20+@{power-100-attack}]] vs @{power-100-def} Hit: [[(1*@{power-100-weapon-num-dice})d@{power-100-weapon-dice}+@{power-100-damage}]] Damage&lt;/textarea&gt; Things I've tried that don't work: Using character Abilities instead of attributes. Doesn't work, don't know why. Would be useful though as it'd allow for multi-line "macros" without hating life. Using &lt;br&gt; to force a new line in the attribute field. Doesn't work, don't know why. Creating a rollable table, "macro-table", and populating the items with "#macro-1", "#macro-2", etc. However, rolling the table returns the item as a result and thus does not run the macro. Tried using Aaron's "Recursive Tables" script in the following, simple command: !rt [[ 1t[macro-table] ]] This returns the item in plaintext, but for whatever reason it doesn't run the macro. So you'd get a chat output of "#macro-1" -- closer but doesn't actually run the macro. Going to add my method to have a roll-query selection return a macro based on your selection based on the above method (API-free). Here's the link to the post I explain it.
1710002411
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Does "&amp;#10;" work instead of "\n"? That's the html entity for a line feed and is often used for tricky macro issues.
Doesn't seem to. Set attribute to this is line 1 &amp;#10; this is line 2 and still only outputs it as one line in the chat: this is line 1 this is line two Which is weird cuz it, like, has the line break there if you copy/paste it. But doesn't show in the chat /shrug
1710159365

Edited 1710160097
Hello, I can't seem for the life of me to be able to edit the community wiki, and I spotted an error (after being contacted about it) in this page :&nbsp; Reusing Rolls - Roll20 Wiki The names of the abilities given : PikesDamages Rolling 1d4 = (1)'&gt;1 What they should be : PikesDamages Rolling 1d4 = (1)'&gt;1 (There is two spaces between "PikesDames" and "Rolling" when there should be only one) If anyone could edit it, it'd be awesome ! Thanks. Rollisticaly, Gibli.