RimWorld

RimWorld

Vanilla Armor Patch for SoS
a way to add your particular armors to the patch
ok, so... here is the modifications needed for any kind of armor:

<!--Medic Armor Helm -->
<li Class="PatchOperationAdd">
<xpath>*/thingDef[defName="Apparel_MedicH"]/apparel/tags</xpath>
<value>
<li>Spacer</li>
<li>EVA</li>
</value>
</li>

<li Class="PatchOperationReplace">
<xpath>*/thingDef[defName="Apparel_MedicH"]/statBases/Insulation_Cold</xpath>
<value>
<Insulation_Cold>100</Insulation_Cold>
</value>
</li>

<!--Medic Armor -->
<li Class="PatchOperationAdd">
<xpath>*/thingDef[defName="Apparel_MedicArmor"]/apparel/tags</xpath>
<value>
<li>Spacer</li>
<li>EVA</li>
</value>
</li>

<li Class="PatchOperationReplace">
<xpath>*/thingDef[defName="Apparel_MedicArmor"]/statBases/Insulation_Cold</xpath>
<value>
<Insulation_Cold>100</Insulation_Cold>
</value>
</li>

With this sored inside the following file:
<Steam installation folder>\workshop\content\294100\2160918341\1.3\Patches\SoSArmorsPatch.xml

You have to find the thing def from your particular armor and replace the defName=""

I tested it only with the medic armor from the Rimsenal CORE and worked like a charm
< >
Showing 1-2 of 2 comments
Borsek  [developer] Mar 4, 2022 @ 4:27pm 
This will work if you add it within a mod's <* Class="PatchOperationSequence">

Otherwise, the code looks something like:



<!--Cataphract Armor-->

<Operation Class="PatchOperationAdd">
<xpath>/Defs/ThingDef[defName="Apparel_ArmorCataphract"]</xpath>
<value>
<apparel>
<tags>
<li>Spacer</li>
<li>EVA</li>
</tags>
</apparel>
</value>
</Operation>




But it depends on various mod author's way of implementing items, naming, and how they sort stuff within their .xmls. Sometimes <Insulation_Cold> has to be added instead of replaced, or you need an @name structure, since you're modifying 'abstract' armors - a base list of properties, that a specific armor loads first, and maybe doesn't even modify, as is the case in vanilla armors, note the <xpath> section above vs below:




<Operation Class="PatchOperationReplace">
<xpath>/Defs/ThingDef[@Name="ApparelArmorCataphractBase"]/statBases/Insulation_Cold</xpath>
<value>
<Insulation_Cold>100</Insulation_Cold>
</value>
</Operation>




vs.:




<Operation Class="PatchOperationReplace">
<xpath>/Defs/ThingDef[defName="VAE_Headgear_HeavyMarineHelmet"]/statBases/Insulation_Cold</xpath>
<value>
<Insulation_Cold>100</Insulation_Cold>
</value>
</li>
</Operation>
Last edited by Borsek; Mar 4, 2022 @ 4:30pm
Borsek  [developer] Mar 4, 2022 @ 4:28pm 
Either way, thanks for the initiative and a great guide. If anyone does their own modifications to a mod, I'll gladly merge your code if you post it here.
< >
Showing 1-2 of 2 comments
Per page: 1530 50