Jump to content

Help changing values


Festro

Recommended Posts

Need help modding food and water values tried using set xpath this is what I've got, basically what I want to do is have food and water regenerate slowly rather than degrade.

<set xpath="/entity_classes/entity_class[contains(@name, 'player')]/effect_group/passive_effect(@name, 'WaterChangeOT')/@operation">base_add</set>
<set xpath="/entity_classes/entity_class[contains(@name, 'player')]/effect_group/passive_effect(@name, 'FoodChangeOT')/@operation">base_add</set>

but debug says that "WaterChangeOT')/@operation has an invalid token" what did do wrong?

Link to comment
Share on other sites

On 10/30/2020 at 1:51 PM, Festro said:

Need help modding food and water values tried using set xpath this is what I've got, basically what I want to do is have food and water regenerate slowly rather than degrade.

<set xpath="/entity_classes/entity_class[contains(@name, 'player')]/effect_group/passive_effect(@name, 'WaterChangeOT')/@operation">base_add</set>
<set xpath="/entity_classes/entity_class[contains(@name, 'player')]/effect_group/passive_effect(@name, 'FoodChangeOT')/@operation">base_add</set>

but debug says that "WaterChangeOT')/@operation has an invalid token" what did do wrong?

 

Not sure why yours didn't work, exactly, but making your passive_effect node a [contains] worked.  Try this

 

<set xpath="/entity_classes/entity_class[contains(@name, 'player')]/effect_group/passive_effect[contains(@name,'WaterChangeOT')]/@operation">base_add</set>

 

Config dump came out like this:

        <passive_effect name="WaterChangeOT" operation="base_add" value=".0111"><!--Attribute "operation" replaced by: "Regen"--></passive_effect> <!-- water base drain, 40/hour -->
        <passive_effect name="WaterChangeOT" operation="base_add" value="@_vehicleFood" tags="driving"><!--Attribute "operation" replaced by: "Regen"--></passive_effect>


 

Link to comment
Share on other sites

This issue feels familiar. I had some of my mods that I recently loaded into a19.2 b4? And suddenly some parts were not loading, and the fix for this was similar.  It’s like some xml/xpath commands are not working properly now. I did a similar fix where I changed it to “contains” or something, I forgot what I did though :(, but it should be an easy thing to reproduce for a bug report. I’m on my phone so I can’t easily search bug reports to see if this has been reported already. 

Link to comment
Share on other sites

On 11/9/2020 at 6:59 AM, stample said:

 

Not sure why yours didn't work, exactly, but making your passive_effect node a [contains] worked.  Try this

 


<set xpath="/entity_classes/entity_class[contains(@name, 'player')]/effect_group/passive_effect[contains(@name,'WaterChangeOT')]/@operation">base_add</set>

 

Config dump came out like this:


        <passive_effect name="WaterChangeOT" operation="base_add" value=".0111"><!--Attribute "operation" replaced by: "Regen"--></passive_effect> <!-- water base drain, 40/hour -->
        <passive_effect name="WaterChangeOT" operation="base_add" value="@_vehicleFood" tags="driving"><!--Attribute "operation" replaced by: "Regen"--></passive_effect>


 

will give it a try thanks!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...