Custom sound files?

Discussion in 'Mapping Questions & Discussion' started by Turnip, Aug 26, 2016.

  1. Turnip

    aa Turnip The 80s Vegetable

    Messages:
    1,432
    Positive Ratings:
    803
    How would someone go about creating a sound file that can replace one of the default sounds in the game?
    (assuming this is possible in hammer)

    Rather then play the default sounds upon winning a match, I would like the game to reference a sound file I would have instead.
    Is it possible to do something like this or closer in hammer?
     
  2. Gale

    Gale L1: Registered

    Messages:
    38
    Positive Ratings:
    13
    I believe it would be possible if you found the sound that plays when a round is won, and replace it with your own(with the same filename and directory), and pack it into the map it would do exactly what you're looking to do.
     
  3. Turnip

    aa Turnip The 80s Vegetable

    Messages:
    1,432
    Positive Ratings:
    803
    Thanks, but I had a new idea instead. How did cp_snowplow play music at the start of the game or just prior to it? I may use that method instead of at the end.
     
  4. Nicky

    aa Nicky Lets try something new!

    Messages:
    912
    Positive Ratings:
    1,698
    You can use an ambient generic, and use either timers or logic_autos with delays to time the ambient_generic to play right before the match starts/near when the match ends. Make sure to check the flag "Play everywhere" on the ambient_generic.
     
    • Like Like x 1
    • Agree Agree x 1
  5. Turnip

    aa Turnip The 80s Vegetable

    Messages:
    1,432
    Positive Ratings:
    803
    How do you find the sound file in the browser?
     
  6. Nicky

    aa Nicky Lets try something new!

    Messages:
    912
    Positive Ratings:
    1,698
    You have to put it in your custom context folder in your game files. Then in the sound browser, from the drop down menu click "Raw" (I think it's raw, I might be wrong just check all of them), and search up your sound file name in the filter. If you sound file is a .wav, then you can preview it straight from hammer. However if it's a .mp3 you can't preview it. Though you probably will want to use mp3s because the file size is smaller.
     
  7. Turnip

    aa Turnip The 80s Vegetable

    Messages:
    1,432
    Positive Ratings:
    803
    Where?
     
  8. Nicky

    aa Nicky Lets try something new!

    Messages:
    912
    Positive Ratings:
    1,698
    First off, I meant "custom content" not "context", sorry about that. Anyways, in your tf/custom folder (where you may put mods, custom huds, hitsounds, etc), make an folder called something like "custom_map_stuff" (you can name it anything you want, and you can make multiple of these to keep it organized by author, asset pack, etc). Then in that folder, make a folder called "sound", then in that folder put your sound file in. If, let's say you have custom materials, models, textures, particles, etc. you'll want to make folders for those. So in the "custom_map_stuff" folder, you may end up with the folders "models", "materials", "sound", and "particles". These folder are all identical names to the folders in your /tf directory. Sorry I'm not on my computer right now so I can't give screenshots. However if you are still having trouble, I'm 99% sure there's a tutorials about getting and using custom assets. If you can't find one you can always join the steam group chat and ask the people there for help.
     
    • Like Like x 1
  9. Turnip

    aa Turnip The 80s Vegetable

    Messages:
    1,432
    Positive Ratings:
    803
    upload_2016-8-29_14-30-11.png
    I cant find the custom folderpath, and nothing selectable pops up when I type in the name of the audio file.
     
  10. Izotope

    aa Izotope Never releases maps

    Messages:
    620
    Positive Ratings:
    585
    ^

    You search for your soundfiles in the Filter.
     
    • Agree Agree x 1
  11. Turnip

    aa Turnip The 80s Vegetable

    Messages:
    1,432
    Positive Ratings:
    803
    There is still nothing that shows up when I type in the name of the file, or custom

    EDIT: NEVERMIND IM AN IDIOT AND NAMED THE FILE WRONG
     
  12. Nicky

    aa Nicky Lets try something new!

    Messages:
    912
    Positive Ratings:
    1,698
    Yup, search in the "filter" box, then when you click on a sound file all the other boxes will fill up with info.

    Also if you can't find the custom folder path, you may not have it. Go to Your game's directory (if you don't know how to get to it, google it), and in your "tf" folder make a folder called "custom"


    EDIT: Have you tried restarting Hammer or clicking "Refresh Sounds" after putting the custom file in?
     
    • Like Like x 1
  13. Turnip

    aa Turnip The 80s Vegetable

    Messages:
    1,432
    Positive Ratings:
    803
    I got the sound working thanks. Also, how do I pack the custom sound? Will Vide automatically pick it up or do I have to find it myself?
     
  14. Nicky

    aa Nicky Lets try something new!

    Messages:
    912
    Positive Ratings:
    1,698
    If you compile with CompilePal, it will automatically pack the content in when you compile your map. I've found it very easy to use, and it's much nicer knowing that things are auto packed, instead of running the risk on forgetting to pack somethings when you manually pack with Vide. If you do you CompilePal, make sure "run on compile" is checked on the "pack" tab.