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

Using Groupcheck and Applydamage scripts to add Status Effects

1702872837

Edited 1703602066
Hi all, I've been using the two mentioned scripts to also add Status Effects when applying damage using the following macro. !group-check {{ --?{Ability Save|Strength,Strength Save|Dexterity,Dexterity Save|Constitution,Constitution Save|Intelligence,Intelligence Save|Wisdom,Wisdom Save|Charisma,Charisma Save} --ro ?{Roll Type|Normal,roll1|Advantage,adv|Disadvantage,dis} --process --subheader vs DC ?{DC} --button ApplyDamage !apply-damage ~dmg [[?{Damage|0}]] ~type ?{Damage on Save|Half,half|None,none} ~DC ?{DC} ~saves RESULTS(,) ~ids IDS(,) ?{Status| None,~| Red,~status red| Blue,~status blue| Green,~status green| Orange,~status orange| Purple,~status purple| Pink,~status pink| Yellow,~status yellow| ―, | Faerie Fire Violet,~status Faerie_Fire_Violet| Faerie Fire Green,~status Faerie_Fire_Green| Faerie Fire Blue,~status Faerie_Fire_Blue| ―, | Entangle,~status Engulfed| ―, | Prone,~status Knocked_Prone| Restrained,~status Restrained| Grappled,~status Grappled| ―, | Incapacitated,~status Sleep| Stunned,~status Stunned| Unconscious,~status Unconscious| ―, | Charmed,~status Charmed| Frightened,~status Frightened| ―, | Poisoned,~status Poisoned| Blinded,~status Blinded| Deafened,~status Deafened| Paralyzed,~status Dominated| Petrified,~status Petrified| ―, | Invisible,~status Invisible| Silenced,~status Silence| Slowed,~status Slowed| ―, } }} It worked fine until I changed the Marker set I was using, the new set uses a naming convention including spaces ie Faerie Fire Violet. Checking the status marker using token-mod I can see that anything with a space now has an underscore. However, when I use the appropriate name Faerie_Fire_Violet it returns "invalid status". Looking at the applydamage code reveals that it uses libTokenMarkers to check the status. That's as much as I know, though, as I'm not very proficient with javascript. I also tried using  Faerie_Fire_Violet::243322  which is the specific marker for my game, but it doesn't like that at all and makes the "Apply Damage" button do nothing when pressed. Any help is greatly appreciated. Thanks
1702879221

Edited 1702879417
Now I'm really at a loss. I took the tokens with spaces in them, downloaded them(right click, save image), renamed the tokens so none had spaces, created a new Token Marker Set and added everything I wanted into that set. I then changed the set the game was using, restarted the API sandbox, and refreshed my in-game page.  I still get the same "Invalid Status" message, but still on only the ones that used to have spaces in their names. I've confirmed with token-mod that the names have changed and all the others that were originally one word still work, even if they aren't named something from the basic marker set. For instance, I use a token marker called "engulf" as my entangle token marker, and it's always worked. I renamed Faerie_Fire_Violet to ffviolet, and still nothing. I changed the selection option to not include any spaces, so it looks like FaerieFireViolet. Even Prone, which was using "Knocked_Prone" and wasn't working is now just named Prone and still isn't working. Am I just missing a comma somewhere or something?
Ok, seems I finally figured it out. Restarting the sandbox wasn't good enough, I had to delete the libTokenMarkers script and then readd it. It works now.