Function Impersonate by activating the token (only players)
Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice
-
- Kobold
- Posts: 11
- Joined: Wed Apr 13, 2016 4:18 am
- Location: Germany
Function Impersonate by activating the token (only players)
Hi there,
maybe I should describe at first my question in more detail.
It is possible to give a token (controlled by a player) the state "Impersonate" (as seen in the control menue by right-clicking) wenn the token is selected by the player who has the ownership? I ask because in a campaign that we are playing the players controlls more than one token. The problem we have atm is, that some functions can only be used correctly if the player token has the state "Impersonate". So if the player set "Impersonate" to his first charakter and the functions works, he has to do this for the next charakter and so on. Sometimes the players forgot this and the makros change some property entries for the wrong charakter.
Im far away to be an expert in maptool, but my thougt was, that there has to be an option to set this global - maybe with some function like onCampaignLoad as I've seen in the bag of tricks.
(or maybe someone knows a better solution for my problem - please feel free to write any idea or hint)
Thank you for reading this
maybe I should describe at first my question in more detail.
It is possible to give a token (controlled by a player) the state "Impersonate" (as seen in the control menue by right-clicking) wenn the token is selected by the player who has the ownership? I ask because in a campaign that we are playing the players controlls more than one token. The problem we have atm is, that some functions can only be used correctly if the player token has the state "Impersonate". So if the player set "Impersonate" to his first charakter and the functions works, he has to do this for the next charakter and so on. Sometimes the players forgot this and the makros change some property entries for the wrong charakter.
Im far away to be an expert in maptool, but my thougt was, that there has to be an option to set this global - maybe with some function like onCampaignLoad as I've seen in the bag of tricks.
(or maybe someone knows a better solution for my problem - please feel free to write any idea or hint)
Thank you for reading this
speaks german and moderate english
Re: Function Impersonate by activating the token (only playe
you don't tell us what kind of macros it are. But in general simply checking 'apply to selected token' in the macro editor will fix the issue.
Obviously this *does* require the user to select the token before they hit the macro.
Obviously this *does* require the user to select the token before they hit the macro.
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
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
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
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
-
- Kobold
- Posts: 11
- Joined: Wed Apr 13, 2016 4:18 am
- Location: Germany
Re: Function Impersonate by activating the token (only playe
thank you for your awnser,wolph42 wrote:you don't tell us what kind of macros it are. But in general simply checking 'apply to selected token' in the macro editor will fix the issue.
Obviously this *does* require the user to select the token before they hit the macro.
the macros are mainly linked to a lib - I could, of course, copy some code.
The macros are in the campaign window and we used a framework, changed a lot, and added macro libraries (also your bag of tricks - thanks a lot for this awestome stuff) and bound them together. Fo me (I must say this) I'm generally happy with this as it is now - and I have not much ideas about macros and programming languages and how they work (could read them a bit and change some minor things, but thats it). At this point I sometimes fear that I can destroy more then I can "repair".
So I thougt: IF there is a possibility to have this "get impersonate by selection if your are a player option", then I would use this permanently when the campaign is loaded.
The 'apply to selected token' is used for the most of the macros - they are regulary working fine, but some dont do this.
For example: the change of HP need, that the charakter, who is ownershiped by a player, is 'impersonated'.
Also the picture of the token isn't showing up for the player, when the playertoken isn't impersonated - it would be nice for the players when they see the tokenimage, even if its not necessary for the most of the macros.
If there is exist a function "get impersonate by selection if your are a player option" this could be a solution - but of couse, it has to checked first in the campaign.
thanks again
speaks german and moderate english
Re: Function Impersonate by activating the token (only playe
Also, maybe you're not using the Impersonate window (Window, in the upper menu -> Impersonate)?
That should "force" you to impersonate any token you select, so you couldn't forget to do it.
That should "force" you to impersonate any token you select, so you couldn't forget to do it.
"There are many ways my Son, to find where the souls of Demons remain...
But it takes only one second of despair and of doubt until, at last, your Soul they will gain..."
But it takes only one second of despair and of doubt until, at last, your Soul they will gain..."
Re: Function Impersonate by activating the token (only playe
AFAIK there isn't but I might be wrong have a look: http://lmwcs.com/rptools/wiki/Category:Macro_Function I think Irrlicht suggestion is your best option.Lost in Khyber wrote: So I thougt: IF there is a possibility to have this "get impersonate by selection if your are a player option", then I would use this permanently when the campaign is loaded.
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
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
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
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
Re: Function Impersonate by activating the token (only playe
Relying on Wiki: getImpersonated() is a bit of a trap since it's specific to the Impersonate window and can only be set manually. It's not so bad if you're a player with one token, but switching can be a pain. There is no setImpersonated which would set the token for the impersonated window, but there is Wiki: switchToken() which will change the currently impersonated token you select but only for the duration of the macro and doesn't effect the Impersonated Window unless your token and user name are the same (I think).
Long story short, it's better to use Wiki: getSelected(), Wiki: switchToken() and Wiki: currentToken() with macros not using "Apply to Selected Tokens" checkbox or to just use currentToken if you are rather than getImpersonated.
Long story short, it's better to use Wiki: getSelected(), Wiki: switchToken() and Wiki: currentToken() with macros not using "Apply to Selected Tokens" checkbox or to just use currentToken if you are rather than getImpersonated.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
-
- Kobold
- Posts: 11
- Joined: Wed Apr 13, 2016 4:18 am
- Location: Germany
Re: Function Impersonate by activating the token (only playe
Thank you all for your awnsers and time! This are some important informations, so I'm very thankfull.
I will follow all the hints you have given to me and speak with the team (well, the players and the gm ) about the possibilities we have and how to deal with the situation after the research and evaluation.
I will follow all the hints you have given to me and speak with the team (well, the players and the gm ) about the possibilities we have and how to deal with the situation after the research and evaluation.
speaks german and moderate english
- Full Bleed
- Demigod
- Posts: 4736
- Joined: Sun Feb 25, 2007 11:53 am
- Location: FL
Re: Function Impersonate by activating the token (only playe
But the bigger question is, "Why?"aliasmask wrote:Relying on Wiki: getImpersonated() is a bit of a trap since it's specific to the Impersonate window and can only be set manually.
Not having a setImpersonate() function allows people to paint themselves into some annoying corners.
Anyone know of a reason that we don't have this function? It's one of those functions that seems so obvious... and yet, it doesn't exist.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."
Re: Function Impersonate by activating the token (only playe
Because we have switchToken
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
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
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
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
Re: Function Impersonate by activating the token (only playe
Is there something that a SetImpersonate() function would do that switch token does not?Full Bleed wrote: Not having a setImpersonate() function allows people to paint themselves into some annoying corners.
Re: Function Impersonate by activating the token (only playe
switchToken is 'macro temporary' setImpersonate is permanent. However if user would start using switchToken AND setImpersonate in the same macro, you would get a nice spaghetti painting.Jagged wrote:Is there something that a SetImpersonate() function would do that switch token does not?Full Bleed wrote: Not having a setImpersonate() function allows people to paint themselves into some annoying corners.
Basically impersonation is really useful during roleplay/ using the chat. switchToken is only useful for macros.
The *only* reason it would be useful (AFAICS) to have an setImpersonated is so you could create a macro button: 'Impersonate' however that one already exists in the panel. The only advantage a 'macro' button would have over the 'default' button is that you can assign a shortcut key to it.
As for the latter, I'm far more in favor to be able to map shortcut keys to all the functions in maptool then to have them as macro functions and do it through that method. (but thats my opinion)
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
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
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
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
-
- Kobold
- Posts: 11
- Joined: Wed Apr 13, 2016 4:18 am
- Location: Germany
Re: Function Impersonate by activating the token (only playe
Yes, that’s true. We didn’t use this window because it’s another one which blocks some of our precious mapview-space – but if scaled it’s kind of small, so this is a good hint to remember to impersonate and its also faster than the right clicking option.Irrlicht wrote:Also, maybe you're not using the Impersonate window (Window, in the upper menu -> Impersonate)?
That should "force" you to impersonate any token you select, so you couldn't forget to do it.
Thanks – if there is no other way, we will use this (also for now).
speaks german and moderate english
- Full Bleed
- Demigod
- Posts: 4736
- Joined: Sun Feb 25, 2007 11:53 am
- Location: FL
Re: Function Impersonate by activating the token (only playe
If switchToken always got the job done I wouldn't run into so many situations where setImpersonate() would be a lot simpler. There are a lot of functions that default to impersonate, and impersonate is great for keeping actions locked onto a particular token without having to pass id's and pull id's all the time.wolph42 wrote:switchToken is 'macro temporary' setImpersonate is permanent. However if user would start using switchToken AND setImpersonate in the same macro, you would get a nice spaghetti painting.
Basically impersonation is really useful during roleplay/ using the chat. switchToken is only useful for macros.
Not to mention that using switchToken code blocks burns 50% of MT's code level limit.
Sorry, I do not see switchToken() as an replacement for a setImpersonate().
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."
Re: Function Impersonate by activating the token (only playe
Perhaps you could give a more concrete example, as I have to say, its not an issue I have run up against?
Nor have I run into problems with switchtoken() eating up a branching level, so an example there might help too.
Nor have I run into problems with switchtoken() eating up a branching level, so an example there might help too.
Re: Function Impersonate by activating the token (only playe
When dealing with open frames, it's best to pass the token id to the frame so any link clicked from it would be set to a specific token. This is something I've done for like the spell manager. I would have several frames open for each token I was controlling.
If you're not sure what I'm talking about,
macroLink(text, macroName, output, args, target)
If you're not sure what I'm talking about,
macroLink(text, macroName, output, args, target)
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools