V3cta Posted November 30, 2018 Share Posted November 30, 2018 Hey guys, just tried out the new xPath technique, but I'm not sure how to do it properly. What I want to do: Change max levels to 150 and give 2 points per level instead of one & remove level requirements for attributes What I came up with: <configs> <set xpath="/progression/level/@max_level">150</set> <set xpath="/progression/level/@skill_points_per_level">2</set> <set xpath="/progression/attribute/[@level_requirements]/@value">1</set> </configs> How can I set the level requirements for all attribute levels to 1? My method isn't working, a syntax error is coming up, can someone help me? Link to comment Share on other sites More sharing options...
Akzyra Posted November 30, 2018 Share Posted November 30, 2018 Your last spath is wrong, here is the correct one: Missed some steps in the path and wrong syntax. /progression/attributes/attribute/level_requirements/requirement/@value If you only want the Player Level requirement gone, use a filter: /progression/attributes/attribute/level_requirements/requirement[@name=PlayerLevel]/@value I use https://www.freeformatter.com/xpath-tester.html to test, just paste the whole XML into it. Then you see what your xpath selects. Here it should list all level numbers as attributes: Attribute='value=1' Attribute='value=1' Attribute='value=1' Attribute='value=20' ... Link to comment Share on other sites More sharing options...
Russiandood Posted November 30, 2018 Share Posted November 30, 2018 I use https://www.freeformatter.com/xpath-tester.html to test, just paste the whole XML into it. Then you see what your xpath selects. Here it should list all level numbers as attributes: Oh snap! Thank you for this haha, I was sort of looking for something like this, but haven't dug too deep to find it lol. Link to comment Share on other sites More sharing options...
V3cta Posted December 1, 2018 Author Share Posted December 1, 2018 Your last spath is wrong, here is the correct one: Missed some steps in the path and wrong syntax. /progression/attributes/attribute/level_requirements/requirement/@value If you only want the Player Level requirement gone, use a filter: /progression/attributes/attribute/level_requirements/requirement[@name=PlayerLevel]/@value I use https://www.freeformatter.com/xpath-tester.html to test, just paste the whole XML into it. Then you see what your xpath selects. Here it should list all level numbers as attributes: Attribute='value=1' Attribute='value=1' Attribute='value=1' Attribute='value=20' ... Thank you very much! Now I understand. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.