How do I patch a prosthesis for CE so that it raises CarryWeight & CarryBulk?

Started by Hjkma, September 18, 2019, 05:02:38 AM

Previous topic - Next topic

Hjkma

So far, I manage to raise the weight capacity. But for some reason it raises a maximum of 20 kilograms, despite the fact that I set a high value. And the bulk capacity does not rise at all, adding CarryBulk value does not help. Patch code:
<?xml version="1.0" encoding="UTF-8"?>
<Patch>
<Operation Class="PatchOperationFindMod">
<mods>
<li>Combat Extended</li>
</mods>
<match Class="PatchOperationSequence">
<success>Always</success>
<operations>
<li Class="PatchOperationAdd">
<xpath>Defs/HediffDef[defName="SpineExoskeleton"]/stages/li/statOffsets</xpath>
<value>
<CarryWeight>+75</CarryWeight>
<CarryBulk>+25</CarryBulk>
</value>
</li>
</operations>
</match>
</Operation>
</Patch>

Hediff code:
  <HediffDef ParentName="AddedBodyPartBase">
    <defName>Hediff_SpineExoskeleton</defName>
    <label>Spine Exoskeleton</label>
    <labelNoun>Spine Exoskeleton</labelNoun>
<defaultLabelColor>(0.5, 0.5, 0.9)</defaultLabelColor>
    <stages>
      <li>
        <statOffsets>
          <CarryingCapacity>+75</CarryingCapacity>
        </statOffsets>
      </li>
    </stages>
    <addedPartProps>
      <solid>true</solid>
      <partEfficiency>1.50</partEfficiency>
    </addedPartProps>
    <spawnThingOnRemoved>SpineExoskeleton</spawnThingOnRemoved>
  </HediffDef>

Any help?

Hjkma

The patch seems to have no effect at all. I just removed the patch and the weight capacity still increased. As I understand it, the stat CarryingCapacity in HediffDef is somehow responsible for this. But how to increase the bulk capacity?

Hjkma

Okay, adding the CarryBulk value directly to the Hediff code did the trick. So the problem is in the patch, somehow I incorrectly wrote it, but I still have not figured out what it is.

Edit: The problem was solved, it turned out that I had typed the wrong hediff name in the patch.