How can you add a custom announcer to a map?

Discussion in 'Mapping Questions & Discussion' started by Dog.vtf, Dec 24, 2017.

  1. Dog.vtf

    Dog.vtf L2: Junior Member

    Messages:
    50
    Positive Ratings:
    8
    I'm making a Payload map where the payload is not a bomb, And I need to make custom announcer sounds.


    But I need to have them just on this map. Any ideas on how to do this?
     
  2. Lampenpam

    aa Lampenpam

    Messages:
    1,019
    Positive Ratings:
    337
    You replace sound scripts with a MAPNAME_level_sounds.txt which you place in the maps folder. Open tf2_misc_dir.vpk and go to the scripts fodler. There are some text files with all the soundscripts of the game.
    All announcer lines should be in game_sounds_vo.txt. There a shit tone of scripts so use the search function to get the right one. Here is an example from game_sounds_vo.txt

    Code:
    "Announcer.SD_OurTeamHasFlag"
    {
        "channel"        "CHAN_VOICE2"
        "volume"        "1"
        "pitch"            "PITCH_NORM"
        "soundlevel"    "SNDLVL_NONE"
    
        "rndwave"
        {
            "wave"    "vo/announcer_sd_possession01.mp3"
            "wave"    "vo/announcer_sd_possession16.mp3"
            "wave"    "vo/announcer_sd_possession21.mp3"
            "wave"    "vo/announcer_sd_possession24.mp3"
        }
    }
    Looks like it's the script for the special delivery mode, it randomly plays one out of four voice lines of the announcer when your team gets the flag. If you want to replace that because you are making some custom special delivery mode then you have to copy this script into your own MAPNAME_level_sounds.txt.
    the part with "rndwave" is what you are going to edit. Create a custom sound file that is supposed to play instead and name it differently and it instert it in the script.
    For example, I now created with a text-to-speach programm a voice saying "our team has the banana basket" or something like that and save the mp3 to tf/sounds/lampenpam/vo_banana_get.mp3 then I'd have to change the script to:

    Code:
    "Announcer.SD_OurTeamHasFlag"
    {
        "channel"        "CHAN_VOICE2"
        "volume"        "1"
        "pitch"            "PITCH_NORM"
        "soundlevel"    "SNDLVL_NONE"
    
        "wave"         "lampenpam/vo_banana_get.mp3"
    }
    As you can see I used "wave" instead of "rndwave" because It doesn't need to select a file at random, but of course you can do it similar to the original script if you want to play a random file.

    Now while playing the map with the name of your level_sounds.txt file, the voice lines for the team grabing the flag in SD is replaced with my custom file. It's important that you don't change the name of the scripts (in this case the "Announcer.SD_OurTeamHasFlag") so it replaces the right sound.
    But you can add custom scripts (with a new custom name) to your level_sounds.txt too. You can play them with an ambient_generic by specifiying the name of the sound script but that's only usefull if you have a script with randomly selected sound files.
     
    • Thanks Thanks x 1
    • Like Like x 1
    • Agree Agree x 1
  3. Dog.vtf

    Dog.vtf L2: Junior Member

    Messages:
    50
    Positive Ratings:
    8
    I've extracted game_sounds_vo but I'm having trouble finding the payload sounds, Do you know any text that would be in the payload sound codes?
     
  4. Lampenpam

    aa Lampenpam

    Messages:
    1,019
    Positive Ratings:
    337
    Search for "cart" not for "payload"

    And just fyi, don't store the extracted text file (if you even safe it seperatly in the first place) in the tf/scripts folder because then it would overwrite the offical one which doesn't get updated when new lines are added in an update.
     
  5. Izotope

    aa Izotope Never releases maps

    Messages:
    613
    Positive Ratings:
    572
    Tip: use snd_show 1 in console, it'll display the path and soundname of everything that you can hear.
    Then you can look for that exact name in your files and find the soundscript that goes with it.
     
  6. Faux Rhinoceros

    aa Faux Rhinoceros Also known as Dr. Element

    Messages:
    1,477
    Positive Ratings:
    1,367
    There are also some payload related sounds that contains the word "escort"
     
  7. Dog.vtf

    Dog.vtf L2: Junior Member

    Messages:
    50
    Positive Ratings:
    8
    Do those have the word bomb? if they have just have cart it's fine by me.
     
  8. henke37

    aa henke37

    Messages:
    1,883
    Positive Ratings:
    442
    I disagree on this last claim. Being able to set the channel and loudness is important.
     
    • Agree Agree x 1
Tags: