SpeakForMe: Speak as a token without impersonating it

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

User avatar
Rumble
Deity
Posts: 6235
Joined: Tue Jul 01, 2008 7:48 pm

SpeakForMe: Speak as a token without impersonating it

Post by Rumble »

One of the more tedious parts of GMing is remembering to impersonate the right guy while I'm running a game, so that I can speak "as" that character and preserve as much immersion as I can. The reason its tedious is that impersonation is still a matter of finding the token, right-clicking, selecting impersonate, and going to the chat window to type.

BUT! That is no longer the case!

The attached Library token, "Lib:SpeakForMe", contains a set of macros that will provide you a frame where you can select the token to do the speaking, choose a text color, and enter text - which will then be sent to the chat window as if the token was being impersonated (in other words, it will show the token's icon and name, and the message will appear to be from that token).

It's not an actual automated impersonation - you won't stay as that token, and it doesn't support /me commands (although you could just write the text in that format), but it's a way to speak as your various diabolical NPCs a little easier.

Now - if someone else already made something like this, I'll just be like, "Oh."

The library token was made in b63, but will probably work back to b56. Not positive.
Attachments
speakEasy.rptok
(62.62 KiB) Downloaded 385 times
Last edited by Rumble on Fri Feb 05, 2010 10:16 pm, edited 6 times in total.

User avatar
Rumble
Deity
Posts: 6235
Joined: Tue Jul 01, 2008 7:48 pm

Re: SpeakForMe: Speak as a token without impersonating it

Post by Rumble »

For the codies, here are the macros:

rspk.speakForDialog generates the dialog contents; it's separated out because otherwise I run afoul of nesting limits.
[spoiler=rspk.speakForDialog]

Code: Select all

[h:sources = getTokenNames()]
   <html>
   <form name="speakeasy" method="json" action='[r:macroLinkText("[email protected]","all")]'>
   <table>
   <tr>
   <td>
         <b>Select Speaker:</b>
   </td>
   <td colspan>
         <select name='who'>
   [r,foreach(source,sources,""),CODE:
   {
       <option value='[r:source]'>[r:source]</option>
   }]
        </select>
    </td>
    </tr>
    <tr>
    <td>
         <b>Select output color:</b>
    </td>
    <td>
         <select name='color'>
                   <option value='black' selected>Black</option>
                   <option value='red'>Red</option>
                   <option value='green'>Green</option>
                   <option value='blue'>Blue</option>
          </select>
    </td>
    </tr>
    <tr>
    <td>
         <b>Enter text to say:</b>
     </td>
    <td>
         <textarea name='whatToSay' rows='8' cols='40'>
         </textarea>
    </td>  
    
</tr>
    </table>
    <input type='submit' value='Speak!'></input>
    </form>
    </html>
 
[/spoiler]

rspk.speakForDialog presents the frame, and handles the output part to chat. It's a "self-executing" frame; it passes arguments to itself.
[spoiler=rspk.speakForDialog]

Code: Select all

[if(json.type(macro.args)=="OBJECT"),CODE:
{
    [h:who = json.get(macro.args,"who")]    
    
[h:color = json.get(macro.args,"color")]
    [h:what = json.get(macro.args,"whatToSay")]
    [h:what = "<font color='"+color+"'>"+what+"</font>"]
    [h:mLink = macroLinkText("[email protected]","all",what,who)]
    [h:execLink(mLink)]
    [h:abort(0)]
};
{
    [frame("Speak As"),CODE:
    { 
       
[r:rspk.speakForDialog()]
    }]
}]
 
[/spoiler]

rspk.displaySpeech is a trivial macro that displays the actual text.
[spoiler=rspk.displaySpeech]

Code: Select all

[r:macro.args]
 
[/spoiler]

onCampaignLoad just defines the various function
[spoiler=onCampaignLoad]

Code: Select all

[h:defineFunction("rspk.createSpeakDialog","[email protected]")]
[
h:defineFunction("rspk.displaySpeech","[email protected]")]
[
h:defineFunction("rspk.speakForDialog","[email protected]")]
 
[/spoiler]
Last edited by Rumble on Sat Dec 05, 2009 9:10 pm, edited 1 time in total.

User avatar
Jiyambi
Kobold
Posts: 16
Joined: Fri Nov 06, 2009 7:30 am
Location: Seattle, WA

Re: SpeakForMe: Speak as a token without impersonating it

Post by Jiyambi »

Looks awesome Rumble, thanks for sharing it :)

User avatar
Natha
Dragon
Posts: 733
Joined: Sat Oct 11, 2008 3:37 am
Location: Limoges/Guéret, France
Contact:

Re: SpeakForMe: Speak as a token without impersonating it

Post by Natha »

Nice !
ImageImageImageImage

User avatar
Azhrei
Site Admin
Posts: 12057
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: SpeakForMe: Speak as a token without impersonating it

Post by Azhrei »

I'm bookmarking this thread and I'll come back and check it out in more detail. Thanks a bunch!

User avatar
Rumble
Deity
Posts: 6235
Joined: Tue Jul 01, 2008 7:48 pm

Re: SpeakForMe: Speak as a token without impersonating it

Post by Rumble »

Update: fixed a rather serious "it won't freakin' work" error due to using an incorrect function name. Download the new rptok, because the old one be broken.

User avatar
plothos
Great Wyrm
Posts: 1890
Joined: Sat Jun 21, 2008 1:07 am

Re: SpeakForMe: Speak as a token without impersonating it

Post by plothos »

Thanks Rumble. This is definitely going in my toolbox.
Drop-In Utilities:
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).

User avatar
plothos
Great Wyrm
Posts: 1890
Joined: Sat Jun 21, 2008 1:07 am

Re: SpeakForMe: Speak as a token without impersonating it

Post by plothos »

Hey Rumble, this would be a neat feature that'd help text games a lot.

Very often you have conversations going between several NPCs and the characters (as GM). Switching impersonation over and over is a pain. It's much nicer in your new box, but you still have to keep using the pull-down.

Any way you could have three pull-downs labeled A, B, and C side by side and then buttons at the bottom Speak As A, Speak As B, and Speak As C?
Drop-In Utilities:
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).

User avatar
Rumble
Deity
Posts: 6235
Joined: Tue Jul 01, 2008 7:48 pm

Re: SpeakForMe: Speak as a token without impersonating it

Post by Rumble »

plothos wrote:Hey Rumble, this would be a neat feature that'd help text games a lot.

Very often you have conversations going between several NPCs and the characters (as GM). Switching impersonation over and over is a pain. It's much nicer in your new box, but you still have to keep using the pull-down.

Any way you could have three pull-downs labeled A, B, and C side by side and then buttons at the bottom Speak As A, Speak As B, and Speak As C?


Well, probably - if you can have three submit buttons on a form. I don't know, but I'll try it. If not, probably some way to do it with links instead.

User avatar
plothos
Great Wyrm
Posts: 1890
Joined: Sat Jun 21, 2008 1:07 am

Re: SpeakForMe: Speak as a token without impersonating it

Post by plothos »

Links using images instead of text, maybe?
That'd require image tokens to be included, though. Bleah.
Drop-In Utilities:
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).

User avatar
Rumble
Deity
Posts: 6235
Joined: Tue Jul 01, 2008 7:48 pm

Re: SpeakForMe: Speak as a token without impersonating it

Post by Rumble »

plothos wrote:Links using images instead of text, maybe?
That'd require image tokens to be included, though. Bleah.


Nah, it was easier than I thought. Speak For Me version 2:

speakforme_v2.rptok
(60.26 KiB) Downloaded 204 times


Features (many, many new things!):

* Multi-speak: offers three drop down boxes populated with token names from the map. Buttons let you speak the entered text as the token selected in the corresponding drop-down box. The drop-downs will remember the selection you made until you manually re-launch the SpeakForMe macros.

* GM Only or Everybody Plays: two Campaign macros (or macros for wherever) are offered. One is if you want to keep SpeakForMe a GM-only tool, in which case, copy that one to the Campaign panel. If you want to let players use it, copy the other macro to the Campaign panel.

Note: if you choose to let players use it too, the list of tokens they can speak as is restricted to the tokens owned by that player - so they won't be speaking as your NPCs. Handy for players who run more than one character, or who are responsible for some NPCs, etc.

* State Configuration: one of the features of the "getTokens*" set of functions is the ability to exclude certain states from the list of tokens (such as excluding Dead tokens from any lists). On its first launch, SpeakForMe will present a dialog containing all of the configured states in the campaign (sorted alphabetically, broken across several tabs), with checkboxes. If you check off a state, then any token with that state will not be included in the SpeakForMe drop-down boxes.

Note: if you exclude a state that may change midgame (such as "Dead"), remember to ask players (and yourself) to re-launch the dialog so that the lists of viable sources updates. You can also build in such a refresh yourself, based on your own macro frameworks. All you need to do is trigger the macro "Launch SpeakForMe" on the Lib:SpeakForMe token, and it will refresh the frame.

* Several color options

* Checkboxes for bold, italic, and underline. Note that it formats the entire text entry in that fashion; this ain't a word processor. If you need finer control, ignore those and use HTML in the text area, and it will come through.



DISCLAIMER: this is not true impersonation. /me and /mes commands do not work, and the token you are speaking as does not remain impersonated after you hit the button.

User avatar
plothos
Great Wyrm
Posts: 1890
Joined: Sat Jun 21, 2008 1:07 am

Re: SpeakForMe: Speak as a token without impersonating it

Post by plothos »

This is fabulous. I can't wait to incorporate it. Thanks!! :D
Drop-In Utilities:
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).

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

Re: SpeakForMe: Speak as a token without impersonating it

Post by neofax »

I used this in my game Saturday and just remembered to report back here that it was great. Some suggestions:

1) Going from 1 map to the next requires the campaign macro to be reloaded as the drop down menus have no clue what tokens are on the current map. Create ability to refresh from the frame.
2) Would be nice if it only displays tokens that are "Visible" and on the token layer. Meaning have the visible flag on.
3) Ability to use pre-cann'd messages from the tokens speech table or normal table. Would allow the DM to build the campaign before hand and then post game put on the net for others to use.

User avatar
Rumble
Deity
Posts: 6235
Joined: Tue Jul 01, 2008 7:48 pm

Re: SpeakForMe: Speak as a token without impersonating it

Post by Rumble »

neofax wrote:I used this in my game Saturday and just remembered to report back here that it was great. Some suggestions:

1) Going from 1 map to the next requires the campaign macro to be reloaded as the drop down menus have no clue what tokens are on the current map. Create ability to refresh from the frame.
2) Would be nice if it only displays tokens that are "Visible" and on the token layer. Meaning have the visible flag on.
3) Ability to use pre-cann'd messages from the tokens speech table or normal table. Would allow the DM to build the campaign before hand and then post game put on the net for others to use.


Thanks for the feedback - responses to each item:

1. That's a good idea, but a "refresh frame" thing would be identical to re-running "Launch SpeakForMe".

2. Easily done. I did leave that out on purpose - GMs may want invisible tokens to speak as well.

3. That's difficult from an interface standpoint. How should that be displayed to the user? Where would you like to see that in the interface? I would probably create a whole new library token to handle scripted interactions, focused entirely around the pre-built speech bits (which, after looking at the drop-in forum, it appears biodude already did).

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

Re: SpeakForMe: Speak as a token without impersonating it

Post by neofax »

No problem for the feedback. I learn alot from everyones code here and letting them know is a small bit to give back.

1) OK
2) Never really thought of that, but now that I do, I can see the reasoning and extra cool factor on it. NPC is talking behind a curtain and PCs perception is high enough to hear it.
3) You know, I D/L'd this for the game on Saturday, but never got the chance to add to campaign and test.

Post Reply

Return to “Drop-In Macro Resources”