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

4E D&D Roll Template Help

I recently started DMing a 4E game in Roll20 and just learned about roll templates. I'm currently programming in my players' powers in their character sheets and am having issues with the Psion's single target power that can augment into an AoE. It  functions , all the math works and everything is labeled appropriately. But it asks for the number of targets regardless of what augment number is selected. It only shows the multi attacks if augment 2 is selected thankfully, so it's not that big of a deal. But it bugs me. Can anyone point out what I'm doing wrong? I've broken it up for ease of reading.   &{template:dnd4epower} {{atwill=yes }} {{emote=You sift through your foe’s mind for the mental representation of yourself within it and brutally rip it out.}} {{name=@{power-1-name}}} {{class=@{class}}} {{level=@{power-1-level}}} {{type=@{power-1-useage} }} {{keywords=♦ Augmentable, Implement, Psionic, Psychic}} {{action=@{power-1-action} }} {{range=♦ @{power-1-range} }} {{target=One Creature }}   {{attack=[[1d20cs>19+@{power-1-attack}]] vs Will}} {{damage=[[(@{power-1-weapon-num-dice})d@{power-1-weapon-dice}+@{power-1-damage}+@{weapon-1-damage-misc}]] psychic damage}} {{critical=[[6+@{power-1-damage}+@{weapon-1-damage-misc}+@{weapon-1-enh}d{weapon-1-per-plus}]] psychic damage }} {{hiteffect=You become invisible to the target until the start of your next turn.}}   {{augment1attack=As above}} {{augment1hiteffect= As above, but you become invisible to the target until the end of your next turn.}}   {{augment2range= ♦ Area burst 1 within 10 squares}} {{augment2target=Each creature in burst}} {{augment2attack=[[1d20+@{power-1-attack}]] vs Will*}} {{augment2multiattack2=[[1d20+@{power-1-attack}]] vs Will}} {{augment2multiattack3=[[1d20+@{power-1-attack}]] vs Will}} {{augment2multiattack4=[[1d20+@{power-1-attack}]] vs Will}} {{augment2multiattack5=[[1d20+@{power-1-attack}]] vs Will}} {{augment2multiattack6=[[1d20+@{power-1-attack}]] vs Will}} {{augment2multiattack7=[[1d20+@{power-1-attack}]] vs Will}} {{augment2multiattack8=[[1d20+@{power-1-attack}]] vs Will}} {{augment2multiattack9=[[1d20+@{power-1-attack}]] vs Will}} {{augment2damage=[[2d@{power-1-weapon-dice}+@{power-1-damage}+@{weapon-1-damage-misc}]] psychic damage}} {{augment2hiteffect= You become invisible to the target until the start of your next turn. Augment 2 criticals deal [[12+@{power-1-damage}+@{weapon-1-damage-misc}}+@{weapon-1-enh}d{weapon-1-per-plus}]] psychic damage.}}   {{augmenttoggle=[[?{Augment 0,1,2|0}]]}} {{augment2multitoggle=[[?{Number of targets (max 9)|1}]]}}
1581438811

Edited 1581439011
Ziechael
Forum Champion
Sheet Author
API Scripter
Changing your last section to include number of targets output as part of the query should fix it. Replace: {{augmenttoggle=[[?{Augment 0,1,2|0}]]}} {{augment2multitoggle=[[?{Number of targets (max 9)|1}]]}} With: {{augmenttoggle=[[?{Augment|0,0|1,1|2,2}]]}} {{augment2multitoggle=[[?{Number of targets (max 9)|1}}]]}} Removing any spacing as needed to make the overall thing work still of course :) The essence of what I've will mean that if 0 or 1 is selected the query will resolve to: {{augmenttoggle=[[0]]}} and it will not include the rest, selecting 2 however has the next section nested within it (see the wiki for more details on html replacements) and will resolve to: {{augmenttoggle=[[2]]}} {{augment2multitoggle=[[1]]}} With the 1 being the result of the number chosen in query 2.
1581439198
Ziechael
Forum Champion
Sheet Author
API Scripter
The 0,0 and 1,1 bit of the toggle might not be needed but I always do it so I can better track variations in my macros... shrug
I thought you couldn't nest the roll template sections within each other, so I hadn't bothered trying. Much obliged, works like a charm.