• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Help: Changes to Progression.xml via xPath

V3cta

Refugee
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?

 
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'



...


 
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. :D

 
Back
Top