ago

[RELEASED] Client mod loader

Recommended Posts

INFORMATION: Got server pack A0553A65523FE3159852CCAF022C54E021E81492:http://<IP>:8787/packs/A0553A65523FE3159852CCAF022C54E021E81492

SEVERE: Connection refused: connect
java.net.ConnectException: Connection refused: connect
 

The clients can't connect to the server

Share this post


Link to post
Share on other sites

Working ago.   Thank you.. Putta little something in your account :)

Share this post


Link to post
Share on other sites

Will have you have instructions for idiots for the map image replacement? :lol:

Share this post


Link to post
Share on other sites

Assuming you have a server called "Playtime"

 

* The servers table in wurmlogin.db has a column mapname. Change the mapname to "Playtime"

* Create mods/serverpacks/playtime.jar on the server with the files

maps/Playtime.png

mappings.txt

 

* And mappings.txt

map.playtime = maps/Playtime.png

 

* Add playtime.jar to the serverPacks property in mods/serverpacks.properties

* restart server

 

When a client connects to the server it will receive the changed mapname and the packs file.

It will then display the custom map as server map.

 

The map should be of size 920x620. Other sizes should work too but the image might be scaled.

 

 

Share this post


Link to post
Share on other sites

Awesome! Thanks! Even this idiot can follow that. :-P

 

Share this post


Link to post
Share on other sites

is it added as classpath=playtime.jar?

 

EDIT: I think I answered it myself. serverPack=playtime.jar

 

Which you said but I read wrong. haha

 

 

Edited by Audrel

Share this post


Link to post
Share on other sites

:-) Yes, it has the "s" in the properties file, just not in the forum post. And I have made the ugliest ingame map the world has ever seen! If you can find out where you are using it, you are truly blessed. The Freedom map might have gotten you closer. haha

 

Share this post


Link to post
Share on other sites

Im so close to having this work, it downloads to the client but I get a no image in game so Im sure its a path thing! An example of the files would be great!!

 

Share this post


Link to post
Share on other sites

Yeah, configurable files in the mod would be grrrreat.

Share this post


Link to post
Share on other sites
15 hours ago, Overlord said:

Im sure its a path thing! An example of the files would be great!!

 

I've setup a test server (ago modloader testserver) with a custom map (the creative map mapdump), the hitchingpost and the basic creatures from the creaturedemo.

 

on the server it has in mods/serverpacks.properties

classname=org.gotti.wurmunlimited.mods.serverpacks.ServerPackMod
classpath=serverpacks.jar
serverPacks=creative.jar
#Set a fixed port. If no port is selected a random free port will be used
serverPort=8787

The jar archive mods/serverpacks/creative.jar contains those files

Archive:  mods/serverpacks/creative.jar
  Length      Date    Time    Name
---------  ---------- -----   ----
   468674  12-08-2015 12:16   maps/creative.png
        0  12-08-2015 12:18   maps/
       34  12-08-2015 12:18   mappings.txt
---------                     -------
   468708                     3 files

mappings.txt contains just one line

map.testserver=maps/creative.png

The map name "Testserver" was set in the servers table in wumlogin.db database

update servers set mapname = 'Testserver'

 

The client needs the serverpacks mod to download the packs and the custommaps mod to actually use the custom mapname instead of the default cluster map.

There are no configuration options on the client besides enabling those mods.

 

Edited by ago

Share this post


Link to post
Share on other sites
16 hours ago, Overlord said:

Im so close to having this work, it downloads to the client but I get a no image in game so Im sure its a path thing! An example of the files would be great!!

 

I had noticed everything has to be lowercase.

Share this post


Link to post
Share on other sites
1 minute ago, Crustyfoot said:

I had noticed everything has to be lowercase.

 

Are you using a Java JDK and the jar command? (just making sure :))

 

jar cf myjar.jar file1 file2 ... file1/2/3 so on can be directories and it will recurse the files inside into the jar.

 

Share this post


Link to post
Share on other sites
12 minutes ago, Audrel said:

 

Are you using a Java JDK and the jar command? (just making sure :))

 

jar cf myjar.jar file1 file2 ... file1/2/3 so on can be directories and it will recurse the files inside into the jar.

 

 

 

I just used 7 zip and dragged all the files in the directory into the file and changed it to a .jar file.    Works fine. 

Share this post


Link to post
Share on other sites
Just now, razoreqx said:

 

 

I just used 7 zip and dragged all the files in the directory into the file and changed it to a .jar file.    Works fine. 

 

Huh. It said mine was invalid or something. Then again, my 7zip might be a century old. LOL

Share this post


Link to post
Share on other sites

The jar file is basicly just a zip file. 7zip may use it's own 7z format as default but can create zip as well.

Share this post


Link to post
Share on other sites

the best pay to do this is take another .jar file and copy it..     Open it in 7zip  and delete all the contents.   Drag your files, and directory in there.     Save.

 

Done. 

Share this post


Link to post
Share on other sites

I have one big question about this client modloader and I can't seem to find anything in the post that answers it. If changes are loaded to the client, what happens if you then want to connect to a different server or play solo and don't have or use those mods? Will it still work with a vanilla server, or do I have to make a completely new copy of the client for each different or vanilla server?

Share this post


Link to post
Share on other sites
41 minutes ago, Romen said:

I have one big question about this client modloader and I can't seem to find anything in the post that answers it. If changes are loaded to the client, what happens if you then want to connect to a different server or play solo and don't have or use those mods? Will it still work with a vanilla server, or do I have to make a completely new copy of the client for each different or vanilla server?

 

Its all based on hash.   If the new server doesnt use the loader..  Nothing happens..

If they used the loader and the hash is different for that server you'll get a new pack.

If the hash matches it will use the one you already have.

 

Ive tested this with a few servers that have ago's modloader running.   Not once did it break my client. 

 

Share this post


Link to post
Share on other sites

Appreciate the quick response Razor - was actually thinking of trying out your server, but wanted to make sure it wouldn't mess up the vanilla game I have going with a friend on my own server and that I could switch back and forth between the two.

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