Jump to content

Can't change the Junk Turret sound with mod.


gkuba

Recommended Posts

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.

 

<?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>

 

<?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!

Link to comment
Share on other sites

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

Look in items.xml under gunMR10:

<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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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:

<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.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...