Garry's Mod

Garry's Mod

Not enough ratings
Prop Hunt X2Z: Adding Custom Taunts with Taunt Scanner
By Wolvindra (X)
Add a Custom Taunts Easily by using Prop Hunt X2Z's Taunt Scanner feature. This only available if you installed Prop Hunt X2Z Gamemode.
   
Award
Favorite
Favorited
Unfavorite
Introduction & Requirements
Taunt Scanner System
Prop Hunt: X Introduces new Taunt Scanner system starting from Revision 19/06/2022 or any "X2Z" revisions. Taunt scanner by default will scans "sound/taunts_phx" in Gamemode's directory. However you can make a replicated folder in root garrysmod folder to add more taunts in there.

Be sure to read from PH:X Wiki[gmodgameservers.com] first for Sound Format and Other requirements. Or use this guide instead which is more updated.

Below are the method, and steps on how you gonna add custom taunts in Prop Hunt: X. With only requirements:


What are Scanned
  • It will only scan on "sounds" directory and looks for "taunts_phx" directory. They can be both from Prop Hunt's X or Garry's Mod mod directory.
  • It will then scans for MP3s, WAVs, and OGG files.
  • It can scans up to 1000s of taunt files.

What are Best Method for this?
See Methods below on how you'll add your custom taunts in PH:X.
Method 1: Using Taunt Scanner system (Easy)
Quick Video Tutorial:

How to add your Custom Taunts in Prop Hunt X by using Taunt Scanner system.
Please note: This doesn't compatible with Taunt Loader addon.

Taunt Scanner System

Using this system is very easy. All you have to do is that copy your favourite taunts files (currently support .wav, .mp3, and .ogg) to the sound folder. By default, this folder don't exist in your first garry's mod installation so you have to create a new folder. Then you can place these taunts into the folder.

Steps

  • Prepare your taunt files. They're must in WAV, MP3, and OGG format. To make them playable, make sure they're in mono format, following with sample rate of 44100 Hz for WAVs and Bitrate of 128000 bps for MP3s.
  • Locate your "garrysmod" in your Garry's Mod game directory (e.g: on: C:\Program Files (x86)\Steam\SteamApps\common\GarrysMod\garrysmod), and search for folder: "sound". If sound folder don't exist, create a new one.
  • Enter "sound" folder, again, create "taunts_phx", if they don't exist (by default they don't so you'll have to create new one)
  • Enter "taunts_phx" folder, Create two folders called: "1" and "2". Those are Team IDs for Prop Hunt, where "1" is for Hunters, and "2" is for Props.
  • Once you created them, enter folder "2" to add custom taunts for props. Before adding, we need to make a Category folder. This is required since PH:X requires category in order to get your taunts visible. Create an category folder and give it a name. (e.g: my_awesome_taunts - Note: must lowercased, do not contain space).
  • Enter "my_awesome_taunts" category folder, and paste all your files in there.
  • Repeat the process for Hunters team: Enter folder "1", Create Category, and paste your files.
  • Please note: to make them working, be sure files names MUST lowercased, does not contain spaces or weird symbols/unicode text. File name must follow with ASCII standards.

The Correct Folder Structure
#1 - Structure Diagram (Note: starts in "sound" folder)


#2 - Correct Structure Folders with External Script and Subfolders Examples.


Testing & Notes
Once you all done, fire up your Prop Hunt: X, and see if these taunts visible on your Custom Taunt menu.

Additional Notes:
  • Pro Tips: You can create multiple categories inside folder "1" and "2" and you can add more taunts in there too.
  • Subfolders inside category folders won't be scanned. For that, See picture of "Correct Structure Folders with External Script and Subfolders Examples" above.
  • This also works when you pressing F3 for Random Taunts.
  • This also provides download if you're playing Multiplayer Mode, so your friend can listen to your taunts.
  • If you have a big collection of taunt files, I'd suggest by using Workshop and follow the folder structures as mentioned above. (Or you can use some other technique below)
  • This method is also works if you're hosting on a Dedicated Server. You just need a FastDL or Workshop server content to make these working.
Method 2: Using Taunt Scanner with Different Directory (Intermediate)
This method is similar to the Method #1, however if you wish to use another location other than "taunts_phx", you need a custom script to make them available in game.

The steps are same, except:
  • Once you entered "sound" directory from "garrysmod" (..\garrysmod\sound) folder, create a custom folder called "my_custom_taunt_packs" instead of "taunts_phx"
  • Rest of steps are similar to method #1.

Once you're done making the custom taunts folder, you need the following script.

  • Create an empty folder in "addons" directory (..\garrysmod\addons)
  • Create folder: lua, click on "lua", create again: "autorun"
  • Create a file called "sh_mycustomtaunt.lua"
  • and Follow this script below:

sh_mycustomtaunt.lua code:
( Example Code from: https://github.com/Wolvin-NET/prophuntx/blob/master/templates/lua/autorun/sh_taunt_scanner_example.lua )
-- Let's say, if you have a directory under "sound/my_custom_taunt_packs", then the last argument should only contains "my_custom_taunt_packs". -- See this topic on how you add custom taunt within taunt scanner: -- https://gmodgameservers.com/wiki/prophuntx/#5_Modifications/Add_Custom_Taunts+Add_Custom_Taunts -- Usage: list.Set("PHX.TauntScanFolder", <taunt name>, <directory>) -- Example: list.Set("PHX.TauntScanFolder", "My Custom Taunt Packs", "my_custom_taunt_packs")

Example Image:
Method 3: Using LUA
If you're experienced users, you may want to make specific custom taunts without using taunt scanner. There's two ways of doing this.

Step #1 - Using External Script outside from gamemode directory (Recommended)

local taunts = {} -- Make sure these team ids are available, -- Otherwise, default to number IDs. TEAM_HUNTERS = TEAM_HUNTERS or 1 TEAM_PROPS = TEAM_PROPS or 2 -- Add taunts to Hunter team. taunts[TEAM_HUNTERS] = { ["Guuuh!"] = "vo/k_lab/ba_guh.wav", ["If you See Dr. Breen"] = "vo/streetwar/rubble/ba_tellbreen.wav", ["test"] = "vo/k_lab/ba_geh.wav", -- ["add more"] = "prop_hunt/just/other/taunts.wav", } -- Add Taunts to Prop team. taunts[TEAM_PROPS] = { ["Windows XP Shutdown"] = "taunts/ph_enhanced/ext_xp_off.wav", ["Windows XP Startup"] = "taunts/ph_enhanced/ext_xp_start.wav", -- ["add more"] = "prop_hunt/just/other/taunts.wav", } -- Assign the taunt tables with Category. -- Note: if category exists, -- Any existing taunt name (keys) or taunt path (values) -- that exists in category will be skipped. -- Example: -- list.Set(<the List we assign to>, <category name>, <taunt table>) list.Set("PHX.CustomTaunts", "Epic Custom Taunts", taunts) -- // Or, if you want something specific, for example: Using Different Category Name: \\ -- -- Add for Hunters only list.Set("PHX.CustomTaunts", "Custom Epic Hunter Taunts", { [TEAM_HUNTERS] = taunts[TEAM_HUNTERS], [TEAM_PROPS] = nil }) -- Add for Props only list.Set("PHX.CustomTaunts", "Custom Epic Hunter Taunts", { [TEAM_HUNTERS] = nil, [TEAM_PROPS] = taunts[TEAM_PROPS] }) -- You can also add more list here and repeat the process.

Step #2 - Edit Script in gamemode directory
Warning: Use at your own risk! The gamemode may always receiving updates. This method may be unstable and require Map Restart to apply! This step is only available if you're using GitHub version!
  • Navigate to your Garry's Mod "garrysmod/gamemode" directory
  • Open or Edit file "gamemodes/prop_hunt/gamemode/config/sh_additional_taunts.lua" with Notepad/++ (Windows) or nano/vim (Linux)
  • Follow the process that similar from "Step #1" above.
  • Once you're done editing, Restart the Map (use: changelevel <map name>)
Adding Taunt Sounds to a Workshop
By default, players will download your taunt files one by one when they joined to your server which can take very long time. To prevent this, you need to pack all of your taunt sound files and submit into workshop following with the structure folder from Method you chose (Method #1 or #2)

Once workshop is ready & uploaded, copy your workshop ID from an URL (example: "https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=123456789", where the the ID is "123456789"), Open the lua file that you've created from Method #1 or #2, Add the following line:
-- ... <your previous code containing list.Set("PHX.TauntScanFolder", ... ) > if SERVER then resource.AddWorkshop( "123456789" ) -- your Workshop ID end

And That's it!

Note: This also works with Method #3 (Only works with Step #1)
Something is not working or there is an error
Heads up to our Discord server here ( https://discord.gg/avaTPM7 ) and we will try to resolve this together. Or submit a issue to GitHub issue page here: https://github.com/Wolvin-NET/prophuntx/issues - make sure to provide any error message if the problem occurs.

Also, make sure that:
  • Make sure to read from this Wiki: https://gmodgameservers.com/wiki/prophuntx/#5_Modifications/Add_Custom_Taunts+Add_Custom_Taunts for basic information about Sound Formats in Source Engine (WAV,MP3,OGG) files before adding.
  • As it says, file name must not contain capital letters, spaces, symbols or any utf-8 characters. This isn't intentional by PH:X's code, it's the game itself on how they read their file names.
  • This only works if you creating this files under <root>/garrysmod/ folder. If you're making them on <root>/garrysmod/addons folder, that should probably works.
  • Known Issues: make sure to delete any sound files in <root>/garrysmod/download/sound/taunts_phx (if exists) before hosting a Multiplayer games. A known problem is that the sound file will think it doesn't exists on server, but it's visible/exists in player's perspective.