Jump to content

Help with xpath


bdubyah

Recommended Posts

So I'm trying to edit the sounds.xml, and wanna change this node:

 

<SoundDataNode name="vwheel_bounce"> <AudioSource name="Sounds/AudioSource_Vehicle"/>

<Noise ID="3" range="14" volume="30" time="3" muffled_when_crouched="0.65" heat_map_strength="0.05" heat_map_time="60"/>

<AudioClip ClipName="Sounds/Vehicles/Minibike/minibike_suspension_1"/>

<AudioClip ClipName="Sounds/Vehicles/Minibike/minibike_suspension_2"/>

<AudioClip ClipName="Sounds/Misc/entityhitsground"/>

<MaxVoices value="2"/> <MaxRepeatRate value="0.01"/>

</SoundDataNode>

 

If I wanted to change the "volume" and "MaxRepeatRate", what would that look like? I've tried searching but I don't see much for sounds. I tried:

 

<configs>

<set xpath="/Sounds/SoundDataNode[@name=vwheel_bounce]/property[@name=MaxRepeatRate]/@value">10</set>

<set xpath="/Sounds/SoundDataNode[@name=vwheel_bounce]/property[@name=volume]/@value">10</set>

</configs>

 

in my mod's sounds.xml but it tells me during load that it didn't apply the changes. What am I missing?

Link to comment
Share on other sites

It looks like the Xpath you have is trying to find a property element when there isn't one.

 

Try this out and see if it works:

<configs>

<set xpath="/Sounds/SoundDataNode[@name=vwheel_bounce]/MaxRepeatRate/@value">10</set>

<set xpath="/Sounds/SoundDataNode[@name=vwheel_bounce]/Noise[@ID=3]/@volume">10</set>

</configs>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...