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

Emote bubbles

1607975971

Edited 1607982014
Lee
Pro
API that takes emote text and has it pop up as a speech bubble over the player's token for a set amount of time. Does/Can it exist?&nbsp;&nbsp; &nbsp;IRL we can have side conversations, or say things with body language. This allows the game to flow and connect with fellow players without stoping the narrative. A problem of VTT's is the signal talker nature of voice calls. One person talks, if more then the conversation grinds to a halt. This substantially reduces player engagement. With this, I'm looking for away to keep people engaged while dealing with the restrictions of a one-person talks world. Copied script from per The Aarons suggestion (thanks!):&nbsp; <a href="https://gist.github.com/BaldarSilveraxe/30169b095929b7aa12a5" rel="nofollow">https://gist.github.com/BaldarSilveraxe/30169b095929b7aa12a5</a> But got these errors: Your scripts are currently disabled due to an error that was detected. Please make appropriate changes to your script's code and click the "Save Script" button. We will then attempt to start running the scripts again.&nbsp; More info... &nbsp;If this script was installed from the Script Library, you might find help in the Community API Forum. For reference, the error message generated was:&nbsp; TypeError: Cannot read property 'replace' of undefined TypeError: Cannot read property 'replace' of undefined at fixNewObject (apiscript.js:11623:14) at findOrCreateBubbleParts (apiscript.js:11421:19) at speechBalloon (apiscript.js:11491:18) at Timeout.checkBubbleDisplay [as _onTimeout] (apiscript.js:11393:21) at listOnTimeout (internal/timers.js:549:17) at processTimers (internal/timers.js:492:7)
Fab idea! *waits with bated breath for one of the Scripting Gods to weigh in*
1607977418
The Aaron
Roll20 Production Team
API Scripter
Try:&nbsp;<a href="https://app.roll20.net/forum/post/1397909/script-dungeon-buddies-inspired-speech-balloons" rel="nofollow">https://app.roll20.net/forum/post/1397909/script-dungeon-buddies-inspired-speech-balloons</a>
1607978469

Edited 1607978785
Pat
Pro
API Scripter
...we can make text objects, I'm not sure if they come with backgrounds... I've created an emoji decoder... so a player invokable chat button set that will allow them to emote over a selected token if they own it from a series of chat buttons... maybe? One could create a shaped bubble out of lines and fill, and then arrange a chat object over that...&nbsp; Edited to add: Is there a way to make a stock/standard sized balloon for a single emoji, that might have more rounded corners in that case (drawn with paths) for a stock sized text emoji (maybe adjustable size)... and a set number of emojis to select from...&nbsp; Edited to add again: maybe standard text - can't auto fill I think - but if you had an interpreter for any emote that had text bracketed by colons as standard emoji notation - pop an emote of same adjacent to the character token?&nbsp;
Copied script from per The Aarons suggestion (thanks!):&nbsp; <a href="https://gist.github.com/BaldarSilveraxe/30169b095929b7aa12a5" rel="nofollow">https://gist.github.com/BaldarSilveraxe/30169b095929b7aa12a5</a> But got these errors: Your scripts are currently disabled due to an error that was detected. Please make appropriate changes to your script's code and click the "Save Script" button. We will then attempt to start running the scripts again.&nbsp; More info... &nbsp;If this script was installed from the Script Library, you might find help in the Community API Forum. For reference, the error message generated was:&nbsp; TypeError: Cannot read property 'replace' of undefined TypeError: Cannot read property 'replace' of undefined at fixNewObject (apiscript.js:11623:14) at findOrCreateBubbleParts (apiscript.js:11421:19) at speechBalloon (apiscript.js:11491:18) at Timeout.checkBubbleDisplay [as _onTimeout] (apiscript.js:11393:21) at listOnTimeout (internal/timers.js:549:17) at processTimers (internal/timers.js:492:7)
1607983899
The Aaron
Roll20 Production Team
API Scripter
Ah, use this version:&nbsp; <a href="https://gist.github.com/shdwjk/9cfdaa7efd4bb3dc55474e372f8f87af" rel="nofollow">https://gist.github.com/shdwjk/9cfdaa7efd4bb3dc55474e372f8f87af</a> Back in the day (which was a Tuesday, take that, chew it), newly created Roll20 Objects came in with some invalid settings. If you wanted to use them without doing a getObj() on them, you had to apply a fix.&nbsp; About 2 years ago, that got fixed, but the old code for manually correcting it causes the above issue.&nbsp; I corrected it in my gist.
thanks :)
Got this Error: Your scripts are currently disabled due to an error that was detected. Please make appropriate changes to your script's code and click the "Save Script" button. We will then attempt to start running the scripts again.&nbsp; More info... &nbsp;If this script was installed from the Script Library, you might find help in the Community API Forum. For reference, the error message generated was:&nbsp; TypeError: page.get is not a function TypeError: page.get is not a function at Timeout.checkBubbleDisplay [as _onTimeout] (apiscript.js:11392:28) at listOnTimeout (internal/timers.js:549:17) at processTimers (internal/timers.js:492:7)
1608005942
The Aaron
Roll20 Production Team
API Scripter
Added a correction to the gist above.&nbsp; Hopefully that sorts it out.
1608024316

Edited 1608025336
Pat
Pro
API Scripter
Fiddling with paths and emojis - decoding code lifted from teleport - created this dynamically - maybe a drop-down select for players as a button action from selecting their token (token action)?&nbsp; This looks like a really fun idea for my group - they skew younger and like memes and hoola-hoops and frizbees.&nbsp; ...I guess it remains until the character token image changes (shift, rotate, move, status effect) or they select another emoji... - re-using one per player might save some render time - generating them on load would save a little more - re-using the same text object (per page) - just have to keep them from cluttering up the GM layer - Oooh! I could set all of them to transparent color when not in use, and set the text to blank!&nbsp; Edited to add: Sorry, off topic. I'm looking at emoji, not emote - not enough sleep gets to you.&nbsp; Edited again to add: I might do this anyway as an option for shy/nonverbal players who don't want to type a lot - use emojis for perception (eye) and investigation (brain) so they can ask the GM if they are shy. I'll start a new idea thread.&nbsp;
Can someone post a list of the commands for speech balloons? I just tried !makebubble with some text, and it did work, but I'd like to adjust the bubble display (and how long it stays on screen). Also wondering if this could be integrated with ColorEmote (which my players use a lot) eventually. Would be great to run a !cem emote and have the option to send it as a speech balloon too!
1608040823
The Aaron
Roll20 Production Team
API Scripter
Select a token, run something like: !makebubble test message It should make a speech bubble next to the token. This was kind of a proof of concept script, and built during a time when the API couldn't even remove objects (which is why they retreat to the top left corner of the GM Layer), so it's probably a bit rough around the edges by modern standards. =D&nbsp; There's a bug in Roll20 where Text Objects don't have a valid width until they've been manually adjusted some how, which prevents the API from calculating the size of a box that would contain them. Stephen discovered that if he set an invalid font name for them, they'd be rendered in a fixed width font from which a width could be calculated, which is why they look like they do. Text sent to chat gets wrapped the the size of the chat window automatically.&nbsp; Tying ColorEmote to this would require figuring out appropriate line breaking and sizing.&nbsp; It's probably possible to do, but I'm not sure the results would be that great.
The Aaron said: Select a token, run something like: !makebubble test message It should make a speech bubble next to the token. This was kind of a proof of concept script, and built during a time when the API couldn't even remove objects (which is why they retreat to the top left corner of the GM Layer), so it's probably a bit rough around the edges by modern standards. =D&nbsp; There's a bug in Roll20 where Text Objects don't have a valid width until they've been manually adjusted some how, which prevents the API from calculating the size of a box that would contain them. Stephen discovered that if he set an invalid font name for them, they'd be rendered in a fixed width font from which a width could be calculated, which is why they look like they do. Text sent to chat gets wrapped the the size of the chat window automatically.&nbsp; Tying ColorEmote to this would require figuring out appropriate line breaking and sizing.&nbsp; It's probably possible to do, but I'm not sure the results would be that great. OK, thanks for the explanation!
It works! Thank you Aaron! you are amazing
1608237274

Edited 1608237411
Lee
Pro
So it works well in one campaign. But in a different one, I get this message.&nbsp; For reference, the error message generated was:&nbsp; TypeError: page.get is not a function TypeError: page.get is not a function at Timeout.checkBubbleDisplay [as _onTimeout] (apiscript.js:58:36) at listOnTimeout (internal/timers.js:549:17) at processTimers (internal/timers.js:492:7) I've tried disabling all other APIs but the text bubble and I have used the code from your post and the working game. I get the same error regardless. Though disabled I'm using different API in the campaign that does not work. They are: G Welcome Package Paladin Aura G WildHelpers G WildShape If I make a new campaign. It works without issue&nbsp;