[1.3b55] setTokenPortrait(), setTokenHandout()
Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice
- hyperactiveChipmunk
- Cave Troll
- Posts: 99
- Joined: Wed Apr 15, 2009 8:19 pm
[1.3b55] setTokenPortrait(), setTokenHandout()
There are macro functions for getTokenImage() and its counterpart, setTokenImage().
There are macro functions for getTokenPortrait() and getTokenHandout(), but NOT their counterparts, setTokenPortrait() and setTokenHandout().
While not critical, these would be quite handy (portrait, especially) for shapeshifting characters, morphing/multi-state objects (e.g. doors), and the like.
-hC
There are macro functions for getTokenPortrait() and getTokenHandout(), but NOT their counterparts, setTokenPortrait() and setTokenHandout().
While not critical, these would be quite handy (portrait, especially) for shapeshifting characters, morphing/multi-state objects (e.g. doors), and the like.
-hC
Re: [1.3b55] setTokenPortrait(), setTokenHandout()
Seconded. The ability to dynamically change handouts would be incredibly handy in many situations.
Re: [1.3b55] setTokenPortrait(), setTokenHandout()
I'd like to throw my hat in as well, I've got a couple of shapeshifting characters (druids), I've already developed macros to auto swap their tokens as they wildshape, but it would be nice if the other players could see the detailed portrait for the character's alternate forms as well. Not to mention, it would be handy for monsters which look innocuous at first, such as doppelgangers or succubi.
Active PCs
Ceinwyn of Sune, Human Cleric 9
Ghibeel al-Lahab, Tiefling Elementalist 9
Jaga Tinginys, Human Shaman|Warlord 14
Keira Greenleaf, Half-Elf Sentinel / Primal Summoner 12
Malaster, Shardmind Hexblade / Student of Caiphon 17
Strigoi, Revenant Vampire / Vampire Noble 15
Sun Chiun, Human Battlemind / Polearm Master 17
Temper, Warforged Fighter|Warden / Paragon Hybrid 16
Ghibeel al-Lahab, Tiefling Elementalist 9
Jaga Tinginys, Human Shaman|Warlord 14
Keira Greenleaf, Half-Elf Sentinel / Primal Summoner 12
Malaster, Shardmind Hexblade / Student of Caiphon 17
Strigoi, Revenant Vampire / Vampire Noble 15
Sun Chiun, Human Battlemind / Polearm Master 17
Temper, Warforged Fighter|Warden / Paragon Hybrid 16
Re: [1.3b55] setTokenPortrait(), setTokenHandout()
I have an example token that handles some image swapping here:
http://forums.rptools.net/viewtopic.php?f=8&t=15006
But it will work for any token. Just copy macros to token.
I would also like to see the above functions available if not too much of a hassle. Since there is a Wiki: setTokenImage(), I think the code would be very similar.
http://forums.rptools.net/viewtopic.php?f=8&t=15006
But it will work for any token. Just copy macros to token.
I would also like to see the above functions available if not too much of a hassle. Since there is a Wiki: setTokenImage(), I think the code would be very similar.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
- JamzTheMan
- Great Wyrm
- Posts: 1872
- Joined: Mon May 10, 2010 12:59 pm
- Location: Chicagoland
- Contact:
Re: [1.3b55] setTokenPortrait(), setTokenHandout()
If someone goes into that code, it would be nice to add a parm or change setTokenImage some way so that you can control the size of the image.aliasmask wrote:I have an example token that handles some image swapping here:
http://forums.rptools.net/viewtopic.php?f=8&t=15006
But it will work for any token. Just copy macros to token.
I would also like to see the above functions available if not too much of a hassle. Since there is a Wiki: setTokenImage(), I think the code would be very similar.
I have a Werewolf Macro as well and when the image changes, it shrinks the image into the set boundry box (the image is a werewolf on a square stand/bottom with tail and claws that extend beyond the bottom square. I'd like the bottom square to what fits into the bounding box)
Basically, a way to better handle image swamps between circle and topdown images?
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork
Re: [1.3b55] setTokenPortrait(), setTokenHandout()
I've added them to my hit list for b71, but no promises at this point.aliasmask wrote:I would also like to see the above functions available if not too much of a hassle. Since there is a Wiki: setTokenImage(), I think the code would be very similar.
I'll keep your request in mind, Jamz, but I don't see any way for MT to know what the size of your token base actually is. That means you'd need to provide the scaling amount, perhaps as a base-100 value. So 100 means 100%, and 150 would mean 50% larger. But again, no promises.
- CoveredInFish
- Demigod
- Posts: 3104
- Joined: Mon Jun 29, 2009 10:37 am
- Location: Germany
- Contact:
Re: [1.3b55] setTokenPortrait(), setTokenHandout()
I gave this a shot. Needs more testing yet but I think it should work fine.
Didnt went for the size parameter though.
Didnt went for the size parameter though.
Re: [1.3b55] setTokenPortrait(), setTokenHandout()
Are you going to post the patch here? Or maybe start a thread in the testers forum first? (The latter is probably a good idea.)
- CoveredInFish
- Demigod
- Posts: 3104
- Joined: Mon Jun 29, 2009 10:37 am
- Location: Germany
- Contact:
Re: [1.3b55] setTokenPortrait(), setTokenHandout()
Ooops ... I thought I'd sent you a PM. Well then I post it in the testers forum instead.
- CoveredInFish
- Demigod
- Posts: 3104
- Joined: Mon Jun 29, 2009 10:37 am
- Location: Germany
- Contact:
Re: [1.3b55] setTokenPortrait(), setTokenHandout()
Will be in b77: Wiki: setTokenHandout(), Wiki: setTokenPortrait(). Also notable in this context is the change made to Wiki: copyToken() that lets you now specify image changes as well.
Re: [1.3b55] setTokenPortrait(), setTokenHandout()
Thank you oh so very much.
Come on b77.
Come on.
My luck, all the doppleganger encounters will be done with the day before this goes live.
But it's still a great feature.
Come on b77.
Come on.
My luck, all the doppleganger encounters will be done with the day before this goes live.
But it's still a great feature.
I am a special snowflake!
Re: [1.3b55] setTokenPortrait(), setTokenHandout()
So, can I ask some kind soul to make me a macro that will swap out the portraits?
Simplest thing would be just to swap a portrait between 2 selected tokens.
Or would a table with all options work easier/better?
How about player tokens (Druids or Wardens or Disguises) and DM tokens (Dopplegangers and spies)? Would I need two tables?
Again, whoever can throw this together, I appreciate it. I really really do.
And it can be as sloppy as neccessary to make it work. Beggers can't be choosers.
Simplest thing would be just to swap a portrait between 2 selected tokens.
Or would a table with all options work easier/better?
How about player tokens (Druids or Wardens or Disguises) and DM tokens (Dopplegangers and spies)? Would I need two tables?
Again, whoever can throw this together, I appreciate it. I really really do.
And it can be as sloppy as neccessary to make it work. Beggers can't be choosers.
I am a special snowflake!
Re: [1.3b55] setTokenPortrait(), setTokenHandout()
I made this lib token: http://forums.rptools.net/viewtopic.php?f=8&t=15168
Basically, it takes the token image and saves it. So, you can load a new image and then be able to switch back and forth.
Basically, it takes the token image and saves it. So, you can load a new image and then be able to switch back and forth.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: [1.3b55] setTokenPortrait(), setTokenHandout()
Now, if you just want to quickly copy another token's image to your image you can do this:
If you impersonate a token, then you select another token image to copy. If you don't impersonate, then you select a token you want to change then type in token name you want to copy.
Code: Select all
[H, if(hasImpersonated()), code: {
[H: source = getSelected()]
[H: target = getImpersonated()]
};{
[H: source = Enter_Token_Name]
[H: target = getSelected()]
}]
[H, token(source): imgId = getTokenImage()]
[H, token(target): setTokenImage(imgId)]
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools