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

Where is this text coming from

1516756480

Edited 1516758756
I've been getting deep into macros, which is fun. I am using the 5e community contributed character sheet and the NPC version does not have a spellbook. In order to create macros for my NPC spells, I have been building them in the PC spellbook, casting them, pressing the "up" arrow in the chat window to show the code. I copy the code and paste it into the "description" box in the actions section of the NPC sheet. Then I build a token action for it with this code: %{Selected|NPCAction1} This is working out great, except for one little thing. A little string of code that is being plopped into my beautiful spell dispay. (see image) Now I kinda, sorta know why its there. Something is getting doubled up somewhere when I paste the code in the description box. But I can't figure out how to get rid of it. Could someone look at my code and identify the offending line? &{template:5eDefault} {{spell=1}} {{title=Invisibility}} {{subheader=Efreeti}} {{subheaderright=Illusion Level 2}} {{subheader2=(Concentration) }} {{spellshowinfoblock=1}} {{spellshowdesc=1}} {{spelldescription=A creature you touch becomes invisible until the spell ends. Anything the target is wearing or carrying is invisible as long as it is on the target's person. The spell ends for a target that attacks or casts a spell. }} {{spellshowhigherlvl=1}} {{spellhigherlevel=When you cast this spell using a spell slot of 3rd level or higher, you can target one additional creature for each slot level above 2nd }} 0 0 0 0 0 0 {{spellcasttime=1 Action}} {{spellduration=Concentration, up to 1 hour }} {{spelltarget=Target}} {{spellrange=Touch}} {{spellgainedfrom=Innate Casting}} {{spellcomponents=V, S, M (an eyelash encased in gum arabic)}} Or maybe you can refer me to a better way to make spell token marcos for my NPC's.
1516770574

Edited 1516770605
The Aaron
Pro
API Scripter
Try taking out that string of “0 0 0 0 0 0”
1516771994

Edited 1516772278
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Dan, is that the code that you pasted into the description field, or the code that appears when you press up after rolling the npc spell? From your description of your process, I'm thinking it is the first one. If so, this is your problem, because then you have template declarations following each other, and field endings ( }} ) that are prematurely ending your roll template fields. The fix is to simply delete the template declaration (&{template:5eDefault}), and put a double curly end braces before your copied macro text: }}  &{template:5eDefault} {{spell=1 }} {{title=Invisibility}} {{subheader=Efreeti}} {{subheaderright=Illusion Level 2}} {{subheader2=(Concentration) }} {{spellshowinfoblock=1}} {{spellshowdesc=1}} {{spelldescription=A creature you touch becomes invisible until the spell ends. Anything the target is wearing or carrying is invisible as long as it is on the target's person. The spell ends for a target that attacks or casts a spell. }} {{spellshowhigherlvl=1}} {{spellhigherlevel=When you cast this spell using a spell slot of 3rd level or higher, you can target one additional creature for each slot level above 2nd }} 0 0 0 0 0 0 {{spellcasttime=1 Action}} {{spellduration=Concentration, up to 1 hour }} {{spelltarget=Target}} {{spellrange=Touch}} {{spellgainedfrom=Innate Casting}} {{spellcomponents=V, S, M (an eyelash encased in gum arabic)}} EDIT: I've also bolded where that text was coming from
Scott, Yes. It is copy I pasted into the description field. BUT also yes, I did copy that code from press up after casting the spell. I tried deleting the line that you mention, but then the next string of characters showed up. It must be the curly bracket that will fix that. I do like the way the template looks though. Will it be gone? Thanks.
1517321733
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
The template is from the ability whose description you are pasting that into, not from the code you copied in. Simply put an end set of double curly braces, then the code you posted (minus the template declaration), and it should work.
would he not just need to remove this }} from before the (&{template:5eDefault})
1517331547

Edited 1517331630
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
lordmage said: would he not just need to remove this }} from before the (&{template:5eDefault}) That is what he started with, and is what causes the problem he described. You need the }} before the additional template fields you're going to add in the description because the macro looks something like this: &{template:5eDefault} {{name=Yadadad}} {{desc=@{desc}}} Now, the @{desc} gets replaced with the value of the desc field. So, if the desc field contains the code from the OP, you then get this (contents of @{desc} in italics): &{template:5eDefault} {{name=Yadadad}} {{desc= &{template:5eDefault} {{spell=1 }} {{title=Invisibility}} {{subheader=Efreeti}} {{subheaderright=Illusion Level 2}} {{subheader2=(Concentration) }} {{spellshowinfoblock=1}} {{spellshowdesc=1}} {{spelldescription=A creature you touch becomes invisible until the spell ends. Anything the target is wearing or carrying is invisible as long as it is on the target's person. The spell ends for a target that attacks or casts a spell. }} {{spellshowhigherlvl=1}} {{spellhigherlevel=When you cast this spell using a spell slot of 3rd level or higher, you can target one additional creature for each slot level above 2nd }} 0 0 0 0 0 0 {{spellcasttime=1 Action}} {{spellduration=Concentration, up to 1 hour }} {{spelltarget=Target}} {{spellrange=Touch}} {{spellgainedfrom=Innate Casting}} {{spellcomponents=V, S, M (an eyelash encased in gum arabic) }} }} Note that the curly braces that are supposed to end the spell=1 field now end the desc field (this is because template fields end at the first set of }} that they encounter, and the &{template:5eDefault} {{spell=1 in the desc field is read as regular text, not a new template declaration. Then after the desc field is closed, all the other fields are created normally, and you wind up with a quadruple end curly brace (which doesn't have any effect since the template field ends with the first 2, and anything outside of the template isn't displayed). So, to get this to display correctly, you put my suggestion in the desc field, which gives you this macro code once the attributes are replaced with their values (contents of @{desc} in italics): &{template:5eDefault} {{name=Yadadad}} {{desc= }}   {{spell=1}} {{title=Invisibility}} {{subheader=Efreeti}} {{subheaderright=Illusion Level 2}} {{subheader2=(Concentration) }} {{spellshowinfoblock=1}} {{spellshowdesc=1}} {{spelldescription=A creature you touch becomes invisible until the spell ends. Anything the target is wearing or carrying is invisible as long as it is on the target's person. The spell ends for a target that attacks or casts a spell. }} {{spellshowhigherlvl=1}} {{spellhigherlevel=When you cast this spell using a spell slot of 3rd level or higher, you can target one additional creature for each slot level above 2nd }} 0 0 0 0 0 0 {{spellcasttime=1 Action}} {{spellduration=Concentration, up to 1 hour }} {{spelltarget=Target}} {{spellrange=Touch}} {{spellgainedfrom=Innate Casting}} {{spellcomponents=V, S, M (an eyelash encased in gum arabic) }} }} The desc field is now closed before any of the field declarations, allowing them all to be taken into account by the template code and be displayed properly (note, you may have to remove the {{spell=1}} field depending on how the template handles that field).
1517345139
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Scott C., you're a Wizard.
1517345902
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Aw shucks ;)
1517969551

Edited 1517969590
Thanks Scott! So far so good. One more question (and you may have answered this, but I couldn't suss it out of your explanation) How do I get rid of the "Desc" and "Effect" titles and fields from the very bottom of the template (see the image in the OP). In this code for example: }}{{spell=1}} {{title=Firebolt}} {{subheader=Kobold Scale Sorcerer}} {{subheaderright=Evocation Cantrip}} {{subheader2= }} {{spellshowinfoblock=1}} {{spellshowdesc=1}} {{spelldescription=You hurl a mote of fire at a creature or object within range. Make a ranged spell Attack against the target. On a hit, the target takes 1d10 fire damage. A flammable object hit by this spell ignites if it isn't being worn or carried.}} {{spellshowhigherlvl=1}} {{spellhigherlevel=This spell's damage increases by 1d10 when you reach 5th level (2d10), 11th level (3d10), and 17th level (4d10).}} {{spellshowattack=1}} {{spellattack=[[1d20 + 4]]}} 0 0 0 {{spellshowdamage=1}} {{spelldamage=[[1d10]] fire damage}} {{spellcancrit=1}} {{spellcritdamage=Additional [[1d10]] damage}} 0 {{spellcasttime=1 action}} {{spellduration=Instantaneous}} {{spelltarget=a creature or object}} {{spellrange=120 ft.}} {{spellgainedfrom=Sorcerer}} {{spellcomponents=V,S,M (leaf of sumac) I think maybe those are in the pre-built Actions macros like the one you described: "&{template:5eDefault} {{name=Yadadad}} {{desc=@{desc}}}" So maybe I can't remove them?
1517970208
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Yep, those are programmed into the roll template formatting, I'm not familiar with the roll template in question, so not sure how they programmed it, but usually fields aren't displayed unless there is something in the field (e.g. {{desc=yadadadada}} vs {{desc=}}).
So I need to live with them? Boo. I wonder why they are displaying if there is nothing in them?
You could try switching temple to simple or traits as well