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 .
×
Advertisement Create a free account

[Script] Emojibubble

1608150326

Edited 1608679763
Pat
Pro
API Scripter
Emojibubble 1.0 Release Candidate Installation Gist Emojibubble is available on one-click.  1.0 version persists emoji bubbles until actively cleared or deleted - they move with you.  A simple script for adding on-tabletop emoji-bubbles adjacent to NPC and Player tokens.  This script creates an Emojibubble console on installation, accessible to all players and the GM. Select a token, then select and click an emoji button in the console, and the token gets a dynamically created word balloon (an SVG shape) with a text object prefilled with an emoji adjacent to it (see illustration). Any movement by the token deletes the emoji-bubble . Emoji bubbles can be cleared from the console (see below), by selecting "clear" from the macro dropdown, or by sending the JavaScript call: emojibubble.create([token],"clearemojibubble"); Clicking a different emoji button replaces any other emoji bubbles. Clicking the "Clear Emoji Bubble" button clears the emoji bubble.  Bubble references are retained between sessions, meaning clean-up shouldn't cause errors due to new sessions.  Adding more emoji is a matter of adding them to the codebase 1 - the desire here was to keep them limited and not include all of the modern emoji, but anyone willing to put in a little time can add emojis they feel would add to their experience.    1 The ability to add emoji is now baked into the Emojibubble console This one's gone from an idea to a usable script, and I'm debating whether or not to put it in one-click. In one click, the emoji list is no longer editable, but also in one-click, less tech savvy Pros can easily use it in their games if they feel it is appropriate.  I've made a version that is editable from the one-click version without editing the code, including adding emoji, deleting emoji, and resetting to the default if something goes wrong.  Update: Have "solved" the gmnotes update issue, so it's working just don't look under the hood.   Update: Macros have been added, and are kept updated simultaneously with the handout. #Selected_Emojibubble and #Target_Emojibubble   Update: API Access included to emojibubble.create emojibubble.create([token object],"[emoji indexstring]");
1608150970
The Aaron
Forum Champion
API Scripter
You could store them in a configuration handout that could be edited, or perhaps provide a commandline means of adding to the list and editing existing entries.
1608151074
Andreas J.
Forum Champion
Sheet Author
Translator
So it creates a new token, that is then places over the selected token in a way that makes it almost seems like it's a token marker. Is that right? Makes sense, as trying to do some custom token marker stuff would interfere with other marker related stuff, and would probably require to install a set of custom marker, if the bubble+emoji would be a token marker. And yeah submitting it as an one-click install makes it more accessible to people, and maybe easier to find as well.
1608153296

Edited 1608156573
Pat
Pro
API Scripter
The Aaron said: You could store them in a configuration handout that could be edited, or perhaps provide a commandline means of adding to the list and editing existing entries. Good idea! I could add those controls into the GM notes... wait... GM notes can't have clickable buttons... darn. Command line or chat menu - one of those maybe or both - a dedicated GM being able to edit them in-game might help if somebody keeps spamming the same emoji...  Nevermind - I was doing something wrong, and now I'm thinking of adding a control panel on the GM notes to add, edit, and remove emoji - I don't want to get terribly complicated, but when has that ever stopped me so far? 
1608153388
Pat
Pro
API Scripter
ᐰndreas J. said: So it creates a new token, that is then places over the selected token in a way that makes it almost seems like it's a token marker. Is that right? Makes sense, as trying to do some custom token marker stuff would interfere with other marker related stuff, and would probably require to install a set of custom marker, if the bubble+emoji would be a token marker. And yeah submitting it as an one-click install makes it more accessible to people, and maybe easier to find as well. I'm using the drawing and text tools - so the balloon is an SVG drawing, the text is a text-box with only the single character emoji - tried to keep it light and scalable :) And yes, it's not meant to supplement or conflict with token status markers 
1608153976
Andreas J.
Forum Champion
Sheet Author
Translator
oh lol, that's more clever
1608162572

Edited 1608162728
Pat
Pro
API Scripter
Okay, so - I've got an add button that's only on the GM Notes of the same handout - and I've got it so you just paste in the emoji into the field and the app digests it so it can be stored as hex and reconstituted later, stored in a state variable retrieval system - the original set is being kept so you can "reset" at any time - so I think I'll stuff the entire original set into the state variable too... so there is just one retrieval site, and a variable stored in the script that represents the "default." So soon - just paste and name your new emojis as GM - add any ones you want, delete any ones you don't - I will draw the line at drag-drop arranging however. 
1608176129
Pat
Pro
API Scripter
Updates to the above, I figured I'd go all out and make it so it really works, so it's easy to add new emojis. I'll be making a reset button next, then a "delete mode" toggle to get rid of emojis with a click from the GM layer. I couldn't leave it at something hard to manage or something you had to download and fiddle with code to manage.  - Click on "Add Emoji" in the GM Notes (not visible or available to players) Paste in some dirty emoji you picked up off the floor on the web Name it whatever you like (if you duplicate an existing name this will overwrite an existing emoji) Revel as your new emoji is made available for all of your players an you.  Evidence it worked: 
1608179047

Edited 1608364752
Pat
Pro
API Scripter
A Snag I've got delete and reset working, and selected emoji persist from session to session in the control panel.  Trouble is add, reset, and delete showing up in the GM panel. I have duplicates of all of the existing emoji down in the gmnotes that I use - with gray backgrounds to differentiate them - for deletion. And when they delete from the player's view, they should also disappear from the gmnotes. And when new ones are added for the players, they should also show up in the "to be deleted" list which is refreshed at the same time...  The 'remedy' for this is to close and re-open the emoji console handout, which fixes it, every time. I don't want to have to close the emoji console or have that be an instruction - is there any knowledge out there on how to fix this?   This was solved thanks to some sleuthing by Jordan C. - gmnotes will not update the appearance of gmnotes on its own - it only updates after notes is updated - so since I'm updating both, it was a matter of changing the order. 
1608180751
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
The bell just made me think of a very handy usage. Currently I use the Raise Hand script, which causes the avatar color to cycle when a player needs GM attention. Having a bell emoji word balloon appear next to their token would be a good companion to that.
1608183879
Pat
Pro
API Scripter
keithcurtis said: The bell just made me think of a very handy usage. Currently I use the Raise Hand script, which causes the avatar color to cycle when a player needs GM attention. Having a bell emoji word balloon appear next to their token would be a good companion to that. I will ready what I have post-haste then - and adding emojis to this involves copy-pasting the emoji once you click "add emoji" and giving it a name - "attention" or "hey!" Just a warning that it appearing or disappearing from the GM side will - right now - require closing and re-opening. I hope that's not too much of a hassle. I've added notes in that tell a person that, as well as a link to searching for and copy-pasting new emoji.  Update New Gist with all the bells and whistles Please test, as I think this is just about ready to check in... 
1608204194
Andreas J.
Forum Champion
Sheet Author
Translator
You're updating it with neckbreaking speed, and it gives me a ton of ideas on usage, and potential interaction with other APIs. :D Currently, you need to select the token you want add a emoji for, and then to press on the corresponding button in the handout to make it appear? Are you thinking about extending the API to support assigning emojis to tokens with chat commands, or to be able to target tokens based on name/ID, and not only with manual selection? If that is made possible, the API could be more easily used in combination with other APIs or general macros. Some suggestions(wait this is starting to look like a video game): command/macro support: Would enable people to create own ways to interact with activating the API. People could have a macro on their quickbar that automatically selects their chracters token, and adds a specific emoji for it.  Other options could it would enable is to have a macro that first pops up a dropdown-menu on what emoji to show, and then tell the user to target the token they want(acchieved through @{target|}), which could be extended to target multiple tokens at a time compatibility to other APIs: beyond just it's own API commands, it could have potential if it could be called by other APIs, like PowerCards, It's a Trap, or various combat-related APIs. Conditionally having enemies or allies briefly emote their reaction to taking damage, blocking an attack, failing/succeeding on a saving throw, or getting surprised, or show an exclamation mark whenever someone makes a critical roll. option to trigger audio: This emoji-bubble thing could have extended use as part of notifications that trigger on conditions, or could be optionally linked with jukebox to play a notification sound for certain bubbles. option to add bubbles with a ping to the map: If you could ping the map anywhere to add an emoji bubble, this could be used to quickly create map markers on a worldmap, with the various house/animal/plants/character emojis. lol I'm imagining someone moving their character on a map, and then suddenly the characters movement is stopped, and the character get the ⁉️ emoji and a warning sound is played, and at the same time a hidden monster appears in front of them, due to the character noticing it. The situation would require the interaction of several APIs, but would be an impactful moment, if made possible. On a related note, there is a good number of APIs now that if successfully combined, could be used to create very "video game"-esque cut-scenes, by triggering a scene when a character moves to a certain location( It's A Trap , others), locking all player token movement( TokenLock /MapLock(?)) & preventing drawing on the map( DryErase ), while having the GM's narration be supported by scripted token movement, characters having reactions( Emojibubble ), and there appearing both animation( TokenMod (?)) and sounds( Audiomaster ) when appropriate. I've meant to go through all existing APIs in the dropdown get a new and updated API Index on what we have, but also to see what APIs have synergy potential, could interact with eachother, or be thematically related. Currently there exist so many of them that nobody have a good idea of all the things that currently could be done by combining APIs.
1608208697

Edited 1608208743
Pat
Pro
API Scripter
ᐰndreas J. said: You're updating it with neckbreaking speed, and it gives me a ton of ideas on usage, and potential interaction with other APIs. :D Currently, you need to select the token you want add a emoji for, and then to press on the corresponding button in the handout to make it appear? Are you thinking about extending the API to support assigning emojis to tokens with chat commands, or to be able to target tokens based on name/ID, and not only with manual selection? If that is made possible, the API could be more easily used in combination with other APIs or general macros. Some suggestions(wait this is starting to look like a video game): command/macro support: Would enable people to create own ways to interact with activating the API. People could have a macro on their quickbar that automatically selects their chracters token, and adds a specific emoji for it.  Other options could it would enable is to have a macro that first pops up a dropdown-menu on what emoji to show, and then tell the user to target the token they want(acchieved through @{target|}), which could be extended to target multiple tokens at a time compatibility to other APIs: beyond just it's own API commands, it could have potential if it could be called by other APIs, like PowerCards, It's a Trap, or various combat-related APIs. Conditionally having enemies or allies briefly emote their reaction to taking damage, blocking an attack, failing/succeeding on a saving throw, or getting surprised, or show an exclamation mark whenever someone makes a critical roll. option to trigger audio: This emoji-bubble thing could have extended use as part of notifications that trigger on conditions, or could be optionally linked with jukebox to play a notification sound for certain bubbles. option to add bubbles with a ping to the map: If you could ping the map anywhere to add an emoji bubble, this could be used to quickly create map markers on a worldmap, with the various house/animal/plants/character emojis. lol I'm imagining someone moving their character on a map, and then suddenly the characters movement is stopped, and the character get the ⁉️ emoji and a warning sound is played, and at the same time a hidden monster appears in front of them, due to the character noticing it. The situation would require the interaction of several APIs, but would be an impactful moment, if made possible. On a related note, there is a good number of APIs now that if successfully combined, could be used to create very "video game"-esque cut-scenes, by triggering a scene when a character moves to a certain location( It's A Trap , others), locking all player token movement( TokenLock /MapLock(?)) & preventing drawing on the map( DryErase ), while having the GM's narration be supported by scripted token movement, characters having reactions( Emojibubble ), and there appearing both animation( TokenMod (?)) and sounds( Audiomaster ) when appropriate. I've meant to go through all existing APIs in the dropdown get a new and updated API Index on what we have, but also to see what APIs have synergy potential, could interact with eachother, or be thematically related. Currently there exist so many of them that nobody have a good idea of all the things that currently could be done by combining APIs. Okay - starting out, I'm encapsulating it because it's getting too big to be a bunch of functions under an "on:ready" I checked and gm-layer tokens can be used as a "target" for pop-ups which still render to the object layer...  This does mean teleport tokens are valid targets for example - so a similar means for creating tokens to target for emoji pop-up on the object layer should be possible I have the entire collection of token/emoji associations, so given the widening possibility of runaway emoji spam on accident or on purpose, a "purge" button may be necessary to clean-up everything.   Passing in an id if there is no selected should be possible, just have to untangle some of what was slightly sloppy code on my part... I have examples of doing this from teleport API interactions are all chat buttons currently, meaning their methods can be exposed that way, just have to have a mechanism for passing in an ID or an array of IDs, and adjusting for accepting multiple selected tokens...   I'll work on integrations Thanks for your enthusiasm - I'll keep working on this to widen its utility! 
1608241632
Pat
Pro
API Scripter
Update New feature: token targeting through either scripting or with a button (example on load) - select a token, then select an emoji to apply. There should probably be a protection there too for a gm only to be able to apply emoji to tokens that aren't player tokens, and players to other players. 
1608336496

Edited 1608336697
Pat
Pro
API Scripter
Update There is now a dynamically updated macro in the macro list (it will always have the current list of available emoji to select from) Click the macro - it prompts to select a target Then select a drop-down option for the emoji to apply The emoji bubble is applied.  It also is kept up to date with changes.  Add an emoji (as noted here ) Then use the macro... the new emoji is incorporated.  Edited to add: I may add another version ("Select_Emojibubble") to provide a variant that uses the currently selected token. As it is, the "Target_" version does not check to see if you own the target, so it could be used for griefing currently. 
1608349735

Edited 1608350597
DXWarlock
Pro
Sheet Author
API Scripter
This is awesome! Trying to work out how to send a command to apply an Emoji via API. I have the token defined I want to apply it to, and the emoji name to apply. I thought maybe  emojibubble.createEmojiBubble(current_token, emoji);  would do it. But don't think createEmojiBubble is exposed? (I could just be doing it wrong), trying to follow the code in the script to work out how to pass a token and emoji name to it. Is there a way to send a API call to apply an emoji? Edit:  I got it worked out, working how I need it to now!. Just needed to add: return { create: emojibubbleregister, initialize: initialize } Thanks for this script! This can do what I have been needing a 'way to indicate' for a while.
1608357933

Edited 1608360887
Pat
Pro
API Scripter
DXWarlock said: This is awesome! Trying to work out how to send a command to apply an Emoji via API. I have the token defined I want to apply it to, and the emoji name to apply. I thought maybe  emojibubble.createEmojiBubble(current_token, emoji);  would do it. But don't think createEmojiBubble is exposed? (I could just be doing it wrong), trying to follow the code in the script to work out how to pass a token and emoji name to it. Is there a way to send a API call to apply an emoji? Edit:  I got it worked out, working how I need it to now!. Just needed to add: return { create: emojibubbleregister, initialize: initialize } Thanks for this script! This can do what I have been needing a 'way to indicate' for a while. Okay! I'll add this into the official... and I'll put in a macro that uses selected as well... and then maybe I can call it soup!  Added to official, and I'll probably shoot for next week's release on one-click. I'm concerned there are still bugs lurking and don't want to crash sandboxes again.  Edited to add more: Cleanup of emojis involves sending an "emoji" name to create of "clearemojibubble" with the token id. This clears any emoji bubble around the token. 
1608454755

Edited 1608463529
Pat
Pro
API Scripter
Update Okay, so several things on the current gist - I think it's almost ready to go to the library - it's pretty solid, and feels "right" - so I'll give that a shot once I put in some try-catches around any possible sandbox crashes, and add   added multi-select support as requested by  ᐰndreas J . Just in case. So, first off: Macros. There are two macros that can be added to tokens or to the GM's action bar.  #Selected_Emojibubble as a token action for players (it's not set as one to start) allows any player to select their token and select an emoji from a drop-down. It's an alternative to the emoji console. A drop-down list is harder to sort through, so players may use the console until they are comfortable with the selection and what's available.  #Target_Emojibubble is more for the GM and allows a GM to click a button to get a select crosshair, and then a drop-down to set any token with an emojibubble with two clicks and no console lookup or pre-selection.  API access - thanks to DXWarlock for the help on how to open up the API to other scripts - just pass in a token reference and string emoji index to emojibubble.create([token],"emoji"); You can find out the name of an emoji by opening the console and hovering over the relevant button. All of them have a title of the emoji string reference.  So hopefully that all adds up to more support for other scripts and uses! 
1608464226

Edited 1608466060
Pat
Pro
API Scripter
Update Version 1.0 has been submitted to the One-Click repository. This version includes multi-select, macros, API access, adding, removing, resetting... The only thing lacking (which I'll test next for release 1.1) is scaling for differently-sized tokens. If a player has a Large or larger token, there is a concern the emojibubble would appear underneath their token for their view only (all others will see the emoji appear overtop).  Considering adding persistence of emoji as an option (emoji moves with tokens until dismissed or deleted or replaced with a new emoji)
1608476851
This looks super, Pat. Can't wait to try it out. I would definitely second the addition of persistent emoji, since one use case I've thought of (and that came up in my session last night) is to indicate weapon equipped (melee or ranged) for the purposes of keeping track of opportunity attacks (which bad guy has their sword out? which one has the crossbow?). 
1608530696

Edited 1608530712
Pat
Pro
API Scripter
Jay R. said: This looks super, Pat. Can't wait to try it out. I would definitely second the addition of persistent emoji, since one use case I've thought of (and that came up in my session last night) is to indicate weapon equipped (melee or ranged) for the purposes of keeping track of opportunity attacks (which bad guy has their sword out? which one has the crossbow?).  Thanks!  Tried it with my group today - they spammed it (one person had trouble figuring it out, but got it after about thirty seconds) and then settled down to using it occasionally.  I used it for a nonverbal character to emulate them signing, and it was interesting they figured out sequenced emojis from that limited set pretty quickly! I'll see about toggling keeping the emoji pinned or just leaving it on until you actively remove it or delete it yourself... just another layer of management! 
1608535460
Pat
Pro
API Scripter
Update As per request and something I was thinking...  Jay R. said: This looks super, Pat. Can't wait to try it out. I would definitely second the addition of persistent emoji, since one use case I've thought of (and that came up in my session last night) is to indicate weapon equipped (melee or ranged) for the purposes of keeping track of opportunity attacks (which bad guy has their sword out? which one has the crossbow?).  Okay, new gist persists emojibubbles until you actively delete, they stay with you (not across pages, but within a page) as long as you want them to. 
1608606537

Edited 1608606715
Pat
Pro
API Scripter
Update Last changes, I promise - this time, scaling of the offset with token size:  The token offset will now be just to the right and top of the bounding box for whatever size bounding box there is... in addition to movement of the emoji bubble with the token: 
The new changes are awesome! I think this is gonna be a great way to abbreviate and track exploration activities for my Pathfinder 2e game.
1608651965

Edited 1608659519
Pat
Pro
API Scripter
Persephone said: The new changes are awesome! I think this is gonna be a great way to abbreviate and track exploration activities for my Pathfinder 2e game. Thanks! I may pull the publish request that's out there now and add these to the 1.0 release, since it looks like I have some time...  Edited to Add: Added to 1.0 release: persistent emoji, scaled emoji placement.  Is this a common error with new scripts: " Spinning up new sandbox... Error downloading scripts (probably no scripts exist for campaign.)
1608664173
Pat
Pro
API Scripter
It's selectable from one-click, but nothing downloads and it crashed the whole sandbox. For now use the gist. 
1608674465

Edited 1608679319
Pat
Pro
API Scripter
Update Emojibubble is active and available in one-click It downloads properly from one-click - unfortunately it is verbose in the script logs, and has an incorrect conflict with teleport from one-click (if you have teleport from one click, it thinks emojibubble modifies one of its attributes - it doesn't, it's a mistake), so I'll be submitting those changes for next release - are there any other features folks are wanting from this before I move back to localized sound effects?  Edited to add: I got the default number wrong too, I think - six rows of 12, not six rows of 10, for a total of 72 default emoji. 
1610092397

Edited 1610092438
This is probably pretty far away from  your original intention with this script, but would it be possible to modify this to function as a kind of... "dynamic token marker" that would be able to insert a limited amount of actual text via user entry? By limited, meaning a total of 2-4 characters. The reason I'm asking is because I very frequently run into situations where having a temporary status marker would be extremely useful. For example: tracking the results of stealth/hide checks made by creatures during combat; recording the height or depth of a creature that is flying, climbing, or swimming; displaying each character's passive Perception skill while on the landing page when dungeon delving without a map; or tracking the duration of an extended temporary effect that is tracked in minutes rather than rounds during exploration sequences (e.g. potion effects). So instead of just having an emoji, maybe having an emoji plus 1 to 3 numbers. Don't get me wrong, you can do all of the above examples with Roll20's default status markers, and can increase your flexibility with current API scripts (like TokenMod) and custom status markers. The issue I encounter is that because I have a larger group of players whose characters are all fairly high leveled at this point, I have to run combats that often use quite a few enemy creatures that also have a lot of different capabilities - this means that the tokens in my game often have very cluttered status bars. Having a separate pop-out bubble available would be a nice quality of life improvement. That being said, even if it's not possible to incorporate this functionality, this is definitely getting added to my campaign.
1610159704
Pat
Pro
API Scripter
wax poetic said: This is probably pretty far away from&nbsp; your original intention with this script, but would it be possible to modify this to function as a kind of... "dynamic token marker" that would be able to insert a limited amount of actual text via user entry? By limited, meaning a total of 2-4 characters. The reason I'm asking is because I very frequently run into situations where having a temporary status marker would be extremely useful. For example: tracking the results of stealth/hide checks made by creatures during combat; recording the height or depth of a creature that is flying, climbing, or swimming; displaying each character's passive Perception skill while on the landing page when dungeon delving without a map; or tracking the duration of an extended temporary effect that is tracked in minutes rather than rounds during exploration sequences (e.g. potion effects). So instead of just having an emoji, maybe having an emoji plus 1 to 3 numbers. Don't get me wrong, you can do all of the above examples with Roll20's default status markers, and can increase your flexibility with current API scripts (like TokenMod) and custom status markers. The issue I encounter is that because I have a larger group of players whose characters are all fairly high leveled at this point, I have to run combats that often use quite a few enemy creatures that also have a lot of different capabilities - this means that the tokens in my game often have very cluttered status bars. Having a separate pop-out bubble available would be a nice quality of life improvement. That being said, even if it's not possible to incorporate this functionality, this is definitely getting added to my campaign. I may see if I can stretch the bubble for longer phrases - maybe in an updated or alternate model - in the meantime, you could try adding some unicode characters that aren't emojis -&nbsp; <a href="https://jrgraphix.net/r/Unicode/2460-24FF" rel="nofollow">https://jrgraphix.net/r/Unicode/2460-24FF</a> &nbsp;- enclosed alphanumerics or&nbsp; <a href="https://jrgraphix.net/r/Unicode/2600-26FF" rel="nofollow">https://jrgraphix.net/r/Unicode/2600-26FF</a> &nbsp;- miscellaneous symbols - or&nbsp; <a href="https://jrgraphix.net/r/Unicode/2150-218F" rel="nofollow">https://jrgraphix.net/r/Unicode/2150-218F</a> &nbsp;- number forms.&nbsp; Likely I'd end up making an alternative version with a speech bubble for /em expressions, but there already is one I believe...&nbsp;
1610171078
GiGs
Pro
Sheet Author
API Scripter
Pat said: I'm using the drawing and text tools - so the balloon is an SVG drawing, the text is a text-box with only the single character emoji - tried to keep it light and scalable :) And yes, it's not meant to supplement or conflict with token status markers&nbsp; Very intriguing. It sounds like someone could replace the emoji functions with the ability to add floating text. You could fake having post-it notes with such a function, by allowing more than one character. Multi-line text might present extra complications.
1610175263
Pat
Pro
API Scripter
GiGs said: Pat said: I'm using the drawing and text tools - so the balloon is an SVG drawing, the text is a text-box with only the single character emoji - tried to keep it light and scalable :) And yes, it's not meant to supplement or conflict with token status markers&nbsp; Very intriguing. It sounds like someone could replace the emoji functions with the ability to add floating text. You could fake having post-it notes with such a function, by allowing more than one character. Multi-line text might present extra complications. I'm already doing a measure-and-set for the dimmerswitch with svg plotting - just have to figure out the math on measuring a text box and setting the svg to the right offsets, but yes, it could be done with just SVGs and text boxes. Maybe not in emojibubble, since it's kind of dedicated to that single-character simplicity with respect to plugging in new emojis.&nbsp;
Pat said: wax poetic said: This is probably pretty far away from&nbsp; your original intention with this script, but would it be possible to modify this to function as a kind of... "dynamic token marker" that would be able to insert a limited amount of actual text via user entry? By limited, meaning a total of 2-4 characters. The reason I'm asking is because I very frequently run into situations where having a temporary status marker would be extremely useful. For example: tracking the results of stealth/hide checks made by creatures during combat; recording the height or depth of a creature that is flying, climbing, or swimming; displaying each character's passive Perception skill while on the landing page when dungeon delving without a map; or tracking the duration of an extended temporary effect that is tracked in minutes rather than rounds during exploration sequences (e.g. potion effects). So instead of just having an emoji, maybe having an emoji plus 1 to 3 numbers. Don't get me wrong, you can do all of the above examples with Roll20's default status markers, and can increase your flexibility with current API scripts (like TokenMod) and custom status markers. The issue I encounter is that because I have a larger group of players whose characters are all fairly high leveled at this point, I have to run combats that often use quite a few enemy creatures that also have a lot of different capabilities - this means that the tokens in my game often have very cluttered status bars. Having a separate pop-out bubble available would be a nice quality of life improvement. That being said, even if it's not possible to incorporate this functionality, this is definitely getting added to my campaign. I may see if I can stretch the bubble for longer phrases - maybe in an updated or alternate model - in the meantime, you could try adding some unicode characters that aren't emojis -&nbsp; <a href="https://jrgraphix.net/r/Unicode/2460-24FF" rel="nofollow">https://jrgraphix.net/r/Unicode/2460-24FF</a> &nbsp;- enclosed alphanumerics or&nbsp; <a href="https://jrgraphix.net/r/Unicode/2600-26FF" rel="nofollow">https://jrgraphix.net/r/Unicode/2600-26FF</a> &nbsp;- miscellaneous symbols - or&nbsp; <a href="https://jrgraphix.net/r/Unicode/2150-218F" rel="nofollow">https://jrgraphix.net/r/Unicode/2150-218F</a> &nbsp;- number forms.&nbsp; Likely I'd end up making an alternative version with a speech bubble for /em expressions, but there already is one I believe...&nbsp; I'll definitely give that a shot! Thanks for the tip.
1610398894
Pat
Pro
API Scripter
Did you Know You can use Emojibubbles as floating emojibubbles by putting the controlling token on the GM layer. Emojibubbles always appear on the token layer and follow on the token layer, regardless of the layer the originating token is on, keeping their offset, and emojibubble watches for any move of any graphic and only checks to see if it is a token, and if it is in the registry of "things which have emojibubbles." This works for assignment, too, so adding or changing a GM layer token's emojibubble always puts it to the token layer by default.&nbsp;
1611512533
Hey Pat. Just installed Emojibubble from the one-click and got this error from API (disabling scripts): 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: initializeemoji is not a function
1611530341
Pat
Pro
API Scripter
I don't know what I can tell you - I'm not seeing that in the installed version I have - do you have two versions active?&nbsp;
1611534736

Edited 1611538225
Pat said: I don't know what I can tell you - I'm not seeing that in the installed version I have - do you have two versions active?&nbsp; No, I just have the one version. Edit: At the top of the script, this code block appears: state.emojibubble = state.emojibubble||{}; state.emojibubble.registry = state.emojibubble.registry||{}; state.emojibubble.help = state.emojibubble.help||""; state.emojibubble.customemoji = state.emojibubble.customemoji||initializeemoji(); state.emojibubble.macro = state.emojibubble.macro||""; state.emojibubble.selectedmacro = state.emojibubble.selectedmacro||""; I know zero about scripts, so forgive my question. Is that initializeemoji supposed to be there? Edit 2: Stripped "initializeemoji()" from that code and replaced it with "" and now it seems to work fine. Edit 3: Scratch the "work fine" part. Now I can't get any emoji from any menu. :)
1611540223
Pat
Pro
API Scripter
Jay R. said: Pat said: I don't know what I can tell you - I'm not seeing that in the installed version I have - do you have two versions active?&nbsp; No, I just have the one version. Edit: At the top of the script, this code block appears: state.emojibubble = state.emojibubble||{}; state.emojibubble.registry = state.emojibubble.registry||{}; state.emojibubble.help = state.emojibubble.help||""; state.emojibubble.customemoji = state.emojibubble.customemoji||initializeemoji(); state.emojibubble.macro = state.emojibubble.macro||""; state.emojibubble.selectedmacro = state.emojibubble.selectedmacro||""; I know zero about scripts, so forgive my question. Is that initializeemoji supposed to be there? Edit 2: Stripped "initializeemoji()" from that code and replaced it with "" and now it seems to work fine. Edit 3: Scratch the "work fine" part. Now I can't get any emoji from any menu. :) Well, here's the thing: javascript works by hoisting when using var and functions, so the function to initialize emojibubble as an object - which is a function (and anonymous functions should also hoist, if I recall) - so there isn't a reason I can discern why the function reference for initializeemoiji declared as a var shouldn't hoist...&nbsp; So, for whatever reason the hoisting isn't working - probably because I'm using assignment instead of function initializeemoji() The solution is to move the state assignment and initializeemoji invocation below the function declaration. Like so. var initializeemoji = function(){ &nbsp; &nbsp; &nbsp; &nbsp; log('in initializeemoji'); &nbsp; &nbsp; &nbsp; &nbsp; let emojilibrary = {}, &nbsp; &nbsp; &nbsp; &nbsp; dupArray = function(arr){ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; let dup = [], iterator=0; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _.each(arr,function(a){ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dup[iterator++]=a; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return dup; &nbsp; &nbsp; &nbsp; &nbsp; }; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_.each(emojiObj, function(emobj,key){ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; emojilibrary[key] = (Array.isArray(emobj))?dupArray(emobj):emobj; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }); &nbsp; &nbsp; &nbsp; &nbsp; return emojilibrary; &nbsp; &nbsp; } &nbsp; &nbsp; state.emojibubble.customemoji = state.emojibubble.customemoji||initializeemoji(); So I'll put in a patch. May be a while before I can get to it though. Apologies.&nbsp; &nbsp;
1611540568
Pat said: Jay R. said: Pat said: I don't know what I can tell you - I'm not seeing that in the installed version I have - do you have two versions active?&nbsp; No, I just have the one version. Edit: At the top of the script, this code block appears: state.emojibubble = state.emojibubble||{}; state.emojibubble.registry = state.emojibubble.registry||{}; state.emojibubble.help = state.emojibubble.help||""; state.emojibubble.customemoji = state.emojibubble.customemoji||initializeemoji(); state.emojibubble.macro = state.emojibubble.macro||""; state.emojibubble.selectedmacro = state.emojibubble.selectedmacro||""; I know zero about scripts, so forgive my question. Is that initializeemoji supposed to be there? Edit 2: Stripped "initializeemoji()" from that code and replaced it with "" and now it seems to work fine. Edit 3: Scratch the "work fine" part. Now I can't get any emoji from any menu. :) Well, here's the thing: javascript works by hoisting when using var and functions, so the function to initialize emojibubble as an object - which is a function (and anonymous functions should also hoist, if I recall) - so there isn't a reason I can discern why the function reference for initializeemoiji declared as a var shouldn't hoist...&nbsp; So, for whatever reason the hoisting isn't working - probably because I'm using assignment instead of function initializeemoji() The solution is to move the state assignment and initializeemoji invocation below the function declaration. Like so. var initializeemoji = function(){ &nbsp; &nbsp; &nbsp; &nbsp; log('in initializeemoji'); &nbsp; &nbsp; &nbsp; &nbsp; let emojilibrary = {}, &nbsp; &nbsp; &nbsp; &nbsp; dupArray = function(arr){ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; let dup = [], iterator=0; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _.each(arr,function(a){ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dup[iterator++]=a; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return dup; &nbsp; &nbsp; &nbsp; &nbsp; }; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_.each(emojiObj, function(emobj,key){ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; emojilibrary[key] = (Array.isArray(emobj))?dupArray(emobj):emobj; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }); &nbsp; &nbsp; &nbsp; &nbsp; return emojilibrary; &nbsp; &nbsp; } &nbsp; &nbsp; state.emojibubble.customemoji = state.emojibubble.customemoji||initializeemoji(); So I'll put in a patch. May be a while before I can get to it though. Apologies.&nbsp; &nbsp; No worries. Thanks for looking into it. I might try to apply your patch to my version and see if it works. If it doesn't, I'll just wait for your patch!
1611541469
Just tried the fix you suggested, Pat, and it's still not working. I can launch the script and the API doesn't crash, but any attempt to use Emojibubble produces a blank text bubble with no actual emoji inside.&nbsp;
1611622554
Pat
Pro
API Scripter
Jay R. said: Just tried the fix you suggested, Pat, and it's still not working. I can launch the script and the API doesn't crash, but any attempt to use Emojibubble produces a blank text bubble with no actual emoji inside.&nbsp; Does pressing "Reset" on the console do nothing as well?&nbsp;
1611667194
Pat said: Jay R. said: Just tried the fix you suggested, Pat, and it's still not working. I can launch the script and the API doesn't crash, but any attempt to use Emojibubble produces a blank text bubble with no actual emoji inside.&nbsp; Does pressing "Reset" on the console do nothing as well?&nbsp; I can't even find a reset button on the console. :)&nbsp;
1611713941
Pat
Pro
API Scripter
Jay R. said: Pat said: Jay R. said: Just tried the fix you suggested, Pat, and it's still not working. I can launch the script and the API doesn't crash, but any attempt to use Emojibubble produces a blank text bubble with no actual emoji inside.&nbsp; Does pressing "Reset" on the console do nothing as well?&nbsp; I can't even find a reset button on the console. :)&nbsp; On the emojibubble console (the handout), in the GM Notes section, there should be a button to reset the emojibubble set.&nbsp;
1611930986
Oh, I know where it's supposed to be theoretically, but it's not there when I click the Console. There is nothing in the Gm Notes field.
1612096914
D'dm
Pro
awesome work, is it possible to insert text? ala speech bubbles for NPCs?
1612120547

Edited 1612120730
Hey Pat. Not sure if you pushed a change to the one-click, but I was able to get Emojibubble working by deleting the Emoji handout and restarting the API. So it was probably a problem with the initial handout getting borked by me. A simple delete and restart has fixed things! One thing I notice, though. There doesn't seem to be an offset for the bubble, which means that part of the bubble appears behind the token (the slender part). Is that intentional? Edit: scratch that. Seems to only happen with one token. Others display fine. Carry on. :)
1612122595
So, I love this script. Love the cleanness of the bubble and how quickly it follows the token. Love the ability to select and apply bubble AND the target ID option. Delighted that the offset scales based on creature size. I see myself using the latter in a game frequently: To indicate which armed monsters have ranged weapons out and which ones have melee. Could even get granular and indicate type of melee weapon (mace, sword, etc.) if I can find the emojis! To indicate when a monster is speaking a language the party doesn't understand. To distinguish a summoned monster from a regular monster (I'm running a devil-themed campaign right now and the need to differentiate regular devil from summoned devil comes up a fair bit). To indicate player activities (investigation, etc.) that take longer-than-combat amounts of game time. Feature requests for future versions: - The ability to have a favorites list. Or even for each player to have a favorites list. (my players will likely find different and silly uses for the script :)) - The ability to change the bubble's background color, at least to black, and hopefully to other colors. Some emojis are a lot clearer and easier on the eye against a dark background.&nbsp; - The ability to control offset scale. I find myself using a lot of top-down tokens these days, and too great an offset on the bubble would have it appearing in apparent transparent space far to the top-right, giving the impression that it's detached from the creature. In fact, this is also an issue for traditional bordered portrait tokens if they are huge in size. Lastly, I would be delighted if one could add small amounts of floating text to the bubble (like a handful of characters, enough for someone to say "halp" or "im dead" or "lmao" etc.) in a future release, even though I would totally understand Pat wanting to keep the script scope and size manageable.
1612699012
Pat
Pro
API Scripter
Apologies for the late response. There are fixes Emojibubble needs, I'll be trying to get them in this weekend. I've been ill.&nbsp;
1612709749
Pat said: Apologies for the late response. There are fixes Emojibubble needs, I'll be trying to get them in this weekend. I've been ill.&nbsp; Take the day off. Rest and you will be more ready to face the Script Daemons...
1613188716
Just popping in to say that my players and I had a ton of fun tonight using Emojibubble. I had an alien, a creature from the Far Realms, imprisoned in a laboratory. The alien was a child who spoke only in emojis and who wanted to go home and be reunited with his family. Once my players understood that they could also activate emojis, they matched the alien, and we had a great little exchange where they figured out what he was saying and how to send him home. Great script, Pat. One request, if it's possible: that emoji and bubble both disappear if the token is deleted. Currently, if you delete a token with an emojibubble active, the latter persists, which is a slight pain (I have to then select and delete the bubble and the emoji).
1613428642
I get: "TypeError: initializeemoji is not a function" When I add this script from the One-Click repository.
1613434968
Anthony said: I get: "TypeError: initializeemoji is not a function" When I add this script from the One-Click repository. I got the same error a week ago. Pat posted a code fix for it earlier in the thread (which also involves deleting the Emojibubble console handout for me but YMMV). I don't think he's updated the one-click yet.&nbsp;