[Drop-In] [aliasmask]Disguise: Save/use multiple tkn images

These are tools and utilities that make it easier to run games. This includes Lib: macro tokens dropped into MapTool to manage the game, a conversion file for CharacterTool to allow use in MapTool, or just about anything else you can think of -- except graphics with macros and anything specific to a particular campaign framework. Those are already covered by the Tilesets subforum and the Links and External Resources forum.

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

User avatar
lmarkus001
Great Wyrm
Posts: 1867
Joined: Sat Mar 29, 2008 12:30 am
Location: Layfayette Hill, PA

Re: [aliasmask] Disguise: Save and use multiple images for t

Post by lmarkus001 »

Further updated my post above. The tweak now supports any single table (you can feed the table name as a parameter when calling, or it defaults to Polymorph). The code verifies the existence of the table and excludes the table tab from the dialog if the table does not exist.

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: [aliasmask] Disguise: Save and use multiple images for t

Post by aliasmask »

Because of change in b88, <img> tag doesn't work with Label option of Wiki: input() so the alert of the added image is broken. This update fixes that:

This doesn't have any other changes from the original by other authors. You don't need this if you not using b88.
Attachments
Disguise v1.0a b88.rptok
(44.38 KiB) Downloaded 502 times

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: [Drop-In] [aliasmask]Disguise: Save/use multiple tkn ima

Post by wolph42 »

im considering integrating this drop-in into the BoT (as I did with rumbles dice box). Basically for two reasons
1. its generic (which is a must for the BoT)
2. i'm quite likely gonna use it and I like to use the 'virtual macro panel' which requires integration into the BoT

I had a look at the code and functionality, its possible that ill make some adaptations (though likely far less as I did with rumbles DB, which i basically rewrote).
Obviously credits will go to you as the BoT contains 'rumbles dicebox' it would become something like 'aliasmask diquise function' (better name is welcome!)

but im only going to do it with your permission, hence this post.

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: [Drop-In] [aliasmask]Disguise: Save/use multiple tkn ima

Post by aliasmask »

Take a look at the latest version of 3.5/pathfinder FW. Lindsay added a couple of updates for including default images from a table and I believe a map. I would consider Disguise out-of-date for there have been a lot of changes since I wrote that.

If I were to rewrite it, I would add labeling and the ability to switch to portrait and handout images. I would also change it to a frame over an input and make it possible to select a token on the board to change image too. I would have an option to save the size attribute for disguises. Later, if I really wanted to get fancy, add the ability to adjust properties or integrate it with a mod adjustment in the Lindsay FW.

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: [Drop-In] [aliasmask]Disguise: Save/use multiple tkn ima

Post by wolph42 »

aliasmask wrote:Take a look at the latest version of 3.5/pathfinder FW. Lindsay added a couple of updates for including default images from a table and I believe a map. I would consider Disguise out-of-date for there have been a lot of changes since I wrote that.

If I were to rewrite it, I would add labeling and the ability to switch to portrait and handout images. I would also change it to a frame over an input and make it possible to select a token on the board to change image too. I would have an option to save the size attribute for disguises. Later, if I really wanted to get fancy, add the ability to adjust properties or integrate it with a mod adjustment in the Lindsay FW.
I know, but it still works and gets the job done. I'll have a look at lm's FW. But to return to my initial question: do I have your permission?

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: [Drop-In] [aliasmask]Disguise: Save/use multiple tkn ima

Post by aliasmask »

All my work is open source (non commercial). Just a small acknowledgement for whatever capacity my code has inspired you in the notes of lib token... that's what I do for others.

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: [Drop-In] [aliasmask]Disguise: Save/use multiple tkn ima

Post by wolph42 »

aliasmask wrote:All my work is open source (non commercial). Just a small acknowledgement for whatever capacity my code has inspired you in the notes of lib token... that's what I do for others.
thanks!

edit: had a look at LM's FW and it looks nifty (the shapechange) but its too much for the BoT, your 'simple' tool is enough for me.

User avatar
Sereptus
Giant
Posts: 123
Joined: Tue Jun 07, 2011 12:08 pm
Location: Canada

Re: [Drop-In] [aliasmask]Disguise: Save/use multiple tkn ima

Post by Sereptus »

I'm using this great tool, thanks to all who created it!! Now the problem, I'm trying to use (use disguise) on a token I created through Tokenlab but I cant change the image on my tokens. I can change the image on any other token I've created through Statblock Parsers and such but the Tokenlab tokens refuse to change images even with out trying to use the use disguise macro. Anybody shed some light on this?


Is this question in the right area? :shock:


I've asked in a couple other areas on these forums and hope I'm not breaking any rules, I just HAVE to have this work! The players will love it!

I'm guessing the token image when using Tokenlab is hard-coded in some way?

Sincerely, a NEWB!
OOOHH RegEx....YOU BITTER-SWEET BEAST!!!

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: [Drop-In] [aliasmask]Disguise: Save/use multiple tkn ima

Post by aliasmask »

The method used to change the image is like this. First you move the macro Use Disguise to the campaign window. This way everyone can use it. Then you select your token and click Use Disguise. This will save the current image to the list. Close that window. Now you can change the image on the token to something else using the token properties build in to MT. After changing image and clicking okay, you can now click Use Disguise to save that image to the list. You should now see both images in the list. Rinse and repeat.

Since this drop-in makes use of the MT cache on your machine you should be connected to all the players when setting up new images. Another option is to simply have the image somewhere else in the campaign so new players will get non-current images loaded in to their cache. If you don't use one of the above methods, then other players will just see a red X for your image.

If other players are seeing a red X, then you'll have to use the 2nd method to fix that and I believe they will have to reconnect as well for it to take affect. This way the image will load in to their cache. This is only a problem for new players no connected at the time you create the alternate disguise. It's best to just have a stack of your images somewhere in the campaign.

User avatar
Sereptus
Giant
Posts: 123
Joined: Tue Jun 07, 2011 12:08 pm
Location: Canada

Re: [Drop-In] [aliasmask]Disguise: Save/use multiple tkn ima

Post by Sereptus »

Thanks for replying Alias, although I still have the same problem, you gave me some excellent ideas for using this tool. I don't have problems using disguise with any other token I've created in the past, the problem I believe lays with Tokenlab. When I try to change the image (after setting the original) it changes the image to what I've selected but when I hit okay to exit the edit token screen it reverts back to the original image. I've tried using the available images as well to no avail. My best guess is Tokenlab somehow hard-codes the image to the token itself (although albeit I'm no programmer)because I've had no problems using (use disguise) with other tokens I've created through statblock parsers. I've tried using other campaign FW's, made new tokens with Tokenlab using different images, my only options at this point is to get help from one of you guys, go back to using other parsers (which would be a drag seeing as all my players and myself paid good money for Herolab :cry: ) or go bat-sh*# crazy trying to figure this out before our next session!! I'm also wondering if it's just me having this problem or has anyone else tested/tried using Tokenlab to create a Token and then attempted to change the image? Come to think of it, I just remembered I cant even change the image normally so the problem definitely lays with Tokenlab ...I guess I should be posting this on that forum! :oops:

Thanks again for your patience!

P.S. I did try all of your suggestions.
OOOHH RegEx....YOU BITTER-SWEET BEAST!!!

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: [Drop-In] [aliasmask]Disguise: Save/use multiple tkn ima

Post by aliasmask »

Yeah, I'm not familiar at all with Tokenlab.

User avatar
Sereptus
Giant
Posts: 123
Joined: Tue Jun 07, 2011 12:08 pm
Location: Canada

Re: [Drop-In] [aliasmask]Disguise: Save/use multiple tkn ima

Post by Sereptus »

aliasmask wrote:Yeah, I'm not familiar at all with Tokenlab.
I hate to ask AliasMask, do you think you could take a look at the Tokenlab converter for Herolab by Sozin? :oops: I think it's an excellent stat block importer for PC's and Creatures alike, and would be great if incorporated into 3.5/Pathfinder framework. :D
OOOHH RegEx....YOU BITTER-SWEET BEAST!!!

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: [Drop-In] [aliasmask]Disguise: Save/use multiple tkn ima

Post by aliasmask »

Sereptus wrote:
aliasmask wrote:Yeah, I'm not familiar at all with Tokenlab.
I hate to ask AliasMask, do you think you could take a look at the Tokenlab converter for Herolab by Sozin? :oops: I think it's an excellent stat block importer for PC's and Creatures alike, and would be great if incorporated into 3.5/Pathfinder framework. :D
After taking a quick look, it seems Token Lab creates a system agnostic token where all the needed macros are on the token. Converting that to a 3.5/pathfinder token type is a little more work than I'm will to do right now, but if you post an example token that you're having problem changing the image on, then I can take a look at that and perhaps come up with a universal solution.

User avatar
Sereptus
Giant
Posts: 123
Joined: Tue Jun 07, 2011 12:08 pm
Location: Canada

Re: [Drop-In] [aliasmask]Disguise: Save/use multiple tkn ima

Post by Sereptus »

Sure! Heres a couple! :)I Sincerely think this is a fantastic way to get ready made tokens for a campaign, there's just a few things that foul up like it doesn't give you a basic Melee or ranged stat or breath weapon for some reason, and when herolab exports it gives a creature level of 0+12 so Tokenlab always reads it as 0 and thus all creatures imported this way have a level of zero. I realize these are just basic things but I'm not yet familiar enough with coding to tear apart the XML importer in Tokenlab (I'm learning though through all the greats on these forums)and try to fix these things, and I don't expect you to either, just happy to have you take a look. :mrgreen: Thanks again AM!! :)
Attachments
Troll, Cave.rptok
(679.25 KiB) Downloaded 100 times
Yenorin.rptok
(430.98 KiB) Downloaded 96 times
OOOHH RegEx....YOU BITTER-SWEET BEAST!!!

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: [Drop-In] [aliasmask]Disguise: Save/use multiple tkn ima

Post by aliasmask »

Okay, figured it out. The token is "corrupt" and can only be fixed in tokenLab, patched in MT or manually by editing the rptok file (.zip). The file context.xml lists the image assets like this:

Code: Select all

  <imageAssetMap>
    <entry>
      <string>Troll 01</string>
      <net.rptools.lib.MD5Key>
        <id>0589979da1f0e6b9990cfa911c9f4de5</id>
      </net.rptools.lib.MD5Key>
    </entry>
  </imageAssetMap>
But should be like this:

Code: Select all

  <imageAssetMap>
    <entry>
      <null/>
      <net.rptools.lib.MD5Key>
        <id>0589979da1f0e6b9990cfa911c9f4de5</id>
      </net.rptools.lib.MD5Key>
    </entry>
  </imageAssetMap>
Apparently, by setting the name instead of putting </null> it doesn't allow MT to change the token image manually or with any of the functions. I suggest you contact the creator of TokenLab and let him know so he can patch that problem. Seems like it would be an easy fix.

This may have been the token format at one time, but the current version 1.3b89 doesn't list assets that way, and it's a problem. Another possible solution would be to patch MT when the token is first read and make the correction then. Someone like Lee could probably do it very fast, but I don't know when the general public would have access to it in the next release of MT b90 (no release date pending).

As far as an easy fix on your end, the only way I know of is to edit the content.xml file in the zip and that can be a pain. First you "save" your token, change the token name to .zip, open zip and export content.xml file. Open file in editor and look for imageAssetMap at top. Change the <string>...</string> to <null/>. Save. Import file to zip. Change name back to rptok. Drop token back in to campaign.

After all that, you can then change the image manually or with Disguise macro.

Post Reply

Return to “Drop-In Macro Resources”