Sign in to follow this  
Borgir

WU2GMap - Google Maps generator for WU [discontinued]

Recommended Posts

Edit 6/2018: Project deleted (GitHub = sellouts).

 

Hello,
 
I'm working on a simple Google Maps generator for WU. It's actually continuation of my older project (Google Maps for WO).

Current version: v0.9-beta.5 (2015-11-16)

GitHub repository

Download

User guide

Example maps (possible spoilers!)

 
Generated maps are standalone (only HTML, CSS, JS and images), not connected to WU in any way anymore.
 
Maps can be viewed locally (using any modern web browser) or uploaded to a web server (no PHP or Java needed).
 
Generator is written in Java, so far working only on Windows (Linux fix coming soon).

 
Future features:
 


- more configurable options
- bridges
- walls, doors, fences, gates (only when zoomed enough)
- in-game map annotations
- altars
- dens
- source fountains
- source springs
- custom markers and labels (non database stuff: points of interest, road names, sea names, mountain names, canal names, tunnel names...)
- tower zones (guards response, building restrictions)
- settlement zones (deed, perimeter)
- bigger zoom
- progressive zoom
- more...


 
Any feedback or ideas are welcome.

Edited by Borgir
  • Like 6

Share this post


Link to post
Share on other sites

I just added link to an underground map type example.

I still need to fix colors for some tile types (reinforced walls, floors, etc.) and add proper legend.

... and also bigger zoom.

Edited by Borgir

Share this post


Link to post
Share on other sites

Would love to see the cave map on a WO server like Xanadu.

Haha, yeah, that'd be interesting to see.

Some time ago we've been trying to map Indy (by counting tiles manually), but it was pretty much impossible task (without the server database access):

http://diggu.github.io/independence/underground/

  • Like 1

Share this post


Link to post
Share on other sites

This looks really cool, however I ran into a slight problem..


 



C:\wumap>java -jar WU2GMap.jar c:\wumap\source c:\wumap\web

WU2Gmap - Google Maps generator for Wurm Unlimited


 

START

Exception in thread "main" java.lang.ClassNotFoundException: org.sqlite.JDBC

        at java.net.URLClassLoader.findClass(Unknown Source)

        at java.lang.ClassLoader.loadClass(Unknown Source)

        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

        at java.lang.ClassLoader.loadClass(Unknown Source)

        at java.lang.Class.forName0(Native Method)

        at java.lang.Class.forName(Unknown Source)

        at dig.borgir.wu2gmap.wu.MyWuMap.openAllDatabases(MyWuMap.java:142)

        at dig.borgir.wu2gmap.wu.MyWuMap.<init>(MyWuMap.java:50)

        at dig.borgir.wu2gmap.wu.WuMapFactory.createWuMap(WuMapFactory.java:14)

        at dig.borgir.wu2gmap.WU2GMap.main(WU2GMap.java:51)


 

.map files are in c:\wumap\source\ and I copied the entire folder "sqlite" into the same folder as the .map-files (keeping the directory).

static.zip is extracted into c:\wumap\static\  (no double subfolder, the files are located directly in the static\ folder)

 


C:\wumap>java -version

java version "1.8.0_65"

Java SE Runtime Environment (build 1.8.0_65-b17)

Java HotSpot 64-Bit Server VM (build 25.65-b01, mixed mode)

 

What am I doing wrong? :)

 

The c:\wumap\web folder exists and is empty.


 


 


Edit: perhaps I need the third party stuff somewhere? I'm a cluts when it comes to java-related stuff :P


Edited by Forked

Share this post


Link to post
Share on other sites

I have to figure out this GitHub release system, but meanwhile you can download lib.zip from here
 
https://drive.google.com/file/d/0B5u2Jp0dOEj3VTRBMFVFMVpDMjg/view?usp=sharing
 
and extract the content in the lib subdirectory, so file structure is like this:
 
WU2GMap.jar
lib/commons-lang3-3.4.jar
lib/pngj-2.1.1.jar
lib/sqlite-jdbc-3.8.11.2.jar
lib/WurmAPI-2015-11-07-common.jar

 

obsolete

Edited by Borgir

Share this post


Link to post
Share on other sites

Also use
 
C:\wumap>java -jar WU2GMap.jar c:\wumap\source\ c:\wumap\web\
 
instead of
 
C:\wumap>java -jar WU2GMap.jar c:\wumap\source c:\wumap\web
 
I'll fix this later.

 
PS: static.zip stuff is important only later for generated maps

Edited by Borgir

Share this post


Link to post
Share on other sites

That did the trick!


 


C:\wumap\web\2015-11-10-15-17-55\index.html


 


Is it possible to have an option where it does not include the date and time in the folder name?


 



Oh and just a small note. When specifying source folder you have to have the leading \ behind it. :)


 




C:\wumap>java -jar WU2GMap.jar c:\wumap\source c:\wumap\web

WU2Gmap - Google Maps generator for Wurm Unlimited


 

START

Opening c:\wumap\sourcesqlite\wurmlogin.db


...

 

C:\wumap>java -jar WU2GMap.jar c:\wumap\source\ c:\wumap\web\

WU2Gmap - Google Maps generator for Wurm Unlimited


 

START

Opening c:\wumap\source\sqlite\wurmlogin.db

<everything works>


Share this post


Link to post
Share on other sites

Is it possible to have an option where it does not include the date and time in the folder name?

Edited by Borgir

Share this post


Link to post
Share on other sites

Ok, I simplified whole process little bit - only one single file (6 MB zip) to download now, plus easier usage.

Also fixed the "\ bug".

Edited by Borgir

Share this post


Link to post
Share on other sites

I can remove timestamp based subdirectory completely, but generator would have to delete everything in the output directory first.

Thank you. :) 

For my part I'll write a script that dumps the needed files, run your .jar and then upload the resulting files to a different server using either FTP or SCP. It would be more of a pain to make when I have to find the correct folder to upload from.

 

I'll test the new version either later today or tomorrow and give you (more, but hopefully not as annoying :P ) feedback.

Share this post


Link to post
Share on other sites

Not annoying at all, quite the opposite. I appreciate your feedback and help.


 


I'll get rid of that timestamp thingy tomorrow (too tired tonight already).


Edited by Borgir

Share this post


Link to post
Share on other sites

And I'm back looking at this. :)

Do you run this on linux or windows?
I see that it creates tiles.cmd under both map\ and underground\ in my output directory.

That file use convert to do stuff. However it does not run the file and running it manually gets me this: 

 

C:\wumap\web\2015-11-11-09-07-06\map>mkdir tiles\0
 
C:\wumap\web\2015-11-11-09-07-06\map>convert 1.png -resize 256x256 tiles\0\0-0.p
ng
Invalid Parameter - -resize
 
C:\wumap\web\2015-11-11-09-07-06\map>mkdir tiles\1
 
C:\wumap\web\2015-11-11-09-07-06\map>convert 1.png -resize 512x512 map-512.png
Invalid Parameter - -resize
 
C:\wumap\web\2015-11-11-09-07-06\map>convert map-512.png -crop 256x256 -set file
name:tile "%[fx:page.x/256]-%[fx:page.y/256]" +repage +adjoin "tiles\1\%[filenam
e:tile].png"
Invalid Parameter - -crop
 
C:\wumap\web\2015-11-11-09-07-06\map>del map-512.png
Could Not Find C:\wumap\web\2015-11-11-09-07-06\map\map-512.png
 
C:\wumap\web\2015-11-11-09-07-06\map>mkdir tiles\2
 
C:\wumap\web\2015-11-11-09-07-06\map>convert 1.png -resize 1024x1024 map-1024.png
Invalid Parameter - -resize
 
C:\wumap\web\2015-11-11-09-07-06\map>convert map-1024.png -crop 256x256 -set fil
ename:tile "%[fx:page.x/256]-%[fx:page.y/256]" +repage +adjoin "tiles\2\%[filename:tile].png"
Invalid Parameter - -crop
 
C:\wumap\web\2015-11-11-09-07-06\map>del map-1024.png
Could Not Find C:\wumap\web\2015-11-11-09-07-06\map\map-1024.png
 
C:\wumap\web\2015-11-11-09-07-06\map>mkdir tiles\3
 
C:\wumap\web\2015-11-11-09-07-06\map>copy 1.png map-2048.png
        1 file(s) copied.
 
C:\wumap\web\2015-11-11-09-07-06\map>convert map-2048.png -crop 256x256 -set fil
ename:tile "%[fx:page.x/256]-%[fx:page.y/256]" +repage +adjoin "tiles\3\%[filename:tile].png"
Invalid Parameter - -crop
 
C:\wumap\web\2015-11-11-09-07-06\map>del map-2048.png
 
C:\wumap\web\2015-11-11-09-07-06\map>mkdir tiles\4
 
C:\wumap\web\2015-11-11-09-07-06\map>copy 2.png map-4096.png
        1 file(s) copied.
 
C:\wumap\web\2015-11-11-09-07-06\map>convert map-4096.png -crop 256x256 -set fil
ename:tile "%[fx:page.x/256]-%[fx:page.y/256]" +repage +adjoin "tiles\4\%[filename:tile].png"
Invalid Parameter - -crop
 
C:\wumap\web\2015-11-11-09-07-06\map>del map-4096.png
 
C:\wumap\web\2015-11-11-09-07-06\map>mkdir tiles\5
 
C:\wumap\web\2015-11-11-09-07-06\map>copy 4.png map-8192.png
        1 file(s) copied.
 
C:\wumap\web\2015-11-11-09-07-06\map>convert map-8192.png -crop 256x256 -set fil
ename:tile "%[fx:page.x/256]-%[fx:page.y/256]" +repage +adjoin "tiles\5\%[filename:tile].png"
Invalid Parameter - -crop
 
C:\wumap\web\2015-11-11-09-07-06\map>del map-8192.png
 
C:\wumap\web\2015-11-11-09-07-06\map>mkdir tiles\6
 
C:\wumap\web\2015-11-11-09-07-06\map>copy 8.png map-16384.png
        1 file(s) copied.
 
C:\wumap\web\2015-11-11-09-07-06\map>convert map-16384.png -crop 256x256 -set fi
lename:tile "%[fx:page.x/256]-%[fx:page.y/256]" +repage +adjoin "tiles\6\%[filename:tile].png"
Invalid Parameter - -crop
 
C:\wumap\web\2015-11-11-09-07-06\map>del map-16384.png

 
convert.exe in windows (at least win 2012 r2) is for converting a FAT volume to NTFS.
 
Now I'm going to guess that this should be usable for this task. Going to try it with convert.exe from ImageMagick-6.9.2-5-portable-Q16-x64.zip
 
Using that convert.exe seems to do the trick. 
It's running now, so I'll update this post with the result. :)
 
 
Update: contents of static/ are still not copied into the static-folder in the output dir, but after doing that manually and using the convert.exe from the .zip above everything looks good :)
Edited by Forked

Share this post


Link to post
Share on other sites

I just uploaded new version (beta.2) and new instructions.

Tested on Windows only atm, will update for Linux later today.

Share this post


Link to post
Share on other sites

Now I'm going to guess that this should be usable for this task. Going to try it with convert.exe from ImageMagick-6.9.2-5-portable-Q16-x64.zip

Edited by Borgir

Share this post


Link to post
Share on other sites

convert.exe in windows (at least win 2012 r2) is for converting a FAT volume to NTFS.

Edited by Borgir

Share this post


Link to post
Share on other sites

I guess I'll have to add "path to the IM convert.exe" to the configuration and generate batch files using full path, to prevent confusions like this.

 

Yeah, sorry about that. I'm just about done writing a .cmd script that handles everything for me. The only thing missing is uploading it through ftp. Using 0.9 beta 2 now and it appears to work great. :)

Share this post


Link to post
Share on other sites

Vanilla Adventure with just two guys playing on it: http://tda.nu/wumap/map/


Everything works excellent. The underground map only shows ore veins you have found and our little settlement is visible. :)


  • Like 1

Share this post


Link to post
Share on other sites

Version 0.9-beta.4 released today:


  • simplified execution
  • only one file to edit (config.ini)
  • only one file to run (run.bat)
  • plus some other tweaks

Next step - more configurable options (colors, labels, markers).


 


Slowly getting closer to the first stable version, hopefully :)


  • Like 2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this