Sign in to follow this  
Brian

Mod Development Basics

Recommended Posts

If someone with many years of Java experience were inclined to attempt writing or maintaining some mods, how would he go about doing it?

 

Is there some kind of SDK or similar resources for Wurm Unlimited, or does one just decompile the jar files and try to make best guesses by looking at various existing mod source code?

Share this post


Link to post
Share on other sites

well i can at least tell you how i do it.

Yup decompiled the server.jar, use the modlauncher and yeah pretty much do what ever you want, I only do server mods though.

 

Plenty of mods out there already you can use to get the general idea of how it works.

Share this post


Link to post
Share on other sites

Reverse engineer. That was my best teacher.

Oh you said that. Sorry was posting out of my league.

Edited by lowborn

Share this post


Link to post
Share on other sites

This article about setting up IntelliJ for WU modding is very good:

 

For decompiling I'm using Procyon, this shell script will make decompiling jars easier:

#!/bin/bash

DECOMPILER=/usr/local/share/procyon/procyon-decompiler-0.5.36.jar

ARGS=""
for i in "$@"
do
    ARGS="$ARGS $i"
done

java -jar $DECOMPILER $ARGS

I've just named it "javad" and placed in /usr/local/bin

Then decompiling a jar is done in the terminal:

javad [jarfile] -o [outputdir]


Modding with Ago's modlauncher is done using javassist, which is a good idea getting to know.

 

Ago's example mods are all you need to learn how to write mods, make code injections etc. Everything else is about reading the decompiled code and making injections or adding hooks.

 

  • 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