Ludeon Forums

RimWorld => Mods => Help => Topic started by: klun222 on January 12, 2020, 02:25:35 PM

Title: Help patching out vanilla content.
Post by: klun222 on January 12, 2020, 02:25:35 PM
Hey, I did this (3 code examples):

<li Class="PatchOperationRemove">
            <xpath>Defs/ResearchProjectDef[defName = "PlateArmor"]</xpath>
         </li>

<li Class="PatchOperationRemove">
            <xpath>ThingDef[defName = "Gun_PumpShotgun"]</xpath>
         </li>

<li Class="PatchOperationRemove">
            <xpath>ThingDef[defName = "Apparel_PowerArmor"]</xpath>
         </li>



So you see what kinds of things Im trying to patch out. So removing research works (it did remove successfully), but removing weapons and armor doesn't. Is there something wrong with my code?

Thanks.
Title: Re: Help patching out vanilla content.
Post by: hauvega on January 12, 2020, 02:38:56 PM
Do not forget the Defs/ part in xpath.
Title: Re: Help patching out vanilla content.
Post by: klun222 on January 12, 2020, 04:12:48 PM
Just did that, doesnt work
Title: Re: Help patching out vanilla content.
Post by: LWM on January 12, 2020, 04:41:37 PM
For what it's worth, "/Defs/" is better than just "Defs/"

I assume this is all part of a PatchOperationSequence?


<li Class="PatchOperationRemove">
            <xpath>/Defs/ThingDef[defName = "Gun_PumpShotgun"]</xpath>
         </li>


That code does look like it should work, if it is in a sequence thing?  What does your entire XML look like?
Title: Re: Help patching out vanilla content.
Post by: klun222 on January 13, 2020, 07:00:13 AM
Yes, its a part of patch operation sequence, it should remove about 10 resserch and 15 weapons or apparel. In the same file, it removes resserch but not the other.
Title: Re: Help patching out vanilla content.
Post by: hauvega on January 13, 2020, 10:11:53 AM
I just tried with a single line patch file and it does remove a weapon. 
Title: Re: Help patching out vanilla content.
Post by: LWM on January 13, 2020, 10:54:00 AM
Quote from: klun222 on January 13, 2020, 07:00:13 AM
Yes, its a part of patch operation sequence, it should remove about 10 resserch and 15 weapons or apparel. In the same file, it removes resserch but not the other.

And your patch sequence isn't getting stopped by one of the earlier patches returning "fail"?

Title: Re: Help patching out vanilla content.
Post by: klun222 on January 13, 2020, 12:52:34 PM
I dunno, it works now, seems the patch was too long maybe? I made 3 patch files and now they work.