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 you output templates with -- report in TokenMod?

February 01 (4 years ago)

Thoughts? Has anyone figured out how to do this.

I can do this for example:

?{Toggle Aura?


|On, 

!token-mod --set aura2_radius#10 aura2_color#e25822

!token-mod --report all&#124"{name&#125 burns everything near path as she appears for **[[2d6]]** fire damage!"

|Off,

!token-mod --set aura2_radius#0 aura2_color#transparent}}


As a macro for a player to throw an aura around a summoned wildfire spirit that will show where the spirit throws splash damage and how much. But, I thought it would be cooler to have the output from --report be a normal dmg template. But, I cannot figure out any syntax to make it work.


Thoughts?

February 01 (4 years ago)
David M.
Pro
API Scripter

A couple of options. For a template, you will need to use html replacements for the closing brackets of the template, like this:

?{Toggle Aura?
|On, 
!token-mod --set aura2_radius#10 aura2_color#e25822
&{template:default} {{name=SomeName}} {{=@{selected|token_name} burns everything near path as she appears for **[[2d6]]** fire damage!"}}
|Off,
!token-mod --set aura2_radius#0 aura2_color#transparent}

Note this is best used in an ability, as collection macros will eat the html replacements if they are ever opened again.

Another option is to use an emote, something like:

?{Toggle Aura?
|On, 
!token-mod --set aura2_radius#10 aura2_color#e25822
/em @{selected|token_name} burns everything near path as she appears for **[[2d6]]** fire damage!"

|Off,
!token-mod --set aura2_radius#0 aura2_color#transparent}
February 01 (4 years ago)

David,


Thank you so much. The answer was to stop trying to use tokenmod --report to create the output. That was most helpful. I ended up with:


?{Toggle Aura?
|On, 
!token-mod --set aura2_radius#10 aura2_color#e25822
&{template:dmg} {{rname=Wildfire Spirit Splash}} {{range=10 ft. radius}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[2d6]]}} {{dmg1type=Fire}} {{dmg2flag=}} {{dmg2=}} {{dmg2type=}} {{crit=}} {{crit1=}} {{crit2=crit2}} {{save=1}} {{saveattr=Dexterity}} {{savedesc=}} {{savedc=15}} {{desc=}} {{hldmg=}} {{spelllevel=}} {{charname=}}
|Off,
!token-mod --set aura2_radius#0 aura2_color#transparent}