Help. No overlays.

Thoughts, Help, Feature Requests

Moderators: dorpond, trevor, Azhrei

Poki#3
Kobold
Posts: 5
Joined: Thu Aug 26, 2010 11:45 am

Help. No overlays.

Post by Poki#3 »

I downloaded TokenTool 1.0.b28 and my problem is that it doesn't show any overlays. All overlays show up as blank, unusable 64x64 pictures.
"Restore defaults" doesn't work. The pictures in "C:\Documents and Settings\Poki#3\.tokentool\overlays" are fine.

I'm running Windows XP. I have the latest Java (6.21) installed.
tt1.PNG
tt1.PNG (24.68 KiB) Viewed 5825 times
tt2.PNG
tt2.PNG (38.19 KiB) Viewed 5825 times

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

Re: Help. No overlays.

Post by Azhrei »

I don't think I've ever seen this before. :roll:

However, I know that some Java apps have problems when there are strange characters in the directory names. The "#" in "Poki#3" may be a problem. :?:

Unfortunately, changing your username on the computer is a bit drastic to fix this, but I don't have any other short-term fixes for you. There may be a way to run TokenTool from the command line and specify -Duser.home so that it uses a different default location, but I've never tried.

(The reason it's a problem is that some applications convert all file access into URL access, and the "#" is a special character in URLs. TokenTool may be doing such a conversion -- I'm not familiar with the source code.)

Edit: I had the wrong command line option.

Poki#3
Kobold
Posts: 5
Joined: Thu Aug 26, 2010 11:45 am

Re: Help. No overlays.

Post by Poki#3 »

Your theory is very probable.
I could change my username. There's an option for that in Windows User Management after all. I'm just worried that it might break some other programs that I have installed on my PC.

If there's a command line that I can use to switch the folder to a subfolder in the place I unpacked TokenTool (for instance D:\RP Tools\TokenTool 1.0.b28\Overlays) I'll gladly settle for it. I don't mind running a .bat file instead of a .jar file. But I'm not a good programmer, so I'd need someone to format the code for me ^^;
I can paste it into notepad and rename the file to a .bat no problem.

Do you think other programs might have some problems? I see MapTool also saves something in Documents and Settings.

PS: Unrelated, but I'm looking for a Square overlay with no border. Anyone have something like that, or could make one for me? ^^; I found a round overlay, and a square with rounded corners on this forum, but no completely square one.

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

Re: Help. No overlays.

Post by Azhrei »

Poki#3 wrote:I could change my username. There's an option for that in Windows User Management after all. I'm just worried that it might break some other programs that I have installed on my PC.
Well, it shoudn't. But you could always rename it back again if it failed for some other app. And it would be a good test to see if that was actually the problem you're having...
I don't mind running a .bat file instead of a .jar file. But I'm not a good programmer, so I'd need someone to format the code for me ^^;
I can paste it into notepad and rename the file to a .bat no problem.
I'll let one of the Windows folks here help with that. I don't do Windows. ;)
PS: Unrelated, but I'm looking for a Square overlay with no border. Anyone have something like that, or could make one for me? ^^; I found a round overlay, and a square with rounded corners on this forum, but no completely square one.
The default installation of TT includes square outlined images? I know I have a few but I don't know where I got them -- so I don't know if I can redistribute them. Sorry, not much help. :(

neofax
Great Wyrm
Posts: 1694
Joined: Tue May 26, 2009 8:51 pm
Location: Philadelphia, PA
Contact:

Re: Help. No overlays.

Post by neofax »

The default TT has a square one with a slight edge and a very minor(can barely tell it is there) frost effect to the image. As for changing the name, I wouldn't. I would add another account and use this to make your tokens. PITA, yes, but you don't run the risk of hosing your system. Or, you could always use the free Disk Imaging CD and image your disk to a external HDD. You could also buy a 8gb USB thumb drive and put Arch Linux on it, or use Virtualbox and put Arch Linux on it. You can even use Virtualbox and make a Hacintosh if you wanted, but I personally would not change my user name in Windows unless I was planning to format C:\ anyways.

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

Re: Help. No overlays.

Post by CoveredInFish »

A square without any border wouldnt be hard to make. Do you want something like this...
overlay_square_noborder.png
overlay_square_noborder.png (722 Bytes) Viewed 5793 times

Poki#3
Kobold
Posts: 5
Joined: Thu Aug 26, 2010 11:45 am

Re: Help. No overlays.

Post by Poki#3 »

@CoveredInFish - Yes, that's exactly what I wanted. Now onto my other problem.

@neofax - Look, installing a second operating system and booting it up just to make a few tokens, and then switching over to my main system to play is kind of uncomfortable. Same with making another user and having to relog myself. I also don't know if MapTool or CharTool will work 100%, since they also save thingamajigs in my D&S folder.
The best course of action would be if a developer fixed the code since, bottom line, this is a bug. I used one or two other Java programs that did not have such problems.

If not that, I'd wholeheartedly prefer a command line solution. I'd rather have my files saved in the program directory anyway. (I hate it when programs clutter system folders with their files <.<)

User avatar
jfrazierjr
Deity
Posts: 5176
Joined: Tue Sep 11, 2007 7:31 pm

Re: Help. No overlays.

Post by jfrazierjr »

Poki#3 wrote: The best course of action would be if a developer fixed the code since, bottom line, this is a bug. I used one or two other Java programs that did not have such problems.
Not bug. This is how Java deals with URL's which is how java opens files in most cases(ie, openfile takes a URL) and the limitation is in the URL specificacation, not Maptool.
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..

User avatar
jfrazierjr
Deity
Posts: 5176
Joined: Tue Sep 11, 2007 7:31 pm

Re: Help. No overlays.

Post by jfrazierjr »

I believe that if you go into your user account, there is an option for where to place your home directory. Alternately, (in theory anyway since I don't use TokenTool), you can use the -Duser.home option when launching TokenTool via a batch file.
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..

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

Re: Help. No overlays.

Post by Azhrei »

jfrazierjr wrote:Not bug. This is how Java deals with URL's which is how java opens files in most cases(ie, openfile takes a URL) and the limitation is in the URL specificacation, not Maptool.
Well, potentially it would be possible to change all occurrences of the File object so that local filenames are URL-encoded prior to being converted into a URL, so that "#" would become %23.

However, as Joe points out this is a ramification of how URLs are structured and is built in to the core Java libraries. It's not likely to change within the language any time soon, nor do I think it's practical to change it in MapTool. But I'll keep this in mind as we work on the design for the next major version.

Poki#3
Kobold
Posts: 5
Joined: Thu Aug 26, 2010 11:45 am

Re: Help. No overlays.

Post by Poki#3 »

jfrazierjr wrote:Not bug. This is how Java deals with URL's which is how java opens files in most cases(ie, openfile takes a URL) and the limitation is in the URL specificacation, not Maptool.
Gimp and Guild Wars Team Builder are also java programs that had no problem with my #. Windows allows that character in folder names. It doesn't have the right to not work.
and... why does it have to save overlays in D&S and not a folder within TokenTool again?


Anyway, I made a batch file by modifying the in included with CharTool and it looks like this:

Code: Select all

javaw -Xmx128M -Duser.home -jar tokentool-*.jar run
It works (YAY!), though I have now a .tokentool folder in D:/ (since I unpacked TT in D:\RP Tools\TokenTool 1.0.b28).
This is nitpicking at this point, but how can I make it save in TokenTools directory?

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Re: Help. No overlays.

Post by Phergus »

Poki#3 wrote:Gimp and Guild Wars Team Builder are also java programs that had no problem with my #. Windows allows that character in folder names.
Gimp is written in C.
Poki#3 wrote:It doesn't have the right to not work.
You're right. You should ask for your money back. :roll:
Poki#3 wrote:and... why does it have to save overlays in D&S and not a folder within TokenTool again?
It doesn't save them in Documents & Settings. It save them into your home directory which is in Documents & Settings. Just like Gimp saves all of its per user settings in your home directory.

It does this so that if you add overlays of your own and then later use a new version of TokenTool it will be able to find your overlays.

Code: Select all

javaw -Xmx128M -Duser.home -jar tokentool-*.jar run
You would normally follow user.home with an equals sign and a path like this:

Code: Select all

javaw -Xmx128M -Duser.home="." -jar tokentool-*.jar run
Which would make it create the .tokentool directory in the current directory.

User avatar
jfrazierjr
Deity
Posts: 5176
Joined: Tue Sep 11, 2007 7:31 pm

Re: Help. No overlays.

Post by jfrazierjr »

Poki#3 wrote:
jfrazierjr wrote:Not bug. This is how Java deals with URL's which is how java opens files in most cases(ie, openfile takes a URL) and the limitation is in the URL specificacation, not Maptool.
Gimp and Guild Wars Team Builder are also java programs that had no problem with my #. Windows allows that character in folder names. It doesn't have the right to not work.
and...

Yea, and Gimp is rebuilt for each different platform while Java style code is supposed to be portable. However, it is portable in that it was built with certain preconceptions about what types of file and directory name characters were allowed on each OS and when an OS goes and changes the rules, well... boom stuff blows up.

I have no idea about Guild Wars Team Builder, but I can only assume that it does not do anything with the user directory.
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..

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

Re: Help. No overlays.

Post by Azhrei »

Poki#3 wrote:Gimp and Guild Wars Team Builder are also java programs that had no problem with my #.
As was already pointed out, GIMP is not written in Java. That makes me wonder if that other thing you mentioned is either. But to be honest, I don't really care. 8)
Windows allows that character in folder names.
And this is important how? How does that saying go... "Windows is a 32-bit operating system based on a 16-bit platform for an 8-bit chip from a 2-bit company that can't stand 1 bit of competition." Of course, now there's a 64-bit veneer on top of all that. Woohoo. (Sigh.)

:mrgreen:
It doesn't have the right to not work.
Gee, so we're not within our rights to write it the way we did? I guess you should stop using it then. (Like the Soup Nazi: "No TokenTool for YOU!")
why does it have to save overlays in D&S and not a folder within TokenTool again?
As already pointed out, it doesn't. It saves them in your "home directory" which is under D&S.

Saving data files under Program Files (which was common in the old days) is a really screwed up plan: it doesn't allow users to easily find and back up all of their data in one place. By putting all user-created data into a single hierarchy of directories, the user can simply drag that directory to an external device and get everything they've created backed up.

Putting data in the same place as the executable is (generally speaking) pretty futzed under Windows since you can't just copy that directory and back everything up: you won't get registry entries, for example. That means using that technique to back up an application won't work, so using it to back up data is even worse.

But somehow MS has been able to foist this onto the user for a couple of decades now and only recently has anyone made an attempt to fix it. (Win7 pretty much forces all data into a directory below MyDocs unless you work hard to get around it. Which means you're knowingly shooting yourself in the foot and you get what you deserve. ;))

The RPTools apps are broken in that they use the registry to store some information (such as MapTool storing global macros there). Everything should be stored in external files, in text format, in a place chosen by the user (as much as possible). This allows a MapTool application to be completely ported to another system by just copying the data directory...
It works (YAY!), though I have now a .tokentool folder in D:/ (since I unpacked TT in D:\RP Tools\TokenTool 1.0.b28).
I guess I made an assumption which was invalid. I thought you would Google it to see how to use the -D option and thus would find a few pages that discuss this very issue. For example, this one.

However, I do agree that most Windows users don't really know anything about how Windows works (any more than a licensed driver knows how a gasoline engine works, or a child knows how a light switch works). At a minimum we should check for this problem at startup and produce an error message. I'll see about adding that into the initialization routine.

Poki#3
Kobold
Posts: 5
Joined: Thu Aug 26, 2010 11:45 am

Re: Help. No overlays.

Post by Poki#3 »

This topic turned a bit too ugly, and that totally was not my intension. If anyone took what I wrote the wrong way I'm sorry.

- Yes, Gimp is not written in java, my bad. GWTB is very niche. No wonder you don't know what it is. Doesn't matter.
- The "It doesn't have the right to not work." quote is out of context. What I meant was that if Windows allows for that, and a windows program (yes, I know it's multiplatform) does not and bugs out because of it, then it should be fixed one way or another. I don't know if it should be fixed in the program itself, or in the programing language, but the end goal of any program is to make it do something as best as it can and be as user friendly as possible without any errors. This is a problem or oversight that shouldn't be ignored. Yes, I don't believe in such a thing as a "shippable bug". I'm a perfectionist, sue me.
- Honestly, the Windows D&S folder (at least in XP) is full of trash. I hate it when, for instance, video games place their save games there. Maybe it's just me, but I'd rather have a clear "Save" folder in my game folder so I always know where can I find it and where can I back it up and unpack my backup after I reinstall the game. Then again I keep my programs and games organized around this fact. Maybe it's just me... I'm used to it, and it's comfortable for me that way, since I can backup only the things I want and not every single thing a program thinks is important to him. Especially when the things it saves can take up hundreds of megabytes.
- Thanks Phergus for the example. Works like a charm!
- Googling for "-D" won't give you any results relevant to this case on it's own, and the extra words I tried tacking on didn't help me. I guess I was just using bad search terms :/

Again, thanks to everyone for the help.

Post Reply

Return to “TokenTool”