Mapper tool for Ender's client

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

Moderator: Phades

Mapper tool for Ender's client

Postby loic71 » Sat Feb 22, 2014 11:09 pm

A safe* Ender's client map tool!
Please, if you like this project, share your experience.

Changelog

v1.2 - Stable :
Notes : I focused mainly on bugs correction and made it more user friendly.
Quite a good version IMO. Don't hesitate to try it out.

- Bug fixed : when moving your character around the program would crash because of bad function call.
- Much more talkative program : you now know what's going on.
- Much more stable, lots of optimizations, less leaks.
- Tile size now configurable (default : 80x80 pixels -> a bit zoomed out)
- No more black screen of death
- Number of folders included replaced by max_number_of_tiles (default : 2000)
- Added a map max loading time (default : 20 seconds)

What's coming next :
- Indexer : You'd first have to run a script which would index all your tiles and build a map based on it).
=> Will require lots of time at first usage (specially for old players) but will then generate a nice map very quickly.
=> An indexed map would allow the tool to save markers' positions effectively.
- Big tiles : Generate big tiles so there are less objects on the canvas thus better overall performances.

Known bugs :
- Thicket areas (fucking thicket) appearing black.

v1.2a - Laggy
Notes : Still some work to do (optimization greatly required), but the results are awesome in my opinion! Hope you like it.

- Configuration made easier (in the first lines of the function __init__, there are variables and comments...) - but still quite dirty => need to make config file.
- Loads last map folder + older folders (number of folders to set in "self.number_of_folders_to_show" variable.
- @TODO : View optimization (moving canvas is way too laggy with more than 50 folders). - FIXED in 1.2 - Stable
- @TODO : Optimization of the refresher (when new tiles are shown in the session), reloading the whole map is very very dirty :oops: - FIXED in 1.2 - Stable
- @TODO : Craft something cleaner than a black screen when current folder is empty. - FIXED in 1.2 - Stable
- @TODO : Find some curios and get some sleep. :D - NOT FIXED, yet. :D

v1.1a
- Now loads your last map folder (based on currentsession.js)
- Everytime a tile appears in the folder, draws it, and tries to center on it (buggy, needs client informations, pending question to Ender.) - Awesome for dual screen users.
- Hotfix : crash when nothing in last map folder corrected.

v1
- The program finds your biggest map folder, and show its content.
- Map draggable (if it's too fast for you, change the "gain" value line 61 to something lower)

Installation notes
It's a python script.
Windows :
From Binary :
- Download this file : https://drive.google.com/file/d/0BzKNp_JzxbpYejZnU0NPSHEweTQ/edit?usp=sharing
- Rename it removing ".fugoogle" so its name becomes : BIN.zip
- Unzip it in your Ender's client map folder.
- Launch the mapper[version here].exe
- Enjoy !

From sources :
To use it you need python 2.7
And the Python Image Library (PIL)

You need to place the script in your ender's map folder ([Ender's installation folder]/map)
And then right click on it, select "open with..." and chose "python.exe"

Linux : [not tested]
[FEDORA] yum install python tkinter python-pillow-tk (thanks romovs)

In a terminal, run : [apt-get / yum / whatever you use...} install python python-imaging
Then : cd /your/map/directory && python mapper.py

Improvement ideas
- add markers for water/soil/clay nodes, caves, homes, friendly places, hostile places, (saveable to config file which could be shared)...
- instead of just showing the bigger map folder, compile all folders to show every place one have visited!
- in game map replaced with this one **
- [your idea here...]


Hope you like it!
Feedback greatly appreciated.


* As it is shipped as a source file, you can edit it with your favorite text editor and check out the code (66 lines atm).
You'll see that it's harmless and hopefully, some hnh wizards will tell you that in this thread posts.

** Replacing in game map would require the game to ask this program for the map instead of hnh map server.
This program would open a socket to listen to the client and act as a proxy between hnh map server and the game client.
Tiles coming from hnh server would be compared to the local library, and once they match, the program could send ender's client the whole map saved by the user (with the markers in the images).
You do not have the required permissions to view the files attached to this post.
Last edited by loic71 on Wed Feb 26, 2014 3:34 am, edited 10 times in total.
loic71
 
Posts: 57
Joined: Wed Feb 19, 2014 5:44 am

Re: Mapper tool for ender

Postby romovs » Sun Feb 23, 2014 7:48 am

To run it on recent Fedora distributions do "yum install python tkinter python-pillow-tk". python-imaging package has been removed a while ago...

Also a little suggestion: add a check for empty tile folders. e.g. I had "var currentSession = '2014-02-22 18.53.44';"
and 2014-02-22 18.53.44 dir was empty. mapper crashed on 63th line with "UnboundLocalError: local variable 'name' referenced before assignment"
but even after fixing the error it just gave a black screen which might be little bit confusing.
User avatar
romovs
 
Posts: 1472
Joined: Sun Sep 29, 2013 9:26 am
Location: The Tabouret

Re: Mapper tool for ender

Postby loic71 » Sun Feb 23, 2014 9:53 am

Yeah sorry about that.
I mentionned it in the previous edit of the post, and re-uploaded the file but should have renamed it and do a new version.

Anyway, I'm glad to meet the first user. Hope you like the idea.

Please, give the 1.2a a shot. It's still alpha and may be laggy, but it's a first draft implementing the usage of older map folders. I'm quite proud.

In next releases I will focus on canvas optimization and have this being fluid.
loic71
 
Posts: 57
Joined: Wed Feb 19, 2014 5:44 am

Re: Mapper tool for ender

Postby FirePowi » Sun Feb 23, 2014 2:55 pm

Fedora 20 :

Firstly, install dependancies [in a terminal] :
Code: Select all
su -c "yum install python tkinter python-pillow-tk"


Secondly, download this script :
*clic*

Thirdly, move this file on /usr/local/bin/ ; rename it "mapper" ; migrate from CRLF to LF (Windows to GNU/Linux textfile) [In terminal]
Code: Select all
su -c "sed 's/\x0D$//' PATH_TO_DOWNLOAD_FOLDER/mapper1.2a.py > /usr/local/bin/mapper"

replace PATH_TO_DOWNLOAD_FOLDER by the path of your download folder. Maybe ~/Downloads for english installation ; ~/Téléchargements for french installation ; …

Following, make it executable : [In Terminal]
Code: Select all
su -c "chmod +x /usr/local/bin/mapper"


Then, go to your Ender "map" forder with cd [In Terminal]
Code: Select all
cd …/map


Finally, try it
Code: Select all
mapper
FirePowi
 
Posts: 3
Joined: Sun Feb 09, 2014 11:58 am

Re: Mapper tool for ender

Postby borka » Sun Feb 23, 2014 8:15 pm

1. people installing Ender with updater.jar won't have a currentsession.js (nor map.html)

2. from your description i can't see what it does - do i have to run Ender and be ingame?

3. I run it offline and i just get a huge program window with just a black background (didn't fiddle with the script yet) - wonderfull when using 1 monitor only :P

4. for your suggestion to Ender - i guess you'll have to write a script yourself ;)

5. the biggest problem with making own local maps is that often maps not getting saved (empty map subfolder)
Avatar by SacreDoom
Java 8 - manually downloads - good to check for actual versions url here:
viewtopic.php?f=42&t=40331
Remember what the dormouse said: Feed your head Feed your head
User avatar
borka
 
Posts: 9965
Joined: Thu Feb 03, 2011 7:47 pm
Location: World of Sprucecap

Re: Mapper tool for ender

Postby loic71 » Sun Feb 23, 2014 8:49 pm

1 - I installed Ender's with updater.jar, and have a currentsession.js (no map.html though)
2 - You don't have to be in game, but it's better to be since it shows the new map tiles automatically
Basically, it gets the value in the currentsession.js, get the tiles in the folder (hence the black screen if you have no tiles) then compare this set of tiles with previous folders to show them on the map too.
3 - See my 2
4 - I won't be tinkering with java, and do believe it's not that a complicated thing for Ender (he is so good) :roll:. Plus, I'm pretty sure when new functionnalities will appears in my map, he will be glad to help it be even better :)
5 - I don't know, I never had problems with maps not getting saved.
I think local maps are better because up-to-date, and you can do private things (like add markers on the map).
Although I'm thinking of an enhancement which would download some tiles from algeralith's and apply a transparent grey layer on them.

Edit for 5 : nevermind you're right, when login out, and back in with another char, a new map folder is created and it's empty until you discover map tiles you didn't before in that session - you'll need to relaunch Ender's when you switch of character on the same account if you want the map to show.
loic71
 
Posts: 57
Joined: Wed Feb 19, 2014 5:44 am

Re: Mapper tool for ender

Postby loic71 » Wed Feb 26, 2014 2:33 am

Found out I could use google drive to share this in a binary.
Here's the link : https://docs.google.com/file/d/0BzKNp_JzxbpYejZnU0NPSHEweTQ/edit
Download, rename in BIN.zip, extract to Ender's client map folder, and launch mapper.[version].exe

v1.2 - Stable :
Notes : I focused mainly on bugs correction and made it more user friendly.
Quite a good version IMO. Don't hesitate to try it out.

- Bug fixed : when moving your character around the program would crash because of bad function call.
- Much more talkative program : you now know what's going on.
- Much more stable, lots of optimizations, less leaks.
- Tile size now configurable (default : 50x50 pixels)
- No more black screen of death
- Replaced : Number of folders included replaced by max_number_of_tiles (default : 2000)
- Added a map max loading time (default : 20 seconds)

What's coming next :
- Indexer : You'd first have to run a script which would index all your tiles and build a map based on it).
=> Will require lots of time at first usage (specially for old players) but will then generate a nice map very quickly.
=> An indexed map wouls allow the tool to save markers' positions effectively.
- Big tiles : Generate big tiles so there are less objects on the canvas thus better overall performances.

Known bugs :
- Thicket areas (fucking thicket) appearing black.
- Bad centering when swapping character without restarting the client

I don't have much time to test it extensively, please let me know if you encounter some bug.
loic71
 
Posts: 57
Joined: Wed Feb 19, 2014 5:44 am

Re: Mapper tool for Ender's client

Postby FirePowi » Wed Feb 26, 2014 1:38 pm

Thanks !
FirePowi
 
Posts: 3
Joined: Sun Feb 09, 2014 11:58 am

Re: Mapper tool for Ender's client

Postby loic71 » Wed Feb 26, 2014 2:42 pm

FirePowi wrote:Thanks !


I see you like it!
Please tell me what you'd like in it in next version :)

Oh, and you are most welcome, my pleasure.
loic71
 
Posts: 57
Joined: Wed Feb 19, 2014 5:44 am

WTB Pies / AGI food

Postby loic71 » Wed Feb 26, 2014 3:30 pm

You know, maybe with a good map you would have ease to find what you want without asking ofther people.

Which is quite rewarding on the long term, don't you think?

Give it a shot
loic71
 
Posts: 57
Joined: Wed Feb 19, 2014 5:44 am

Next

Return to The Wizards' Tower

Who is online

Users browsing this forum: Claude [Bot] and 0 guests