RPTools.net

Discussion and Support

Skip to content

It is currently Sun Oct 22, 2017 2:12 pm 






Reply to topic  [ 58 posts ]  Go to page 1, 2, 3, 4  Next

Previous topic | Next topic 

  Print view

Author Message
User avatar  Offline
Deity
 
Joined: Tue Jul 01, 2008 6:48 pm
Posts: 6237
 Post subject: SpeakForMe: Speak as a token without impersonating it
PostPosted: Fri Dec 04, 2009 12:34 am 
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.


speakEasy.rptok [62.62 KiB]
Downloaded 338 times

_________________

What I'm Working On

MapTool Tutorials:
Introduction to Tokens
Introduction to Properties
Introduction to Macro Writing
Introduction to Light and Sight


Last edited by Rumble on Fri Feb 05, 2010 10:16 pm, edited 6 times in total.
Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Jul 01, 2008 6:48 pm
Posts: 6237
 Post subject: Re: SpeakForMe: Speak as a token without impersonating it
PostPosted: Fri Dec 04, 2009 1:01 am 
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.
Code:
[h:sources = getTokenNames()]
   <html>
   <form name="speakeasy" method="json" action='[r:macroLinkText("rspk.speakForDialog@this","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>
 


rspk.speakForDialog presents the frame, and handles the output part to chat. It's a "self-executing" frame; it passes arguments to itself.
Code:
[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("rspk.displaySpeech@this","all",what,who)]
    [h:execLink(mLink)]
    [h:abort(0)]
};
{
    [frame("Speak As"),CODE:
    { 
       
[r:rspk.speakForDialog()]
    }]
}]
 


rspk.displaySpeech is a trivial macro that displays the actual text.
Code:
[r:macro.args]
 


onCampaignLoad just defines the various function
Code:
[h:defineFunction("rspk.createSpeakDialog","rspk.createSpeakDialog@this")]
[
h:defineFunction("rspk.displaySpeech","rspk.displaySpeech@this")]
[
h:defineFunction("rspk.speakForDialog","rspk.speakForDialog@this")]
 

_________________

What I'm Working On

MapTool Tutorials:
Introduction to Tokens
Introduction to Properties
Introduction to Macro Writing
Introduction to Light and Sight


Last edited by Rumble on Sat Dec 05, 2009 9:10 pm, edited 1 time in total.

Top
 Profile  
 
User avatar  Offline
Kobold
 
Joined: Fri Nov 06, 2009 7:30 am
Posts: 17
Location: Seattle, WA
 Post subject: Re: SpeakForMe: Speak as a token without impersonating it
PostPosted: Fri Dec 04, 2009 1:06 am 
Looks awesome Rumble, thanks for sharing it :)


Top
 Profile  
 
User avatar  Offline
Dragon
 
Joined: Sat Oct 11, 2008 2:37 am
Posts: 739
Location: Limoges/Guéret, France
 Post subject: Re: SpeakForMe: Speak as a token without impersonating it
PostPosted: Fri Dec 04, 2009 4:34 am 
Nice !

_________________
ImageImageImageImage


Top
 Profile  
 
User avatar  Offline
Site Admin
 
Joined: Mon Jun 12, 2006 12:20 pm
Posts: 12101
Location: Tampa, FL
 Post subject: Re: SpeakForMe: Speak as a token without impersonating it
PostPosted: Fri Dec 04, 2009 3:22 pm 
I'm bookmarking this thread and I'll come back and check it out in more detail. Thanks a bunch!


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Jul 01, 2008 6:48 pm
Posts: 6237
 Post subject: Re: SpeakForMe: Speak as a token without impersonating it
PostPosted: Sat Dec 05, 2009 9:11 pm 
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.

_________________

What I'm Working On

MapTool Tutorials:
Introduction to Tokens
Introduction to Properties
Introduction to Macro Writing
Introduction to Light and Sight


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Sat Jun 21, 2008 12:07 am
Posts: 1950
 Post subject: Re: SpeakForMe: Speak as a token without impersonating it
PostPosted: Sat Dec 05, 2009 9:16 pm 
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).


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Sat Jun 21, 2008 12:07 am
Posts: 1950
 Post subject: Re: SpeakForMe: Speak as a token without impersonating it
PostPosted: Sat Dec 05, 2009 9:24 pm 
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).


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Jul 01, 2008 6:48 pm
Posts: 6237
 Post subject: Re: SpeakForMe: Speak as a token without impersonating it
PostPosted: Sat Dec 05, 2009 9:55 pm 
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.

_________________

What I'm Working On

MapTool Tutorials:
Introduction to Tokens
Introduction to Properties
Introduction to Macro Writing
Introduction to Light and Sight


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Sat Jun 21, 2008 12:07 am
Posts: 1950
 Post subject: Re: SpeakForMe: Speak as a token without impersonating it
PostPosted: Sat Dec 05, 2009 10:49 pm 
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).


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Jul 01, 2008 6:48 pm
Posts: 6237
 Post subject: Re: SpeakForMe: Speak as a token without impersonating it
PostPosted: Sun Dec 06, 2009 12:01 am 
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:

Attachment:
speakforme_v2.rptok [60.26 KiB]
Downloaded 172 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.

_________________

What I'm Working On

MapTool Tutorials:
Introduction to Tokens
Introduction to Properties
Introduction to Macro Writing
Introduction to Light and Sight


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Sat Jun 21, 2008 12:07 am
Posts: 1950
 Post subject: Re: SpeakForMe: Speak as a token without impersonating it
PostPosted: Sun Dec 06, 2009 1:37 am 
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).


Top
 Profile  
 
 Offline
Great Wyrm
 
Joined: Tue May 26, 2009 7:51 pm
Posts: 2060
Location: Philadelphia, PA
 Post subject: Re: SpeakForMe: Speak as a token without impersonating it
PostPosted: Thu Dec 31, 2009 5:45 pm 
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.


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Jul 01, 2008 6:48 pm
Posts: 6237
 Post subject: Re: SpeakForMe: Speak as a token without impersonating it
PostPosted: Thu Dec 31, 2009 6:00 pm 
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).

_________________

What I'm Working On

MapTool Tutorials:
Introduction to Tokens
Introduction to Properties
Introduction to Macro Writing
Introduction to Light and Sight


Top
 Profile  
 
 Offline
Great Wyrm
 
Joined: Tue May 26, 2009 7:51 pm
Posts: 2060
Location: Philadelphia, PA
 Post subject: Re: SpeakForMe: Speak as a token without impersonating it
PostPosted: Thu Dec 31, 2009 6:13 pm 
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 58 posts ]  Go to page 1, 2, 3, 4  Next

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there are 2 users online :: 1 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: Yahoo [Bot] and 1 guest





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman