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

Tomorrow's Update Re: Status Effect Icons and the API

The new update tomorrow which introduces status effect icons will also affect the API as previously discussed. I've updated the API documentation today to reflect how the new changes will work. You can read about it here:&nbsp; <a href="https://wiki.roll20.net/API:Objects#Graphic_.28Token.2FMap.2FCard.2FEtc..29" rel="nofollow">https://wiki.roll20.net/API:Objects#Graphic_.28Token.2FMap.2FCard.2FEtc..29</a> Note that these changes will not be in place until the update is live tomorrow. Let me know if you have any questions. Thanks!
This is now live for campaigns on both Main and Dev. In addition, the selected token information ( <a href="https://app.roll20.net/forum/post/248459/api-update-7-slash-20-inline-roll-support-selected-token-information#post-248459" rel="nofollow">https://app.roll20.net/forum/post/248459/api-update-7-slash-20-inline-roll-support-selected-token-information#post-248459</a> ) is now live on Main and Dev. Thanks!
This is not live for Free accounts, right?
Patricio M. said: This is not live for Free accounts, right? The API is only for Mentor accounts, correct.
Are there plans to give access to the API for supporters at some point?
1375814462

Edited 1375815258
EDIT: Nevermind, I figured out my problem... sheesh.
1375854057
Alex L.
Pro
Sheet Author
Quatar said: Are there plans to give access to the API for supporters at some point? They answered this on the Wednesday live chat thing, basicaly no plans atm.
Well damn... that was easy. I fixed my !mark script by deleting + "marker" in two spots. And here I was worried I was going to have to do a major rewrite.
Found an interesting bug. In my !mark script, if I type !mark target skull@10, it adds a skull without a number badge. If I repeat this command, it keeps adding skulls as shown above. This also works however, for numbers less than ten. Instead of replacing the existing badge and number, it just adds a new one. So if I were to enter: !mark target skull@1 !mark target skull@2 !mark target skull@3 I would have three skulls on the token with a 1, 2, and 3 showing.
1375863250

Edited 1375863268
Alex L.
Pro
Sheet Author
HoneyBadger said: Found an interesting bug. In my !mark script, if I type !mark target skull@10, it adds a skull without a number badge. If I repeat this command, it keeps adding skulls as shown above. This also works however, for numbers less than ten. Instead of replacing the existing badge and number, it just adds a new one. So if I were to enter: !mark target skull@1 !mark target skull@2 !mark target skull@3 I would have three skulls on the token with a 1, 2, and 3 showing. That would be a problem with your code, its a coma separated list so if you have "skull,skull,skull" then it will have 3 skulls, you need to check the list and replace it if it exists.
1375863607

Edited 1375863679
Eh... I like the "bug" and will consider it a feature. Two skulls on a -10 hp D&amp;D 4e character to mark that is has failed two death saves has more visual oomph than a skull with a red two on it.&nbsp; And I don't believe it is a problem with my code, but with the backwards compatibility code that Riley put in. I'm not using the comma delimited list for setting status markers. I'm just using "status_" + StatusMarkerName in my code.
1375864328
Alex L.
Pro
Sheet Author
HoneyBadger said: Eh... I like the "bug" and will consider it a feature. Two skulls on a -10 hp D&amp;D 4e character to mark that is has failed two death saves has more visual oomph than a skull with a red two on it.&nbsp; And I don't believe it is a problem with my code, but with the backwards compatibility code that Riley put in. I'm not using the comma delimited list for setting status markers. I'm just using "status_" + StatusMarkerName in my code. Are you converting skull@2 to obj.set("status_skull", "2"); or obj.set("status_skull@2",true);
TargetToken.set("status_" + StatusMarkerName, true); So... the second one.
1375870453
Alex L.
Pro
Sheet Author
HoneyBadger said: TargetToken.set("status_" + StatusMarkerName, true); So... the second one. That's your problem it should be the first.
It's not a problem. It's a feature.
1375873084
Alex L.
Pro
Sheet Author
HoneyBadger said: It's not a problem. It's a feature. sure it is ....
HoneyBadger said: It's not a problem. It's a feature. Actually I'm not sure that it is, haha. set("status_skull@2") shouldn't be working, so I'll have to take a look at that...
1375876459

Edited 1375876490
I like it as a feature! :D p.s. Feature is what we called bugs back in the EverQuest 1 days... I am sooo old...&nbsp;
1375883969

Edited 1375883976
Riley D.
Roll20 Team
HoneyBadger said: I like it as a feature! :D p.s. Feature is what we called bugs back in the EverQuest 1 days... I am sooo old...&nbsp; Okay, so, I just pushed out an update that should "fix" this. You can still do .set("status_skull@2", true) but it will just drop the "@2" part from the name. The correct way to set a badge of two is to do .set("status_skull", "2") The reason it's important to do it the correct way is because the app assumes there can only be one skull icon -- so while it works right now, I can't guarantee it wouldn't break in the future. In addition, when you did .get("status_skull") who knows what you would have gotten.