zoom-able local maps creator

Forum for alternative clients, mods & discussions on the same.

Moderator: Phades

zoom-able local maps creator

Postby Tav » Sun Jun 26, 2011 9:33 pm

I have made a python script that makes zoom-able local maps from the maps produced by clients like Gilbertus or Enders.

It can be downloaded here:

http://sourceforge.net/projects/hnhmapo ... p/download

There are read-mes with info on how to use it.
It is really only useful when your maps get to be more than, say 20 tiles wide, minimum, really.

Also included is a slightly modified version of the local html viewer that comes with the clients. It is just changed to allow for the zooming is all.
Thanks to the people who made the clients and the html.

Please feel free to leave feedback in this thread. I am up for helping people with this, but I dunno if I will respond to any support or feature requests. I don't visit the forum much. the scripts are simple - anyone with a little python could figure them out. They are GPL so anyone can improve them or make them friendlier.
Anyway - I use them and find them very useful, so there ya go.

Changelog:
v1-1 No longer saves blank tiles.

I may sometimes be in IRC as deMangler (I can't log in with that name in the forums)
Tav
Last edited by Tav on Sat Jul 02, 2011 9:29 pm, edited 3 times in total.
Tav
 
Posts: 13
Joined: Fri Jun 10, 2011 10:21 pm

Re: zoom-able local maps creator

Postby Tav » Mon Jun 27, 2011 12:45 pm

I have had some feedback in IRC from users of these tools.
While their usage seems obvious to me, it is clear that I have not communicated this very well in the readme, so here is a walkthrough of how I use the tools.

Tile Offsetter
I am currently integrating a tile off setter into the zoom map creator. Meanwhile, the one posted by Ender later in this thread is excellent.

Zoomable map creator

When you have a large combined set of tiles, it is awkward not to be able to zoom the map, so that is what the zoomable map creator is for.
Copy all your combined tiles into the '9' folder. This is the furthest zoomed in level.
Run the python script.
It will produce directories filled with tiles for the html to display different zoom levels.
There is more information in the readme about setting the map size and zoom levels, but the defaults are good for a start to see how it works.


Feature Requests
I have been asked to add a 'include tiles in sub-folders' feature to the offset tool. I have not done this before because you would have to know that all the sessions had the same zero, so there is no point - you would just move all the tiles to the same dir in this case.
However, I will add this feature to ease session combining.

I will also try to make it so that you get thumbnails of tiles from two selected folders in the offset tool gui, so that you can pick out two identical tiles and it will work out the offset from that.

Also, I will produce a gui for the zoomable tiles creator, so that choosing map zoom and size is easier.

These features may take some time for me to do - I code for fun when I feel like it, but I will try to apply the suggestions. I will update this thread with progress.

Meantime, don't be afraid to use the tools as they stand. A little learning curve is no bad thing, and those scrips have evolved to be the way they are because that is what has turned out to be the best in practice in my day-to-day usage.
Also, don't be afraid to improve them yourself.

Personally, I find that too much automation spoils the fun. I would ideally rather just use the cartography feature in the game. I like the Iron-age northern Europe game more than I like the 21st century metagame and pwn all noobz game.
But I am also a compulsive messy python scripter, so there ya go.


More updates eventually.
Tv
Last edited by Tav on Sat Jul 02, 2011 9:20 pm, edited 1 time in total.
Tav
 
Posts: 13
Joined: Fri Jun 10, 2011 10:21 pm

Re: zoom-able local maps creator

Postby EnderWiggin » Mon Jun 27, 2011 1:02 pm

Here you can find python script that finds offset for different sessions automatically. Basically it checks hashes of minimaps in each folder and when find enough matches it calculates offset. I thought that this could be useful.
User avatar
EnderWiggin
 
Posts: 1154
Joined: Sat Mar 20, 2010 8:23 pm

Re: zoom-able local maps creator

Postby Tav » Mon Jun 27, 2011 1:15 pm

EnderWiggin wrote:Here you can find python script that finds offset for different sessions automatically. Basically it checks hashes of minimaps in each folder and when find enough matches it calculates offset. I thought that this could be useful.


That is VERY useful :)
Tv
Tav
 
Posts: 13
Joined: Fri Jun 10, 2011 10:21 pm

Re: zoom-able local maps creator

Postby Moogie » Sat Jul 30, 2011 2:45 pm

Hmm. I used the offset merger Ender posted to compile my sessions, and now neither the original Ender's map nor Tav's map will display the map. Is this because Ender's script made the tiles offset begin at -400? I tried manually going to that location in the map and I didn't see any tiles show up, so I think I'm just fucked.

Also, Tav, your zoom creator script doesn't appear to work. It gives an error about "from Tkinter import *" not found.

In future, what tools should I use, and what should I avoid? There's so many scripts and versions out there. All I really want is a compiled map that can zoom out.
User avatar
Moogie
 
Posts: 260
Joined: Wed Mar 31, 2010 4:57 am

Re: zoom-able local maps creator

Postby Tav » Mon Aug 15, 2011 8:27 pm

Moogie wrote:Hmm. I used the offset merger Ender posted to compile my sessions, and now neither the original Ender's map nor Tav's map will display the map. Is this because Ender's script made the tiles offset begin at -400? I tried manually going to that location in the map and I didn't see any tiles show up, so I think I'm just fucked.

Also, Tav, your zoom creator script doesn't appear to work. It gives an error about "from Tkinter import *" not found.

In future, what tools should I use, and what should I avoid? There's so many scripts and versions out there. All I really want is a compiled map that can zoom out.



I have no idea why it would gives this error if you have python (I use 2.7) installed the TK libraries should be.
However, the TK libraries are not required for this script so you could modify the script, commenting the lines as follows:

Code: Select all
#from Tkinter import *
#import tkFileDialog
#import tkMessageBox
#import tkSimpleDialog


The script does need the PIL libraries installed to stitch the tiles together.

I am sorry I have no time to devote to making this more user friendly at the moment.
I will get to it.
Meanwhile - anyone else please feel free to improve it. All the functional code is there, with the libraries installed and when run as described in the readme it does work, but not that friendly to non-python people at the moment I am afraid.

Tav.
Tav
 
Posts: 13
Joined: Fri Jun 10, 2011 10:21 pm


Return to The Wizards' Tower

Who is online

Users browsing this forum: Claude [Bot] and 1 guest