Page 1 of 1

Tooltips in broadcast...possible?

Posted: Sat Apr 22, 2017 9:21 pm
by xavram
If this is possible (to display tooltips within a broadcast message), could someone provide an example of this please?

Re: Tooltips in broadcast...possible?

Posted: Sun Apr 23, 2017 4:01 am
by aliasmask
broadcast outputs raw text, so if you include the HTML with a tool tip (can't use the t roll option) it will show your tool tip.

Code: Select all

[H: broadcast('<span title="this is my tooltip">This is my text</span>')]

Re: Tooltips in broadcast...possible?

Posted: Sun Apr 23, 2017 11:23 am
by xavram
Hmm...I'm thinking more like being able to see the breakdown of somewhat complicated roll results.

Right now, for example, if you mouse over the total to hit roll in my frame work, you see the tool tip which breaks down...

the die roll
the attack bonus
the state bonus
misc bonus

and like 4 other things.

I'm trying to figure out how I could put THAT into your example.

Re: Tooltips in broadcast...possible?

Posted: Sun Apr 23, 2017 11:36 am
by xavram
Better example.

Current code puts together the output string like so...


[h : output = MisfortuneText + "<b>" + getName() + "</b> rolls a " + saveName + " save: " + "<b>" + sum(roll,saveValue,modifier,-stateMod,BuffSave) + "</b>"]
[g,s : ouput]


And when you mouse over this, you see the breakdown of the "sum" function.

Is that possible in a broadcast?

Re: Tooltips in broadcast...possible?

Posted: Sun Apr 23, 2017 12:33 pm
by aliasmask
Yeah, you just need to write the html for it. Here's an old example of an attack macro I wrote for someone along with some other useful tidbits. All the output is saved to a variable.

http://forums.rptools.net/viewtopic.php ... ck#p233681

Re: Tooltips in broadcast...possible?

Posted: Sun Apr 23, 2017 1:33 pm
by xavram
Good stuff AM, thanks!

Re: Tooltips in broadcast...possible?

Posted: Sun Apr 23, 2017 4:41 pm
by xavram
AliasMask, just wanted to give you a big "THANKS!" for pointing me the direction of that link. Although its going to take some work on my end, the end result of these changes are going to be great and there's no way I would have thought to do that without looking at the example you showed.

So again, THANKS!!!!

Re: Tooltips in broadcast...possible?

Posted: Sun Apr 23, 2017 5:05 pm
by aliasmask
Glad to be of service ;)

Re: Tooltips in broadcast...possible?

Posted: Sun Apr 23, 2017 8:50 pm
by xavram
Now if you could just tell me where to get those "WotC Images" that are in your signature line and you'll be the Maptool hero of the week...:)

Re: Tooltips in broadcast...possible?

Posted: Mon Apr 24, 2017 3:04 am
by aliasmask
xavram wrote:Now if you could just tell me where to get those "WotC Images" that are in your signature line and you'll be the Maptool hero of the week...:)
I posted new links as the last comment of the thread.

Re: Tooltips in broadcast...possible?

Posted: Mon Apr 24, 2017 3:34 pm
by xavram
Thanks again AM, these will be very useful when i start digging into my next campaign.