-
Notifications
You must be signed in to change notification settings - Fork 21
Custom maps
The following is a guide how to setup a custom map on a server called "Playtime". Replace "Playtime" with your servers name.
To enable a custom mod the server needs have
- the servermap mod
- the serverpacks and httpserver mod
or
- a custom map name
- a pack with the map
- the serverpacks and httpserver mod
The mod uses an existing mapdump or creates a mapdump on server start and prepares a server pack with the map for the clients.
The mod has two options:
- addServerMapPack: set to
true(the default) to have the mod create and activate the server pack. Setting this option tofalsewill effectively disable the mod. - renderServerMap: set to
true(the default) to create a map dump on server start. Set tofalseto use pre-rendered map dumps only. The mod looks for pre-rendered mapdumps in- MAPDIR\MAPNAME.png (e.g. Adventure\heavenord.png)
- MAPDIR\render.png
- mapdump.png (in the wurm server main folder, can be created with #savemapdump)
NOTE: This should be enough to have the server map ready. If it does not show up check the trouble shooting section.
The map name is set in the table "SERVERS" in wurmlogin.db.
update "SERVERS" set "MAPNAME" = 'Playtime' where local = 1
Note: "MAPNAME" is the map name sent to the client, "NAME" is the name as seen in the "Server Name" field of the "Local Server" settings
The map image must be a PNG file and should have the size 920x620. It's best to create a square map of 620x620 and add 150 pixels of border to the left and right. The border my contain additional keys and information for the players.
The map must be packed into a pack file.
The pack file must contain the map as "Playtime.png" and a file "mappings.txt" with the contents
map.playtime = Playtime.png
Note: The key "map.playtime" must be all lowercase even if the map name may contain upper case letters.
Compress the two files into a Zip archive named playtime.jar and place it in the folder mods/myservermap.
The serverpacks mod must be configured to pickup the pack with the map. This is best done by placing it in its own mod. Store this in mods/myservermap.properties:
classname=org.gotti.wurmunlimited.modloader.SimpleMod
serverPacks=playtime.jar
Start the server. You should get a similar log message in "server.log"
ServerPackMod: Added pack F18603CBAC21775433D54D832FC1EE3038A21AF3 for pack mods\myservermap\playtime.jar
The client needs the "serverpacks" mod and the "custommap" mod
Serverpacks is required to fetch the map from the server, custommap is required for the client to not discard maps with a different name than the default Wurm Unlimited map names. Both mods are enabled by default when using the client modloader v0.7 and later.
No further configuration is required on the clients.
After logging in on the client the console should have similar messages:
INFORMATION: Got server pack F18603CBAC21775433D54D832FC1EE3038A21AF3 (http://serveraddress:52646/packs/F18603CBAC21775433D54D832FC1EE3038A21AF3)
INFORMATION: Added server pack F18603CBAC21775433D54D832FC1EE3038A21AF3
and the custom map should show up.
- The server address for the httpserver mod (previously for serverpacks mod) can be configured with the "publicServerAddress" setting in httpserver.config (or serverpacks.config).
- The fixed port can be selected with the "serverPort" setting.
- The interface for the serverpacks server can be selected with the "internalServerAddress" setting.
If the server is behind a firewall then create a port forwarding entry in the firewall and set "publicServerAddress" and "publicServerPort" accordingly.
You can also use a real web server to handle the downloads. Setup the server to handle all pack download urls and set "publicServerAddress" and "publicServerPort" to the web server.
The Download URL contains http://0.0.0.0/...
- Either set the servers external address to your computers IP address or use that IP address as "publicServerAddress" in the httpserver (or serverpacks) configuration.
Make sure the client serverpacks mod is installed