Maintaining MODs with Core Updates

Started by Mudder, August 21, 2016, 08:06:14 PM

Previous topic - Next topic

Mudder

As I've been spending an overwhelming amount of time with this game lately I have begun to change mods and generally find some lacking for what I want.

This is ultimately the start of me creating my own. Though I have an aversion to working on mods when the core game is constantly breaking them...

That said, with the release of each core update are there notes on what needs to change in the mods in order to be compatible?
I'm a freelance programmer/web developer that spends way too much time here rather than making money.

CallMeDio

Hello, idk about the notes, but you will probably notice what changed very easily when you open visual studio and see the red outlined parts of the code when you reference the new game assembly dll in your mod project.
Updates aren't that frequent and depending on what you do you may not even need to change. If you want to go for it, don't stop because of that ;) , Rimworld mods are a excellent way to learn coding, what is very cool as C# is a very good language to do applications with.
QuoteYou may need a rubber duck.  Also, try some caveman debugging.

Released mods: No Mood Loss on Prisoner Sold or Died

RawCode

Implement abstraction layer for your code.

It won't magically solve issues, but, you will need to change only one type (and in case of really good implementation, one text file) to fix issues, and multiple abstraction layers can be packed into mod, allowing it to run on otherwise incompatible versions without any modifications.

1000101

Don't forget that Tynan has a changelog when a new release is out so you can always reference that too.
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

Mudder

Quote from: RawCode on August 22, 2016, 03:13:36 AM
Implement abstraction layer for your code.

It won't magically solve issues, but, you will need to change only one type (and in case of really good implementation, one text file) to fix issues, and multiple abstraction layers can be packed into mod, allowing it to run on otherwise incompatible versions without any modifications.

Yeah, If I go the modding route I'll just make some tools to do this and also allow me to use JSON because XML is just the worst. I'm going to look at the changes 15 brings so I get an idea of what needs to happen.

I noticed there is a source directory, though it seems incomplete. How much of the game code are we actually given?
I'm a freelance programmer/web developer that spends way too much time here rather than making money.

robotguy4

#5
Quote from: Mudder on August 23, 2016, 01:52:45 AM
Yeah, If I go the modding route I'll just make some tools to do this and also allow me to use JSON because XML is just the worst.
I've read there are things that XML can do that JSON can't. I'm not sure if this is an issue. Try it anyway if you can. A converter might work.

Quote from: Mudder on August 23, 2016, 01:52:45 AM
I noticed there is a source directory, though it seems incomplete. How much of the game code are we actually given?
You're probably going to want to decompile RimWorld's code to get a better idea of what things do.

Also, if you're planning on replacing how things work, you're going to have to look into CCL Detours. From my understanding generally if you're implementing new things you'll just be making code. If you're changing the behavior of an already existing class or making it reference your new code, you'll need detours.

RawCode

Quote from: Mudder on August 23, 2016, 01:52:45 AM
Quote from: RawCode on August 22, 2016, 03:13:36 AM
Implement abstraction layer for your code.

It won't magically solve issues, but, you will need to change only one type (and in case of really good implementation, one text file) to fix issues, and multiple abstraction layers can be packed into mod, allowing it to run on otherwise incompatible versions without any modifications.

Yeah, If I go the modding route I'll just make some tools to do this and also allow me to use JSON because XML is just the worst. I'm going to look at the changes 15 brings so I get an idea of what needs to happen.

I noticed there is a source directory, though it seems incomplete. How much of the game code are we actually given?

source is just few random classes
you must decompile game manually, don't forget to tag all "advanced" options in ILSPY to see mangled yield and enumeration code.

you can use GSON, JSON or ever pack everything directly into DLL, it's all about how much time and resources you have to implement features, not supported by vanilla game.


Mudder

Quote from: RawCode on August 23, 2016, 09:04:27 AM
source is just few random classes
you must decompile game manually, don't forget to tag all "advanced" options in ILSPY to see mangled yield and enumeration code.

you can use GSON, JSON or ever pack everything directly into DLL, it's all about how much time and resources you have to implement features, not supported by vanilla game.

Tynan doesn't seem shy about posting large snippets of code on Reddit. Rather than decompile everything (which feels dirty to me) has anyone asked him why he doesn't just release the code? I could imagine he would enjoy a good amount of pull requests (free labor anyone?)
I'm a freelance programmer/web developer that spends way too much time here rather than making money.

1000101

Quote from: Mudder on August 23, 2016, 02:18:02 PMTynan doesn't seem shy about posting large snippets of code on Reddit. Rather than decompile everything (which feels dirty to me) has anyone asked him why he doesn't just release the code? I could imagine he would enjoy a good amount of pull requests (free labor anyone?)

Already been discussed to death.  It's a closed source project and he want's to protect his IP.  There is nothing wrong with that.
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

System.Linq

Quote from: 1000101 on August 23, 2016, 02:36:53 PM
Quote from: Mudder on August 23, 2016, 02:18:02 PMTynan doesn't seem shy about posting large snippets of code on Reddit. Rather than decompile everything (which feels dirty to me) has anyone asked him why he doesn't just release the code? I could imagine he would enjoy a good amount of pull requests (free labor anyone?)

Already been discussed to death.  It's a closed source project and he want's to protect his IP.  There is nothing wrong with that.

Not to mention maintain his creative vision of how he wants the game to be.

Mudder

Quote from: Psychology on August 23, 2016, 06:07:08 PM
Not to mention maintain his creative vision of how he wants the game to be.
No, he would still maintain complete control. No one would force him to accept any pull requests.

Quote from: 1000101 on August 23, 2016, 02:36:53 PM
Already been discussed to death.
Fair enough. All I will say is... This.
I'm a freelance programmer/web developer that spends way too much time here rather than making money.