Ludeon Forums

RimWorld => Mods => Topic started by: chaotix14 on January 08, 2019, 01:28:03 PM

Title: Is it possible for mods to disable recipes from other mods without C#?
Post by: chaotix14 on January 08, 2019, 01:28:03 PM
I'm planning to make a food overhaul addon for VGP, which would require disabling the vanilla and VGP recipes(specifically the fine and lavish meal recipes need to go, the other recipes can just be overwritten) to make it possible to re-balance the food.
Now I know it's possible to overwrite the recipe with one that I will use(though I'd like to avoid that for sanity's sake, having to refer to stewed meat with veggies as mealfine is going to cause coding mistakes), or I could edit the workbenches that pull the recipes(which just seems like a bad idea and an unnecessary source of compatibility issues).

So with me having been out of rimworld modding for a long while I wondered if there was a way to disable recipes in other mods without having to overwrite them or having to muck around modifying other files that would definitely lead to compatibility issues?
Title: Re: Is it possible for mods to disable recipes from other mods without C#?
Post by: Razuhl on January 08, 2019, 07:54:44 PM
Have you tried using xml patches? Defining one that removes the building entries on a group of recipes and one that removes all matching recipe entries on buildings should sever everything that comes in through xml. Implied recipes that are generated during runtime would not be effected.
Title: Re: Is it possible for mods to disable recipes from other mods without C#?
Post by: chaotix14 on January 09, 2019, 12:47:17 PM
I can't say I have, like I said haven't done any rimworld modding in a long while. But looking through the coding in other mods it does seem like the exact thing I was looking for.
Title: Re: Is it possible for mods to disable recipes from other mods without C#?
Post by: Kirby23590 on January 10, 2019, 01:54:59 AM
xpath or patching (https://ludeon.com/forums/index.php?topic=32785.0) shouldn't be hard...

Here's a more complete guide here  (https://gist.github.com/Zhentar/4a1b71cea45b9337f70b30a21d868782)to do patching by removing, replacing and adding recipes and stats...

Make sure you put your patch file in your Rimworld/Mods/MyMod/Patches/MyPatch.xml