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 .
×

Hover Text in Chat Window

High, Is there a way for text sent to the chat window from a macro to include hover text when you mouse over it. For example I'll have a macro that creates ability buttons for a character. So if one of these buttons is "parry" I'd like the hover text to describe what parry does so my player can read it before clicking the button to send the next message to chat. Hope that makes sense
1786734154
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
It's pretty easy to do if the button is created by a script. You define the <a> link properties of the button with a "title" attribute. That functions as hovertext. It's a bit more involved with a button created by a link in a macro. There is a trick to format a macro button: [Title of my button](!command "title="This is the Hovertext) This takes advantage of the way command buttons are passed to inject some html into the button. The trick is usually invoked to add styling with the "style" attribute: [Title of my Button](!command" title="test" style="color:#ddd;font-size:14px;font-weight:bold;line-height:18px; width:98%;display:block;background-color:#333;padding:2px;margin:3px 0px;cursor:default) The key to the construction is: [button name](code) where the code is: Command Quote Space HTML styling with style or title attributes no trailing quote
Keith, Exactly what I was looking for so thanks as always. 1 last question. How would I reconstruct  [button name](code) To call an ability from another character sheet ?
1786782496
StéphaneD
Pro
Sheet Author
API Scripter
FFR The syntax would be  [button name](~character name|macro name) Works for both an ability defined in the Attributes & Abilities tab of the character sheet, or a roll or action button on the charcter sheet itself - provided you know the name of such a button, either because the developer of the sheet documented it, or you inspected the HTML code
1786805240
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
FFR said: Keith, Exactly what I was looking for so thanks as always. 1 last question. How would I reconstruct  [button name](code) To call an ability from another character sheet ? You can find hints for most such constructions here:  Chat Menu
Hi, Tried [button name](~character name|macro name) (code) but instead of the text hovering it appears in the chat window. Any ideas
1786815372

Edited 1786815500
Gauss
Forum Champion
use: [button name](~character name|ability macro name"CSS code") Example:  [Longbow](~George|Longbow"title="This is the Hovertext)