Easier method to reorder states?

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
Post Reply
User avatar
Oryan77
Dragon
Posts: 452
Joined: Sun Feb 20, 2011 3:14 pm

Easier method to reorder states?

Post by Oryan77 »

I have created around 100 new state icons for MT users to use. In total, I have about 400 states in my campaign file.

Is there an easier way to reorder states so that they will appear in a proper order for users to easily locate them within the groups I have created?

Whenever you add a new state, MT drops the new state at the end of the list. If you want to put it back in alphabetical order, the only option I have ever seen is to use the "Move Up" and "Move Down" buttons. I've never been a big fan of how this works in MT, but it's a small issue so I never really cared.

However, now that I want to reorder 100 new states so that I can provide an easy to navigate export for the public, I'm seeing that I will need to click the "Move Up" button several thousand times just to put these things in order. :shock: I may need to use my big toe to click the mouse button to avoid carpel tunnel.

Is there a better way to reorder states that I am not aware of?

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: Easier method to reorder states?

Post by Full Bleed »

Oryan77 wrote:Is there a better way to reorder states that I am not aware of?
Yeah, it's pretty clear that the state part of MT was never really designed to handle that many states very well.

You could open up the campaign file with an appropriate unzip program (one that can pull a single file from the zip container, edit it, and then inject it without actually fully opening the zip), edit the content.xml file, find the section on states, and reorder with cut-and-paste. I've done this with a table file since there is no good way to work with large tables either.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

taustinoc
Dragon
Posts: 518
Joined: Mon Aug 03, 2015 6:30 pm

Re: Easier method to reorder states?

Post by taustinoc »

Note: Make a backup file before you start editing the campaign file. It's easy to make changes that cause the file to look corrupted to MapTool.

That said, 7Zip will open the file, and you can right-click on the content.xml to "edit", and that has always worked for me.

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: Easier method to reorder states?

Post by Full Bleed »

taustinoc wrote:Note: Make a backup file before you start editing the campaign file. It's easy to make changes that cause the file to look corrupted to MapTool.
Good advice. I guess I tend to take for granted that people will do this before editing a file. ;)
That said, 7Zip will open the file, and you can right-click on the content.xml to "edit", and that has always worked for me.
Yeah... that's the only way I can do this these days. Changing the file to a zip file, editing it, and repacking it just doesn't work anymore.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

taustinoc
Dragon
Posts: 518
Joined: Mon Aug 03, 2015 6:30 pm

Re: Easier method to reorder states?

Post by taustinoc »

Full Bleed wrote:
taustinoc wrote:Note: Make a backup file before you start editing the campaign file. It's easy to make changes that cause the file to look corrupted to MapTool.
Good advice. I guess I tend to take for granted that people will do this before editing a file. ;)
Even smart, experienced users do stupid things. A lot. Never hurts to remind people. Whether it's this guy or someone who finds this thread on a search later on.

(I'm a little OCD on the subject, because this is the sort of thing I do for a living.)
Full Bleed wrote:
That said, 7Zip will open the file, and you can right-click on the content.xml to "edit", and that has always worked for me.
Yeah... that's the only way I can do this these days. Changing the file to a zip file, editing it, and repacking it just doesn't work anymore.
There are a zillion different options for zipping up files these days, and most zip programs support nearly all of them. I would guess that Windows defaults to an options that isn't supported (or at least isn't used) by the library used by MapTool. In any event, it's easy enough to edit the .cmpgn file directly. I went so far as to set Windows to open it (and .rptok) files in 7Zip by default. Though I do not recommend anyone else do that. Do as I say, not as I do.

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: Easier method to reorder states?

Post by Full Bleed »

taustinoc wrote:There are a zillion different options for zipping up files these days, and most zip programs support nearly all of them. I would guess that Windows defaults to an options that isn't supported (or at least isn't used) by the library used by MapTool.
It's not just Windows zip. WinRarr. WinZip. And, yes, even 7-Zip. Go ahead and actually unzip a campaign file with 7-zip into it's own folder and then zip it back up and MT will not read it. The only way to do it is to use the "edit" method mentioned above because that seems to just pull the one file from the zip and then replace it without changing the actual zip.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

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

Re: Easier method to reorder states?

Post by wolph42 »

taustinoc wrote:Do as I say, not as I do
so you don't have any kids (yet)? Cause then you would know that *their* rule is: do as they do, not what they say :mrgreen:

nonetheless, good advice though. These days though I use dropbox, which has a repository so I never have to think about this stuff anymore.
(But even then I *still* make backups!!)

taustinoc
Dragon
Posts: 518
Joined: Mon Aug 03, 2015 6:30 pm

Re: Easier method to reorder states?

Post by taustinoc »

wolph42 wrote:
taustinoc wrote:Do as I say, not as I do
so you don't have any kids (yet)?
As a matter of fact, no, I don't. :D
wolph42 wrote: Cause then you would know that *their* rule is: do as they do, not what they say :mrgreen:
There are many circumstances in life where I would act otherwise, but in this case, since I do computer stuff for a living, I'm entirely comfortable doing stuff I would never recommend anyone else do. I mention it because there may be other IT pros out there who can take intelligent risks (and keep good backups).
wolph42 wrote:nonetheless, good advice though. These days though I use dropbox, which has a repository so I never have to think about this stuff anymore.
Does Dropbox archive old versions? I use Google Drive, because it's more convenient to me, and the old versions have saved me having to recreate several hours of work a few times. But I get issues with it sometimes, so I only kinda recommend it. And both are file sharing services, not backup services. They can be sort-of used for backups, but there are limits.
wolph42 wrote:(But even then I *still* make backups!!)
I expect you learned that lesson the same way everyone else always has. Including me.

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

Re: Easier method to reorder states?

Post by wolph42 »

taustinoc wrote:Does Dropbox archive old versions? I use Google Drive, because it's more convenient to me, and the old versions have saved me having to recreate several hours of work a few times. But I get issues with it sometimes, so I only kinda recommend it. And both are file sharing services, not backup services. They can be sort-of used for backups, but there are limits.
yup it does. However the free version stores them for one month (they changed that after a while). Still thats good enough for me. If I really FTU I can rely on that. For longer periods I keep the 'actual' backups.
taustinoc wrote:Do as I say, not as I do
Wolph42 wrote:Cause then you would know that *their* rule is: do as they do, not what they say :mrgreen:
taustinoc wrote:There are many circumstances in life where I would act otherwise, but in this case, since I do computer stuff for a living, I'm entirely comfortable doing stuff I would never recommend anyone else do. I mention it because there may be other IT pros out there who can take intelligent risks (and keep good backups).
I just mentioned it because a while back I got the advice: "note that your kids don't take your advice but they will do what you do". Your remark just reminded me of that.

taustinoc
Dragon
Posts: 518
Joined: Mon Aug 03, 2015 6:30 pm

Re: Easier method to reorder states?

Post by taustinoc »

wolph42 wrote: I just mentioned it because a while back I got the advice: "note that your kids don't take your advice but they will do what you do". Your remark just reminded me of that.
My view of children is that they should be kept in a box and fed through a slot until they turn 18. Then you seal up the slot. If they can't escape, we really don't want them anyway. Some might consider this a bit antisocial on my part.

(I was excused from any form of babysitting here in the office when I explained that my theory of how to do so involved a dark closet and a cardboard box. I'm not expected to make coffee, either.)


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

Re: Easier method to reorder states?

Post by Oryan77 »

taustinoc wrote:That said, 7Zip will open the file, and you can right-click on the content.xml to "edit", and that has always worked for me.
Thanks, I will give this a shot. And yes, I do graphic work for a living and tend to save often and backup regularly.

Speaking of which, this is a longshot here, but here's a question for you (being an IT guy).

I had recently spent the past several days using Photoshop to create custom shapes for Maptool. These are for over 100 state images I will be posting here soon for people to use with their tokens.

I don't know how familiar you are with Photoshop, but basically you can create vector shapes in Photoshop and the program automatically keeps them saved in its tools presets. Photoshop generates a file called "CustomShapes.psp" located in a hidden folder. I believe this file is what PS uses to store the custom shapes you create.

My luck, after days of creating these shapes, I finished and closed down Photoshop. I realized that I forgot to export out a custom shapes file so that I could import those shapes into Photoshop on another computer. When PS loaded, none of those shapes were there. Those shapes should have still existed when Photoshop loaded.

It's killing me that I lost all of that work. Unfortunately, the CustomShapes.psp file saved the last instance of the custom shapes that were loaded when I reloaded Photoshop (which was the default shapes).

My question is, do you know any kind of trick or file hack at all to revert this .psp file back to a previous state that may load up these custom shapes? I'm using Windows 8.1 and file history is not on, so that won't help me. I also tried Previous Version but that too did not have any history available. Being desperate, I reverted to my last saved version of Windows which was 24 hours prior to losing everything. Of course that did not change any Adobe files. I'm really bummed out about this and I had no reason to believe Photoshop would just remove my custom shapes like that. I've used the program for almost 20 years and have never seen this happen. As you can see, me asking you this question shows just how desperate I am to recover this data! :P

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: Easier method to reorder states?

Post by Full Bleed »

Oryan77 wrote:I don't know how familiar you are with Photoshop, but basically you can create vector shapes in Photoshop and the program automatically keeps them saved in its tools presets. Photoshop generates a file called "CustomShapes.psp" located in a hidden folder. I believe this file is what PS uses to store the custom shapes you create.
You may be SOL... restoring to an earlier point may not have been the best course of action.

But you can try this:

Go to the custom shapes file in this location: Users/[user name]/AppData/Roaming/Adobe/Adobe Photoshop XX/Adobe Photoshop XX Settings

Right click on the file>Properties and click the Previous Versions tab.


One other thing... in Photoshop try Edit>Preset Manager>Preset Type:Custom Shapes

If you hit Load, you can find the default file name and check it for "Previous Versions" as well. Not sure I followed where you were storing those custom shapes you made.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

taustinoc
Dragon
Posts: 518
Joined: Mon Aug 03, 2015 6:30 pm

Re: Easier method to reorder states?

Post by taustinoc »

I'm not familiar with Photoshop at all, but it sounds like Full Bleed's suggestion is your best bet. Good luck with it.

Post Reply

Return to “MapTool”