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

Ping Buddy Error

1687397734
Essen
Pro
Marketplace Creator
Trying to solve a previous question I posted, I found Ping Buddy. It worked once, now it gives me errors.  For reference, the error message generated was: TypeError: tokenChar.get is not a function TypeError: tokenChar.get is not a function     at apiscript.js:193:70     at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:168:1), <anonymous>:65:16)     at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:168:1), <anonymous>:70:8)     at TrackedObj.set (/home/node/d20-api-server/api.js:1107:14)     at updateLocalCache (/home/node/d20-api-server/api.js:1442:18)     at /home/node/d20-api-server/api.js:1628:11     at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560     at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147)     at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546)     at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489) I really don't want to try tweaking it, since I don't know anything about it.
1687406686

Edited 1687406943
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi Essen! Can you describe what you were doing when the error was triggered?  I think I see what the problem is, but a  repeatable series of steps would help in troubleshooting.  It looks like I wrote that bit to assume a token that represents a character since it needs to know who to ping, but I won't be able to look at it right now..
1687425407
Essen
Pro
Marketplace Creator
I created a token to move my “camera account”.  I set the name and Tooltip to “Pingmesilent”, and I was careful about the capitalization.  The token is tied to a blank character controlled by camera account, instead of setting the token to be manually controlled by that player, I’m realizing now that that may have had an impact.  I moved the token once with my DM account, and the view for that player moved as expected (I had both accounts in at the same time). Moving the token a second time didn’t do anything, and I saw the error above the API console. Just to see what was effected, I changed the name of the token to Cam, while leaving the tooltip set to Pingmesilent. I made a universal macro for !pingme Cam, which also did nothing when clicked by the camera player. I appreciate whatever you can do. Not to have a sob story, but I have a mostly blind friend who’s finally getting into the game after changing classes, and he asked me to start recording the map so he can rewatch it at his own pace and start internalizing what’s happening each session, instead of just coasting. The PingBuddy API is perfect for easily guiding that view without jerking the camera around for everyone. So I look forward to anything you can figure out in regards to getting it working smoothly.
1687450819

Edited 1687450908
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi Essen, I have followed those steps as closely as I could, and can replicate the error under very specific circumstances (which I shall correct). If the ping token is not actually representing a character sheet, but just a graphic that is given control to a player, the script breaks. Verify that the token as it is on the board , is representing a character controlled by Cam and not just directly assigned control by Cam. If this already correct, but you are still getting the error, let me know. If you want to message me an invite and promote me to GM, I'd be happy to investigate. In any case, once I have new code, I will let in you know, and probably release this to One Click.
1687460560
Essen
Pro
Marketplace Creator
Ah, does the character name matter? I hadn't thought of that. This is what I have: I'll keep an eye out for a code update.
1687460949
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Character name should not matter, unless it is one of the listed controlled names, and even then, it should trigger a behavior, not an error. Can you do me a favor and post the permissions settings on VigilemCamera character?
1687464984
Essen
Pro
Marketplace Creator
What do you mean by permission settings? This?
1687470360
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hmm. That all looks correct. I'll still work on the code, but I'm not sure what is triggering the error in your game.
1687470457
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
It should not make any difference at all, but what happens if you name the Camera character differently from the Camera player ?
1687470955
Essen
Pro
Marketplace Creator
Welp.  I renamed the character Camera and it works just fine. At least, it didn't crash after one move. !pingme Cam works also. 
1687471582
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I'll keep at the script because there are still issues with it, but do you have a workable solution now? I want to make sure you and your player are getting what you need from it.
1687472358
Essen
Pro
Marketplace Creator
As far as I can tell, it keeps working as desired! Thanks for the help! I really appreciate it
1687475221
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Since I'll be polishing this up for publication, is there any other functionality you might need?
1687525276
Essen
Pro
Marketplace Creator
Not that I can think of! The controlled-by function, where I can set it to specific players, that handles any use case I can think of now. Thanks though!
1687589189
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I believe I have accounted for tokens that do not represent a character. Also, capitalization no longer matters. I have updated the code link in the original thread, but here it is for reference. [ Code ]
1687609393
Essen
Pro
Marketplace Creator
Outstanding! Thank you!
1688787750
Essen
Pro
Marketplace Creator
Hi there Keith! I’ve been told today that the Ping Buddy token I’ve been moving has actually been pulling everyone’s cameras, not just the one account. It’s apparently been happening since we got it working. Any idea why it would grab everyone instead of just the indicated account?
1688788802

Edited 1688792714
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
HI Essen! What is the codeword you are using? And what are the permissions on the token/character? NVM, I was able to duplicate. Not sure when that crept in, but it should be working now. Code has been updated . This should also be in One Click when the next merge happens.
1688830922
Essen
Pro
Marketplace Creator
Wow, that was quick! Thank you so much
1688834951

Edited 1688835215
Essen
Pro
Marketplace Creator
Now that this is worked out, I tried something and found a weird behavior. I figured it would streamline things for each PC token to pull the camera, since they only move on their turn. Adding the camera account to the token (when configured) didn't move the camera account. I removed the other players and did work. It looks like it only applies the camera movement to the first player assigned to a character, not any additional ones added after the first one is saved.  I don't know if this is something that you need to worry about fixing though. If the players are moving the token, it wouldn't hurt for it to snap for their view AND the camera view. But It's not a detriment if it doesn't. People just need to know the trick to get it to work for a camera account the way I have it. EDIT:: Actually, in the case of two people sharing a character, it could be a problem if it only moves the camera for one of them. So I'm not sure how many users would want this resolved.
1688837219
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Currently it is configured to only pull for the first listed controller. It shouldn't be impossible to ping to all controllers. I'll have to give some thought as to whether this would be a feature or a bug. Any thoughts on the matter as to when this would be a help or a hindrance?
1688859570
Essen
Pro
Marketplace Creator
The main thing is the UI awkwardness for who the effected player is. The players are listed in the order that they joined the game, not the order that they're assigned to the character or in alphabetic order. It took a lot of guesswork to figure out the SOP for getting it to effect my camera account. If this stays the status quo, really clear instructions will need to be included so less analytic people can get it working.  Ultimately, it would be nice to be able to just pick who it impacts. Whether that's a toggle, or simply "move camera account even if they aren't in control" as part of the tooltip. But I have no clue how much work that takes, so I'll assume it's too complicated. Use case for 1st only: The party has a Mastiff, a shared sidekick that one person controls per session, but everyone is set to. The whole group being panned over would annoy people, but it would also be a pain to add and remove people as they want to check his character sheet and talk strategy. Use case for All: Some groups may have shared characters, like younger people who will work in pairs to steer one character. Having to pick one character that gets the camera effect while the rest of that team has to do it manually is really minor, but doesn't feel ideal. I have gotten my personal situation all worked out, so I'm not too worried about it. But that's what I have to contribute.
1688884520
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I'll look into setting an option for multiple controllers in future versions, and make sure the instructions clearly state how to affect the order of controllers (they are basically the order in which they are added, and you can remove all and start over if you want.) BTW, "All Players" should be a viable setting.
1688914903

Edited 1688914947
Essen
Pro
Marketplace Creator
I hadn't tried using "All Players", since everyone being pulled is what I was trying to fix. But I understand that it does seem like it should count. Thanks again for working with me on all this! I appreciate you helping me get things working.
1689427593
Essen
Pro
Marketplace Creator
Hi again! One more tally in "set controller" bucket. Somehow, the camera shifting began effecting the players instead of the camera account, despite being all set up before. At some point the order that players were listed in the Character became the authority, and player account #1 became the one affected.  I had to redo all of it to set the camera account as the only one assigned, then add in the players, and it worked as expected the rest of the session. Not sure why it changed or if it will do so again.
1689443168
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
The script has always taken the first controller in the list order. It does this by splitting on the comma and taking item [0]. You are reporting that the Roll20 app has arbitrarily changed the list order after it was created? If so, I might need to add a pingme -1234567890abcdef option to ping only a specific player, regardless of the controller. - 1234567890abcdef would be the player id, which might be tough for the average user to find. I could write a routine to follow a player name as set in the display name field of the player's settings tab, but then it would break if they ever changed their name.  Any ideas on other ways to implement? BTW, the script was accepted for merge some time ago, but due to a snafu somewhere, has not been listed for One Click. I am still trying to get that resolved.
1689510486

Edited 1689511100
Essen
Pro
Marketplace Creator
Yeah. I don’t know if it was caused because of a server update or API restarting, or just something that happens over time. The party has a Mastiff they share control over, and I set the 3 people taking turns in addition to the camera. The first person in the game-join-sort-order had the camera effect. I don’t know enough about the backend to explain it. But removing everyone, saving the camera as the sole controller, then adding people fixed it. I think I remarked before that it would be cool to be able to type in the player name(s) for who it effects, like Pingmesilent Keith|Essen or if it can only call one person, one token could have Pingmesilent Keith Pingmesilent Essen to effect two people. This second one could be best since it allows for different options: Pingme Keith Pingmesilent Essen I don’t know how easy or hard this would be to implement though. I’m not sure how to get player IDs, but once a GM learns it I’m sure it’ll be easy to manage, like how I made a handout on finding TokenIDs and relevant commands. The display name idea seems intuitive, since it would be straight forward to fix if it broke. But in my case, no one ever changes their names, and my camera name is set. So the the risk is low. I’ve had an idea to group a blank Camera token to a PC token, but grouping seems to be causing issues where players aren’t able to access their token macro buttons. So grouping in general may be out.
1690828584
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Hi Essen! Just wanted to let you know that I have not yet implemented any changes, but the latest version is now available on One Click . So if you install from there, you automatically get updates as they are published.
1690895702
Essen
Pro
Marketplace Creator
Alrighty! Thanks. The player order thing keeps happening, I have to go in and reset players before each session. But I appreciate you telling me about the auto-updates.
1691657551
Essen
Pro
Marketplace Creator
Hi again! I just wanted to let you know that the Pingmesilent is showing the Ping animation now.  It's jumpy, as if the ping Color>Transparent>Color is out of sync with the animation itself, and gets cut off. But it does show. Also, I'm curious if you've picked a method for picking who gets controlled?
1691683694
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I'll have to check if the recent updates in default player color have introduced any complications. I did a little work on the controlling, but ran into some difficulties. It can be done, but my free time is limited right now as I am fulfilling a patreon and a kickstarter in addition to my normal freelance and contract work.
1691690579
Essen
Pro
Marketplace Creator
No worries. It's usable, I just wanted to keep you apprised.
1693963785
Essen
Pro
Marketplace Creator
Hi there. Not sure why, but the API seems to be pulling the camera focus for all accounts in control of it now. I’m not sure what changed, but since it’s hard to move a token when the screen keeps shifting, my players have asked I disable it. But I wanted to update you on the odd behavior.