RPTools.net

Discussion and Support

Skip to content

It is currently Fri Oct 20, 2017 8:26 pm 






Reply to topic  [ 4 posts ] 

Previous topic | Next topic 

  Print view

Author Message
 Offline
Dragon
 
Joined: Wed Oct 19, 2011 1:07 am
Posts: 958
 Post subject: Impersonate Function
PostPosted: Wed Sep 12, 2012 5:55 am 
IDK if I asked this before, but is there a reason why impersonation only has a slash command and not a function? While [token:] does most of what is needed from an impersonated token, I believe having the ability to set impersonation through a function (e.g. impersonateToken(tokenName)), can be a very useful thing to have. In my case, I've come to appreciate that an impersonation persists whereas a selection doesn't; useful to have when I want to keep a lib:token's macros available at all times during design. Unfortunately, I can't apply stuff like conditional etc. since we all know that slash commands always have to be on top of the first macro, to execute.

As stated on one my of earlier posts today, I've done a brief scan of the MT code and want to affect some changes on a fork of the final MT build, for personal use. One of these is making a function for ImpersonateMacro. I've pretty much traced the area of execution and I'd like to ask the devs for any advice before I start on this particular item :)

_________________
My stuff for the community:
Donate to the Mote Project
The Mote Project's G+ community
Mote on Facebook
Fully Customizable Calendar Drop-in


Last edited by Lee on Wed Sep 12, 2012 12:20 pm, edited 1 time in total.

Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 7887
Location: Bay Area
 Post subject: Re: Impersonate Roll Option
PostPosted: Wed Sep 12, 2012 6:04 am 
Do you mean like Wiki: switchToken()? It sets the Wiki: currentToken() impersonation for the rest of the function. If the user name matches that of the token (as a side effect) the impersonation remains. If you were to tweak something, I would tweak switchToken.

_________________
Downloads:


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 9412
Location: Netherlands
 Post subject: Re: Impersonate Roll Option
PostPosted: Wed Sep 12, 2012 6:16 am 
In addition to AMs comment (Wiki: switchToken() indeed does exactly that which you describe) I'm a bit puzzled by this:
Lee wrote:
useful to have when I want to keep a lib:token's macros available at all times during design

the whole Idea of a lib:token is that the macros ARE available at all times, so what exactly do you mean with this?

_________________
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC

My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent and
DPI.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS


Top
 Profile  
 
 Offline
Dragon
 
Joined: Wed Oct 19, 2011 1:07 am
Posts: 958
 Post subject: Re: Impersonate Roll Option
PostPosted: Wed Sep 12, 2012 12:42 pm 
aliasmask wrote:
Do you mean like Wiki: switchToken()? It sets the Wiki: currentToken() impersonation for the rest of the function. If the user name matches that of the token (as a side effect) the impersonation remains. If you were to tweak something, I would tweak switchToken.


It's more of having the functionality of /impersonate in a function as opposed to changing up the macro execution context.

wolph42 wrote:
In addition to AMs comment (Wiki: switchToken() indeed does exactly that which you describe) I'm a bit puzzled by this:
Lee wrote:
useful to have when I want to keep a lib:token's macros available at all times during design

the whole Idea of a lib:token is that the macros ARE available at all times, so what exactly do you mean with this?


:lol: I should have been clearer. I meant the macro buttons on a lib:token. My global panel is chock-full of macros calling library macros so I've devolved into running macros from the library itself. Like everyone else, I flit around the MT interface like a mad moth around a flame, so inadvertent clicks on the map area clears the selection panel. It's annoyed me enough to want to make some tweaks. Currently, I work around this by having a couple of macros on hotkey to re-select these tokens and one to cycle through them, but I think it's a lot more convenient, at least for me, to "lock" a lib:token in the Impersonated panel; not to mention that, while there have been many workarounds through macros (like the one in A.M.'s lib:players or another one I saw on the User Creations section), it'd be nice to use the built-in impersonate functionality while macro coding, e.g. [impersonate(tokenName)] ["say something"] [impersonate("")]. I guess it's more of a personal preference and not for everyone :)

_________________
My stuff for the community:
Donate to the Mote Project
The Mote Project's G+ community
Mote on Facebook
Fully Customizable Calendar Drop-in


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 4 posts ] 

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 is 1 user online :: 0 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: No registered users and 1 guest





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

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman