Alternative sound TurretAcquireTarget

Started by Master Bucketsmith, August 21, 2016, 05:35:41 AM

Previous topic - Next topic

Master Bucketsmith

Hey so,

For my spotlights, instead of it playing the sound of the spotlights to go off every damned time it fires, I went to seek out an alternative.
First, I changed the spotlights so they no longer fire overhead/like mortars, but like a regular turret that requires line of sight. (Makes sense!)
So now, they get the AcquiredTarget sound, just like the vanilla improvised turret.
Naturally, that would be the perfect way to have the Spotlight_go_on sound only play once per target!

I've tracked down this:
filepath: Mods\Core\Defs\SoundDefs\World_Oneshots_GunTurret.xml
<?xml version="1.0" encoding="utf-8"?><DefPackage-SoundDef>

  <SoundDef>
    <defName>TurretAcquireTarget</defName> 
    <eventNames /> 
    <maxSimultaneous>1</maxSimultaneous> 
    <subSounds>
      <li>
        <grains>
          <li Class="AudioGrain_Clip">
            <clipPath>Weapon/GunTurret/Status/Target_Acquired</clipPath>
          </li>
        </grains>     
        <volumeRange>
          <min>15</min>       
          <max>15</max>
        </volumeRange>
      </li>
    </subSounds>
  </SoundDef>

</DefPackage-SoundDef>


It describes the regular sounddef for TurretAcquireTarget. Problem is, if I change this and add it to my mod, it changes the sound for ALL turrets that call for TurretAcquireTarget, even the vanilla improvised turret.

So my question is; does anyone know how I could set my spotlights to selectively use an alternative clippath for TurretAcquireTarget without altering it for all turrets?

AtomicRavioli

As there isn't a tag for the sound defined in either Weapons_Guns or Buildings_Security (the two places where the improvised turret is defined), I would imagine this would need a detour to do.

Master Bucketsmith