SineSwiper / RimWorld-XenobionicPatcher

Fix surgical operations to work with all of your bionics, implants, animals, humans, aliens
Artistic License 2.0
4 stars 3 forks source link

Animal Body #5

Closed Sashachan closed 3 years ago

Sashachan commented 4 years ago

I use a mod that adds new bodyparts that are in torso group. But because animals use different names("Body","Shell","SnakeBody") for their corepart, these new implants are not detected by the patcher i think. When i changed Bodies_Animal.xml corepart name to "Torso" then i could install these new implants, but im afraid that it may break other mods or something. Is there an easy way to fix it, or should new parts not work on animals?

The mod in question is https://steamcommunity.com/sharedfiles/filedetails/?id=1725545225, it adds Blood, Skin, Nervous System body parts to Torso.

SineSwiper commented 3 years ago

The static part mapper already has support for torsos being linked to "body" and "shell", and "snake" is actually one of the adjectives that gets stripped out, so that should match, too. Is this an mod ordering problem? I can dig into the XML a bit more.

SineSwiper commented 3 years ago

Yeah, actually, this is an issue with the mod. There are patch files for adding those parts specifically in the Torso. Here's an example:

        <xpath>/Defs/BodyDef/corePart[def="Torso"]/parts</xpath>
        <value>
            <li>
                <def>CNSkin</def>
                <coverage>0</coverage>
                <depth>Inside</depth>
                <groups>
                    <li>Torso</li>
                </groups>
            </li>
        </value>
    </Operation>

CyberNet could be changed to support other "torso" types, or you can try modifying the patch files yourself. You had the right idea with changing the name, but the patch files can fix it from the other side.

It's outside the scope of XP because XP is just mapping surgeries to other body parts, not creating new body parts.