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

Macro to send tooltip text to chat

February 13 (2 months ago)
FFR
Pro

Hi,

Is anyone aware of a macro command that will take the tooltip text of a selected, targeted or named token and send it the chat

My group uses the tooltip to note temporary conditions eg blind until end of next turn and I'd like to incorporate this into an OnMyTurn macro so when the token comes up in the turn order it will post a message to the chat in case we fail to hover over the token to see the tooltip.

Hopefully someone has cracked or can crack this

Thanks


February 13 (2 months ago)

Edited February 13 (2 months ago)

The tooltip text is only available to be referenced by Mod scripts, just like the token or character sheet GM notes field. If you have a Pro subscription, you could use Supernotes or Metascripts or another script to reference the Tooltip field. 

Since you have a Pro subscription, you can use Metascripts with this construction:

@(CharacterName.tooltip)

February 13 (2 months ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter

In Supernotes, the command would be

!pcnote --tooltip


Supernotes also pulls from many other sources, can control who sees the note, and offers a bunch of output templates.

February 14 (2 months ago)
FFR
Pro

Guys,

When posting on the forum my hope is always one of you guys will respond so thanks to both of you.

Jarren,

I have meta scripts installed but can't get this to work. Do you have an example how this would appear in a macro or script card

Keith,

I use Supernotes for a lot of things and really like the output templates. This works but posts it twice in the chat. I changed it to !gmnote --tooltip so it's whispered so the double posting isn't a major issue.

February 14 (2 months ago)
timmaugh
Pro
API Scripter

FFR, remember that metascripts only work in a script call. So, you have to start with a bang (!).

Then, if you want to output something from the message, you have to use {&simple} to that once the metascript work has finished, the message stops being a script call and is, instead, dumped out to chat.

So... just to check the value:

!@(Token Name.tooltip){&simple}

...or, to you use it in a template:

!&{template:default} {{name=Proof of Concept}} {{Tooltip=@(Token Name.tooltip)}} {&simple}