Jump to content

Turn off Turret noise?


ungkor

Recommended Posts

It sounds like you're talking about the auto turrets, machine gun and shotgun? Sounds are typically governed by xml. If you're comfortable editing the xmls, you could give that a go. I would just make a copy of the original file, rename it as "[filename]_original.xml" and then edit the other one.

 

Auto turrets are found in blocks.xml. "autoturret" is the parent block, with "shotgunTurret" extending off of that with some unique properties, one of those being the "FireSound". All other sounds are under the parent. It just depends on what sound you're talking about, but there are a few listed there, other than "FireSound", there's TargetingSound", "OverheatSound", and "WakeUpSound". Targeting and Overheating are the only looped sounds. If you comment out any of those lines, that sound will go away. Just add <!-- [line] --> around the line of code.

 

I'm assuming the one you'll want to edit out is Targeting, but I haven't tested any of this myself so I could be wrong. If you want to make this a permanent change (because once the game is updated, this will all be erased) just make your own mod. It's fairly easy and there's a handful of tutorials in the modding section of this forum.

Link to comment
Share on other sites

If it is the electric ones, and you don't feel like xml:ing your way out of it; motion sensors are silent, aren't they? Just hook up one next to the turret, looking over the field of fire, activating the turret only when there's something to blast at.

 

If you're talking about the robotic turrets (the INT weapon); the xml may be the only way to go (no idea where there). Alternatively, you could use the activation range of those for a trigger; just place them far enough that they won't trigger while you're in normal operation, and then have them activate once you approach your defensive position. How easy this is will of course depend on your base setup.

Link to comment
Share on other sites

@Syphon583, I've not tried to change any of the game code, ever. Then again I always steered clear of the Wasteland too. This playthrough has proven it to be quite managable, so delving into the code may not be as daunting as I feared. I'll have a look. I may be able to pull it off.

 

Yeah @theFlu I think both the OP and I were talking about the robotic turrets. That whine they produce...not my favorite. Just a gripe from me. I'll still use them under the right conditions.  But I don't find generators, (unsightly) wiring and the corresponding maintenance to be my cup of tea as it were. You're right. Everything's quiet (except for the generator) until a sensor is activated and then blam blam blam. It's a balance, give and take. Do or don't, win or won't. Like you say, it all depends on the base set up.

 

I'm gonna try to eliminte that turret whine. But not today.

 

 

Link to comment
Share on other sites

A bit of grep-fu seems to confirm my suspicion; you're editing blocks.xml, which defines, you know, blocks. The SMG and Shotgun turrets.

 

There's turret entries for the junk turrets with similar TargetingSound definition in entityclasses.xml, you might want try to remove that.

Link to comment
Share on other sites

10 hours ago, ungkor said:

I commented out     <!-- <property name="TargetingSound" value="turret_retarget_lp"/> --> in block.xml.   

 

I still hear the "scanning" sound as the turret sweeps back and forth.  

Screenshot 2022-09-15 213710.png

Yeah, I assumed you were using auto turrets (which are controlled by blocks.xml), but based on the screenshot you're referring to junk turrets. Agree with @theFlu, try editing the sound line in entityclasses.xml

Link to comment
Share on other sites

https://www.nexusmods.com/7daystodie/mods/894

 

Peace & Quiet mod

I vaguely recall I had to update some of the fire related sounds (the torch I think got it's own loop) with A20 myself, but the rest of it still works.

 

Paste this under the other fire sounds if you want to get rid of the torch sound.
    <remove xpath="/Sounds/SoundDataNode[@name='torch_lp']" /> -->

Link to comment
Share on other sites

I've played around a bit with the xml and if you want to silence the turrets, the following should do the trick:

 

Create a folder in the Mods folder. Place the following XML file in it.

ModInfo.xml

<?xml version="1.0" encoding="UTF-8"?>
<xml>
	<ModInfo>
		<Name value="Turret Noises Be Gone"/>
		<Description value="Removes Turret noises (except gun fire)"/>
		<Author value="drgnkght"/>
		<Version value="A20"/>
		<Website value=""/>
	</ModInfo>
</xml>

 

Create a Config folder in it and put the following XML files in it.

blocks.xml

<drgnkght>
    <setattribute xpath="/blocks/block[@name='autoTurret']/property[@name='TargetingSound']" name="value">none</setattribute>
    <setattribute xpath="/blocks/block[@name='autoTurret']/property[@name='OverheatSound']" name="value">none</setattribute>
    <setattribute xpath="/blocks/block[@name='autoTurret']/property[@name='WakeUpSound']" name="value">none</setattribute>
    <setattribute xpath="/blocks/block[@name='shotgunTurret']/property[@name='TargetingSound']" name="value">none</setattribute>
    <setattribute xpath="/blocks/block[@name='shotgunTurret']/property[@name='OverheatSound']" name="value">none</setattribute>
    <setattribute xpath="/blocks/block[@name='shotgunTurret']/property[@name='WakeUpSound']" name="value">none</setattribute>
</drgnkght>

 

entityclasses.xml

<drgnkght>
    <setattribute xpath="/entity_classes/entity_class[starts-with(@name,'junkTurret')]/property[@name='TargetingSound']" name="value">none</setattribute>
    <setattribute xpath="/entity_classes/entity_class[starts-with(@name,'junkTurret')]/property[@name='OverheatSound']" name="value">none</setattribute>
    <setattribute xpath="/entity_classes/entity_class[starts-with(@name,'junkTurret')]/property[@name='WakeUpSound']" name="value">none</setattribute>
</drgnkght>

 

Edited by drgnkght
Adjusted blocks.xml to fix missing path element and added missing shotgun turret (see edit history)
Link to comment
Share on other sites

    <property name="MaxOwnerDistance" value="16"/>

    <!-- <property name="TargetingSound" value="turret_retarget_lp"/> -->
    <property name="OverheatSound" value="turret_overheat_lp"/>
    <property name="WakeUpSound" value="turret_windup"/>
    <property name="FireSound" value="junkturret_fire"/>

 

In entityClasses.xml didn't work.

 

I'll try what drgnkght suggested next.  The scanning noise of junk turrets is so annoying. 

Link to comment
Share on other sites

1 hour ago, ungkor said:

I'll try what drgnkght suggested next. 

The main difference there is that drgnkght's xpath will turn the xml into:

    <property name="TargetingSound" value="none"/>
    <property name="OverheatSound" value="none"/>
    <property name="WakeUpSound" value="none"/>

 

EDIT: Or wait.. value=none , or just just value=  ..? One of the three, maybe ... :)

 

Which may make a difference if there's a value inherited from somewhere - the commenting out would not remove an already existing value.

 

But yeh, make it into an xpath-mod, it's easier to manage overall.

Edited by theFlu (see edit history)
Link to comment
Share on other sites

4 hours ago, theFlu said:

The main difference there is that drgnkght's xpath will turn the xml into:

    <property name="TargetingSound" value="none"/>
    <property name="OverheatSound" value="none"/>
    <property name="WakeUpSound" value="none"/>

 

EDIT: Or wait.. value=none , or just just value=  ..? One of the three, maybe ... :)

 

Which may make a difference if there's a value inherited from somewhere - the commenting out would not remove an already existing value.

 

But yeh, make it into an xpath-mod, it's easier to manage overall.

You had it right the first time. Mod should set value=“none”. (Since we’re using XML the quotes are required.)

 

As stated previously by others, removing the properties doesn’t work. You need to set a new value. I think you’re right, it’s inheriting the sound from a parent object. That said I’m not sure if none is a special value meaning “don’t play a sound” or just a sound name that doesn’t exist. It works so I don’t question it.😅

Link to comment
Share on other sites

1 minute ago, drgnkght said:

if none is a special value meaning “don’t play a sound” or just a sound name that doesn’t exist. It works so I don’t question it

Yeh, that's kinda why I felt compelled to add the options there; the quoted one feels like a bugged name, while the empty one might be a default "actually none" ... maybe there's some error spam to be found in log files if it's a name. :)

Link to comment
Share on other sites

6 hours ago, theFlu said:

Yeh, that's kinda why I felt compelled to add the options there; the quoted one feels like a bugged name, while the empty one might be a default "actually none" ... maybe there's some error spam to be found in log files if it's a name. :)

I checked the Player.log file. I didn't see any error spam. Also tried value="". That caused an error. So, still not sure about "none", but it didn't work without it.

Link to comment
Share on other sites

  • 2 weeks later...
On 9/19/2022 at 4:43 PM, drgnkght said:

I've played around a bit with the xml and if you want to silence the turrets, the following should do the trick:

 

Create a folder in the Mods folder. Place the following XML file in it.

ModInfo.xml

<?xml version="1.0" encoding="UTF-8"?>
<xml>
	<ModInfo>
		<Name value="Turret Noises Be Gone"/>
		<Description value="Removes Turret noises (except gun fire)"/>
		<Author value="drgnkght"/>
		<Version value="A20"/>
		<Website value=""/>
	</ModInfo>
</xml>

 

Create a Config folder in it and put the following XML files in it.

blocks.xml

<drgnkght>
    <setattribute xpath="/blocks/block[@name='autoTurret']/property[@name='TargetingSound']" name="value">none</setattribute>
    <setattribute xpath="/blocks/block[@name='autoTurret']/property[@name='OverheatSound']" name="value">none</setattribute>
    <setattribute xpath="/blocks/block[@name='autoTurret']/property[@name='WakeUpSound']" name="value">none</setattribute>
    <setattribute xpath="/blocks/block[@name='shotgunTurret']/property[@name='TargetingSound']" name="value">none</setattribute>
    <setattribute xpath="/blocks/block[@name='shotgunTurret']/property[@name='OverheatSound']" name="value">none</setattribute>
    <setattribute xpath="/blocks/block[@name='shotgunTurret']/property[@name='WakeUpSound']" name="value">none</setattribute>
</drgnkght>

 

entityclasses.xml

<drgnkght>
    <setattribute xpath="/entity_classes/entity_class[starts-with(@name,'junkTurret')]/property[@name='TargetingSound']" name="value">none</setattribute>
    <setattribute xpath="/entity_classes/entity_class[starts-with(@name,'junkTurret')]/property[@name='OverheatSound']" name="value">none</setattribute>
    <setattribute xpath="/entity_classes/entity_class[starts-with(@name,'junkTurret')]/property[@name='WakeUpSound']" name="value">none</setattribute>
</drgnkght>

 

Unless I made a typo, the above doesn't work for me. 

 

Created a new Mods folder at:

steamapps\common\7 Days To Die\Mods

 

Added a new file named ModInfo.xml and copy and pasted the info into it as show above.

Created a new folder under steamapps\common\7 Days To Die\Mods called Config

 

Created blocks.xml and entityclasses.xml inside the config folder, with the contents shown above.

 

I have 'hide file name extensions off' so I'm sure they are named correctly.   Case sensitive issue?  Maybe it needs to be entityClasses.xml or something simple like that?

 

Currently reading https://7daystodie.fandom.com/wiki/Basic_Modding_Tutorial_1

 

 

 

mods.png

Link to comment
Share on other sites

29 minutes ago, ungkor said:

Unless I made a typo, the above doesn't work for me. 

 

Created a new Mods folder at:

steamapps\common\7 Days To Die\Mods

I think you need one more folder:

steamapps\common\7 Days To Die\Mods\SilentTurrets

 

Even the advice from drgnkght says it, but quite shortly:

31 minutes ago, ungkor said:

Create a folder in the Mods folder. Place the following XML file in it.

 

And you're editing files in the game folder, which is about to change in a future patch - it's not wrong, you will just need to move or re-config it later.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...