- Apr 27, 2019
- 5
- 3
You can check out my mods Random Names and Chaotic Markets and Complex Breeding for Dummies. They come with Source Code.
For mods that don't have source code. You can still use dnSpy or ILSpy to look inside and see how they do things. It's not as convenient as having the source code, but with a bit of practice, it is enough to copy/modify any feature from another mod.
Most MBM mods use BepInEx + Harmony patches to hook into the game without changing the game files.
The inline editing (IL) that Krongorka suggested, is a different way that also works. But has two downsides:
First: For some reason it doesn't work sometimes. I want to edit a method but cant.
Second: IL changes the existing game files directly. So if your mod changes the game files and another mod also changes the game files, then you have to choose. Cant use the same game file twice. So if you just want to do some quick edits for personal use, then IL is the easier way (well, if it works -> see the first downside). If you want to maybe upload the mod (yes please ) then I recommend trying out the BepInEx + Harmony approach (which is the approach guyverek CB and also most mods from Surgy s modpack use).
For extra Context: If you want to edit spine data like Krongorka does, then you need to touch game files anyway, so the second downside of IL is something you have to deal with anyway. But for mods that only change code: if you want to be compatible with other mods then BepInEx + Harmony is a great.
Also a while ago someone asked me how to make a RandomNames mod for Complex Breeding. I know that is not what you are looking for exactly, but the pointers might still help, so I copy paste them here:
You don't have permission to view the spoiler content. Log in or register now.
Oh, now its much more clearer. BepInEx is fine for me too, what I didn't know, the harmony stuff until now. I will definitely check them out. Thanks the detailed description and source codes! I think I know what I will tinkering in my free time ^.^You can check out my mods Random Names and Chaotic Markets and Complex Breeding for Dummies. They come with Source Code.
For mods that don't have source code. You can still use dnSpy or ILSpy to look inside and see how they do things. It's not as convenient as having the source code, but with a bit of practice, it is enough to copy/modify any feature from another mod.
Most MBM mods use BepInEx + Harmony patches to hook into the game without changing the game files.
The inline editing (IL) that Krongorka suggested, is a different way that also works. But has two downsides:
First: For some reason it doesn't work sometimes. I want to edit a method but cant.
Second: IL changes the existing game files directly. So if your mod changes the game files and another mod also changes the game files, then you have to choose. Cant use the same game file twice. So if you just want to do some quick edits for personal use, then IL is the easier way (well, if it works -> see the first downside). If you want to maybe upload the mod (yes please ) then I recommend trying out the BepInEx + Harmony approach (which is the approach guyverek CB and also most mods from Surgy s modpack use).
For extra Context: If you want to edit spine data like Krongorka does, then you need to touch game files anyway, so the second downside of IL is something you have to deal with anyway. But for mods that only change code: if you want to be compatible with other mods then BepInEx + Harmony is a great.
Also a while ago someone asked me how to make a RandomNames mod for Complex Breeding. I know that is not what you are looking for exactly, but the pointers might still help, so I copy paste them here:
You don't have permission to view the spoiler content. Log in or register now.