looking for 1.1 Tutorials/Help

Started by rai32, June 20, 2020, 01:55:21 PM

Previous topic - Next topic

rai32

ive recently been getting into Rimworld Modding and have recently been found mysel repeatedly tripping up by ollowing outdated tutorials for rimworld and Harmony stuff.
Is there a particular place to look or some more relevant stuff? Im currently speciically looking at how to add actions to the drop down when right clicking if therese anything speciically or that

jacob814

Im not sure how you learn but I normally find a mod with similiar functionality to what I want and reverse engineer the code/xml to implement myself.
My Mods:
Glass&Lights

CottonISgood

same I want to mod rimworld but I don't know how :(

Canute

I think a good start would be to read the stickies of this subforum.

CottonISgood

Quote from: Canute on June 26, 2020, 05:22:32 AM
I think a good start would be to read the stickies of this subforum.
no because they are all outdated

LWM

The wiki still has a lot of valuable information.

If you have specific questions, this forum is usually excellent.

SickBoyWi

I'd recommend finding a mod that does something simple, subscribing/downloading it, and digging through the Defs folder to see how what it's setting up.

The folder structure of a mod is specific.
If it has an Assemblies folder, then it has source code associated. Those types of mods are going to be harder for you to figure out if you have no programming experience.
The Defs folder defines all the configuration that the game uses for items, pawns, and everything else.
The Textures folder has the images.
The Patches folder has xpath patches. These, again, will be more complicated if you aren't familiar with how markup language looks and works.
The About folder just has a file that tells Steam about the mod, and perhaps a preview image

Find some simple mods that only have Def folders, dig around, open the files, and look at what they're doing. See if you can figure it out there. Once you feel like you have some mastery of that, dig into a mod's Patches folder, and download DotPeek to decompile the file in a mod's assembly folder. Then you'll need Visual Studio Community edition to open the source code solution and dig around in there.

If you're starting with no knowledge, there's a ton to figure out. Start slow, and spend the time it takes to learn it.


Pornhonker

#7
Quote from: CottonISgood on June 26, 2020, 05:28:20 AM
no because they are all outdated

I didn't run into this problem - Jecrell's tutorial worked very well for me, and I used the Rimworld cookiecutter with Visual Studio 2017 to create the mod structure. I used ILSpy to decompile Assembly-CSharp.dll and saved it as a Visual Studio C# project (File - Save Code) that I then opened in Visual Studio. This last step was the most important, because then I could just search for specific classes that I could then patch with Harmony. And then finally I used ILSpy on similar mods to see how they patched the source code. The source code for many mods are also available on GitHub.

I don't consider myself a good programmer at all and I've never used C#, but I was able to make a workable mod in a few hours. I recommend seeing how far you get and then posting here with specific questions.