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

can some one show me how to clean up this macro

1585189039

Edited 1585189417
Xax
Pro
&nbsp; im trying to make a 1 click npc with roll able tables and i currently have this&nbsp;&nbsp; /w Vega &amp;{template:default} {{name=NPC is}}{{=[[1t[sex-and-race]]] [[1t[height]]] [[1t[build]]] [[1t[clothing]]] [[1t[oddity]]]&nbsp; [[1t[hair]]] [[1t[hairstyle]]]&nbsp; [[1t[eye2]]]&nbsp; [[1t[eyes]]] [[1t[Armor]]] [[1t[Shield]]]&nbsp; [[1t[weapon]]]&nbsp; [[1t[weapon]]]&nbsp; [[1t[male-names]]]&nbsp; [[1t[male-names]]] [[1t[female-names]]] [[1t[female-names]]] [[1t[Occupation]]]}} &nbsp; and it comes up looking like this&nbsp;&nbsp; &nbsp;&nbsp; (To Vega): NPC is <span class="userscript-inlinerollresult showtip tipsy-n-right" title="Rolling 1t[sex-and-race] = ( Elvish male kid )" style="background-color: rgb( 254 , 246 , 142 ) ; border: 2px solid rgb( 254 , 246 , 142 ) ; padding: 0px 3px ; font-weight: bold ; cursor: help ; font-size: 1.1em">Elvish male kid&nbsp; <span class="userscript-inlinerollresult showtip tipsy-n-right" title="Rolling 1t[height] = ( Average height )" style="background-color: rgb( 254 , 246 , 142 ) ; border: 2px solid rgb( 254 , 246 , 142 ) ; padding: 0px 3px ; font-weight: bold ; cursor: help ; font-size: 1.1em">Average height &nbsp;<span class="userscript-inlinerollresult showtip tipsy-n-right" title="Rolling 1t[build] = ( Thin build )" style="background-color: rgb( 254 , 246 , 142 ) ; border: 2px solid rgb( 254 , 246 , 142 ) ; padding: 0px 3px ; font-weight: bold ; cursor: help ; font-size: 1.1em">Thin build &nbsp;<span class="userscript-inlinerollresult showtip tipsy-n-right" title="Rolling 1t[clothing] = ( Common clothes )" style="background-color: rgb( 254 , 246 , 142 ) ; border: 2px solid rgb( 254 , 246 , 142 ) ; padding: 0px 3px ; font-weight: bold ; cursor: help ; font-size: 1.1em">Common clothes &nbsp; Scars across back&nbsp; coily green hair &nbsp; feathered &nbsp;<span class="userscript-inlinerollresult showtip tipsy-n-right" title="Rolling 1t[eye2] = ( cross )" style="background-color: rgb( 254 , 246 , 142 ) ; border: 2px solid rgb( 254 , 246 , 142 ) ; padding: 0px 3px ; font-weight: bold ; cursor: help ; font-size: 1.1em">cross &nbsp; thin red eyes &nbsp;<span class="userscript-inlinerollresult showtip tipsy-n-right" title="Rolling 1t[Armor] = ( Full Plate )" style="background-color: rgb( 254 , 246 , 142 ) ; border: 2px solid rgb( 254 , 246 , 142 ) ; padding: 0px 3px ; font-weight: bold ; cursor: help ; font-size: 1.1em">Full Plate &nbsp; A tower shield &nbsp; hand crossbow &nbsp; handaxe &nbsp;<span class="userscript-inlinerollresult showtip tipsy-n-right" title="Rolling 1t[male-names] = ( Raven )" style="background-color: rgb( 254 , 246 , 142 ) ; border: 2px solid rgb( 254 , 246 , 142 ) ; padding: 0px 3px ; font-weight: bold ; cursor: help ; font-size: 1.1em">Raven &nbsp; Sykes &nbsp;<span class="userscript-inlinerollresult showtip tipsy-n-right" title="Rolling 1t[female-names] = ( Kim )" style="background-color: rgb( 254 , 246 , 142 ) ; border: 2px solid rgb( 254 , 246 , 142 ) ; padding: 0px 3px ; font-weight: bold ; cursor: help ; font-size: 1.1em">Kim &nbsp;<span class="userscript-inlinerollresult showtip tipsy-n-right" title="Rolling 1t[female-names] = ( Kim )" style="background-color: rgb( 254 , 246 , 142 ) ; border: 2px solid rgb( 254 , 246 , 142 ) ; padding: 0px 3px ; font-weight: bold ; cursor: help ; font-size: 1.1em">Kim &nbsp; Farmer (radish) &nbsp; &nbsp; and i would like it&nbsp; to be cleaner looking , and be able to easily add in stats and hit points eventually&nbsp; .&nbsp; also it would be nice to post 2 things under one header like the 2 eye tables&nbsp; and the 2 hair tables , names , and wepons thx !&nbsp;
Vega ,&nbsp; Ill give this a shot. Since you are using the default template it can still look nice but you did not specify which Character sheet so you may have other options. Here is an example of one I built using The Aarons Recursive Tables (thats an api if you are pro but you can see the spacing and taging in the text of the macro). !rt /w gm &amp;{template:pf_block} {{name=NPC Creator}} {{race=**Race:**[[ 1t[NPC-Sex] ]] [[ 1t[NPC-Races] ]]}} {{Classes=**Class:**[[ 1t[NPC-Classes] ]]}} {{Levels=**Level:**[[1d20]]}} {{Alignment=**Alignment:**[[ 1t[NPC-Alignment] ]]}} {{Deity'=**Deity:**[[ 1t[Deities] ]]}} {{stats=**Str:**[[{4d6}kh3]] **Dex:**[[{4d6}kh3]]&nbsp; **Con:**[[{4d6}kh3]]&nbsp; **Int:**[[{4d6}kh3]]&nbsp; **Wis**[[{4d6}kh3]]&nbsp; **Cha:**[[{4d6}kh3]]}} {{Height= **Height**: [[ 1t[NPC-Height] ]]}} {{Body Type= **Body Type**: [[ 1t[NPCBody-Type] ]]}} {{Age= **Age**: [[ 1t[NPC-Age] ]]}} {{Appearance= **Appearance**: [[ 1t[NPC-Appearance] ]]}} {{manners= **Mannerisms**: [[ 1t[NPCPhysical-Mannerisms] ]]}} {{Personality Quirks= **Personality Quirks**: [[ 1t[NPC-Personality-Quirks] ]]}} {{Philosophical Disposition= **Philosophical Disposition:**Pending Table}} {{HomeLand= **Origin:** [[ 1t[Home-Land-Region] ]]}} {{Grewup= **Grew Up In:** [[ 1t[Birth-Place] ]]}} {{BirthRank= **Birth Rank**:[[ 1t[NPC-Birthrank] ]]}} {{CHistory= **Child Hood History:** [[1t[Childhood-History]]]}} {{PC= **Personal Demons:** [[ 1t[Personal-Conflict] ]]}} {{CS= **Target of Personal Demons:** [[ 1t[Personal-Conflict-Subject] ]]}} {{CSM= **Personal Demon Motivation:**[[ 1t[Conflict-Motivation] ]]}} {{CR= **Personal Demon Resolution:**[[ 1t[Conflict-Resolution] ]]}} {{Criminal Activity= **Criminal History:**[[ 1t[Criminal-History] ]]}} {{Criminal History Punishment= **Criminal History Outcome:** [[ 1t[Criminal-History-State] ]]}} {{Trade= **Trades:**[[ 1t[NPC-Trades] ]]}} Essentially in yours you have everything on one line.&nbsp; Ie this here {{=[[1t[sex-and-race]]] [[1t[height]]] [[1t[build]]] [[1t[clothing]]] [[1t[oddity]]]&nbsp; [[1t[hair]]] [[1t[hairstyle]]]&nbsp; [[1t[eye2]]]&nbsp; [[1t[eyes]]] [[1t[Armor]]] [[1t[Shield]]]&nbsp; [[1t[weapon]]]&nbsp; [[1t[weapon]]]&nbsp; [[1t[male-names]]]&nbsp; [[1t[male-names]]] [[1t[female-names]]] [[1t[female-names]]] [[1t[Occupation]]]}} would be better written as {{Sex &amp; Race:=[[1t[sex-and-race]]]}} {{Height:=[[1t[height]]]}} and so forth. when you do {{= any thing is contained in side is put on a single line and wraps to the dimension and justification of he template}} So when you are formatting a macro like that one the default template lets you tag out put as follow {{some tag on the left=Something on the right}} this is covered in this link&nbsp; <a href="https://roll20.zendesk.com/hc/en-us/articles/360037257334-How-to-Make-Roll-Templates" rel="nofollow">https://roll20.zendesk.com/hc/en-us/articles/360037257334-How-to-Make-Roll-Templates</a> &nbsp;on how the default template works.&nbsp; In mine I use the pathfinder templates specific to that sheet. The advantage is it may give you better out put and look nicer but not required the default works well enough. Hope this helps.
thanks for the help , i am not tying it to any sheet , and the one i did seems to work for DCC and 5E as i copied the game and then use the dungeon crawl classics sheet and the roll 20 5E sheet on the original game. Is there a way to randomly have a sheet all filled out with 1 button ?&nbsp; I am a plus sub , but ill most likely move to pro after the year is up.&nbsp; ill try the line like this&nbsp; {{Sex &amp; Race:=[[1t[sex-and-race]]]}} &nbsp; , can i get 2 tables under 1 line?&nbsp;
Hey Vega, Right,&nbsp; character sheets have custom CSS templates you can call from. When you are not using a sheet only the default template however if you look at the documentation the margin are setup that you can put another table on the same line but if the text is larger than the width it will wrap around to the next line giving you an odd looking format. You will have to experiment for what looks best in your eyes.
1586446701

Edited 1586446964
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
You can fiddle with this style. It may not be what you want immediately, but it's tweakable if you know CSS. Default Roll Template Enhancement
The QoL from what Keith (NOT KEVIN ;D) posted above has saved my chat windows, I have now required all my players install it :D&nbsp;
1586459604
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I didn't even have to require my players. I showed them a screen share and they clamored for it. I sent them a care package of m favorite styles from those threads.
thanks for the comments , i cant access the API stuff , and here is what i have now ,&nbsp; (To Vega): NPC is Sex &amp; Race: <span class="inlinerollresult showtip tipsy-n-right" title="Rolling 1t[sex-and-race] = ( Triton boy )" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(254, 246, 142); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">Triton boy Height: <span class="inlinerollresult showtip tipsy-n-right" title="Rolling 1t[height] = ( Average height )" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(254, 246, 142); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">Average height Build: <span class="inlinerollresult showtip tipsy-n-right" title="Rolling 1t[build] = ( Thin build )" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(254, 246, 142); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">Thin build Clothing: <span class="inlinerollresult showtip tipsy-n-right" original-title="Rolling 1t[clothing] = ( Adventurer&quot;s outfit )" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(254, 246, 142); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">Adventurer's outfit Oddity: <span class="inlinerollresult showtip tipsy-n-right" original-title="Rolling 1t[oddity] = ( Taps foot when annoyed )" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(254, 246, 142); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">Taps foot when annoyed Hair: <span class="inlinerollresult showtip tipsy-n-right" title="Rolling 1t[hairstyle] = ( feathered )" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(254, 246, 142); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">feathered &nbsp;<span class="inlinerollresult showtip tipsy-n-right" original-title="Rolling 1t[hair] = ( coily black hair )" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(254, 246, 142); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">coily black hair Eyes: <span class="inlinerollresult showtip tipsy-n-right" title="Rolling 1t[eye2] = ( tired )" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(254, 246, 142); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">tired &nbsp;<span class="inlinerollresult showtip tipsy-n-right" original-title="Rolling 1t[eyes] = ( thin green eyes )" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(254, 246, 142); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">thin green eyes Armor: <span class="inlinerollresult showtip tipsy-n-right" original-title="Rolling 1t[Armor] = ( Padded armor )" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(254, 246, 142); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">Padded armor &nbsp;<span class="inlinerollresult showtip tipsy-n-right" original-title="Rolling 1t[Shield] = ( a green shield with a sea monster on it )" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(254, 246, 142); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">a green shield with a sea monster on it Wepons: <span class="inlinerollresult showtip tipsy-n-right" original-title="Rolling 1t[weapon] = ( scimitar )" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(254, 246, 142); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">scimitar &nbsp;<span class="inlinerollresult showtip tipsy-n-right" original-title="Rolling 1t[weapon] = ( javelin )" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(254, 246, 142); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">javelin Names: <span class="inlinerollresult showtip tipsy-n-right" original-title="Rolling 1t[male-names] = ( Kreshmar )" style="box-sizing: content-box; outline: none; background-color: rgb(254, 246, 142); border: 2px solid rgb(254, 246, 142); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">Kreshmar &nbsp;<span class="inlinerollresult showtip tipsy-n-right" original-title="Rolling 1t[male-names] = ( Marden )" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(254, 246, 142); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">Marden &nbsp;<span class="inlinerollresult showtip tipsy-n-right" original-title="Rolling 1t[female-names] = ( Avalonia )" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(254, 246, 142); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">Avalonia &nbsp;<span class="inlinerollresult showtip tipsy-n-right" original-title="Rolling 1t[female-names] = ( Lucianna )" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(254, 246, 142); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">Lucianna Occupation: <span class="inlinerollresult showtip tipsy-n-right" original-title="Rolling 1t[Occupation] = ( Member of overlords family )" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(254, 246, 142); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">Member of overlords family Stats <span class="inlinerollresult showtip tipsy-n-right fullcrit" title=" Rolling 4d6d1 = ( 6 + 6 + 2 + 6 )" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(63, 179, 21); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">18 &nbsp;<span class="inlinerollresult showtip tipsy-n-right" title=" Rolling 4d6d1 = ( 5 + 4 + 2 + 1 )" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(254, 246, 142); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">11 &nbsp;<span class="inlinerollresult showtip tipsy-n-right fullcrit" title=" Rolling 4d6d1 = ( 3 + 4 + 2 + 6 )" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(63, 179, 21); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">13 &nbsp;<span class="inlinerollresult showtip tipsy-n-right fullcrit" original-title=" Rolling 4d6d1 = ( 2 + 1 + 6 + 4 )" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(63, 179, 21); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">12 &nbsp;<span class="inlinerollresult showtip tipsy-n-right" title=" Rolling 4d6d1 = ( 4 + 1 + 2 + 5 )" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(254, 246, 142); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">11 <span class="inlinerollresult showtip tipsy-n-right fullcrit" original-title=" Rolling 4d6d1 = ( 4 + 6 + 6 + 5 )" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(63, 179, 21); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">17 [HP]<span class="inlinerollresult showtip tipsy-n-right fullfail" original-title=" Rolling 5d24 = ( 18 + 1 + 6 + 20 + 9 )" style="box-sizing: content-box; background-color: rgb(254, 246, 142); border: 2px solid rgb(179, 21, 21); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">54 } &nbsp;this works great for a 1 roll npc , is there a way to get all this with 1 button to make a usable character sheet? , that would be epic !!!!&nbsp; &nbsp; &nbsp; here is the macro im using&nbsp; /w Vega &amp;{template:default} {{name=NPC is}} {{Sex &amp; Race:=[[1t[sex-and-race]]]}} {{height:=[[1t[height]]]}} {{build:=[[1t[build]]]}} {{clothing:=[[1t[clothing]]]}} {{oddity:=[[1t[oddity]]]}} {{Hair:=[[1t[hairstyle]]] [[1t[hair]]]}} {{Eyes:=[[1t[eye2]]]&nbsp; [[1t[eyes]]]}} {{Armor:=[[1t[Armor]]] [[1t[Shield]]]}} {{Wepons:=[[1t[weapon]]]&nbsp; [[1t[weapon]]]}} {{Names:=[[1t[male-names]]] [[1t[male-names]]] [[1t[female-names]]] [[1t[female-names]]]}} {{Occupation:=[[1t[Occupation]]]}}&nbsp; &nbsp;{{stats=[[4d6d1]] [[4d6d1]] [[4d6d1]] [[4d6d1]] [[4d6d1]][[4d6d1]][HP][[5d24]]}}} &nbsp; &nbsp;
1586558116
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Vega said: thanks for the comments , i cant access the API stuff... None of the tips above require the API.
Vega said: [...] &nbsp;this works great for a 1 roll npc , is there a way to get all this with 1 button to make a usable character sheet? , that would be epic!!! [...] Unfortunately, making a proper character sheet (with its own attributes and abilities) can’t be done through macro’s alone. However, you can create a set of macro’s that simulate the output of a character sheet and that prompt you for the relevant modifiers. Oftentimes it’s faster to prepare a few generic character sheets and then duplicate and further customize them as needed.&nbsp;
keithcurtis said: Vega said: thanks for the comments , i cant access the API stuff... None of the tips above require the API. &nbsp;thanks kieth&nbsp; , im still messing with all this , and trying to use what your showing me , alot of this is way over my head , ill keep learning , and testing things , good to know none of that needs the api stuff !