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
This post has been closed. You can still view previous posts, but you can't post any new replies.

Tooltips can now be added to Tokens/Cards

October 05 (3 years ago)
Eve
Roll20 Team

With our release today you can now add tooltips to any token or card on the VTT! These tooltips will appear when the mouse cursor is hovered over the token and can be used to provide additional context about what your players see. They’re also fully compatible with screen reader applications!

To get started using tooltips in your game simply double click the token you would like to add tooltips to. You’ll find the newly added Tooltip section in the Token Settings. Once you’ve entered the text you want to appear when the mouse is held over that token simply put a check in the box labeled “Show” and then save your token settings. Please note that there is a 150 character limit for tooltips text.

If you need help with token settings for your game you can find more information in the Token Features article in the Help Center.

If you have any questions or feedback please let us know in this thread!

October 06 (3 years ago)

Edited October 07 (3 years ago)

Is there the ability to turn off/on who can see it? For example if a DM wanted to put possible NPC/Monster info in the tooltip to better play the creature or possibly its the NPC/Monsters line or first action. Would be good to toggle this for GM view only, just like name, bars, bubbles and such. I know the GM notes are available on the Token and the Character sheet but the tooltip is much faster and more intuitive to use during play.

Possibly just the see checkbox with the ability to select if its visible to everyone or just the editors.

October 06 (3 years ago)
Tom
Pro

That sounds like a really good option to have so I'll second this if its not already available please :)


Tom

October 06 (3 years ago)

Edited October 06 (3 years ago)
Gold
Forum Champion

Another area that's fully accessible to Screen Readers is the Roll20 text chat, on the right side. Which doesn't require hovering-over a token or card.

It would be superior to be able to type Text onto Cards (not just into a Tooltip), and be able to Send/Print that card's text to the chatroom.

There are already lots of cards (in Roll20's own Marketplace and published games here) that far-exceed 150 characters worth of text. That's only enough for a title sentence ("Queen Of Hearts"), not a full Effects description in some games ("This potion gives your character the ability to...").

See this Suggestion thread to support greater features for text on Cards:

https://app.roll20.net/forum/post/1292722/allow-text-inside-card-decks

Thanks for this latest innovation that truly helps some people with accessibility if they want to hover for tooltip + screenreader, that's really great.

Eve, has it been proposed, or approved and scheduled, that Roll20 could add more Text accessibility features to Card Decks, beyond this introductory Tooltip step?

In the meantime, this question for greatest utility of the new Tooltip feature:

How do we display the Tooltip text, in roll20's text chat room? API? Macro?

October 06 (3 years ago)
The Aaron
Roll20 Production Team
API Scripter

Gold said:

How do we display the Tooltip text, in roll20's text chat room? API? Macro?

Select tokens and issue:

!show-tip

or for whispered:

!wshow-tip


Code:

on('ready',()=>{


  const s = {
    container: `display:inline-block;border:1px solid #999;border-radius:.2em; padding: .1em;background-color:white;width:100%;`,
    img: `max-width: 5em;max-height:5em;display:block;overflow:auto;background-color:transparent;float:left;margin:.5em;`,
    quote: `font-weight: bold;font-style:italic;padding:.3em;`,
    clear: `clear:both;`
  };
  const f = {
    container: (d,q) => `<div style="${s.container}">${d}${q}${f.clear()}</div>`,
    item: (d)=>`<img src="${d}" style="${s.img}">`,
    quote: (q)=>q?`<div style="${s.quote}">${q}</div>`:'',
    clear: () => `<div style="${s.clear}"></div>`
  };

  on('chat:message',msg=>{
    if('api'===msg.type && /^![w]?show-tip(\b\s|$)/i.test(msg.content) && playerIsGM(msg.playerid)){
      let who = (getObj('player',msg.playerid)||{get:()=>'API'}).get('_displayname');
      let whisper = /^!w/i.test(msg.content);
      let msgs = (msg.selected || [])
        .map(o=>getObj('graphic',o._id))
        .filter(g=>undefined !== g)
        .filter(g=>0 !== g.get('tooltip').length)
        .map(t=>f.container(f.item(t.get('imgsrc')),f.quote(t.get('tooltip'))))
        ;
      if(msgs){
        sendChat('',`${whisper ? `/w "${who}" `: ''}${msgs.join('')}`);
      }
    }
  });
});


October 06 (3 years ago)

Edited October 06 (3 years ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter

Also, Reporter can do this:

!report --t|tooltip



Or prettier:

!report --t|tooltip --- ----compact|true title|tooltip| showheader|false showfooter|false source|false

Even works on multiple selections:



October 06 (3 years ago)
vÍnce
Pro
Sheet Author

Looks like we can use the "Show-tip" and/or "Reporter" scripts (pro req) to view tooltips without the need to hover over tokens and cards... What about a script to enter tooltip text? Perhaps a new TokenMod feature? ;-)

October 06 (3 years ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter

I believe the Aaron has said he has already updated Token-mod, but it won't be available until the next pull.

October 06 (3 years ago)

I think there's some great potential for using Tooltips, especially for players using screen readers.  But I'm not sure I'll use them much yet, as I've already noticed a few things that conflict pretty heavily with Explorable Darkness.  As a player, moving your mouse over the screen, even in areas that are not currently visible will show all tooltips, and will likely give away things that the GM intends to keep hidden.

Also, my first inclination was to use the tooltips in place of the Nameplate, as I thought it would be nice when there are several tokens bunched together for players to hover over one to see its name.  But unfortunately, if you have several tokens in close proximity, when you initially hover over a token, the tooltip does not disappear until you are no longer hovering over any token.  So I tested it out, and if you have several tokens in a line, the first tooltip you get when you hover over a token will remain even after the cursor has moved onto another token if there is no break or space between them.

With that being said, there are definitely some things that this could be used for, such as if there is a noise in a room or hallway - you could use a transparent token with a tooltip and players could 'find' exactly where the noise is occurring.  I vaguely remember a request for something like that in the past.

But I'd love to hear other people's ideas on how they're planning on using these tooltips! I'm sure there's lots of ways of using them that I'm not even considering yet.

October 06 (3 years ago)

Edited October 06 (3 years ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter

Some uses I have come up with so far (with additions from other parts of the thread):

1) Simple Map pins. I have an elaborate system of map pins already, but adding a tool tip to them gives a quick identification.

2) NPC identifiers. My current campaign takes place in a single village, that the players got to populate. Each villager has token notes for me, but now has a tooltip for them, to remind them that the assistant banker speaks three languages, or the captain of the guard has a drinking problem.

3) Putting clues on the map. (haven't tried yet). Put an invisible token on the map with notes like "Rotten smell here", or over a book image with the title of the book.

4) Short price lists over store fronts.

5) I use a card deck to track potions. Cards like healing potions now have a tooltip with the appropriate number of dice of healing.

6) Setting the effects of conditions on tokens.

Once the Token-mod update is available in One Click, there will be many more uses. Such as putting clues and rumors on NPCs and over map items that are dependent on the success level of an investigation check. Or a chest that lists its contents when opened.

October 06 (3 years ago)

Hmm, I'm considering using the tooltips for tracking D&D 5E conditions rather than the status markers. Problems with status markers are they are visible to everyone and give away an "invisible" token, on some maps, they completely, or nearly completely, obscure the token and remembering what condition the status marker represents...

A tooltip with Paralyzed - (plus the text to remind the mechanical effects the condition imposes) would be very useful, but application would need to be done with the API because I wouldn't want to do all that typing (or even cut-paste) every time a condition is applied.

Something to consider. I'll have to play with it.

October 06 (3 years ago)
The Aaron
Roll20 Production Team
API Scripter


Doug E. said:

Problems with status markers are they are visible to everyone and give away an "invisible" token

Bump can help with that part at least.

October 06 (3 years ago)
timmaugh
Pro
API Scripter

Fetch has been updated to use this, too:

@(selected.tooltip)
@(Token Name.show_tooltip)
@(@{target|token_id}.tooltip)

(although the show_tooltip is currently not correctly updated as the API sees it... a change in the UI doesn't update the value that the API can see).

October 06 (3 years ago)

Edited October 06 (3 years ago)
Mads
Pro

Got this idea from the 1999 video game "Baldur's Gate Tales of the Sword Coast. Would it be possible to track a tokens HP, and output something like this in the tooltip:

 

Barely Injured = 20-30% dmg taken

Injured = 40-50% dmg taken

Badly Injured = 60-70% dmg taken

Near Death = 80-90% dmg taken

Death = 100% dmg taken

October 06 (3 years ago)
The Aaron
Roll20 Production Team
API Scripter

elias b. said:

soy nuevo como entro a un juego de rol

Inicie un nuevo hilo para esta pregunta aquí.

Start a new thread for this question here.

October 06 (3 years ago)
The Aaron
Roll20 Production Team
API Scripter


Mads said:

Got this idea from the 1999 video game "Baldur's Gate Tales of the Sword Coast. Would it be possible to track a tokens HP, and output something like this in the the tooltip:

 

Barely Injured = 20-3% dmg taken

Injured = 40-50% dmg taken

Badly Injured = 60-70% dmg taken

Near Death = 80-90% dmg taken

Death = 100% dmg taken

Definitely!  That's a great idea and wouldn't be very hard at all.  Would be nice if we had access to colors and fonts for this sort of thing.

October 06 (3 years ago)
Gold
Forum Champion

The tooltips section is in-the-way on the Token Dialog box.

That's creating extra scrolling every time you want to adjust the Aura Radius of a token.

Can Tooltips-section be moved to the bottom of the Token Dialog, under Auras? Or moved to a separate tab like GM Notes for Tokens?

October 06 (3 years ago)
JP
Plus

Dang, @keithcurtis, I kinda want to see your game sessions in action now. When are you going to start streaming them! :-)

October 06 (3 years ago)
Eve
Roll20 Team


Gold said:

Eve, has it been proposed, or approved and scheduled, that Roll20 could add more Text accessibility features to Card Decks, beyond this introductory Tooltip step?

This is definitely something that has been discussed but I don't have much more I can say about it yet.

By the way, I really appreciate all of this feedback so far! I've got a ton of notes I'm taking back to the team so thank you all so much.

October 06 (3 years ago)


Mads said:

Got this idea from the 1999 video game "Baldur's Gate Tales of the Sword Coast. Would it be possible to track a tokens HP, and output something like this in the tooltip:

 

Barely Injured = 20-30% dmg taken

Injured = 40-50% dmg taken

Badly Injured = 60-70% dmg taken

Near Death = 80-90% dmg taken

Death = 100% dmg taken


Thats a great idea!

October 06 (3 years ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter

For those of you who use Stylus, here is a bit of css code to move the character count to above the field. I don't know about others, but I have to scroll to see it.

.largedialog small  {
    position:relative;
    top:-95px;
}

Before:




After:


October 06 (3 years ago)
timmaugh
Pro
API Scripter


Mads said:

Got this idea from the 1999 video game "Baldur's Gate Tales of the Sword Coast. Would it be possible to track a tokens HP, and output something like this in the tooltip:

 

Barely Injured = 20-30% dmg taken

Injured = 40-50% dmg taken

Badly Injured = 60-70% dmg taken

Near Death = 80-90% dmg taken

Death = 100% dmg taken


Here's a method to do that now...

!forselected(^) token-mod --on show_tooltip --set tooltip|{^&if @^(selected.bar1_max) > [^\][^\]0.8 * (@^(selected.bar1_max)) \^]\^].value}"No visible injury"{&^elseif @^(selected.bar1_max) > [^\][^\]0.7 * (@^(selected.bar1_max)) \^]\^].value}"Barely Injured"{&^elseif @^(selected.bar1_max) > [^\][^\]0.5 * (@^(selected.bar1_max)) \^]\^].value}"Injured"{&^elseif @^(selected.bar1_max) > [^\][^\]0.3 * (@^(selected.bar1_max)) \^]\^].value}"Badly Injured"{&^elseif @^(selected.bar1_max) > 0}"Near Death"{&^else}"Dead"{^& end}

Note that the original range of damage taken did not represent the entire spectrum of damage possible (where does 35% damage taken go? it's between tiers), so the above thresholds might need to be adjusted based on where you want the breakpoints to be.

Note, too, that this requires you to select the token(s) you wish to update. You could use a {&select} statement to virtually select the tokens, provided you had a list of them (or the query metascript I'm working on), but even manually selecting them and then running the above command would be a whole lot quicker than manually checking/updating them.

REQUIRED SCRIPTS:

Token-Mod (the newest version, as of posting still pending in the 1-click merge)
Fetch (the newest version, also still in the 1-click merge pipeline)
SelectManager
ZeroFrame
APILogic


October 07 (3 years ago)

Ok when i add a Note to the Token using the Show tool tip is there a way for me to not let my players see but i can

October 07 (3 years ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter

Not currently, no. There have been a couple of requests for this function.

October 07 (3 years ago)
Mads
Pro


timmaugh said:


Mads said:

Got this idea from the 1999 video game "Baldur's Gate Tales of the Sword Coast. Would it be possible to track a tokens HP, and output something like this in the tooltip:

 

Barely Injured = 20-30% dmg taken

Injured = 40-50% dmg taken

Badly Injured = 60-70% dmg taken

Near Death = 80-90% dmg taken

Death = 100% dmg taken


Here's a method to do that now...

!forselected(^) token-mod --on show_tooltip --set tooltip|{^&if @^(selected.bar1_max) > [^\][^\]0.8 * (@^(selected.bar1_max)) \^]\^].value}"No visible injury"{&^elseif @^(selected.bar1_max) > [^\][^\]0.7 * (@^(selected.bar1_max)) \^]\^].value}"Barely Injured"{&^elseif @^(selected.bar1_max) > [^\][^\]0.5 * (@^(selected.bar1_max)) \^]\^].value}"Injured"{&^elseif @^(selected.bar1_max) > [^\][^\]0.3 * (@^(selected.bar1_max)) \^]\^].value}"Badly Injured"{&^elseif @^(selected.bar1_max) > 0}"Near Death"{&^else}"Dead"{^& end}

Note that the original range of damage taken did not represent the entire spectrum of damage possible (where does 35% damage taken go? it's between tiers), so the above thresholds might need to be adjusted based on where you want the breakpoints to be.

Note, too, that this requires you to select the token(s) you wish to update. You could use a {&select} statement to virtually select the tokens, provided you had a list of them (or the query metascript I'm working on), but even manually selecting them and then running the above command would be a whole lot quicker than manually checking/updating them.

REQUIRED SCRIPTS:

Token-Mod (the newest version, as of posting still pending in the 1-click merge)
Fetch (the newest version, also still in the 1-click merge pipeline)
SelectManager
ZeroFrame
APILogic


Thank you timmaugh and Aaron for your amazing scripts, I use them in all of my games. 

I like your solution, but agree that there is a lot of manual editing to make it relevant. I am aiming for something like the Aura/Tint HealthColor script, where it automatically apply to the HP of all tokens. 

Corrected the values:

Uninjured = 0% dmg taken

Barely Injured = 0-25% dmg taken

Injured = 25-50% dmg taken

Badly Injured = 50-75% dmg taken

Near Death = 75-100% dmg taken

Death = 100% dmg taken


October 07 (3 years ago)
Andrew R.
Pro
Sheet Author

I run 13th Age and I’m going to try putting the AC, PD, & MD in the tooltip of my monster tokens. I don’t keep that secret from my players, so visibility isn’t an issue for me. 

October 07 (3 years ago)


Andrew R. said:

I run 13th Age and I’m going to try putting the AC, PD, & MD in the tooltip of my monster tokens. I don’t keep that secret from my players, so visibility isn’t an issue for me. 

Excellent idea! I like having that info at a glance and this doesn't require an extra bar.

October 07 (3 years ago)
Tony R.
Pro
Sheet Author

This is a great feature! I echo DougA's point. If there was a way to make its visibility to players togglable, it would be super helpful to GMs to quickly reference things like a monster's resistances, for example. 

October 07 (3 years ago)
Andrew R.
Pro
Sheet Author


Andrew R. said:

I’m going to try putting the AC, PD, & MD in the tooltip of my monster tokens.

It looks like the Show checkbox isn't preserved for a default token. I updated the default token for a monster as above but dragging out a new token from the Journal entry gives a token that doesn't show the tooltip. The text is there but the Show checkbox is not checked. 

October 08 (3 years ago)

Is anyone having major lag issues when editing tokens, now that this has rolled out? Roll20 is working completely fine, but then as soon as I edit a text field for the token (either the name or the tooltip), it lags up that token, and then lags up basically the entire page.

October 08 (3 years ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter

No. But if you are using Firefox, try turning off Autofill and Autocomplete. That is a known cause of that behavior.

October 08 (3 years ago)

Hmmm, I'm using Chrome and I have those disabled anyways, and I believe I have hardware acceleration available (to fix another issue).

October 08 (3 years ago)

Edited October 08 (3 years ago)

This is something I have wanted for a long while so glad it has arrived. But a couple of QoL things that would be great:

1.) When I set up a token with a Tooltip and tick show, then save the token as the default, the text stays but the Show is unticked. I would appreciate it if it saved this preference.

2.) I assume that if the tooltip says show, it shows for everyone? Or is it just the person who has permissions to the sheet it is attached to? I would, if possible, like the option to have a Show to all or just a Show to DM option on the tooltip. I intend to use this to have easy-to-hand info about certain tokens characters without having to open up a bunch of sheets, without the players seeing SOME of them.


I can only assume Show means everyone can see the tooltip and that isn't ideal for some of my intended uses.

Many thanks!


(Edit: I have just realised other people have raised both of these, so I effectively second both of these being added/fixed when possible) :)

Thank you for this feature! My new favorite thing is to put tooltips on invisible tokens.

October 11 (3 years ago)
Andrew R.
Pro
Sheet Author


Andrew R. said:

It looks like the Show checkbox isn't preserved for a default token. 

I've put in a Help Center request #69288 about this.



October 11 (3 years ago)
Eve
Roll20 Team

I just want to say thanks again to everyone who has provided feedback about tooltips. I'm going to close this thread tomorrow evening at which point I'll start collecting all of the feedback together to be passed along to our development team for possible improvements down the road. If there's anything you still want to add now's definitely the time to do it!

October 11 (3 years ago)

Edited October 11 (3 years ago)
Gold
Forum Champion

A macro that does what that API script from The Aaron (above) does.

  • Send Tooltip text to Chat: Allow tooltips to "print" into the Roll20 text chat area, by typing some macro or hitting some button, or combo-keyclicking the token/card in some way. PRO users can do this by API script snippit. Allow this ability for Free accounts.
October 11 (3 years ago)

Edited October 11 (3 years ago)
vÍnce
Pro
Sheet Author


Gold said:

A macro that does what that API script from The Aaron (above) does.

  • Allow tooltips to "print" into the Roll20 text chat area, by typing some macro or hitting some button, or combo-keyclicking the token/card in some way. PRO users can do this by API script snippit. Allow this ability for Free accounts.

IF we could actually move our cursor over the tooltip, maybe a context-menu option (ie right-click/ctrl-click: send to chat)


October 12 (3 years ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter

Feedback:

First off, even if nothing else is done to these, it's a great addition. It's something that has been requested on and off for years.

Things I would like to see (in order of preference):

  1. "Show Tooltip" option needs to be correctly settable by the API, and needs to be persistent with the default token.
  2. It would be nice to be able to control player visibility, as is currently the case with auras and nameplates. A similar level of flexibility would be most welcome.
  3. It might be good to have them exposed to macro calls: @{selected|tooltip}. This would give users the ability to store macro-actionable values, like they currently can with token bubbles. 
  4. Currently, they are being sanitized. This is probably a good thing. But if the API could send html with inline styles, this could open whole new worlds of display beauty.


October 12 (3 years ago)
Andrew R.
Pro
Sheet Author

I'd like to see Markdown formatting in the tooltip. So I can put 

**AC** 27 **PD** 23 **MD** 25

in my 13th Age Glorantha monsters. 

October 12 (3 years ago)
Gold
Forum Champion

What keithcurtis said, for the macro code, GUI, method to print the tooltip text into Chat:

Yes, please, this.

keithcurtis said:

  • It might be good to have them exposed to macro calls: @{selected|tooltip}. 


Also Markdown support, just like Chatroom has.. what Andrew said.

October 12 (3 years ago)
Eve
Roll20 Team

I'd like to thank you all again for the feedback and suggestions. I'm closing this thread but if you run into any problems please send in a request through the Help Center.