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

Scan Macro Help

So I have this Macro that is inspired by the one on the 5e sheet (in fact, it's mostly modified from that macro) but it's not working quite right and I was hoping someone could help. The Macro is designed to display the results of a 'Scan' spell, a la Final Fantasy, which details certain information about the monster you're fighting. <div class="sheet-col-1-3 sheet-center"><button type="roll" class="sheet-roll" name="roll_Scan_Results" value="&{template:5eDefault} {{title=Scan Results}} {{subheader=@{character_name}}} {{scanlevel=@{level}}} {{scan_monster_type=@{monster_type}}} {{scan_hp=@{HP}/@{HP|Max}}} {{scan_hp=@{MP}/@{MP|Max}}} {{scan_element_absorb=@{elementabsorb}}} {{scan_element_immunity=@{elementimmune}}} {{scan_element_resistance=@{elementresist}}} {{scan_element_weakness=@{elementweak}}} {{scan_status_immunity=@{statusimmune}}}">Scan Results</button></div> This is my macro thus far. In the template section I have... {{#scan}}                 <div class="sheet-row">                     <div class="sheet-col-5-12 sheet-padl sheet-padr sheet-rt-key">Level</div>                     <div class="sheet-col-7-12 sheet-padr sheet-rt-value">{{scan_level}}</div>                 </div>                                  <div class="sheet-row">                     <div class="sheet-col-5-12 sheet-padl sheet-padr sheet-rt-key">Type</div>                     <div class="sheet-col-7-12 sheet-padr sheet-rt-value">{{scan_monster_type}}</div>                 </div>                                  <div class="sheet-row">                     <div class="sheet-col-5-12 sheet-padl sheet-padr sheet-rt-key">HP</div>                     <div class="sheet-col-7-12 sheet-padr sheet-rt-value">{{scan_HP}}</div>                 </div>                                  <div class="sheet-row">                     <div class="sheet-col-5-12 sheet-padl sheet-padr sheet-rt-key">MP</div>                     <div class="sheet-col-7-12 sheet-padr sheet-rt-value">{{scan_MP}}</div>                 </div>                                  <div class="sheet-row">                     <div class="sheet-col-5-12 sheet-padl sheet-padr sheet-rt-key">Elemental Absorbance</div>                     <div class="sheet-col-7-12 sheet-padr sheet-rt-value">{{scan_element_absorb}}</div>                 </div>                                  <div class="sheet-row">                     <div class="sheet-col-5-12 sheet-padl sheet-padr sheet-rt-key">Elemental Immunity</div>                     <div class="sheet-col-7-12 sheet-padr sheet-rt-value">{{scan_element_immunity}}</div>                 </div>                                  <div class="sheet-row">                     <div class="sheet-col-5-12 sheet-padl sheet-padr sheet-rt-key">Elemental Resistance</div>                     <div class="sheet-col-7-12 sheet-padr sheet-rt-value">{{scan_element_resistance}}</div>                 </div>                                  <div class="sheet-row">                     <div class="sheet-col-5-12 sheet-padl sheet-padr sheet-rt-key">Elemental Weakness</div>                     <div class="sheet-col-7-12 sheet-padr sheet-rt-value">{{scan_element_weakness}}</div>                 </div>                                  <div class="sheet-row">                     <div class="sheet-col-5-12 sheet-padl sheet-padr sheet-rt-key">Status Immunity</div>                     <div class="sheet-col-7-12 sheet-padr sheet-rt-value">{{scan_status_immunity}}</div>                 </div>                 {{/scan}} This is my result. So clearly it's detecting everything up to my subheader. I've tried removing all except for the scan_level but even that doesn't work. Any idea what I'm doing wrong?
Assuming you put the template code above somewhere inside the 5eDefault template, the stuff between {{#scan}} and {{/scan}} will only show if scan has a value in the template invocation.  Try adding "{{scan=1}}" to your macro.
Hmm alright thanks! I'll give that a try.
1444508576

Edited 1444509396
Kiyomi N.
Sheet Author
Yay I got it all working perfectly. Thank you very much :)