Set/Get Properties for a Token on another map
Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice
Set/Get Properties for a Token on another map
There are a few times I'd like to Set/Get properties of a token on another map.
For example, I might want to edit a token on another map before copying it to the current map, or I might want to have an action on one map impacts another map.
There is no elegant way to do this at the moment - the best is to change map temporarily to do the job and come back to the previous map. This induces flickering.
Would it be beneficial to add an extra parameter "mapname" to these functions, so that they could work for tokens on other maps? I think it could be done relatively easily.
The big question is, would that parameter be considered bloat? Or would it be helpful enough to justify its own existence?
For example, I might want to edit a token on another map before copying it to the current map, or I might want to have an action on one map impacts another map.
There is no elegant way to do this at the moment - the best is to change map temporarily to do the job and come back to the previous map. This induces flickering.
Would it be beneficial to add an extra parameter "mapname" to these functions, so that they could work for tokens on other maps? I think it could be done relatively easily.
The big question is, would that parameter be considered bloat? Or would it be helpful enough to justify its own existence?
MT Framework: Call of Cthulhu 7th fork, D&D 5e Spell Library
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
Re: Set/Get Properties for a Token on another map
Check out this thread: viewtopic.php?f=20&t=22147&p=271425&hil ... en#p271425
When copying tokens from another map you can set the properties of the token. I have a macro called createToken() that does a bunch of things. It was made before they added more functionality to the function, mostly the image options, but setting properties would still be done the same way.
When copying tokens from another map you can set the properties of the token. I have a macro called createToken() that does a bunch of things. It was made before they added more functionality to the function, mostly the image options, but setting properties would still be done the same way.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: Set/Get Properties for a Token on another map
Does that mean you don't think the extra parameter would be useful?
I personally believe that built in functionality is much preferable to complicated macros doing the same job.
I personally believe that built in functionality is much preferable to complicated macros doing the same job.
MT Framework: Call of Cthulhu 7th fork, D&D 5e Spell Library
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
Re: Set/Get Properties for a Token on another map
Someone may or may not fix this before 2.0 where this won't be an issue, but until then I'm just offering a solution.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
- Full Bleed
- Demigod
- Posts: 4736
- Joined: Sun Feb 25, 2007 11:53 am
- Location: FL
Re: Set/Get Properties for a Token on another map
As long as it added no overhead to the existing functions I'd be for it. Otherwise I'd just as soon see it have it's own functions (i.e. something like "get/setRemoteProperty()").
Anytime someone wants to come in and create/improve existing functions to do what "complicated" (or even uncomplicated) macros that others simply don't have easy access to (because they don't spend much time on the forums or have optional drop-ins installed) is a good thing.I personally believe that built in functionality is much preferable to complicated macros doing the same job.
I saw in another thread that you've been poking around in the MT source code... does that mean you're thinking about tackling this yourself?
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."
Re: Set/Get Properties for a Token on another map
The functions would have an additional parameter for the mapname. In the absence of that parameter, the function would revert to what it is now. So no overhead except for a quick check on the number of arguments.Full Bleed wrote: ↑Fri Aug 02, 2019 12:54 pmAs long as it added no overhead to the existing functions I'd be for it.
Yep.Full Bleed wrote: ↑Fri Aug 02, 2019 12:54 pmI saw in another thread that you've been poking around in the MT source code... does that mean you're thinking about tackling this yourself?
MT Framework: Call of Cthulhu 7th fork, D&D 5e Spell Library
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
- Full Bleed
- Demigod
- Posts: 4736
- Joined: Sun Feb 25, 2007 11:53 am
- Location: FL
Re: Set/Get Properties for a Token on another map
Great. That means the chances of this actually seeing the light of day just went up exponentially...Merudo wrote: ↑Fri Aug 02, 2019 3:20 pmYep.Full Bleed wrote: ↑Fri Aug 02, 2019 12:54 pmI saw in another thread that you've been poking around in the MT source code... does that mean you're thinking about tackling this yourself?
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."
Re: Set/Get Properties for a Token on another map
I created a commit that would add "mapName" as an optional parameter for these functions.
If the response is positive I might add support for other functions as well.
Code: Select all
getTokenImage
getTokenPortrait
getTokenHandout
setTokenImage
setTokenPortrait
setTokenHandout
setTokenOpacity
getTokenOpacity
MT Framework: Call of Cthulhu 7th fork, D&D 5e Spell Library
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
Re: Set/Get Properties for a Token on another map
Update the issue when it's complete and we'll get it merged.
Re: Set/Get Properties for a Token on another map
I have added the extra parameter to the functions in TokenPropertyFunction.java and TokenImage.java.
MT Framework: Call of Cthulhu 7th fork, D&D 5e Spell Library
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.