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

Advanced xpath help needed

mr.devolver

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

Code:
<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


 
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"/>

 
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?

 
I will hopefully be back and active soon, have some real life stuff I have to bring to a close and deal with at present .

Regards

Ragsy !!

 
If people plan on modifying the NPC mod I should probably prefix it with 1- to indicate it builds on the 0- creature pack. Then folks wont have these issues in the future.

 
Back
Top