RimWorld

RimWorld

Comigo's Majestic Trees - Regrowth Compatibility Patch
『Gecko』 16 Dec, 2023 @ 10:11am
[Solution - Trees not Invisible + Transparent - REAL Patch] Sad to see half-baked mods around here ... and authors not taking the time to do some 5 minute work...
To the people still having issues with even this mod being installed, which is also no wonder, as it is not even really patching the files properly ... do the following:

Search for your mod (ID: 2882287753) and rename the image path inside your explorer from:
"/Textures/Things/Plant/Leafless"
to
"/Textures/COGPack/Plant/Leafless"

* mod authors should ALWAYS stick to the origins, if you are even too lazy to patch out properly, as mismatching paths will also lead to non-optimal overrides, in this case, it will override NOTHING, as comigo's path system is not starting with "Things"...


Secondly, go to the root of that mod and create a subfolder called "Patches", right next to "About" and "Textures".

Go inside and create an XML file, name it whatever you want. I like it organized, so I called mine "Plants_Wild_Leafless_Patches.xml".
Open up that sucker.
Slap in this code:

<?xml version="1.0" encoding="utf-8" ?> <Patch> <!-- Core\Defs\ThingDefs_Plants\Plants_Wild_*.xml --> <Operation Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName="Plant_TreeBirch"]/plant</xpath> <value> <leaflessGraphicPath>COGPack/Plant/TreeBirch_Leafless</leaflessGraphicPath> </value> </Operation> <Operation Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName="Plant_TreeBirch"]/modExtensions/li[@Class="MajesticFramework.PlantExtension"]</xpath> <value> <makeLeafless>true</makeLeafless> <makeTransparent>true</makeTransparent> </value> </Operation> <Operation Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName="Plant_TreeCypress"]/plant</xpath> <value> <leaflessGraphicPath>COGPack/Plant/TreeCypress_Leafless</leaflessGraphicPath> </value> </Operation> <Operation Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName="Plant_TreeCypress"]/modExtensions/li[@Class="MajesticFramework.PlantExtension"]</xpath> <value> <makeLeafless>true</makeLeafless> <makeTransparent>true</makeTransparent> </value> </Operation> <Operation Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName="Plant_TreeMaple"]/plant</xpath> <value> <leaflessGraphicPath>COGPack/Plant/TreeMaple_Leafless</leaflessGraphicPath> </value> </Operation> <Operation Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName="Plant_TreeMaple"]/modExtensions/li[@Class="MajesticFramework.PlantExtension"]</xpath> <value> <makeLeafless>true</makeLeafless> <makeTransparent>true</makeTransparent> </value> </Operation> <Operation Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName="Plant_TreeOak"]/plant</xpath> <value> <leaflessGraphicPath>COGPack/Plant/TreeOak_Leafless</leaflessGraphicPath> </value> </Operation> <Operation Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName="Plant_TreeOak"]/modExtensions/li[@Class="MajesticFramework.PlantExtension"]</xpath> <value> <makeLeafless>true</makeLeafless> <makeTransparent>true</makeTransparent> </value> </Operation> <Operation Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName="Plant_TreePoplar"]/plant</xpath> <value> <leaflessGraphicPath>COGPack/Plant/TreePoplar_Leafless</leaflessGraphicPath> </value> </Operation> <Operation Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName="Plant_TreePoplar"]/modExtensions/li[@Class="MajesticFramework.PlantExtension"]</xpath> <value> <makeLeafless>true</makeLeafless> <makeTransparent>true</makeTransparent> </value> </Operation> <Operation Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName="Plant_TreeWillow"]/plant</xpath> <value> <leaflessGraphicPath>COGPack/Plant/TreeWillow_Leafless</leaflessGraphicPath> </value> </Operation> <Operation Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName="Plant_TreeWillow"]/modExtensions/li[@Class="MajesticFramework.PlantExtension"]</xpath> <value> <makeLeafless>true</makeLeafless> <makeTransparent>true</makeTransparent> </value> </Operation> <Operation Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName="Plant_TreeWillow"]/plant</xpath> <value> <leaflessGraphicPath>COGPack/Plant/TreeWillow_Leafless</leaflessGraphicPath> </value> </Operation> <Operation Class="PatchOperationAdd"> <xpath>/Defs/ThingDef[defName="Plant_TreeWillow"]/modExtensions/li[@Class="MajesticFramework.PlantExtension"]</xpath> <value> <makeLeafless>true</makeLeafless> <makeTransparent>true</makeTransparent> </value> </Operation> </Patch>

And call it a day. Restart the game, if it was running before.
Done. This is how you actually patch stuff around a C# based XML-modded game.