[Solved] Patch operation for Base Def

Started by Rah, March 01, 2020, 05:30:41 PM

Previous topic - Next topic

Rah

Hi,

I'm trying to add graphicData with a texPath to BodyPartProstheticImperialBase. Does anyone know how to do this? For some reason there's no texPath in the new Royalty bionic stuff. I want to add some custom textures.

<Operation Class="PatchOperationFindMod">
    <mods>
        <li>Royalty</li>
    </mods>
    <match Class="PatchOperationSequence">
    <operations>
    <li Class="PatchOperationAdd">
        <xpath>*/ThingDef[defName = "BodyPartProstheticImperialBase"]</xpath>
        <value>
<graphicData>
<texPath>Things/Item/BodyPart/Bionic</texPath>
<drawSize>0.90</drawSize>
</graphicData>
    </value>
    </li>
    </operations>
    </match>
</Operation>

K

I don't have Royalty to look at the XML, but I'm guessing you also need a graphicClass in the graphicData you add in that patch. Assuming the xpath is right, of course.

Also not certain of this since I can't look at the XML but it looks like you're trying to identify an abstract ThingDef using a defName. Does it actually have one? All of the abstract defs in the base game don't. You may need to use the attribute @Name instead.

Rah

K to to the rescue ! Yep, that worked. Thanks man. <3