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

Can't change the Junk Turret sound with mod.

gkuba

Refugee
Hopefully someone can let me know whats going on here but I am trying to change the junk turret deployed firing sound to the markman's rifle suppressed sound. If I manually change it in the entity_classes.xml it works fine but trying to change it via xpath doesn't.

I have tried doing this both ways but neither works and there are no error / warnings in the console.

Code:
<?xml version="1.0" encoding="UTF-8"?>
<WeaponTweaks>
 <setattribute xpath="/entity_classes/entity_class[@name='turretJunk']/property[@name='FireSound']" name="value">sniperrifle_s_fire</setattribute>
</WeaponTweaks>
Code:
<?xml version="1.0" encoding="UTF-8"?>
<WeaponTweaks>
 <set xpath="/entity_classes/entity_class[@name='turretJunk']/property[@name='FireSound']/@value">sniperrifle_s_fire</set>
</WeaponTweaks>
If anyone knows why this change isn't taking I would love to hear it.

Thanks!

 
I believe the sound you're looking for is "sniperrifle_fire", not "sniperrifle_s_fire".

Look in items.xml under gunMR10:

Code:
<property name="Sound_start" value="sniperrifle_fire"/>
 
I believe the sound you're looking for is "sniperrifle_fire", not "sniperrifle_s_fire".Look in items.xml under gunMR10:

Code:
<property name="Sound_start" value="sniperrifle_fire"/>
But he said he wanted the silenced sound. That's in the item_modifiers.xml.

OP, if you have no warnings or errors, are you sure your mod is loading? You can hit F1 and see what was loaded. You could also export your configs and see if it is being applied.

 
But he said he wanted the silenced sound. That's in the item_modifiers.xml.
OP, if you have no warnings or errors, are you sure your mod is loading? You can hit F1 and see what was loaded. You could also export your configs and see if it is being applied.
Ah you are correct, it looks like the proper xpathing so the issue may be location related.

Does the layout of the modlet look like this?

/7 Days to Die/Mods/ModName/Config/entityclasses.xml

/7 Days to Die/Mods/ModName/ModInfo.xml

 
But he said he wanted the silenced sound. That's in the item_modifiers.xml.
OP, if you have no warnings or errors, are you sure your mod is loading? You can hit F1 and see what was loaded. You could also export your configs and see if it is being applied.
Yes bdubyah is correct I am after the silenced version of the sound from the item_modifiers.xml, The mod is successfully loading as the other changes in that mod are working just fine.

Ah you are correct, it looks like the proper xpathing so the issue may be location related.
Does the layout of the modlet look like this?

/7 Days to Die/Mods/ModName/Config/entityclasses.xml

/7 Days to Die/Mods/ModName/ModInfo.xml
Yes I have that mod structure.

 
Looks like it should work, it might be an actual bug like the rwgmixer.xml xpath thing they fixed with the recent 18.1 patch.

Just like how the world generation wasn't applying rwgmixer patches, maybe the audio files aren't properly implementing patches.

 
Maybe try editing it in items.xml too?
I have, the items.xml just controls the sounds it makes while holding and that is working.

The entity_classes.xml has the sounds for when its deployed which isn't working with the patch. I confirmed it will work changing it manually in the files. So it does just seem like patching entity_classes.xml may be broken right nowm

 
I have, the items.xml just controls the sounds it makes while holding and that is working.
The entity_classes.xml has the sounds for when its deployed which isn't working with the patch. I confirmed it will work changing it manually in the files. So it does just seem like patching entity_classes.xml may be broken right nowm
It's entityclasses.xml, not entity_classes.xml.

Anyway patching the entityclasses.xml file with this works:

Code:
<configs>
<set xpath="/entity_classes/entity_class[@name='playerMale']/effect_group/passive_effect[@name='HealthMax']/@value">200</set>
</configs>
They might generate the audio file references in the entities before running the patch, I suppose.

 
Back
Top