[SOLVED]I'm having trouble finding the Xpath to another mod.

Started by XelNigma, August 18, 2022, 10:10:48 PM

Previous topic - Next topic

XelNigma

I'm trying to add a meditation focus gain to the Eltex weapons added by the Vanilla Psycasts Expanded mod.  I have already successfully added to the Royalty Staff and all the Royal and VPE clothing just fine.

But unlike all the rest the 3 weapons have their equippedStatOffSets as part of their parent instead the weapon it self. and trying to add to the weapon isnt working like it has with the staff or the clothes.

<Defs>
<ThingDef Name="VPE_BaseMeleeWeapon_Eltex_Sharp" ParentName="BaseMeleeWeapon_Sharp_Quality" Abstract="True">
    <weaponTags>
      <li>VPE_EltexMelee</li>
    </weaponTags>
    <equippedAngleOffset>-65</equippedAngleOffset>
    <burnableByRecipe>false</burnableByRecipe>
<techLevel>Medieval</techLevel>
    <recipeMaker>
    <skillRequirements>
      <Crafting>6</Crafting>
    </skillRequirements>
<researchPrerequisite>VPE_CasterGear</researchPrerequisite>
      <recipeUsers>
            <li>ElectricSmithy</li>
            <li>FueledSmithy</li>
      </recipeUsers>
  <unfinishedThingDef>UnfinishedComponent</unfinishedThingDef>
    </recipeMaker>
    <equippedStatOffsets>
      <PsychicSensitivityOffset>0.15</PsychicSensitivityOffset>
      <PsychicEntropyRecoveryRate>0.016</PsychicEntropyRecoveryRate>
    </equippedStatOffsets>
<relicChance>2</relicChance>
    <modExtensions>
    <li Class="VFECore.ThingDefExtension">
            <usableWithShields>true</usableWithShields>
        </li>
    </modExtensions>
  </ThingDef>


Thats the parent of the 2 sharp weapons.  So how do I xpath to the equippedStatOffsets here?
I have tried all kinds of paths but seeing as I have no idea what im doing. Im well out of my depth here.

[SOLVED] So because the thingDef is an abstract I needed to use the path;
<xpath>/Defs/ThingDef[@Name="VPE_BaseMeleeWeapon_Eltex_Sharp"]/equippedStatOffsets</xpath>