Kenabil's Map Viewer

From Wurm Unlimited
Revision as of 15:27, 29 August 2020 by Kenabil (talk | contribs)
Jump to navigation Jump to search

This is a tool which will make it possible to render the Wurm server map to a web page. The generated files needs to be uploaded to a web page server. If you run a dedicated server, you can setup automatic updating of the map, see below.

How to use the map viewer

Download the zip-file for the release you which to use. Extract the files, there should be a file named mapviewer.jar and a file named mapviewer.properties. You need to edit the properties-file and adjust it with the settings you wish to use for your server. It's possible to configure for more than one server.

To run the renderer, you need to open a terminal, also called command prompt, and type: java -jar mapviewer.jar

If you configure to run more than one server, you should name each server and then use the command: java -jar mapviewer.jar [name of you server]

You can use the logging settings in the properties-file, then change the command like this: java -Djava.util.logging.config.file=mapviewer.properties -jar mapviewer.jar [name of your server]

Properties

For all of these properties, you can add a suffix starting with a dash, then add the name of your server, e.g. server-name-MyAwesomeServer = My Awesome Server, and when you render the map you should use the command java -jar mapviewer.jar MyAwesomeServer, which will let the program know that you want to use properties with the MyAwesomeServer-suffix instead of the default values. The program will always use default values if one with your server name suffix is missing. If you use only one server and only want to render one map, then only use the properties as they are listed.

Name of server
server-name = [name]
This will be the name written as the name of the server, and is also used in the title of the web page.
Web page URL
web-page-url = [url]
URL to your main web page, which will be linked to when clicking on the server name in the panel. Defaults to "/".
Steam Server ID
server-id = [id]
The server ID, used when loading server data. If omitted, loads the first server.
Directory to the server data (static or relative path)
map-directory = [path]
Should be the the root directory where the map-files are located. Defaults to server-name, so will then look for a directory in the map viewer directory with the server name.
Original map directory, used for hiding terraforming on hidden deeds
original-map-directory = [path]
Should be the the root directory where the map-files of the original map are located. This is used for deeds that are hidden, which is a feature that requires the Awakening Server Mod installed on the server, where mayors can opt to hide their deeds. Defaults to server-name + "_original". This also requires that use-player-settings is set to true.
Directory where the generated files will be written
output-directory = [path]
Defaults to "./mapviewer".
Output format of the index file
output-format = [html|php]
Whether the generated index-file will be HTML or PHP format.
Show deeds on the map
show-deeds = [true|false]
Show deed borders on the isometric map
show-deed-borders-in-3d-mode = [true|false]
Show deed borders on the terrain and topographical maps
show-deed-borders-in-flat-mode = [true|false]
Use player settings
use-player-settings = [true|false]
This requires that the server has the Awakening Server Mod installed. Defaults to false.

Setup Automatic Updating

This requires that you run a dedicated server. First step then is to install the map viewer on the server. Next you need to setup a scheduled task which calls the map viewer program, in Linux that can be done either using crontab or systemctl. This guide will not explain how to do that. The scheduled task should first make a backup of the Wurm data, both map files and sqlite-db-files, then in the properties-file point to that backup. Also, in the properties file, make sure to point output-directory to where the web page is located.