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

dispel macro

1583491364
Im trying to set up a macro for dispel magic simple enough but im trying to set it up so i can say i want to dispel 1 active effect or 20 active effects and have it roll them separately so instead of 20d20 it would dispel (1d20+CL)x20 {{Dispel Check= ?{Active Spells|1}[[1d20 +{@{casterlevel},10}dh1]]  i mean i can get it to do the number of d20 just was hoping it would do the casterlevel per d20 and display them separately is all Thanks in advance
1583497979
Ziechael
Forum Champion
Sheet Author
API Scripter
It ain't pretty and you'd need to extend it to the 20 you want to do (I could only be bothered with 8 for the example) but generally you need to set up each instance as the result of a query: &{template:default} {{name=Dispel Magic}} {{?{Active Spells|1,[[1d20 +{@{casterlevel},10}dh1]]|2,[[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]]|3,[[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]]|4,[[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]]|5,[[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]]|6,[[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]]|7,[[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]]|8,[[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]]}}} Or for 'readability': &{template:default} {{name=Dispel Magic}} {{?{Active Spells| 1,[[1d20 +{@{casterlevel},10}dh1]]| 2,[[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]]| 3,[[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]]| 4,[[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]]| 5,[[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]]| 6,[[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]]| 7,[[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]]| 8,[[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]] [[1d20 +{@{casterlevel},10}dh1]]} }}
1583498099
Ziechael
Forum Champion
Sheet Author
API Scripter
An alternative would be do have it be a measure of successes, xd20+casterlevel(max10) >= DC but that would mean knowing the DC which, if this is 3.5e (and it feels like it is), would vary for each effect so it would be flaky at best :/
1583525019
Yeah it’s 3.5 was hoping to make a macro that dispel magic on target rather than me rolling a whole bunch. Btw what is the “&44;10}” represent? 
1583528893
Ziechael
Forum Champion
Sheet Author
API Scripter
By doing it like this you have to nest certain characters in the query (pipes, commas and end curly braces will break a query unless part of an attribute call). Check out the wiki for more information... or the new thingy that I can't remember the name of or be bothered to find a link to :P So in the case of your macro, we need to use the dh function to account for the caster level cap which causes us to have to replace the ,10} part of that expression with it's html equivalent: &44;10} When it comes to complex, lengthy or annoying macros I've learned the hard way to ask myself how often it'll get used and whether the benefit of writing it outweighs the potentially annoying alternative of just doing it a few times manually. Since any given dispel usually won't target more than 5 things at a time you could likely get away with having a macro like the one above that covers 1-5 rolls and in the more unusual event of needing 6-infinite checks you could just run that macro x  amount of times until you are done?
1583535525
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Ziechael said: ... or the new thingy that I can't remember the name of or be bothered to find a link to :P I'll start linking to the Help Center as soon as anchor links to headers and sections are available. Which should be Real Soon.
1583548573
Yes TY  Ziechael wasnt sure if there was a diff way of doing but i guess this works TY so much I was stuck on how to do it for a few days.