- a command-line tool to create minimaps
- a command-line tool to view differences between revisions of maps
Examples usage
As an example of how they could be used, let's say someone just pushed changes on a map, say 007-1. Someone else reviewes the changes and wants to check if the minimap has to be updated due to "major" visual changes in the map.
Code: Select all
$ cd eathena-data/client-data/tools
$ ./map-diff.py 007-1
Such image could be displayed: which obviously shows the minimap should be regenerated. Using this command:
Code: Select all
$ ./minimap-render.py 007-1
E.g:
Code: Select all
$ ./map-diff.py changes-made-by-someone-007-1.tmx ../maps/007-1.tmx
In case you would want to compare other changes than the 2 most recent ones, there's always the possibility to do something like:
Code: Select all
$ git log --oneline ../maps/009-6.tmx
83d8751 Convert map compression format back to gzip. It turned out that the 0.5.0 client, which i
678b7c0 unified collision tiles for beds, moved top part of woodland indoor beds to over layer
2fcd26e Fix improper use of an effectively x2 tileset.
648d875 Fix tux9th's map changes for the new standards.
9af1f6d Maps for PvP-last man standing Event
Code: Select all
$ git show 83d8751:../maps/009-6.tmx > 83d8751_009-6.tmx
$ git show 9af1f6d:../maps/009-6.tmx > 9af1f6d_009-6.tmx
$ ./map-diff.py 83d8751_009-6.tmx 9af1f6d_009-6.tmx
Code: Select all
$ ./minimap-render.py $(sed s/.png// <<< $(ls ../graphics/minimaps/))
A rendered minimap typically looks like this: You will notice the small outlines to give a cell-shaded effect, that improves readability overs a simple scaled-down version of the map.
Limitations
The raster tool requires a large amount of RAM when the processed map is very large, which may end up to have the tool failing to render the map.
So far, 024-4 is the only map causing a problem with its 500x500 size.... Anyway, it's good practice to not make maps larger than 150x150.
Installation
Want to test ?
There are 2 steps.
- Grab the minimap and diff tools on my map-tools branch of my tmwa-client-data fork. See the 2 related commits here
- Grab the tmxrasterizer tool from the tmxrasterizer branch of my Tiled fork. Follow the compile instructions of Tiled. If you have an existing installation of Tiled, you can safely upgrade and install: there's only the new tmxrasterizer program that will be installed in your path.
- Install the Image Magick tools on your system.
- Git and Python.
If yes, any ways to improve ?
Thanks for your comments