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

Apply Damage Status Markers

1646679048

Edited 1646689693
Hey guys, I am wanting to use some custom token markers that I added to my campaign in conjunction with Apply Damage (Link provided). I am not experienced enough with api/javascript to add it in on my own. Has anyone already done so? <a href="https://gist.github.com/joesinghaus/9fd52108d07e5ef83ed879a7c6fdc68f" rel="nofollow">https://gist.github.com/joesinghaus/9fd52108d07e5ef83ed879a7c6fdc68f</a> Any help would be greatly appreciated, thanks!
1646684341
Andrew R.
Pro
Sheet Author
You can try the TokenMod script. I use it to create a row of buttons along the bottom of the screen with all the 13th Age conditions using a Token Marker library.&nbsp;
Apply damage scriptlet is so good and widely used I'm surprised it hasn't been absorbed into group check yet.&nbsp;&nbsp;
That's how I use it with Group Check! I'll provide an example of how I am currently using it: !group-check {{ --Wisdom Save --process --subheader vs DC [[@{Xaril Baremon|spell_save_dc}]] Xaril's Viscious Mockery --button ApplyDamage !apply-damage ~dmg [[?{Damage|0}]] ~type none ~DC [[@{Xaril Baremon|spell_save_dc}]] ~saves RESULTS(,) ~ids IDS(,) ~status yellow }} However I would like to be able to change ~status yellow to ~status (name of my custom marker)
Joe B. said: That's how I use it with Group Check! I'll provide an example of how I am currently using it: !group-check {{ --Wisdom Save --process --subheader vs DC [[@{Xaril Baremon|spell_save_dc}]] Xaril's Viscious Mockery --button ApplyDamage !apply-damage ~dmg [[?{Damage|0}]] ~type none ~DC [[@{Xaril Baremon|spell_save_dc}]] ~saves RESULTS(,) ~ids IDS(,) ~status yellow }} However I would like to be able to change ~status yellow to ~status (name of my custom marker) Group check has its own feature that apply damage is utilizing fwiw.&nbsp;&nbsp; --process --button ApplyStatus !token-mod ~set statusmarkers#!?{Name of Marker} tild dash symbol has to be used to replace double dashes in --button options.&nbsp; Not sure about other html replacements but tokenmod has it built in that you can replace | with # so I religiously do this.&nbsp; Exclamation is there cause that signifies the button will toggle the status marker on and off.&nbsp; You could also make a longwinded query with options instead of manually entering the statusmarkers too.&nbsp; I know all mine so I just do them that way and less need to use html escapes which then lets me just store it in the collections tab.&nbsp;&nbsp;
DM Eddie said: Joe B. said: That's how I use it with Group Check! I'll provide an example of how I am currently using it: !group-check {{ --Wisdom Save --process --subheader vs DC [[@{Xaril Baremon|spell_save_dc}]] Xaril's Viscious Mockery --button ApplyDamage !apply-damage ~dmg [[?{Damage|0}]] ~type none ~DC [[@{Xaril Baremon|spell_save_dc}]] ~saves RESULTS(,) ~ids IDS(,) ~status yellow }} However I would like to be able to change ~status yellow to ~status (name of my custom marker) Group check has its own feature that apply damage is utilizing fwiw.&nbsp;&nbsp; --process --button ApplyStatus !token-mod ~set statusmarkers#!?{Name of Marker} tild dash symbol has to be used to replace double dashes in --button options.&nbsp; Not sure about other html replacements but tokenmod has it built in that you can replace | with # so I religiously do this.&nbsp; Exclamation is there cause that signifies the button will toggle the status marker on and off.&nbsp; You could also make a longwinded query with options instead of manually entering the statusmarkers too.&nbsp; I know all mine so I just do them that way and less need to use html escapes which then lets me just store it in the collections tab.&nbsp;&nbsp; Wow, I was able to set the status marker just as you suggested! Do you know how I would be able to apply damage and set the marker at the same time with the button? --button ApplyStatus !token-mod ~set statusmarkers#!DisadvantageFinal That works perfectly for the status I want. However I also would like to use !apply-damage any ideas?
So this is one of the many things I have tried now: !group-check {{ --Wisdom Save --process --subheader vs DC [[@{Xaril Baremon|spell_save_dc}]] Xaril's Viscious Mockery --button ApplyDamage !apply-damage !token-mod ~set statusmarkers#!DisadvantageFinal ~dmg [[?{Damage|0}]] ~type none ~DC [[@{Xaril Baremon|spell_save_dc}]] ~saves RESULTS(,) ~ids IDS(,) }} However it only runs !apply-damage. Is there anyway I can get it to run the !apply-damage &amp; the !token-mod ~set statusmarkers#!DisadvantageFinal? That would solve the need for editing the applydamage api Thanks for all the help :D
1646701957
David M.
Pro
API Scripter
I don't have an answer to your specific question about group-check and apply-damage, but figure I'd throw this out there since you appear to be making individual macros for specific spells anyway: The SmartAoE script can create targeting regions (from one square to various area circles/squares/lines/walls), make "group check" style saves, and&nbsp; optionally autoapply damage and status markers (including custom markers) while applying resistance/vulnerability/immunity rules (if 5e those are built-in with no additional syntax). The syntax looks intimidating at first, but there are plenty of examples on the wiki &nbsp;and in this github repo . Again, I'm just throwing it out there in case there is interest. :) For single target spells I usually don't bother, but it can be pretty handy for AoEs.
1646702186

Edited 1646702236
David M. said: I don't have an answer to your specific question about group-check and apply-damage, but figure I'd throw this out there since you appear to be making individual macros for specific spells anyway: The SmartAoE script can create targeting regions (from one square to various area circles/squares/lines/walls), make "group check" style saves, and&nbsp; optionally autoapply damage and status markers (including custom markers) while applying resistance/vulnerability/immunity rules (if 5e those are built-in with no additional syntax). The syntax looks intimidating at first, but there are plenty of examples on the wiki &nbsp;and in this github repo . Again, I'm just throwing it out there in case there is interest. :) For single target spells I usually don't bother, but it can be pretty handy for AoEs. Woah! That sounds amazing lol. I am going to check that out right now xd That sounds like one api that is doing what I have 3 api's doing!
1646702730
David M.
Pro
API Scripter
Cool, feel free to ask questions on the main forum thread or via PM. And if it's not your cup of tea, you can always fall back on what you were doing to begin with! My games still use a mix of various apis and std macros for spells, depending on which works best for the specific situation. I should also note that not all of the examples auto apply damage (they were meant to show various possibilities) so be sure to read the comments. Some people even just use the script for targeting/visualization and then handle execution in some other way. Mix and match as you see fit!
David M. said: Cool, feel free to ask questions on the main forum thread or via PM. And if it's not your cup of tea, you can always fall back on what you were doing to begin with! My games still use a mix of various apis and std macros for spells, depending on which works best for the specific situation. I should also note that not all of the examples auto apply damage (they were meant to show various possibilities) so be sure to read the comments. Some people even just use the script for targeting/visualization and then handle execution in some other way. Mix and match as you see fit! Thanks, I appreciate it! I just finished with dinner, about to start reading now and get it installed
If the joy you have is for making things and not so much for running an active RPG table, then dive deep on the advanced scripts.&nbsp; If you enjoy running a live session for players, then you should want things that reduce your prep time and workload during live play.&nbsp; There are many scripts that look great but add massive prep time&nbsp; till you have them fully built for the session and the pay off is a side grade at best, maybe a lil showmanship.&nbsp; Depending on your style, beware.&nbsp; I've made mistakes in the past by diving in on some of the scripts only to realize a month or two later that I really didn't need them and I wasted so much time on them when I could have been doing mapmaking or hosting a second table or third table.&nbsp;&nbsp; You could try putting the button command syntax in twice but have apply damage last since it has more stuff in it.&nbsp; Just spitballing, theres an alternate to button in the group check help but I never use it.&nbsp;&nbsp;
DM Eddie said: If the joy you have is for making things and not so much for running an active RPG table, then dive deep on the advanced scripts.&nbsp; If you enjoy running a live session for players, then you should want things that reduce your prep time and workload during live play.&nbsp; There are many scripts that look great but add massive prep time&nbsp; till you have them fully built for the session and the pay off is a side grade at best, maybe a lil showmanship.&nbsp; Depending on your style, beware.&nbsp; I've made mistakes in the past by diving in on some of the scripts only to realize a month or two later that I really didn't need them and I wasted so much time on them when I could have been doing mapmaking or hosting a second table or third table.&nbsp;&nbsp; You could try putting the button command syntax in twice but have apply damage last since it has more stuff in it.&nbsp; Just spitballing, theres an alternate to button in the group check help but I never use it.&nbsp;&nbsp; I installed Smart AoE script, and it is surprisingly easy to setup on the fly. It seems to be a much better alternative to group check / damage combo. You can do all the same things, and also add in spell ae with visual representation. Pretty nifty api
1646746998
David M.
Pro
API Scripter
DM Eddie said: If the joy you have is for making things and not so much for running an active RPG table, then dive deep on the advanced scripts.&nbsp; If you enjoy running a live session for players, then you should want things that reduce your prep time and workload during live play.&nbsp; There are many scripts that look great but add massive prep time&nbsp; till you have them fully built for the session and the pay off is a side grade at best, maybe a lil showmanship.&nbsp; Depending on your style, beware.&nbsp; I've made mistakes in the past by diving in on some of the scripts only to realize a month or two later that I really didn't need them and I wasted so much time on them when I could have been doing mapmaking or hosting a second table or third table.&nbsp;&nbsp; Totally agree that it is a personal choice each GM has to make. A couple of my players use lots of AoE spells so I've found that it really expedites combats for me against large numbers of enemies, and my players get a kick out of it when the fireball or lightning bolt wipes out half the board ("X" markers everywhere) instantly in a single click as opposed to one at a time with me rolling saves and applying damage manually. We find that aspect more immersive and the spells "feel" more powerful. But, YMMMV. The trick is getting the most bang for your buck and identifying the spells that would get the most benefit (e.g. I give an example for Aura of Vitality in the wiki to show it can be done but probably wouldn't implement it in my game because it's just as easy to use a std macro). Hopefully as the repository of example spells grows (currently at 21 5e spells) then there will be even less GM burden as it can be a simple copy/paste in many cases and a simple tweak (name, damage formula and/or save type) in others.
David M. said: DM Eddie said: If the joy you have is for making things and not so much for running an active RPG table, then dive deep on the advanced scripts.&nbsp; If you enjoy running a live session for players, then you should want things that reduce your prep time and workload during live play.&nbsp; There are many scripts that look great but add massive prep time&nbsp; till you have them fully built for the session and the pay off is a side grade at best, maybe a lil showmanship.&nbsp; Depending on your style, beware.&nbsp; I've made mistakes in the past by diving in on some of the scripts only to realize a month or two later that I really didn't need them and I wasted so much time on them when I could have been doing mapmaking or hosting a second table or third table.&nbsp;&nbsp; Totally agree that it is a personal choice each GM has to make. A couple of my players use lots of AoE spells so I've found that it really expedites combats for me against large numbers of enemies, and my players get a kick out of it when the fireball or lightning bolt wipes out half the board ("X" markers everywhere) instantly in a single click as opposed to one at a time with me rolling saves and applying damage manually. We find that aspect more immersive and the spells "feel" more powerful. But, YMMMV. The trick is getting the most bang for your buck and identifying the spells that would get the most benefit (e.g. I give an example for Aura of Vitality in the wiki to show it can be done but probably wouldn't implement it in my game because it's just as easy to use a std macro). Hopefully as the repository of example spells grows (currently at 21 5e spells) then there will be even less GM burden as it can be a simple copy/paste in many cases and a simple tweak (name, damage formula and/or save type) in others. How does it resolve resistances, cover, and immunities, and how do you rotate squares?
1646781786
David M.
Pro
API Scripter
---&gt; Resistances and immunites are handled in 5e automatically with no extra syntax (uses 5e attributes by default). The string value of the 1 or 2 user-defined damage types (e.g. cold, fire, etc.) dealt by the spell/effect are searched for in their respective attributes (e.g.&nbsp; npc_resistances,&nbsp; npc_vulnerabilities,&nbsp; npc_immunities) and the individual damage component is multiplied by 0.5, 2, or 0 respectively. For non-5e games, the user can specify the attribute to search as well as the damage rule (e.g. minus 10 dam or whatever for PF/3.5) as described in the wiki (sorry for odd formatting here in the forums): Command Parameter(s) Description Default Value Example(s) &nbsp;[ Collapse ]&nbsp; Additional Notes -resistAttr &lt;attrName&gt; If the damageType(s) string is included in the current value of the denoted attribute, then the --resistanceRule will be applied npc_resistances --resistAttr|npc_resistances --resistAttr|npc_resistances, npcd_resistances If multiple attribute names are supplied, the script will check&nbsp; both NOTE : default is npc_resistances if this subcommand is omitted --vulnerableAttr &lt;attrName&gt; If the damageType(s) string is included in the current value of the denoted attribute, then the --vulnerableRule will be applied npc_vulnerabilities --vulnerableAttr|npc_vulnerabilities --vulnerableAttr|npc_vulnerabilities, someOtherAttributeName If multiple attribute names are supplied, the script will check&nbsp; both NOTE : default is npc_vulnerabilities if this subcommand is omitted --immunityAttr &lt;attrName&gt; If the damageType(s) string is included in the current value of the denoted attribute, then the --immunityRule will be applied npc_immunities --immunityAttr|npc_immunities --immunityAttr|npc_immunities, someOtherAttributeName If multiple attribute names are supplied, the script will check&nbsp; both NOTE : default is npc_immunities if this subcommand is omitted --resistanceRule &lt;expression&gt; The math operation (accepts single Operator and Operand) to be applied if target is resistant to damageType(s) *0.5 --resistanceRule|*0.5 --resistanceRule|/2 --resistanceRule|-10 NOTE : default is "*0.5" if this subcommand is omitted --vulnerableRule &lt;expression&gt; The math operation (accepts single Operator and Operand) to be applied if target is vulnerable to damageType(s) *2 --vulnerableRule|*2 --vulnerableRule|+10 NOTE : default is "*2" if this subcommand is omitted --immunityRule &lt;expression&gt; The math operation (accepts single Operator and Operand) to be applied if target is immune to damageType(s) *0 --immunityRule|*0 NOTE : default is *0 if this subcommand is omitted ---&gt; I never thought about rotating squares (my players have never brought it up!), but off the top of my head it is technically possible using the "wall" AoE type rather than "square". A square type is always orthogonal w.r.t the grid. For a wall, you specify the width and height and two control tokens are spawned rather than one. The angle between the two control tokens determines the angle of the rectangle (a square in this case). To determine if you would "count" a partially covered square for a non-orthogonal AoE orientation, the --minGridArea command is used with a value up to 1 (100% coverage required). Here's an example of a 20ft square (instantiated as a "wall" instead of the "square" AoE type) being rotated, and grid squares are only counted in the AoE if at least 25% of the square is "in" the AoE. The percentage of a creatures token that must be in the AoE in order to force a save is also customizable based on GM preferences (useful for large tokens). I tweaked a Wall of Fire spell macro to create the example below. click for gif &nbsp; ---&gt; Cover is currently not taken into account, though interaction with dynamic lighting lines is something I would really like to add in the future. I've done some graphical interaction with DL walls before with my Radar script, so I know it's possible. It's just the implementation is going to be a bear for this script. Someday, hopefully. Of course, even still, DL walls are all or nothing, so not sure any script is going to give satisfying automation for cover without something cute like differently colored lines being different heights or something. If you have a case where cover would modify Dex saving throws, then the two options are either (1) just use the script for targeting purposes and resolve the spell manually or (2) use the script to do all the rolls and auto apply damage, then manually adjust the hp if necessary on the one or two creatures in the area that would have benefitted from the cover. If you have a bunch of mook tokens that made saves that all look alike, you can click the token's icon in the chat and it will ping-pull to their location so you can easily identify which one "only failed by 2", for example. &nbsp;