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

[Script] Custom Status Markers 2.1

1466808371

Edited 1527384352
Ada L.
Marketplace Creator
Sheet Author
API Scripter
The old thread (which hasn't had an update in a while) closed, so I'm starting a new one. For those of you new to this script, it allows you to create custom status markers from graphical icons or drawn paths. In the 2.1 update, I've cleaned some things up a bit and redid the API for the script. Most excitingly, it now also features a chat menu interface accessible from a macro, making it much easier to use! No more chat commands! Now available from One-Click! NOTE: You can only save icons that you have uploaded. This will not work with marketplace or web graphics because reasons: <a href="https://wiki.roll20.net/API:Objects#imgsrc_and_avatar_property_restrictions" rel="nofollow">https://wiki.roll20.net/API:Objects#imgsrc_and_avatar_property_restrictions</a> . Demo: Script roadmap: Force-add, force-remove buttons in addition to toggle button. Option for status marker placement.
So I was messing with 2.0, 1.5, and other versions over the past few days, and now that there's a new thread and a new version... I'm still not getting this script to function correctly, with PathMath 1.3 is installed. I get as far as saving new tokens, and then it seems to throw a fit. Here's a selection of the errors I get. Let me know if I can tell you more regarding this - I can't wait to get this awesome script working. !CustomStatusMarkers yields "Custom Status Markers ERROR: Cannot read property 'match' of undefined" !setMarker abcd yields "Custom Status Markers ERROR: Cannot read property 'substring' of undefined"
1466821917

Edited 1466822063
Ada L.
Marketplace Creator
Sheet Author
API Scripter
Bennett S. said: So I was messing with 2.0, 1.5, and other versions over the past few days, and now that there's a new thread and a new version... I'm still not getting this script to function correctly, with PathMath 1.3 is installed. I get as far as saving new tokens, and then it seems to throw a fit. Here's a selection of the errors I get. Let me know if I can tell you more regarding this - I can't wait to get this awesome script working. !CustomStatusMarkers yields "Custom Status Markers ERROR: Cannot read property 'match' of undefined" !setMarker abcd yields "Custom Status Markers ERROR: Cannot read property 'substring' of undefined" Oh, right, I forgot to mention - The icons you use must be ones that you have uploaded. It cannot be from the web or from the marketplace. That is why you're getting those errors. You'll need to run !clearCustomStatusMarkersState to clear the script's state, then try again with icons that you have uploaded.
Hmm, I hadn't actually tried it without my own art. What did work, however, is creating the token for the status from my library, rather than the one that was generated when I click-dragged to the tabletop. So now it works! Thanks so much!
1466834771

Edited 1466835856
Ada L.
Marketplace Creator
Sheet Author
API Scripter
Glad that fixed the problem! I'll see about fixing things up so that trying to create a cross-site status icon doesn't break everything and require a state reset. Edit: That's done. Now if the user tries to use an image that they haven't uploaded to their library, it will cancel it and display a reminder message.
I have a game that this just won't work in. &nbsp;I get no errors in the API console, and i have disabled or deleted every other script, and deleted and re-added this script many times, but it still won't work. Any ideas? Also,&nbsp;I have tried it in my other games, and it works just fine.
1467404457
Ada L.
Marketplace Creator
Sheet Author
API Scripter
Shawn T. said: I have a game that this just won't work in. &nbsp;I get no errors in the API console, and i have disabled or deleted every other script, and deleted and re-added this script many times, but it still won't work. Any ideas? Also,&nbsp;I have tried it in my other games, and it works just fine. What aspect of it is not working in that game? Try running&nbsp;!clearCustomStatusMarkersState to clear the script's state, just in case it somehow got into a weird state.
1467408525

Edited 1467408579
Stephen L. said: What aspect of it is not working in that game? Sorry I should have mentioned what wasn't working. When I use the macro or just the !CustomStatusMarkers command in the chat no menu pops up, and if i try to use the old commands that doesn't work either, so basically nothing works. I just tried using the clear command, and it didn't fix the issue. Right now I am just trying to see if there is a difference in the settings or something between the games that work and the ones that don't.
Ok, so I got it to work, but I don't know why it works when I do this. If I switch who I am chatting as, the menu pops up, but it won't do that for every character including my non-character name, which is what I was trying before.
1467419121

Edited 1467419158
Ada L.
Marketplace Creator
Sheet Author
API Scripter
Shawn T. said: Ok, so I got it to work, but I don't know why it works when I do this. If I switch who I am chatting as, the menu pops up, but it won't do that for every character including my non-character name, which is what I was trying before. I tried replicating your issue by by speaking as different characters while using the macro. I was unable to get it to break. So, I also just tried making a brand new campaign with the script installed, but I couldn't get it to break there either. I'm not sure why it's not working while you are speaking only as certain characters. The whispered message with that shows the menu should be sent to whatever character you're currently speaking as. Can you provide any other information for the conditions under which it is not working?
Any unusual punctuation in the character names that fail? Like single quotes or parentheses?
Stephen L. said: Can you provide any other information for the conditions under which it is not working I tested a few things, and I think I boiled it down to two conditions where it doesn't work. First one is when I try to roll it with my player name as "Shawn" it won't work; if I change it to anything else it will work when I roll it as myself. The second thing is any character that is set to have 'All Players' control will not work; if i remove that setting from the character, it works. Rabulias said: Any unusual punctuation in the character names that fail? Like single quotes or parentheses? Yes my characters do have parentheses and hyphens in their names, and they work as long as they are not set to be controlled by all players.
1467471624
Ada L.
Marketplace Creator
Sheet Author
API Scripter
Shawn T. said: Stephen L. said: Can you provide any other information for the conditions under which it is not working I tested a few things, and I think I boiled it down to two conditions where it doesn't work. First one is when I try to roll it with my player name as "Shawn" it won't work; if I change it to anything else it will work when I roll it as myself. The second thing is any character that is set to have 'All Players' control will not work; if i remove that setting from the character, it works. Rabulias said: Any unusual punctuation in the character names that fail? Like single quotes or parentheses? Yes my characters do have parentheses and hyphens in their names, and they work as long as they are not set to be controlled by all players. It sounds like it might be caused by a bug in how whispering works to characters controlled by multiple players. It's strange though that it doesn't work with your player name. When I tested it with a blank new campaign, it worked fine when I used it with my player name. Is there maybe more than one "Shawn" in your group? If so, that might be confusing the whisper mechanism.
Stephen L. said: &nbsp;Is there maybe more than one "Shawn" in your group? If so, that might be confusing the whisper mechanism. That was it. The players in my group were screwing around and everyone named themselves Shawn. I made a copy and kicked them from the game now it works with both All player controlled characters as well as when I set my name to Shawn. Thanks for all your help figuring out what the issue was!
Is there a way to set where the icons end up? &nbsp;the second marker seems to always end up on my players' heads
1471634491
Ada L.
Marketplace Creator
Sheet Author
API Scripter
No, they are positioned on the players' heads just like normal status markers.