☄️
Cap's Archive Space
  • Welcome
  • Cap's Titanfall 2 Mods v1
    • Welcome!
    • Downloads
    • Custom Audio Repo
    • How-To Guides
      • autoexec.cfg
      • Extract Sound Files
      • Converting to Video
      • Converting to .bik
      • Unpack/Repack .vpk Files
      • How RandomInt Works
    • Mod Guides
      • Killsounds and Deathsounds
      • Lobby Music
      • Victory/Defeat/Draw Music
      • Opening Music
      • Specific Time Music
      • Almost Done Music
      • Announcement Sounds
      • Killstreak Sounds
      • Medal Sounds
      • Announcer
    • Northstar Guides
      • Installing Northstar
      • Modding Northstar
    • Announcers
      • TF2 Administrator
        • Team Fortress 2 Killstreak Mod
      • Halo Announcer
        • Install Guide
        • Mod Settings Info
        • All Medals & Voicelines
        • All Skulls
        • Previous Versions
      • DMC5 Announcer
        • Alternate Downloads
        • Installation Guide
        • In-Depth Guide
        • Configuration
        • Previous Versions
    • Titan OS
      • Titan Fortress 2
    • Text Changes
      • Alternate Titan Ready Text
    • Custom Music
    • Unlocks Reloaded
    • Music Packs
      • MGR Finale Music
    • Speedometer
    • English Text for Various Languages
    • Viewmodels
      • Minimized
    • Joke Mods
      • Shrek.Kill
      • GoFuckYourself
      • Survivor.Death
      • GoMortyYourself
    • Compatibility Patches
Powered by GitBook
On this page
  • File Location
  • What To Do
  • media and autoexec.cfg
  • Remove Default Killsound
  1. Cap's Titanfall 2 Mods v1
  2. Mod Guides

Killsounds and Deathsounds

PreviousMod GuidesNextLobby Music

Last updated 2 years ago

File Location

Killsounds and Deathsounds use the file located in: englishclient_mp_common.bsp.pak000_dir/scripts/vscripts/client/cl_obituary.gnut

What To Do

Scroll through cl_obituary.gnut until you find the first appearance of: string attackerString string weaponString string victimString

This should be around line 253.

Right under these strings, add the following code for killsounds:

    if(attacker == GetLocalClientPlayer() && victim != GetLocalClientPlayer() && victimInfo.petDisplayName == "" )
    {
        int totalnumber=RandomInt([number])
        GetLocalClientPlayer().ClientCommand("killsound"+totalnumber)
    }

Replace [number] with however many killsounds you plan on using.

For deathsounds, add this code:

    if(victim == GetLocalClientPlayer())
    {
        int totalnumber=RandomInt([number])
        GetLocalClientPlayer().ClientCommand("deathsound"+totalnumber)
    }

Replace [number] with however many deathsounds you plan on using.

With the way we wrote these killsound and deathsound if-statements, killsounds will play specifically when you kill an enemy player OR when you kill a Frontier Defense/Bounty Hunt Titan. Deathsounds will play whenever you die, but have a tendency to play 2 random sounds instead of 1 if you die while inside your titan.

Assuming you added both killsounds and deathsounds, the final product should look something like this:

Save the file, and your killsounds are now properly added into your vpk.

media and autoexec.cfg

Place the killsounds/deathsounds you'll be using in the Titanfall2>r2>media folder. Remember to start from 0 in naming.

To call the killsounds in the autoexec, write them out like so:

alias killsound[number] "playvideo killsound[number] 1 1"

where [number] is the current number of each specific killsound. Having multiple, you'll need to write out this line multiple times, which looks like:

Of course, deathsounds are written out the same way and look like this:

After all of this is done, you should now have your killsounds and/or deathsounds properly working.

Remove Default Killsound

If you don't enjoy the background noise of the original killsound behind your brand new one(s), you can simply remove it by commenting out code.

Go to scripts/vscripts/client/cl_player.gnut.

Scroll down to line 1414, around halfway through the file. You should see this code:

We're going to comment out the code for the while(true) statement by using /* and */. The code should now look like this:

Follow this guide if you don't know how to repack your vpk.
Follow this guide if you don't know how to convert your files to .bik.
Follow this guide for more info about the autoexec and how to properly set it up.
Follow this guide if you don't know how to unpack the vpk.