2 hours ago, drats said:<configs> <!-- Changes lockpicking to be actually useful and make sense to spend points on. --> <set xpath="//perk[@name='perkLockPicking']/effect_group/passive_effect[@name='LockPickTime']/@value">.25,.75</set> <set xpath="//progression/perk[name='LockPickBreakChance']/effect_group/passive_effect[name='LockPickTime']/@value">.33,100</set> </configs>
The "name" of the second xpath is missing an @!
And there is no perk with the name "LockPickBreakChance".
Maybe that's why you missed it!
Unless you're trying to modify a skill created by another mod!
If I'm right, maybe that's what you want to do:
<configs> <!-- Changes lockpicking to be actually useful and make sense to spend points on. --> <set xpath="//perk[@name='perkLockPicking']//passive_effect[@name='LockPickTime']/@value">.25,.75</set> <set xpath="//perk[@name='perkLockPicking']//passive_effect[@name='LockPickBreakChance']/@value">.33,100</set> </configs>
I've reduced the size of the xpath and made it more readable!
Using "//", you can search for all passive effects following the hierarchy, without having to mention effect_group or other nodes!
In this case, I've already mentioned which perk I want to select and then skipped all the nodes directly to any passive_effect!
Elements don't need @ but attributes do!
Element is what is inside the beginning of <>
Example, <effect_group>, so "effect_group" is an element!
What comes after "effect_group" is an attribute
Example, <effect_group name="attributeValue1">
In this case, the attribute is "name" and its value is "attributeValue1".
So you can select a specific "effect_group/@name" by searching for the value, or you can search for all "effect_group/@name" and edit them all at the same time!
Searching for a specific one (use [] after the element to select an attribute from it as a requirement):
//perk/effect_group[@name='attributeValue1']
Searching for all effect_groups that have @name!
//perk/effect_group[@name]
And if you want to select the attribute instead of the element, you have to put the @attribute after the element in the xpath
So this:
//perk/effect_group[@name='attributeValue1']
Will become this:
//perk/effect_group[@name='attributeValue1']/@name
<perks> <perk> <effect_group name="attributeValue1"></effect_group> <effect_group name="attributeValue2"></effect_group> </perk> </perks>
Use the XML above to test the XPATHS I mentioned, you can use "https://codebeautify.org/Xpath-Tester" to test!
And you can also look at this documentation on the WIKI, it will help you a lot!
https://7daystodie.fandom.com/wiki/XPath_Explained
There are several ways to select a single node!
Test enough to select as simply as possible!