Can I patch something added by another mod's patch?

Started by Jackdawson, August 04, 2021, 09:59:33 AM

Previous topic - Next topic

Jackdawson

There's this mod called "Diseases+". The mod makes some changes to vanilla diseases including the following patch:

Quote<Operation Class="PatchOperationConditional">
      <xpath>*/HediffDef[defName="Malnutrition"]/comps</xpath>
      <nomatch Class="PatchOperationAdd">
         <xpath>*/HediffDef[defName="Malnutrition"]</xpath>
         <!-- comps нет -->
         <value>
            <hediffClass>HediffWithComps</hediffClass>
            <comps>
               <li Class="RimCore.DiseasesGeneratorA.HediffCompProperties_DiseasesGiver">
                  <minSeverity>0.4</minSeverity>
                  <needTicks>180000</needTicks>
                  <hediffDef>TP_Stomach_Ulcer</hediffDef>
                  <partsToAffect>
                     <li>Stomach</li>
                  </partsToAffect>
                  <countToAffect>1</countToAffect>
                  <letter>true</letter>
               </li>

I want to make a patch that changes that minSeverity value. That's all. Is that possible to do with a patch? What xpath do I have to set?

RawCode

https://xmltoolbox.appspot.com/xpath_generator.html

/def/comps/li[@Class="RimCore.DiseasesGeneratorA.HediffCompProperties_DiseasesGiver"]/minSeverity

Jackdawson