[1.3b55] setTokenPortrait(), setTokenHandout()

If you have an idea for a new feature, please discuss it in the main MapTool forum first, then post a summary of the discussion here. Use the first Sticky as a template.

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice

Post Reply
User avatar
hyperactiveChipmunk
Cave Troll
Posts: 99
Joined: Wed Apr 15, 2009 8:19 pm

[1.3b55] setTokenPortrait(), setTokenHandout()

Post by hyperactiveChipmunk »

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

User avatar
zEal
Dragon
Posts: 944
Joined: Sun Mar 22, 2009 2:25 am

Re: [1.3b55] setTokenPortrait(), setTokenHandout()

Post by zEal »

Seconded. The ability to dynamically change handouts would be incredibly handy in many situations.

User avatar
dakhran
Kobold
Posts: 17
Joined: Wed Jan 13, 2010 10:43 pm
Location: Arlington VA
Contact:

Re: [1.3b55] setTokenPortrait(), setTokenHandout()

Post by dakhran »

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.
Image
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

User avatar
aliasmask
RPTools Team
Posts: 9031
Joined: Tue Nov 10, 2009 6:11 pm
Location: California

Re: [1.3b55] setTokenPortrait(), setTokenHandout()

Post by aliasmask »

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.

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: [1.3b55] setTokenPortrait(), setTokenHandout()

Post by JamzTheMan »

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.
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.

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

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: [1.3b55] setTokenPortrait(), setTokenHandout()

Post by Azhrei »

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've added them to my hit list for b71, but no promises at this point. 8)

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. ;)

User avatar
CoveredInFish
Demigod
Posts: 3104
Joined: Mon Jun 29, 2009 10:37 am
Location: Germany
Contact:

Re: [1.3b55] setTokenPortrait(), setTokenHandout()

Post by CoveredInFish »

I gave this a shot. Needs more testing yet but I think it should work fine.

Didnt went for the size parameter though.

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: [1.3b55] setTokenPortrait(), setTokenHandout()

Post by Azhrei »

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.)

User avatar
CoveredInFish
Demigod
Posts: 3104
Joined: Mon Jun 29, 2009 10:37 am
Location: Germany
Contact:

Re: [1.3b55] setTokenPortrait(), setTokenHandout()

Post by CoveredInFish »

Ooops ... I thought I'd sent you a PM. Well then I post it in the testers forum instead.

User avatar
CoveredInFish
Demigod
Posts: 3104
Joined: Mon Jun 29, 2009 10:37 am
Location: Germany
Contact:

Re: [1.3b55] setTokenPortrait(), setTokenHandout()

Post by CoveredInFish »

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.

User avatar
PinkRose
Dragon
Posts: 732
Joined: Sat Nov 15, 2008 2:28 pm
Location: The City of Roses, Oregon

Re: [1.3b55] setTokenPortrait(), setTokenHandout()

Post by PinkRose »

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.
I am a special snowflake!

User avatar
PinkRose
Dragon
Posts: 732
Joined: Sat Nov 15, 2008 2:28 pm
Location: The City of Roses, Oregon

Re: [1.3b55] setTokenPortrait(), setTokenHandout()

Post by PinkRose »

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.
I am a special snowflake!

User avatar
aliasmask
RPTools Team
Posts: 9031
Joined: Tue Nov 10, 2009 6:11 pm
Location: California

Re: [1.3b55] setTokenPortrait(), setTokenHandout()

Post by aliasmask »

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.

User avatar
aliasmask
RPTools Team
Posts: 9031
Joined: Tue Nov 10, 2009 6:11 pm
Location: California

Re: [1.3b55] setTokenPortrait(), setTokenHandout()

Post by aliasmask »

Now, if you just want to quickly copy another token's image to your image you can do this:

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)]
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.

Post Reply

Return to “Feature Requests”