Sign in to follow this  
SirSchwalk

How to Start Modding

Recommended Posts

I have never before in my life done any sort of work with code, or modding of any game. Wurm Unlimited has caused me to want to learn how. Specifically I want to figure out how to make new items/textures EX new wall types, possibly new armors. Problem is I am completely noob to all of this. Where should I start? What tools will I need? I just need a direction to start running in lol.

Share this post


Link to post
Share on other sites
3 hours ago, SirSchwalk said:

I have never before in my life done any sort of work with code ... Where should I start? 

 

Learning Java and programming in general might be a good start :)

 

3 hours ago, SirSchwalk said:

What tools will I need?

 

On the code side of things you will need some kind of decompiler (i personally use Procyon), you will need to learn to use Javassist, you will need to familiarize yourself with how Ago's client/server modloaders work (their sources and some examples are on github, see the relevant threads for links). You will need some kind of IDE (see here for discussion).

 

Specifically for adding wall types you'll probably need to figure out how to change enums, which we recently discussed here (but that will probably not make any sense unless you know java :P).

 

For modelling you'll need some kind of 3d modelling software that supports Collada models. Blender seems to be pretty popular and it's free. For added fun, most of the models used in WU are in WOM format that we currently have no tools to work with, though the client still supports loading Collada models which are supported by most 3d software.

 

  • Like 1

Share this post


Link to post
Share on other sites

Maybe look into some Minecraft modding tutorials. They are very detailed and will help with learning how to use Java and programming logic in general. The main difference between Minecraft's modding and here is that for Minecraft the community has made good API's for modding. I'm pretty sure that all Minecraft modding APIs, say "Forage" for example, are bytecode manipulation (ASM or Javassist) and reflection code wrapped up in methods. Teachers have used Minecraft modding to teach young children the basics of computer programming. 

Share this post


Link to post
Share on other sites
2 hours ago, joedobo said:

Maybe look into some Minecraft modding tutorials. They are very detailed and will help with learning how to use Java and programming logic in general. The main difference between Minecraft's modding and here is that for Minecraft the community has made good API's for modding.

 

I personally learned Java mostly from Minecraft modding, but i already had ~10 years of work as a coder and a bunch of other languages i knew on a professional level before that. I'm not really sure how good would that be to a complete newbie (e.g. "what's a variable?" level).

 

2 hours ago, joedobo said:

I'm pretty sure that all Minecraft modding APIs, say "Forage" for example, are bytecode manipulation (ASM or Javassist) and reflection code wrapped up in methods.

 

Actually while bytecode manipulation is used for some things, Forge (the main MC modding API) doesn't use it for normal stuff. 

 

What forge does is deobfuscate and decompile the game, apply source code patches (for example here), recompile and reobfuscate (kinda, it's complicated) then make binary patches from that are applied at runtime.

 

Those patches add a bunch of hooks that fire off events that mods can subscribe to to modify behavior. 99% of mods just subclass various Minecraft classes to add content and deal with events, no need for bytecode manipulation.

 

2 hours ago, joedobo said:

Teachers have used Minecraft modding to teach young children the basics of computer programming. 

 

I think you're thinking about projects like http://computercraftedu.com/ that aim to teach kids to program in minecraft (rather than for minecraft).

Share this post


Link to post
Share on other sites

Google "teach to code with minecraft". I'm not talking about computer craft; Although, playing with Lua scripting is a way to learn general programming thinking.

 

Yes, I think the biggest issue for someone who is totally new to program is learning how to think like a programmer. 

 

I guess WU modding is my first dance with Java. Before that I messed around with Python, Lua (to a limited extent), and a few scripting programs.

 

Bdew, Don't discredit simple and detailed tutorials. I bet you didn't eve bother to look at those because you already knew how to program in other languages. You probably thought you'll just need to learn Java syntax and you'll be good to go. I think someone totally new to programming will befit from some hand holding.

 

Heck, while it's not Java, I really like CodeCombat for messing around with programming. It is done in a fun and not tedious environment. It does seem to hide much of the fine details behind methods/function.

 

 

3 hours ago, bdew said:

Actually while bytecode manipulation is used for some things, Forge (the main MC modding API) doesn't use it for normal stuff. 

 

What forge does is deobfuscate and decompile the game, apply source code patches (for example here), recompile and reobfuscate (kinda, it's complicated) then make binary patches from that are applied at runtime.

 

Those patches add a bunch of hooks that fire off events that mods can subscribe to to modify behavior. 99% of mods just subclass various Minecraft classes to add content and deal with events, no need for bytecode manipulation.

 Oh, well we need to make that happen ... somehow. What I wouldn't give to be able to code with normal Java. Although, the process of dropping things into the server or client .jar files I don't like.

 

 

 

Share this post


Link to post
Share on other sites

Yeah, i'm not trying to discredit anything, and sorry if it came off that way. It's really hard for me to say how good or bad would that be for a newbie, since I haven't been one in a looooong while.

 

2 hours ago, joedobo said:

Oh, well we need to make that happen ... somehow. What I wouldn't give to be able to code with normal Java. Although, the process of dropping things into the server or client .jar files I don't like.

 

I'm not sure we have the manpower for that to happen as a community. Just looking at github Forge had 203 contributors over the last few years, and i'm pretty sure there were more that aren't shown since the project was moved at some point. It also burned out all the founding members and the current maintainer stated a few times that he hates everyone and everything and only keeps working on it since it's his sole source of income. 

 

And then there's all the other projects that provide the infrastructure for forge to do it's thing (FML, SS, MCP, FG, etc.).

 

But implementing some kind of decompile-patch-recompile system shouldn't be too hard. Then adding some kind of event bus. Then everyone instead of messing with bytecode editing makes patches that add the needed hooks and PR them to ago (which hopefully doesn't go all crazy from that :P). Ultimately a few years down the line we end with something like forge.

Share this post


Link to post
Share on other sites

If you've never before in your life programmed anything, try Code Combat and get back to me on how much it helps you. I've tried it and it seems pretty damn good, but I'm unsure how helpful it might be to a complete beginner.

Share this post


Link to post
Share on other sites
On 26.9.2016 at 9:44 PM, Sindusk said:

If you've never before in your life programmed anything, try Code Combat and get back to me on how much it helps you. I've tried it and it seems pretty damn good, but I'm unsure how helpful it might be to a complete beginner.

haha this is sweet, just looked into it =)

Share this post


Link to post
Share on other sites

I am self taught with everything I know about computers and programming.

 

I had the advantage of starting back when things were fairly young, or disadvantage not sure which.

 

The first thing I suggest is to familiarize yourself with object oriented programming. I would suggest tinkering with something a bit less complex than java. Maybe do a little bit of php and javascript, just to grasp the basics of creating objects that you call upon over and over again, and manipulate. You don't need to spend much time on it or become an expert, just get an idea of how it folds together.

 

Next step would be to just look at how other people did things. Most of what I learned was reverse engineering what others did, and learning from my experiences. Funny enough I learned a whole lot by doing simple scripting applications, one of my first big projects was a custom mIRC script, back in the 90's...god I am old. 

 

It takes a special kind of nerd, I really enjoy it. Playing around with code, pulling my hair out, and spending hours failing just for that reward of success later when I finally put it all together, I love it! It is like playing football to most people for me.

 

Edit:

Oh yeah and it is stupid I know, but true step number 1, get yourself visual studio and write a hello world program. There is a reason everyone starts there. It is like learning stairway to heaven on the guitar.

Edited by Xyp
  • Like 3

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