[1.3b56+] Canned Token Speech Interface

These are tools and utilities that make it easier to run games. This includes Lib: macro tokens dropped into MapTool to manage the game, a conversion file for CharacterTool to allow use in MapTool, or just about anything else you can think of -- except graphics with macros and anything specific to a particular campaign framework. Those are already covered by the Tilesets subforum and the Links and External Resources forum.

Moderators: dorpond, trevor, Azhrei, giliath, Gamerdude, jay, Mr.Ice

Post Reply
User avatar
biodude
Dragon
Posts: 444
Joined: Sun Jun 15, 2008 2:40 pm
Location: Montréal, QC

[1.3b56+] Canned Token Speech Interface

Post by biodude »

I was inspired by recent discussions about impersonation, and Rumble's nifty SpeakForMe Utiility, to build an interface for canned speech that can be referred to and used quickly during play.

I also wanted to play around (a lot) with frames, forms, and formatting.

The result is my Interface for Canned Speech!
  • It uses the Token Speech tab (not token properties). This means that I couldn't find a way to delete speech entries within the interface (you have to do that manually in the speech tab of token properties). But, you can edit all you want, and it's all accessible via the chat commands (/tsay). It won't clutter your macros, or token properties.
  • There is an option for one-time impersonated speech (not canned): click on the bottom link of a token's table.
  • It has optional drop-down lists so you can find speeches by typing ('auto-complete').
  • HTML formatted speech is fully supported, but it will break the drop-down menus. This is why there is an option to turn them off. Formatted speech appears almost as it will in chat, except maybe color (it gets the link color in the interface, unless span tags with style attributes are used).
  • Chat output can be formatted to match display options for Font Face and Font Size (with the option to turn this off such that output matches chat defaults).
  • Display preferences can be saved globally (by the GM), or in individual tokens for players.

Anyway, here's the Lib:Token, and some screenshots. All feedback welcome.
Happy Holidays!

UPDATE (2010-06-20):
v1.1 - added option to format chat output to match display preferences (for font face & size).
Lib-jaw-CannedSpeech-1.1-1.3b56.rptok
Lib Token for Canned Speech Interface (v1.1)
(58.34 KiB) Downloaded 221 times
Attachments
Example Dialog
Example Dialog
Example Dialog.png (210 KiB) Viewed 5304 times
fully collapsed interface
fully collapsed interface
Screen shot 2009-12-15 at 10.42.32 PM.png (196.84 KiB) Viewed 5302 times
Display Preference options
Display Preference options
Screen shot 2009-12-15 at 10.40.44 PM.png (223.21 KiB) Viewed 5304 times
Lib-jaw-CannedSpeech-1.3b56.rptok
(57.24 KiB) Downloaded 187 times
Last edited by biodude on Sun Jul 04, 2010 7:24 am, edited 3 times in total.
"The trouble with communicating is believing you have achieved it"
[ d20 StatBlock Importer ] [ Batch Edit Macros ] [ Canned Speech UI ] [ Lib: Math ]

User avatar
Daniel
Giant
Posts: 132
Joined: Thu Nov 20, 2008 3:49 am
Location: Germany (GMT +1)

Re: [1.3b56+] Canned Token Speech Interface

Post by Daniel »

Looks really nice. Need to DL and experiment a little.
"This web of time [...] embraces every possibility. We do not exist in most of them. In some you exist and not I, while in others I do, and you do not. [...] In yet another, I say these very same words, but am an error, a phantom."

J.L. Borges

neofax
Great Wyrm
Posts: 1694
Joined: Tue May 26, 2009 8:51 pm
Location: Philadelphia, PA
Contact:

Re: [1.3b56+] Canned Token Speech Interface

Post by neofax »

Is there any way I can change the fonts? I can add them to the drop down, but they always show up as Arial in the chat window. I know that I will need to send the font files to my players, but I would like to have a more region appropriate font displayed.

User avatar
biodude
Dragon
Posts: 444
Joined: Sun Jun 15, 2008 2:40 pm
Location: Montréal, QC

Re: [1.3b56+] Canned Token Speech Interface

Post by biodude »

neofax wrote:Is there any way I can change the fonts? I can add them to the drop down, but they always show up as Arial in the chat window. I know that I will need to send the font files to my players, but I would like to have a more region appropriate font displayed.

Good question: I hadn't thought of that :oops:

To be honest, I built this tool as pretty "bare-bones" just to add a few interface features to the speeches stored on a token. I hadn't put much thought into how the speech text is displayed in chat.

Which of the following features would you find most useful (listed in order of easiest to most annoying to implement)?
1. Display text in chat exactly as it appears in the frame (for all speech)
2. Separate display options for frame & chat output (for all speech)
3. formatting for each individual speech*


* Note that the speech text can contain html, which allows a lot of formatting of your text, which will be applied to the chat output, as well as display within the frame.** For this reason, combined with my limited time & resources and the amount of work involved, I doubt I would ever fully implement this option (but check out Rumble's SpeakForMe Utility for some simple options along this line, without access to the saved speeches on the token). But, let me know which you think is most useful, and I'll see what I can do.

** After some experimenting, I noticed that formatting text in the chat output is not as simple as I would have expected, due to the HTML renderer within MapTools. The font can be changed, but this is much easier to do using a font tag (<font face='Font Name'></font>) than using CSS within a span tag. This grates against current standards, but then again, we are dealing with an acknowledged out-of-date HTML rendering engine. *shrug*
"The trouble with communicating is believing you have achieved it"
[ d20 StatBlock Importer ] [ Batch Edit Macros ] [ Canned Speech UI ] [ Lib: Math ]

neofax
Great Wyrm
Posts: 1694
Joined: Tue May 26, 2009 8:51 pm
Location: Philadelphia, PA
Contact:

Re: [1.3b56+] Canned Token Speech Interface

Post by neofax »

Personally, for my current purposes I would like to have number 1. Chat and frame look and act the same. However, I can see the usefulness of number 3. I just added a font to the font line and then the fonts in the Speech.css macro, but that did not work and I know very little HTML, but am more than willing to learn. :) I have used Rumble's Speak4Me utility, but did not know it could handle HTML, but I would like to have the speech saved for ease of use.

Malekith
Giant
Posts: 245
Joined: Wed Jan 07, 2009 4:36 pm
Location: Gloucester, England
Contact:

Re: [1.3b56+] Canned Token Speech Interface

Post by Malekith »

Mind if I butt in?
I was helping Rumble with his Speak for Me and how the html parser works. It is a very confusing thing. Biodude is right in that you'd think with the current standards that as the MT html supports span tags that would be the preferred method, however doing so confuses the parser for some reason (especially colours, I haven't played with fonts or the canned speech tbh but I'm taking biodude's discoveries as correct). With colours I know that what happens is that the chat window itself applies the users chosen text colour in the chat frame to the macro output with a font tag and if there's <font color> and <span color> it seems pot luck to which it chooses however by setting <font color> in the macro the chat window doesn't change it. I'm not sure to what extent this holds true for fonts, but I'm betting and guessing from what biodude said that there's funky stuff happening.
I would go with number 1 of those options myself and then just test/practice using html in the speech when I want differences.

Also as an aside to get custom fonts showing up without sending them to the players you could try the CSS method of @font-face: ... (it's not hard to google), however I'm not sure what levels that'd be supported by and whether MT would register it like a browser would at all (I'd hazard a guess to say it would but it's all a bit special), and it depends whether for yourself the hassle of uploading the fonts to a website on top of that worry is worth it at all over just emailing the fonts to the players.

Mal
Mal

User avatar
biodude
Dragon
Posts: 444
Joined: Sun Jun 15, 2008 2:40 pm
Location: Montréal, QC

Re: [1.3b56+] Canned Token Speech Interface

Post by biodude »

neofax wrote:Is there any way I can change the fonts? I can add them to the drop down, but they always show up as Arial in the chat window. I know that I will need to send the font files to my players, but I would like to have a more region appropriate font displayed.


Done. I implemented option #1, above.
New version available for download in the original post (use the link in the post, not the old attachment at the end).

I added an option to format chat output using the display options for Font Face and Font Size.
I also moved the lists for the various option drop-downs: they are now at the top of the "Canned Speech Frame" macro. Feel free to add or modify for your preferred fonts / sizes.

I haven't had time to test too much with the HTML formatting, but I used <div> tags, rather than <span> tags, which seemed to work in previous testing, and means I don't have to use <font> tags :P . span tags worked fine in my b56 build, but things may have changed in later versions, so I'm hoping this will be robust without causing too many problems.

Let me know if there are any problems.


@Malekith: '@font-face' appears to be intended for stylesheets, which are not easy to implement in the chat pane (if at all), rather than inline styling, which is what I'm relying on for chat formatting at this point. I strongly suspect that '@font-face' is not supported by MapTool (CSS3), but thanks for letting me know. Then again, I have not had the opportunity to test it in practice. Ultimately, if you want everyone to see text using the same font, it involves providing it to them, whether using '@font-face', or just sending them the font.
"The trouble with communicating is believing you have achieved it"
[ d20 StatBlock Importer ] [ Batch Edit Macros ] [ Canned Speech UI ] [ Lib: Math ]

ziltmilt
Dragon
Posts: 331
Joined: Sun Apr 29, 2007 9:28 pm
Contact:

Re: [1.3b56+] Canned Token Speech Interface

Post by ziltmilt »

Forgive my ignorance, but what's the advantage of using this over simply right-clicking a token and selecting a specific speech option?

User avatar
JonathanTheBlack
Dragon
Posts: 544
Joined: Mon Jun 28, 2010 12:12 pm
Location: I'm the worm...

Re: [1.3b56+] Canned Token Speech Interface

Post by JonathanTheBlack »

ziltmilt wrote:Forgive my ignorance, but what's the advantage of using this over simply right-clicking a token and selecting a specific speech option?

You know what the speech option is before you select it?

User avatar
biodude
Dragon
Posts: 444
Joined: Sun Jun 15, 2008 2:40 pm
Location: Montréal, QC

Re: [1.3b56+] Canned Token Speech Interface

Post by biodude »

ziltmilt wrote:Forgive my ignorance, but what's the advantage of using this over simply right-clicking a token and selecting a specific speech option?

I wrote this tool mostly to see if I could, but here are the main advantages I was trying to achieve (feel free to disagree):
  • View, Edit and Use canned Speeches all in one place, with a single interface.
    No interface built into MapTool lets you do all these things in one place.
  • One-click simplicity
    It takes time to right-click, find the 'Speeches' option, then find the speech ID, which doesn't even show you what the output will ultimately be. I prefer the interface I designed (others may not).
  • Do the above for multiple tokens at once (a single frame can display speeches for multiple tokens).
  • Offer a few more options for display of token speeches, and (now) their appearance in chat, as well.

Granted, I could have achieved everything in this tool by storing data in token properties, rather than speeches: this would have more easily allowed deletion of speeches within the interface. However, part of the whole purpose was to have something that integrated with MapTool's existing infrastructure, which leaves us with a few minor restrictions.

It's ultimately up to personal taste. You don't have to use this tool if you don't think it's useful, but I hope it makes life a little easier for you if you do use a lot of canned speech. Plus, all the changes you make using this tool are accessible using all the same UI elements in the rest of MapTool (right-click, /tsay, etc.).

On a personal level, I also used this project as a simple way to practice building html frames, working with user-interface elements, submitting html forms, etc. I decided to share it with the community, in case someone else found it useful (as a drop-in resource, or to look at the code). A few people seem to, but I'm always open to suggestions to make it better.
"The trouble with communicating is believing you have achieved it"
[ d20 StatBlock Importer ] [ Batch Edit Macros ] [ Canned Speech UI ] [ Lib: Math ]

ziltmilt
Dragon
Posts: 331
Joined: Sun Apr 29, 2007 9:28 pm
Contact:

Re: [1.3b56+] Canned Token Speech Interface

Post by ziltmilt »

Ah, OK. I get it ... yes, that is much easier. And the interface is pretty intuitive. Thanks for sharing!!

User avatar
nolgroth
Dragon
Posts: 441
Joined: Fri Sep 21, 2007 6:10 pm

Re: [1.3b56+] Canned Token Speech Interface

Post by nolgroth »

Awesome resource which I plan on using just as soon as I get an ongoing game together again. Thanks.

Post Reply

Return to “Drop-In Macro Resources”