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

NPC macro layout (5e OGL)

1605905725

Edited 1605906017
Fellow rollers, I am trying to replicate the layout for the monster manual statblock into my roll20 for pure cosmetics . Is it possible, to get the "red line/divider" to continue in the same box (macro)? I am only able to create it with following " &{template:npcaction} {{name=}} {{rname=}} ." but it creates an unwanted gap. My current macro: &{template:npcaction} {{name=@{selected|npc_type}}} {{rname=@{selected|npc_name}}} {{description=Armor Class @{selected|npc_AC} (@{selected|npc_actype}) Hit Points @{selected|hp} (@{selected|npc_hpformula}) Speed @{selected|npc_speed} --------- red line --------- Senses @{selected|npc_senses} Languages @{npc_languages} Challenge @{npc_challenge} (@{npc_xp}) }} My "Gap" Macro: &{template:npcaction} {{name=@{selected|npc_type}}} {{rname=@{selected|npc_name}}} {{description=Armor Class @{selected|npc_AC} (@{selected|npc_actype}) Hit Points @{selected|hp} (@{selected|npc_hpformula}) Speed @{selected|npc_speed} }} &{template:npcaction} {{name=}} {{rname=}} {{description=Senses @{selected|npc_senses} Languages @{selected|npc_languages} Challenge @{selected|npc_challenge} (@{selected|npc_xp}) }} Thanks in advance.
1605907267
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
If you have the red line as an image and store it somewhere on the internet (such as imgur), you can display it on its own line in your first macro as: [redline](imageURL)
1605912885

Edited 1606801614
Using Oosh's HTML Styles in Chat trick : &{template:npcaction} {{name=@{selected|npc_type}}} {{rname=@{selected|npc_name}}} {{description=Armor Class @{selected|npc_AC} (@{selected|npc_actype}) Hit Points @{selected|hp} (@{selected|npc_hpformula}) Speed @{selected|npc_speed} [ ](#" style="border: none; border-top: 0.25em solid transparent; border-bottom: 0.25em solid transparent; border-left: 14em solid #7e2d40; line-height: 1.25em; font-size: 1.05em; display: block)Senses @{selected|npc_senses} Languages @{selected|npc_languages} Challenge @{selected|npc_challenge} (@{selected|npc_xp})}}
WHAT??? Mind officially blown. I had no idea that red line was HTML.... wow!
1605932337
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Very nice trick, Jarren!
1605987612

Edited 1605988343
Jarren, Oosh and Keith thank you for your amazing input! BONUS QUESTION 1: Can one manipulate the "space/gap" above and below the red line by changing something in the code, so the wording is not directly above/beneath the line: [ ](#" style="border: none; border-top: 0.25em solid transparent; border-bottom: 0.25em solid transparent; border-left: 14em solid #7e2d40; line-height: 1.25em; font-size: 1.05em; display: block) BONUS QUESTION 2: Can one change the colour so the text becomes red like the title in the npc sheet/macros?
1605990492

Edited 1607123824
I'll break down the parts of the code: [ ](#" style="border: none; border-top: 0.25em solid transparent; border-bottom: 0.25em solid transparent; border-left: 14em solid #7e2d40; line-height: 1.25em; font-size: 1.05em; display: block) The main part is the hidden anchor tag (an html link, typically for a website): [ ]() Whatever is inside the [ ] is the displayed code, so I just added a blank space there.  Whatever is inside the ( ) is what is linked. The way Roll20 parses this, is it changes things to create proper HTML code.  What Oosh figured out is that you can 'break' the html link by using a fake call of '#"' and add style information, which is what comes afterwards. At that point it's just understanding HTML/CSS style code.  The important thing for you to know here is each attribute is separated by a semicolon ';', and the very end of the line needs a closing parenthesis ')'. You can look up specific style tags to see if there are other options you'd like to use, but here's the breakdown of what is in the code I used: border-top: 0.25em solid transparent; --> This makes the top part of the line transparent border-bottom: 0.25em solid transparent; --> This makes the bottom part of the line transparent border-left: 14em solid #7e2d40; --> This makes the left part of the line solid red and 14 units wide line-height: 1.25em; --> This sets the height of the line font-size: 1.05em; --> This sets the height of the font display: block; --> This 'blocks' the display to start on a new line and use the whole width Bonus question 1 answer: You could either simply add a blank line before the red line in your code to add more space, or you can add 'margin-top' and 'margin-bottom' attributes to increase the space above and below the line. margin-top: 0.25em; margin-bottom: 0.25em; Bonus question 2 answer: You can change the color of the line by changing the color in the 'border-left' attribute: '#7e2d40' is the red currently used for the line and title.  You just need to find the hex reference for the color you want and use that.  The color in the macro is the same color that gets used by the 'npc_action' template, so I'm not sure what color you want to change it to. Bonus help: If you are using Google Chrome as your browser, you can right-click on the chat bar on whatever element you are curious about and click on 'inspect'.  (I think Firefox has a similar functionality.)  At the bottom of the sidebar that shows up on the right, you'll see all the CSS that is currently being displayed, which is how I figured out that the red arrow is just a line, not a graphical image.  The attributes that have a line strikethrough mean that they are being superceded by some other CSS, so look for the ones that don't have a strikethrough.
1605999088

Edited 1606801639
Double bonus trick:  If you want to make macros that don't have super long strings of html formatting in them, you can use another trick to clean up your macros: 1. Create a character named 'Div' 2. On the Attributes & Abilities page of the character sheet, create an ability named 'RedLine' 3. In the 'current' field for the RedLine ability, paste the entire final code you want to use, such as: (FYI I changed the 'display' attribute  in this example to 'inline-block' so that it'll be on its own line and look better in macros) [ ](#" style="border: none; border-top: 0.25em solid transparent; border-bottom: 0.25em solid transparent; border-left: 14em solid #7e2d40; line-height: 1.25em; font-size: 1.05em; margin-top: 0.25em; margin-bottom: 0.25em; display: inline-block) 4. In whichever macros you want to include the red line divider, just use this code: @{Div|RedLine} For example, your code above would look like this: &{template:npcaction} {{name=@{selected|npc_type}}} {{rname=@{selected|npc_name}}} {{description=Armor Class @{selected|npc_AC} (@{selected|npc_actype}) Hit Points @{selected|hp} (@{selected|npc_hpformula}) Speed @{selected|npc_speed} @{Div|RedLine} Senses @{selected|npc_senses} Languages @{selected|npc_languages} Challenge @{selected|npc_challenge} (@{selected|npc_xp}) }}  This is also nice because you can update ALL your macros to look the same, simply by modifying the 'RedLine' ability on the Div character sheet.  If you decide that you want all the lines to be blue, you just change the one piece of code and all future macro calls will be in blue instead.
Nice, Jarren.
1606017770
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Jarren, please post that in the Stupid Tricks thread. I’d link it but I’m on my phone. 
1606036606
keithcurtis said: Jarren, please post that in the Stupid Tricks thread. I’d link it but I’m on my phone.&nbsp; Done:&nbsp; <a href="https://app.roll20.net/forum/post/5899495/stupid-roll20-tricks-and-some-clever-ones/?pageforid=9520178#post-9520178" rel="nofollow">https://app.roll20.net/forum/post/5899495/stupid-roll20-tricks-and-some-clever-ones/?pageforid=9520178#post-9520178</a>
Jarren K, thank you for taking your time writing in the Stupid Tricks thread. I've learned so much, and I'm happy about I contributed with an idea which you converted into magic!
1606802083
Rasmus said: BONUS QUESTION 2: Can one change the colour so the text becomes red like the title in the npc sheet/macros? I just realized you were asking about changing the color of the text, not the line. You could change the font to look like almost anything you want.&nbsp; Here's the code: 1. I made the font red, bold, and removed the underline. Create attribute 'FontColor' on character 'Div': ](#" style="color: #7e2d40; font-weight: bold; text-decoration: none;) 2. Here's the macro for your statblock macro. You have to put a '[' before each item you want to adjust the color for. &amp;{template:npcaction} {{name=@{selected|npc_type}}} {{rname=@{selected|npc_name}}} {{description=[Armor Class@{Div|FontColor} @{selected|npc_AC} (@{selected|npc_actype}) [Hit Points@{Div|FontColor} @{selected|hp} (@{selected|npc_hpformula}) [Speed@{Div|FontColor} @{selected|npc_speed} @{Div|RedLine} [Senses@{Div|FontColor} @{selected|npc_senses} [Languages@{Div|FontColor} @{selected|npc_languages} [Challenge@{Div|FontColor} @{selected|npc_challenge} (@{selected|npc_xp}) }}
1606849194

Edited 1606849591
Hi Jarred, I managed to do something similiar by my self, but I was annoyed by the "red underline" whenever I hovered over the text. YOU MADE MY DAY! I took it one step further to make a "cosmetic replica" of the character sheet with red letters: [](#" style="color: #7e2d40; text-decoration: none;) Please have a look at my code to see if it is done correctly, and feel free to use it or give feed. You made this happen and I am very grateful!: @{selected|wtype}&amp;{template:npcaction} {{name=@{selected|npc_type}}} {{rname=@{selected|npc_name}}} {{description=[**Armor Class**](#" style="color: #7e2d40; font-weight: bold; text-decoration: none;) [@{selected|npc_AC} (@{selected|npc_actype})](#" style="color: #7e2d40; text-decoration: none;) [**Hit Points**](#" style="color: #7e2d40; font-weight: bold; text-decoration: none;) [@{selected|hp} (@{selected|npc_hpformula})](#" style="color: #7e2d40; text-decoration: none;) [**Speed**](#" style="color: #7e2d40; font-weight: bold; text-decoration: none;) [@{selected|npc_speed}](#" style="color: #7e2d40; text-decoration: none;) [ ](#" style="border: none; border-top: 0.25em solid transparent; border-bottom: 0.25em solid transparent; border-left: 14em solid #7e2d40; line-height: 1.25em; font-size: 1.05em; margin-top: 0.25em; margin-bottom: 0.25em; display: block) **STR** @{selected|strength} (+@{selected|strength_mod}) **DEX** @{selected|dexterity} (+@{selected|dexterity_mod}) **CON** @{selected|constitution} (+@{selected|constitution_mod}) **INT** @{selected|intelligence} (+@{selected|intelligence_mod}) **WIS** @{selected|wisdom} (+@{selected|wisdom_mod}) **CHA** @{selected|charisma} (+@{selected|charisma_mod}) }} See picture: BONUS QUESTION (if you have the time) If I want to be able to click on a word so it makes a roll (i.e. clicking the text '(9d8+18)') and then it will make a roll similar to if one clicked the same field on the NPC sheet?
1606861509
Yes that is possible -- you need to put the roll link in the parenthesis. Here's the list of the 5e by Roll20 sheet attributes:&nbsp; <a href="https://wiki.roll20.net/D%26D_5e_OGL_NPC_Attributes" rel="nofollow">https://wiki.roll20.net/D%26D_5e_OGL_NPC_Attributes</a> I can take a look later when I have time for the correct code setup.
1606868897
I've done this before, and I don't remember the specific reason but here's what I had to do: Create a macro named&nbsp;NPCRolledHP: &amp;{template:npcaction} &amp;{noerror}{{rname=@{selected|npc_name}}}{{name=Rolled HP}} {{description=**Rolled HP:** *[[@{selected|npc_hpformula}]]*}} Then here is the adjusted macro to add the button to the hp formula. You need a ! and the macro call on a separate line if I remember correctly: &amp;{template:npcaction} {{name=@{selected|npc_type}}} {{rname=@{selected|npc_name}}} {{description=[Armor Class@{Div|FontColor}: @{selected|npc_AC} (@{selected|npc_actype}) [Hit Points@{Div|FontColor}: @{selected|hp} ([@{selected|npc_hpformula}](! #NPCRolledHP)) [Speed@{Div|FontColor}: @{selected|npc_speed} @{Div|RedLine} [Senses@{Div|FontColor}: @{selected|npc_senses} [Languages@{Div|FontColor}: @{selected|npc_languages} [Challenge@{Div|FontColor}: @{selected|npc_challenge} (@{selected|npc_xp}) }} That will cause the npc_hpformula to be a button that you click on to call the NPCRolledHP macro which will display the rolled HP in a similar template. You could also just add a line with the rolled HP in the same macro. Putting the npc_hpformula inside [[ ]] will create an inline roll: &amp;{template:npcaction} {{name=@{selected|npc_type}}} {{rname=@{selected|npc_name}}} {{description=[Armor Class@{Div|FontColor}: @{selected|npc_AC} (@{selected|npc_actype}) [Hit Points@{Div|FontColor}: @{selected|hp} (@{selected|npc_hpformula}) [Rolled HP@{Div|FontColor}: [[@{selected|npc_hpformula}]] [Speed@{Div|FontColor}: @{selected|npc_speed} @{Div|RedLine} [Senses@{Div|FontColor}: @{selected|npc_senses} [Languages@{Div|FontColor}: @{selected|npc_languages} [Challenge@{Div|FontColor}: @{selected|npc_challenge} (@{selected|npc_xp}) }}
1606871901
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Rasmus, you may be able to glean some helpful stuff from this macro: NPC Statblock Chat Menu for D&amp;D 5e sheet — No API required!
1606883299
Last version here that includes the sheet built-in roll for the npc_hpformula.&nbsp; There's a big caveat on this one -- if you make this a collection macro, every time you open it up, Roll20 will parse the '&amp;#37;' html entity into a '%' and break the macro, and you'll have to re-enter the '&amp;#37;'. You can avoid that by using a macro mule character -- Roll20 does not parse html entities in character ability macros. @{selected|wtype} &amp;{template:npcaction} {{name=@{selected|npc_type}}} {{rname=@{selected|npc_name}}} {{description=[Armor Class@{Div|FontColor} @{selected|npc_AC} (@{selected|npc_actype}) [Hit Points@{Div|FontColor} @{selected|hp} ([@{selected|npc_hpformula}](! &amp;#37;{selected|npc_hpformula})) [Speed@{Div|FontColor} @{selected|npc_speed} @{Div|RedLine} [Senses@{Div|FontColor} @{selected|npc_senses} [Languages@{Div|FontColor} @{selected|npc_languages} [Challenge@{Div|FontColor} @{selected|npc_challenge} (@{selected|npc_xp}) }}
Just a tip (or maybe my personal preference) before getting carried away with storing styles on a Style Mule - I'm finding it more convenient to store them like this, using FontColor as an example. The original is this: ](#" style="color: #7e2d40; font-weight: bold; text-decoration: none;) but I prefer this: style="color: #7e2d40; font-weight: bold; text-decoration: none; It means you need to type a little more when you use it, but you can actually link something when required without having to retype the style info, and leaving the bracket off the end means you can overwrite something like the color without having to redo the whole style. So: [ButtonLabel](~abilityLink" @{div|FontColor}color: purple) allows you to use Jarren's trickery with a few extra characters typed in, but more flexibility to override a property without having to assign another Attribute for a minor style change, and being able to use the style without assuming a null link. YMMV!
1606936402

Edited 1606936550
Dear Keith, Jarren and Oosh - thank you much again! :-) I was trying to see if it was possible to do it without using "the pink boxes" so it just showed the text inside the square brackets without the surrounding pink (quoting keith "which is something no one wants:" ). Unfortunately, I do not have any luck stringing together some "html magic" or similar thing. Am I right to conclude that if I want to be able to "click" the text to make a roll (without using API/Stylus etc.) I have to accept the pink boxes surrounding the text? [Acrobatics @{selected|npc_acrobatics}](~selected|npc_acrobatics)
1606941448

Edited 1606942346
Rasmus &nbsp;said: Am I right to conclude &nbsp;that if I want to be able to "click" the text to make a roll (without using API/Stylus etc.) I have to accept the pink boxes surrounding the text? Nope. Use Keith's Stylus code : [Acrobatics @{selected|npc_acrobatics}](~selected|npc_acrobatics#" style="background-color: transparent; padding: 0px; color: #ce0f69; display: inline-block; border: none;) You have to make sure there's no space between the ability call 'npc_acrobatics' and the html injection starting with '#" style=', otherwise when it gets parsed it becomes&nbsp;%{selected|npc_acrobatics } with a space, which breaks the call. Anything that is done in Stylus could be done directly with the hidden anchor tag&nbsp;[ ](). The positive of that is that it will be displayed that way for all your players.&nbsp; The negative is that you have to update all those styles manually if you ever want to change them.&nbsp;
1606958499
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
For ease of use, I'd suggest installing Stylus and using the Install link in the index post in the thread Jarren linked. You'd need to let your players know how to do it as well, but it's a quicker solution than formatting every button you create.
1606999208

Edited 1606999247
Thank you guys, I'm making huge progress regarding my statblock macro! :-) When I click the NPC-sheet to call a "strength roll" the macro is: @{Veteran|wtype}&amp;{template:npc} @{Veteran|npc_name_flag} {{rname=^{strength}}} {{mod=[[[[@{Veteran|strength_mod}]][STR]]]}} {{r1=[[@{Veteran|d20}+[[@{Veteran|strength_mod}]][STR]]]}} @{Veteran|rtype}+[[@{Veteran|strength_mod}]][STR]]]}} {{type=Ability}} When I click the NPC-sheet to call a "Athlectic roll" the macro is: @{Veteran|wtype}&amp;{template:npc} @{Veteran|npc_name_flag} {{rname=^{athletics}}} {{mod=@{Veteran|npc_athletics}}} {{r1=[[@{Veteran|d20}+@{Veteran|npc_athletics}]]}} @{Veteran|rtype}+@{Veteran|npc_athletics}]]}} {{type=Skill}} When I want to transfer them into "text that is clickable", it is only possible doing so with "Skills &amp; Saving throws", I think it is because of there is an 'Attribute box" named in the NPC sheet. This example works : [Athletics @{selected|npc_athletics_base}](~selected|npc_athletics#" style="background-color: transparent; padding: 0px; color: #7e2d40; display: inline-block; border: none; text-decoration: none;) But, when I use the same "template" to make any ability roll it can only fetch the numbers, and I cannot create an inline roll after the tilde sign because it wants "selected|something" afterwards. Any ideas how to solve this? The goal is to click the "STR 16 (+3)" so it makes a standard STR roll and looks like this: [**STR** @{selected|strength_base} (+@{selected|strength_mod})] ( ~selected|HELP-TO-MAKE-A-STR-ROLL #" style="background-color: transparent; padding: 0px; color: #7e2d40; display: inline-block; border: none; text-decoration: none;) Thanks again to you all for taking your time to answer my questions.
1607006541
[**STR** @{selected|strength_base} (+@{selected|strength_mod})](~selected| strength #" style="background-color: transparent; padding: 0px; color: #7e2d40; display: inline-block; border: none; text-decoration: none;) All of the attributes are listed here . &nbsp;
1607044147

Edited 1607047618
I think you just want the %{strength} roll, so you need to remove the # - that's only for null links, or for #CollectionsMacro links. Also, the [button](~ability) syntax will only link to an Ability, you'll need some trickery if you want to link an Attribute. So these two example won't work: [button](~selected|acrobatics_roll) &lt;=== this is an @{Attribute}, not an %{Ability} [button](~selected|strength#) &lt;=== the # isn't needed, the Ability is just called %{strength} but these will work: [button](~selected|strength) &lt;=== strength is an Ability, this is what the buttons were designed for [button](!&amp;#13;&amp;commat;{selected|acrobatics_roll}) &lt;=== escape the @ so the Attribute doesn't expand until the button is clicked
The macro works with the attributes: [**STR** @{selected|strength_base} (+@{selected|strength_mod})](~selected|strength#" style="background-color: transparent; padding: 0px; color: #7e2d40; display: inline-block; border: none; text-decoration: none;) Now to the cosmetic department. The attribute once cliked shows the "template:simple" even when a NPC is selected. If I swap 'selected|strength' with an attribute box starting with 'npc_something' then it will display the "correct" template: 'template:npcation". The STR,DEX,CON,INT,WIS,CHA is the only boxes without npc. I guess I have to write to Roll20 to ask them kindly to make those into "npcaction"-templates by default. In the mean time, is there someway to write a piece of code to insert a template after the 'tilde' sign? (following doesn't work - using the arrow key to get the direct code from the npc sheet when clicking 'strength') [button](~!&amp;#13;&amp;commat;{selected|wtype}&amp;{template:npc} @{selected|npc_name_flag} {{rname=Strength}} {{mod=[[[[@{selected|strength_mod}]][STR]]]}} {{r1=[[@{selected|d20}+[[@{selected|strength_mod}]][STR]]]}} @{selected|rtype}+[[@{selected|strength_mod}]][STR]]]}} {{type=Ability}} )
Oh I see, it does actually scrub the # from the link when it creates the button. Either way, you don't need the # on the end of Abilities you link to. But you can leave it there if you want to :) Nesting an entire template is possible, but probably not worth the effort. I've only played around with it briefly since there's little to be gained from it - you're better off putting the content in a ability macro on a macro character sheet and linking straight to that instead. But anyway, you can do it if you really want to: [button](`/w gm&amp;#10;&amp;commat;{selected|wtype&amp;#125;&amp;amp;{template:npc&amp;#125; &amp;commat;{selected|npc_name_flag&amp;#125; {{rname=Strength&amp;#125;&amp;#125; {{mod=[[[[&amp;commat;{selected|strength_mod&amp;#125;&amp;rsqb;&amp;rsqb;[STR]&amp;rsqb;&amp;rsqb;&amp;#125;&amp;#125; {{r1=[[&amp;commat;{selected|d20&amp;#125;+[[&amp;commat;{selected|strength_mod&amp;#125;&amp;rsqb;&amp;rsqb;[STR]&amp;rsqb;&amp;rsqb;&amp;#125;&amp;#125; &amp;commat;{selected|rtype&amp;#125;+[[@{selected|strength_mod&amp;#125;&amp;rsqb;&amp;rsqb;[STR]&amp;rsqb;&amp;rsqb;&amp;#125;&amp;#125; {{type=Ability&amp;#125;&amp;#125;) It seems like you need to start the link with a / command of some kind, or it won't create it properly. So you can send a blank whisper to yourself, or whisper the whole thing. Or use some /fx or something. And you need to escape a whole load of stuff to stop it breaking, including roll brackets. You can actually get the straight ability checks on the npc template (as they're rolled from the NPC sheet) with the %{npc_str} format. So [STR](~selected|npc_str) for a button. This won't use global modifiers (though neither does the PC sheet for straight ability checks... still broken) and could potentially be missing some other things that have been updated on the PC rolls.... not sure though.
Cheerios Oosh! The [STR](~selected|npc_str) works amazing. Once again, a massive thanks to you all Keith, Jarren and Oosh for helping me out! After many hours of trying to understand macros, this is my final result for my version of a 'Statblock (token action) macro':
1607123756
Looks nice! You should post the finished code for any other future players who might be interested in doing something similar!
1607136217

Edited 1607136401
There's a few ways to deal with broken abilities, but to deal with empty Attributes breaking your labels, I usually use a &amp;nbsp; in the label for all my menu macros: [@{selected|cust_classname}&amp;nbsp;](#) And this enables you to go a step further, and use its own horrible emptiness against it: [@{selected|cust_classname}&amp;nbsp;](#" style="display:none@{selected|cust_classname}) Anything but an empty field will invalidate the display property value, and it'll be ignored. Don't remove the &amp;nbsp; though, it'll break the link, which breaks the style injection. As Keith said, Stylus is generally easier for this purpose, but no one I play with uses it so it's nice to be able to display public macros the way I want them displayed. Also +1 to posting the finished code, (though I suspect it involves a bunch of Attributes stored on a Style Mule).
1607337370

Edited 1607337447
I am currently trying to copy things from this post into a "Spellbook macro". When I am trying to call an ability from the sheet and it doesn't exist I get an error code. Is there someway to add something to the macro, in case of the caster doesn't have aquired that spell level that just "skips it" so it doesn't show in the chat - like the &amp;{noerror} does for abilities?&nbsp; (I have searched the forum without luck) Example: [@{selected|repeating_spell-9_$2_spellname}](~selected|repeating_spell-9_$2_spell)
1607348845
Not that I've seen anywhere.&nbsp; The closest thing I've found is to use Stylus to hide the orange 'No attribute was found..." section: div.message.error { display: none; }
1607353500

Edited 1607353541
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Putting&nbsp; &nbsp;&amp;{noerror} after your roll template will suppress the orange box error warning. You can see an example of a full statblock macro here .&nbsp;For a spellblock macro, check here , later in the thread. Also in that thread, Oosh describes how to use Stylus to suppress the garbage lines here .
1607396715

Edited 1607397039
There are instructions here for completely removing broken lines from chat menus. It's a bit of setup with Stylus, but worth it if you're not planning on going the API route anytime soon. As usual, this is only for your own browser. If you want a public version, or you don't want to use Stylus, see this thread . You can use style injection to remove blanks, though you can pretty that up with Jarren's suggestion of using a style mule character. This version can't do the Prepared Spells filtering that Stylus can - in fact, you can filter by any Attribute you like using the Stylus trick. Also, you can't get rid of the blank lines without Stylus, as far as I know. One of those options, combined with Keith's &amp;noerror suggestion, that should give you a clean output. edit - side note on &amp;{noerror} - I've never been able to get it to function with a @{target} macro. And here's a rejigged version for the spellbook example for the 5e template: &amp;{noerror} &amp;{template:npcaction} {{rname=Spellbook}} {{name=@{selected|character_name}}} {{description=[@{selected|repeating_spell-cantrip_$0_spellname}](~selected|repeating_spell-cantrip_$0_spell" style="background:none;border:none;color:blue;display:none;display:inline@{selected|repeating_spell-cantrip_$0_spellname|max}) [@{selected|repeating_spell-cantrip_$1_spellname}](~selected|repeating_spell-cantrip_$1_spell" style="background:none;border:none;color:blue;display:none;display:inline@{selected|repeating_spell-cantrip_$1_spellname|max}) [@{selected|repeating_spell-cantrip_$2_spellname}&amp;nbsp;](~selected|repeating_spell-cantrip_$2_spell" style="background:none;border:none;color:blue;display:none;display:inline@{selected|repeating_spell-cantrip_$2_spellname|max}) [@{selected|repeating_spell-cantrip_$3_spellname}](~selected|repeating_spell-cantrip_$3_spell" style="background:none;border:none;color:blue;display:none;display:inline@{selected|repeating_spell-cantrip_$3_spellname|max}) **Level 1** @{selected|lvl1_slots_expended}/@{selected|lvl1_slots_total} Slots [@{selected|repeating_spell-1_$0_spellname}](~selected|repeating_spell-1_$0_spell" style="background:none;border:none;color:blue;display:none;display:inline@{selected|repeating_spell-1_$0_spellname|max}) [@{selected|repeating_spell-1_$1_spellname}](~selected|repeating_spell-1_$1_spell" style="background:none;border:none;color:blue;display:none;display:inline@{selected|repeating_spell-1_$1_spellname|max}) [@{selected|repeating_spell-1_$2_spellname}&amp;nbsp;](~selected|repeating_spell-1_$2_spell" style="background:none;border:none;color:blue;display:none;display:inline@{selected|repeating_spell-1_$2_spellname|max}) [@{selected|repeating_spell-1_$3_spellname}](~selected|repeating_spell-1_$3_spell" style="background:none;border:none;color:blue;display:none;display:inline@{selected|repeating_spell-1_$3_spellname|max}) **Level 2** @{selected|lvl2_slots_expended}/@{selected|lvl2_slots_total} Slots [@{selected|repeating_spell-2_$0_spellname}](~selected|repeating_spell-2_$0_spell" style="background:none;border:none;color:blue;display:none;display:inline@{selected|repeating_spell-2_$0_spellname|max}) [@{selected|repeating_spell-2_$1_spellname}](~selected|repeating_spell-2_$1_spell" style="background:none;border:none;color:blue;display:none;display:inline@{selected|repeating_spell-2_$1_spellname|max}) [@{selected|repeating_spell-2_$2_spellname}&amp;nbsp;](~selected|repeating_spell-2_$2_spell" style="background:none;border:none;color:blue;display:none;display:inline@{selected|repeating_spell-2_$2_spellname|max}) [@{selected|repeating_spell-2_$3_spellname}](~selected|repeating_spell-2_$3_spell" style="background:none;border:none;color:blue;display:none;display:inline@{selected|repeating_spell-2_$3_spellname|max})}}