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

Need some help with a Roll Template Macro

I am having some difficulty getting this macro to work: &{template:default} {{name=Eldritch Blast (Force) (120ft)}} {{Attack 1= [[1d20+7]]}} {{Damage 1= [[1d10]]}} ?{Hex?|No, |Yes,{{Hex (Necrotic)= [[1d6]]}}} {{Critical 1=[[1d10]]}} {{Attack 2= [[1d20+7]]}} {{Damage 2= [[1d10]]}} ?{Hex?} {{Critical 2=[[1d10]]}} On a Hex? Yes, the second instance of ?{Hex?} does not display and I assume it's because same template property name is used. If this is the case, is there any syntax to auto-increment the property name or perhaps a different way of coding it so that I can avoid having to do a second Hex query?
1594005189

Edited 1594005271
GiGs
Pro
Sheet Author
API Scripter
You are correct - you cant have two rows with the same property name. One of them just wont display. It is possible to build the query to include everything up until the second hex query, but you'll need to to a lot of html replacements. There's no way to autoincrement.
1594005465

Edited 1594007365
GiGs
Pro
Sheet Author
API Scripter
You'd have to build it something like this (html entities not included): &{template:default} {{name=Eldritch Blast (Force) (120ft)}} {{Attack 1= [[1d20+7]]}} {{Damage 1= [[1d10]]}} ?{Hex?| No,{{Critical 1=[[1d10]]}} {{Attack 2=[[1d20+7]]}} {{Damage 2=[[1d10]]}} | Yes,{{Hex (Necrotic)=[[1d6]]}} {{Critical 1=[[1d10]]}} {{Attack 2=[[1d20+7]]}} {{Damage 2=[[1d10]]}} {{Hex (Crit)=[[1d6]]}} } {{Critical 2=[[1d10]]}} Remembering the change the property name on the second hex as I have above.
It is possible to build the query to include everything up until the second hex query, but you'll need to to a lot of html replacements. I like that idea. Thank you, GiGs!
1594010779

Edited 1594011218
Oosh
Sheet Author
API Scripter
You can simplify the Query right down and add the Hex damage into the main damage if you prefer. But you do need to have a second Query if you wish to be able to Hex one attack, and not the other: &{template:default} {{name=Eldritch Blast (Force) (120ft)}} {{Attack 1= [[1d20+7]]}} {{Damage 1= [[1d10 ?{Hex 1st attack?|No,]]]]|Yes,+ 1d6[Hex]]] (Hex)}}} {{Critical 1=[[1d10 ?{Hex 1st attack?}}} {{Attack 2=[[1d20+7]]}} {{Damage 2=[[1d10 ?{Hex 2nd attack?|No,]]|Yes,+ 1d6[Hex]]] (Hex)} }} {{Critical 2=[[1d10 ?{Hex 2nd attack?} }} And you'll have to add a 3rd Query in at level 11!
You can simplify the Query right down and add the Hex damage into the main damage if you prefer. Thanks for the suggestion! This was how I had the macro set up but it slowed things down for my DM when we'd encounter monsters resistant/immune to necrotic (and we've been getting a lot of those lately! lol). I wanted to separate the Hex damage and be able to toggle it on/off to make damage calculation easier.
1594079271
Oosh
Sheet Author
API Scripter
Ah sorry, misunderstood. If you're using the 5e sheet, you can set it as a global damage mod? That gives you a checkbox and separate damage (this is how I do it with my Bardlock).