Jump to content

Advanced xpath help needed


Recommended Posts

Hello!

 

I was trying to create a small modlet patch to change some settings in Xyth's NPCs. The idea was to have one modlet patch that would make some changes without changing the original files, so that the changes are applied even if the Xyth's NPCs mod itself gets an update.

 

I started with some first changes for testing which must go to entityclasses.xml file, so entityclasses.xml of my mod looks like this:

<configs>

<set xpath="/entity_classes/entity_class[starts-with(@name, 'NPC')]/effect_group[@name='Base Effects']/passive_effect[@name='HealthMax']/@value">800</set>

<set xpath="/entity_classes/entity_class[starts-with(@name, 'NPC')]/effect_group[@name='Base Effects']/passive_effect[@name='HealthChangeOT']/@value">10</set>

</configs>

 

Unfortunately, this doesn't work and I have no idea why. In the game, I receive no errors related to this mod, just two warnings telling me that my settings did not apply. I tried to solve this with couple of minor changes, but no matter what I tried, it always failed to apply in game.

 

What the heck am I doing wrong?

EP3Od9O.jpg

Link to comment
Share on other sites

Same as Sphereii, Id guess your xpath is happening before the NPC mod xpath. Also, be careful as there are 2 lines that might be changed with your xpath line:

<passive_effect name="HealthMax" operation="base_set" value="200"/>

<passive_effect name="HealthMax" operation="perc_set" value="1"/>

Link to comment
Share on other sites

Thanks guys, so how can I set the load order to make sure my patch is loaded after the mod itself?

 

And Xyth, thanks for reminding me of that other value, I guess that would give me some more headache once the patch gets applied. What does that other value HealthMax with operation "perc_set" does anyway?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...