Custom TokenTool 1.0b32 (Nerps!)

Thoughts, Help, Feature Requests

Moderators: dorpond, trevor, Azhrei

Tielc
Cave Troll
Posts: 25
Joined: Wed Jul 16, 2014 10:41 pm

Re: Custom TokenTool 1.0b32 (Nerps!)

Post by Tielc »

Thanks, the good news is a lot of the properties in the content.xml file is only used while inside of Maptool. The content.xml file can be stripped of almost everything nonessential and still allow the token to be placed. Maptool will add the necessary properties to the object upon placement it looks like. In fact, I think Maptool just disregards a lot of the properties in the token at the time of placement. Many are used for saving the position of the token, visibility, etc. which are controlled by system options. For my app, I'm actually leaving these off from my classes and hence, serialization. So far I haven't had any issues. I'm close to getting a final output file, but unfortunately, I'm back to work this week.

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

Re: Custom TokenTool 1.0b32 (Nerps!)

Post by JamzTheMan »

Correct. I believe I used a modified version of the Token class for TokenTool as well to strip out all that junk, like as you said, MT will import a basic rptok with just a few variables set. (I simply wanted to set the Name & GM Name and Portrait image).
-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
Tanthos
Giant
Posts: 176
Joined: Thu Mar 28, 2013 6:55 pm
Location: United States

Re: Custom TokenTool 1.0b32 (Nerps!)

Post by Tanthos »

Jamz, just wanted to say that this is a really cool little improvement on the TokenTool application. Thanks, dude! :)

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

Re: Custom TokenTool 1.0b32 (Nerps!)

Post by JamzTheMan »

Thanks.

Although I may have found an issue, just yesterday I was creating some new tokens for a Star Wars game for a friend. I noticed it only worked if I dragged it to the Token or Hidden layer. It was not showing up on the map if I dragged it to the background or object layer?

I may have missed something in regards to token/vs stamp, a missing tag it needs maybe. I'll take a look at it this weekend. So for now don't go to crazy. Although, a quick fix is to resave it and then use the version MT saved and it seems to correct the XML.

Drats, sorry, totally missed that test case. Let me know if you see the same issue or different. (It very well could also be my custom MapTool. I need to test with a pure b91 version to be sure.)
-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
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: Custom TokenTool 1.0b32 (Nerps!)

Post by JamzTheMan »

OK, I found the issue. Not a huge one and can be corrected in MapTool.

Turns out, the XML was saving the following width/height
tags

Code: Select all

  <width>0</width>
  <height>0</height>
as 0, so if dragged to the Object/Background layer, it used those values. If dragged to the token/hidden layer, without a sizemap, it defaults to medium size.

To correct any older tokens, go to map-explorer, right-click, set size to Medium (or any size). Resize as needed, resave.

The other issue is I'm not saving a thumbnail in the rptok. Resaving in Maptool inserts that thumbnail. This corrects the ? showing in the asset window.

I'll get a new version out asap.
-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
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: Custom TokenTool 1.0b32 (Nerps!)

Post by JamzTheMan »

Ok, I posted version 1.0b33 (check first post or my sig for links).

Changelog:

o Fixes dragging a .rptok Token to Object or Background layer showing no
image due do width/height set to 0.

o Adds thumbnail to .rptok file for use with MapTool asset window
preview.
-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
Oryan77
Dragon
Posts: 452
Joined: Sun Feb 20, 2011 3:14 pm

Re: Custom TokenTool 1.0b32 (Nerps!)

Post by Oryan77 »

Hey Jamz, great work on TokenTool! If I can get it to work the way I need it to, I would love to transition back to using TokenTool. I went back to using Photoshop long ago due to the limitations the older version of TokenTool had. But that method is still a bit clunky.

I have an issue though, and a couple of suggestions if you don't mind requests.

Problem:

1. I created an rptok using TokenTool which was really convenient (drag and drop, awesome). The issue though is that when I drag the token from the MT library window, I get the red X on the map. The token property also shows the red X for both the Layout and Portrait windows.

The png and jpg files look fine when I view them from within the rptok file (changing it to a zip and viewing them). I can see the token image within the Library window. I tested this on a new campaign using the latest version of MT and it gave the same results. The chat window does give the error "Unknown library token "Lib:OnTokenMove".

Feature Requests:

2. Is it possible to create the ability to drag and sort overlays in the order we would like them to appear in the dropdown via the manage overlay window? It becomes problematic when I create new overlays and add them to the list. I like to sort overlays so it is easy to find particular styles that are grouped together.

3. I noticed the rptok adds a GM Name when imported into MT. I don't use GM Names very often, so it would be nice to be able to leave it blank when creating the rptok from TokenTool (and change the GM Name within TokenTool if a user prefers).

4. Can you add 400 px and 600 px options in the pulldown for creating D&D gargantuan and colossal size tokens? Or preferably, the ability to change what sizes appear in the pulldown by changing those settings with some sort of TokenTool preferences menu? I personally don't need to see any other token size options other than 200, 300, 400, and 600 and it would be handy if my version of TokenTool only displayed those sizes in the pulldown.

5. Ability to add the jpg as a Portrait, Handout, both, or none. Ability to leave this setting as a default within TokenTool so you don't need to change it every time you load TokenTool. Maybe TokenTool will can remember whatever settings you had set when you last closed it?

6. I know we've discussed this before, but I had an idea and was wondering if this was possible to do within TokenTool. What about using two overlays in TokenTool (a top overlay and a bottom overlay). The bottom overlay is used as the mask to "cut" the image. This overlay would be a TokenTool specific overlay that users do not actually change (the overlay image is not visible with the token). The Top overlay simply places the png file on top of the token to allow drop shadows and smooth edges. The top overlay is the border image the user sees and selects the style he prefers. This would be the TokenTool default overlays and custom overlays a user adds.

This allows for overlays with drop shadows to both the outside of the border and the inside of the border. I have LOTS of png borders that are already created like this that I could provide for TokenTool. If a user changes the size of this overlay, TokenTool could automatically change the size of the bottom overlay (mask) to compensate.

I also have a system for a transparent border that I use to represent invisible or ethereal tokens. When I create these tokens, my "mask" needs to be smaller than the overlay size in order to crop the image more so it does not appear underneath the transparent border. If possible, TokenTool could manage "transparent borders" similarly if a user identifies the border as transparent and then TokenTool uses a smaller bottom overlay (mask) to adjust with the larger sized top tranparent overlay.

I'm a graphic artist and I have always hated those default borders because the edges are extremely pixelated and many of them have pixels completely missing. I fixed all of those borders a few years ago and made them look much better, but they can't be used with TokenTool with the current way it masks images. I can provide my borders if they can finally be used with TokenTool.

I know that's a lot of information to absorb, so hopefully it makes sense. I'm an "ideas" guy more than I am a techie (just ask Wolph42 :P ), so I apologize if this stuff is not doable.

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

Re: Custom TokenTool 1.0b32 (Nerps!)

Post by aliasmask »

I recall the discussion with adding the mask separately which is a good idea. I don't use that, but I know how to get it to work the way you want. You just have to apply the mask only image first and then apply the border you want.

These are actually from 2 different sources but you should get the idea. First chose the trimmer and drop you image in tokentool. Then drag the trimmed image to a folder. Then chose the border you want and drag the image from the file back in to tokentool.

It is a good idea and it would be nice if it was done. I recall some new work has been done but I'm not sure about a release.
Attachments
Fire border.png
Fire border.png (120.43 KiB) Viewed 8196 times
RoundSquareCrop.png
RoundSquareCrop.png (1.23 KiB) Viewed 8196 times

User avatar
Oryan77
Dragon
Posts: 452
Joined: Sun Feb 20, 2011 3:14 pm

Re: Custom TokenTool 1.0b32 (Nerps!)

Post by Oryan77 »

Yeah that is what I was suggesting (which was pointed out in the past). I was just wondering if this could be set up in TokenTool to make the task much more convenient for users. I was wondering if TokenTool could accomplish this by making the mask perform it's duty without the user telling it to.

So the user simply selects his pretty overlay, but TokenTool uses an appropriate mask overlay in the process. Basically TokenTool is using two overlays (the mask and the overlay) as in your example images that you just posted. But the user only needs to focus on selecting which "top" overlay he wants to use and TokenTool masks it for him (so he doesn't need to do the same process twice; i.e. create a token by masking it first, then create the finished token by selecting an overlay).

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

Re: Custom TokenTool 1.0b32 (Nerps!)

Post by JamzTheMan »

Let see...first the problem.

1. Are you using the latest build 33? If so, in Linux, Mac, or WIndows? If Windows, .exe or jar?
1a. The Unknown library token error is weird, there shouldn't be anything in the xml pointing to a lib token. Are you sure this is a fresh campaign? Can you send/post an offending rptok?

Now for the requests (and in summary, yes, anything is possible with enough time & money!)

2. Keeping a sort order and creating the sort mechanism may be a pain. For a workaround, I believe it's sorted alphanumerically? Try opening the cache folder and renaming some for a workaround? I thought I did this myself to put my most used at the top...

3. Mostly it was a convenience thing. Most tokens would get name changed when stat blocked, so was more of a reminder and something more than "dragndrop" or whatever it was. Also, I have my MT set (and many others maybe) to rename new tokens, so I added it to GM Name as well. Just background. Starting to need a preferences dialog...otherwise doable

4. Easy enough. The values are hard-coded in the code and while I was there, I added a few. Can easily add 2 more and can look at a preferences file. I wanted to keep TT as a single file/no-install but we'll see...

5. Sure...again, preferences dialog/settings needed...

6. Technically, shouldn't be to hard. May need to add a Tab or something to the preview or something to show 1 or the other or both "masks". Feel free to post/send a could of samples to work with.


Now, given that, Real Life Work comes and goes (and currently here, ok, always here, just sometimes I get more freetime), then there's Summer like == golf every Friday, other MapTool development, weekly Pathfinder game, renovations on the house, redesigning the woodshop/garage, oh look shiny! Um, what was I saying?

Oh ya, I can get to most of it, no promises on when. On the plus side, the latest changes/version is now in GitHub so anyone is able/free to beat me to it! :-)
-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
Oryan77
Dragon
Posts: 452
Joined: Sun Feb 20, 2011 3:14 pm

Re: Custom TokenTool 1.0b32 (Nerps!)

Post by Oryan77 »

I'm using MT 1.3.b91 and TT 1.0.b33 (exe) on Windows 7 x64.

1. Here is the token I created that gives me the red x. I just relaunched MT and tested it again and for some reason it is not giving me that Unknown library token error. I'm not sure what is up with that because I definitely created a new campaign file the first time and got that error every time I selected the token. It does still give me the red x when placed on the map (but shows fine in the library window.
Spoiler
Aasimon Solar 04.rptok
(585.94 KiB) Downloaded 107 times
2. That is what I did in the past, but it became a hassle renaming every file and then deleting the old and importing the new each time. I understand if that is something you do not want to tackle. I just thought I'd ask in hopes it was a simple tweak.

6. Here are some example borders I have that use a slight drop shadow around the outer and inner edges of the token. I am also including a transparent border that I like to use for invisible creatures. I have a total of around 115 borders. I don't mind sharing them but I did not make most of them and would not know who to give credit to. I just grabbed them and edited them to make the edges nicer and fixed the ones with missing pixels.
Spoiler
Example Border using a subtle drop shadow
Borders (200x200 large) 1.png
Borders (200x200 large) 1.png (58.1 KiB) Viewed 8191 times
Example Border that I use for Fiendish Creatures
Borders (200x200 large) 2.png
Borders (200x200 large) 2.png (57.6 KiB) Viewed 8191 times
Example Border that I use for Celestial Creatures
Borders (200x200 large) 3.png
Borders (200x200 large) 3.png (66.92 KiB) Viewed 8191 times
The mask that I use for my borders
Borders (200x200 large) mask.png
Borders (200x200 large) mask.png (25.5 KiB) Viewed 8191 times
Example Transparent Border that I use for invisible creatures
Borders (200x200 large) 4.png
Borders (200x200 large) 4.png (57.95 KiB) Viewed 8191 times
The mask that I use for the transparent border (slightly smaller mask)
Borders (200x200 large) mask invisible.png
Borders (200x200 large) mask invisible.png (25.66 KiB) Viewed 8191 times
Example token showing the Invisible creature with a transparent border
Invisible Stalker 02.png
Invisible Stalker 02.png (60.89 KiB) Viewed 8191 times

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

Re: Custom TokenTool 1.0b32 (Nerps!)

Post by JamzTheMan »

Hrm, we got something funky. Can you post a few more tokens?

This is what I got. I initially got the same issue. So I unzipped the rptok, dragged the images, all x's. Made copies, still x's. So I opened the image into Paint, resaved, and it worked.

So opened b89, all images + rptok worked.

So opened my custom build again and 1.4 and they all worked. So I figured, cache issue, right? I cleared the images from cache, still worked. So, WTF.

So, for you, if you shutdown mt, open it again, drag the rptok, does it work? I'll need more test images. For me, any new token I create in TT works ok. Maybe post the source image as well (or better yet, use an image from online and post the URL).

At first I thought maybe TT is saving a bad png/jpg inside the rptok, but that doesn't explain why it starts working later. Thought it may be a problem caching the first time but clearing cache should replicate the issue so little stumped why. I need to try again with some debug going on.
-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
Oryan77
Dragon
Posts: 452
Joined: Sun Feb 20, 2011 3:14 pm

Re: Custom TokenTool 1.0b32 (Nerps!)

Post by Oryan77 »

I just used these images to create tokens:
Spoiler
Image
Image
Here is the token:
test image.rptok
(257.98 KiB) Downloaded 119 times
test pic.rptok
(110.47 KiB) Downloaded 125 times
I created the tokens the same way as before and I still get the red x. Reloading MT or TT doesn't help.

None of the tokens I have created with TT so far have worked within MT.

User avatar
RPTroll
TheBard
Posts: 3159
Joined: Tue Mar 21, 2006 7:26 pm
Location: Austin, Tx
Contact:

Re: Custom TokenTool 1.0b32 (Nerps!)

Post by RPTroll »

Just wondering. Did we ever get the Nerps version merged with the core Token Tool product? (sorry, catching up after a Summer of hell)
ImageImage ImageImageImageImage
Support RPTools by shopping
Image
Image

Zandel
Giant
Posts: 133
Joined: Thu May 13, 2010 1:52 pm

Re: Custom TokenTool 1.0b32 (Nerps!)

Post by Zandel »

Was this Red X problem ever resolved? I am still having it on Build 33 with MT build 91

Post Reply

Return to “TokenTool”