View Single Post
Author Message
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 11-16-2021 , 20:45   [L4D1 & L4D2] Voice Pitch [v1.0.1 | 25-November-2021]
Reply With Quote #1

Description

This plugin changes the client voice pitch, giving another game experience and more personality/randomness to the characters.

Can be annoying and funny as well. I personally had a lot of fun while doing this.

It was based on the [TF2] Voice Commands Pitch plugin by SirDigby.

Features
  • Allow configuring the min/max pitch through command.
  • Allow configuring the min/max pitch for survivors.
  • Allow configuring the min/max pitch for special infecteds.
  • Allow configuring the min/max pitch for commons and witches.
  • Allow the client to set his own voice pitch.
  • Allow the client to disable the plugin behaviour on self.
  • Allow enabling cookies to store client preferences.
  • Allow enabling only for humans or bots.

Cvars

A configuration file named "l4d_voice_pitch.cfg" will automatically be created for you upon the first run in the "\cfg\sourcemod\" folder.

PHP Code:
// Boomer maximum voice pitch.
// 0 = OFF (disables both min/max).
// -
// Default: "200"
// Minimum: "0.000000"
// Maximum: "255.000000"
l4d_voice_pitch_boomer_max "200"

// Boomer minimum voice pitch.
// 0 = OFF (disables both min/max).
// -
// Default: "60"
// Minimum: "0.000000"
// Maximum: "255.000000"
l4d_voice_pitch_boomer_min "60"

// (L4D2 only) Charger maximum voice pitch.
// 0 = OFF (disables both min/max).
// -
// Default: "200"
// Minimum: "0.000000"
// Maximum: "255.000000"
l4d_voice_pitch_charger_max "200"

// (L4D2 only) Charger minimum voice pitch.
// 0 = OFF (disables both min/max).
// -
// Default: "60"
// Minimum: "0.000000"
// Maximum: "255.000000"
l4d_voice_pitch_charger_min "60"

// Maximum voice pitch allowed to set through command.
// -
// Default: "200"
// Minimum: "0.000000"
// Maximum: "255.000000"
l4d_voice_pitch_command_max "200"

// Minimum voice pitch allowed to set through command.
// -
// Default: "60"
// Minimum: "0.000000"
// Maximum: "255.000000"
l4d_voice_pitch_command_min "60"

// Common maximum voice pitch.
// 0 = OFF (disables both min/max).
// -
// Default: "200"
// Minimum: "0.000000"
// Maximum: "255.000000"
l4d_voice_pitch_common_max "200"

// Common minimum voice pitch.
// 0 = OFF (disables both min/max).
// -
// Default: "60"
// Minimum: "0.000000"
// Maximum: "255.000000"
l4d_voice_pitch_common_min "60"

// Allow cookies for storing client preferences.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_voice_pitch_cookies "1"

// Enable/Disable the plugin.
// 0 = Disable, 1 = Enable.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_voice_pitch_enable "1"

// Hunter maximum voice pitch.
// 0 = OFF (disables both min/max).
// -
// Default: "200"
// Minimum: "0.000000"
// Maximum: "255.000000"
l4d_voice_pitch_hunter_max "200"

// Hunter minimum voice pitch.
// 0 = OFF (disables both min/max).
// -
// Default: "60"
// Minimum: "0.000000"
// Maximum: "255.000000"
l4d_voice_pitch_hunter_min "60"

// Which type of infected client (human/bot) should be affected by the plugin.
// 0 = NONE, 1 = HUMAN, 2 = BOT, 3 = BOTH.
// Add numbers greater than 0 for multiple options.
// Example: "3", enables for Humans and Bots.
// -
// Default: "3"
// Minimum: "0.000000"
// Maximum: "3.000000"
l4d_voice_pitch_infected_client "3"

// (L4D2 only) Jockey maximum voice pitch.
// 0 = OFF (disables both min/max).
// -
// Default: "200"
// Minimum: "0.000000"
// Maximum: "255.000000"
l4d_voice_pitch_jockey_max "200"

// (L4D2 only) Jockey minimum voice pitch.
// 0 = OFF (disables both min/max).
// -
// Default: "60"
// Minimum: "0.000000"
// Maximum: "255.000000"
l4d_voice_pitch_jockey_min "60"

// Smoker maximum voice pitch.
// 0 = OFF (disables both min/max).
// -
// Default: "200"
// Minimum: "0.000000"
// Maximum: "255.000000"
l4d_voice_pitch_smoker_max "200"

// Smoker minimum voice pitch.
// 0 = OFF (disables both min/max).
// -
// Default: "60"
// Minimum: "0.000000"
// Maximum: "255.000000"
l4d_voice_pitch_smoker_min "60"

// (L4D2 only) Spitter maximum voice pitch.
// 0 = OFF (disables both min/max).
// -
// Default: "200"
// Minimum: "0.000000"
// Maximum: "255.000000"
l4d_voice_pitch_spitter_max "200"

// (L4D2 only) Spitter minimum voice pitch.
// 0 = OFF (disables both min/max).
// -
// Default: "60"
// Minimum: "0.000000"
// Maximum: "255.000000"
l4d_voice_pitch_spitter_min "60"

// Which type of survivor client (human/bot) should be affected by the plugin.
// 0 = NONE, 1 = HUMAN, 2 = BOT, 3 = BOTH.
// Add numbers greater than 0 for multiple options.
// Example: "3", enables for Humans and Bots.
// -
// Default: "3"
// Minimum: "0.000000"
// Maximum: "3.000000"
l4d_voice_pitch_survivor_client "3"

// Survivor maximum voice pitch.
// 0 = OFF (disables both min/max).
// -
// Default: "200"
// Minimum: "0.000000"
// Maximum: "255.000000"
l4d_voice_pitch_survivor_max "200"

// Survivor minimum voice pitch.
// 0 = OFF (disables both min/max).
// -
// Default: "60"
// Minimum: "0.000000"
// Maximum: "255.000000"
l4d_voice_pitch_survivor_min "60"

// Tank maximum voice pitch.
// 0 = OFF (disables both min/max).
// -
// Default: "200"
// Minimum: "0.000000"
// Maximum: "255.000000"
l4d_voice_pitch_tank_max "200"

// Tank minimum voice pitch.
// 0 = OFF (disables both min/max).
// -
// Default: "60"
// Minimum: "0.000000"
// Maximum: "255.000000"
l4d_voice_pitch_tank_min "60"

// Witch maximum voice pitch.
// 0 = OFF (disables both min/max).
// -
// Default: "200"
// Minimum: "0.000000"
// Maximum: "255.000000"
l4d_voice_pitch_witch_max "200"

// Witch minimum voice pitch.
// 0 = OFF (disables both min/max).
// -
// Default: "60"
// Minimum: "0.000000"
// Maximum: "255.000000"
l4d_voice_pitch_witch_min "60" 
Public Commands
  • sm_voice => Change the client voice pitch. Usage: sm_voice <pitch>.
  • sm_voicedisable => Disable the plugin behaviour in the client.
  • sm_voicereset => Reset and enable the plugin behaviour in the client.

Admin Commands
  • sm_voiceclient => Set the client voice pitch. Usage: sm_voiceclient <target> <pitch>. (z flag required)
  • sm_print_cvars_l4d_voice_pitch => Print the plugin related cvars and their respective values to the console. (z flag required)

Change Log

Spoiler


Current Translations
  • en - English
  • es - Spanish
  • pt - Brazilian Portuguese
  • pt_p - Portuguese
  • ru - Russian

Notes
  • Voice pitch values can be between 0 and 255, while 100 is the normal game pitch.
  • Using slow values makes the speech slower, while high values make it faster. (e.g: 50 makes it 1/2 slower and 200 makes it 2x faster)

To Do
  • Check client flag.
  • Show actual pitch on chat.
  • Create menu.

Thank you!

Post Reply
  • Any feedback, bug reports, fixes, improvements, translations or suggestions for the plugin are welcome.

Related Plugins

Installation
  • Put the "l4d_voice_pitch.phrases.txt" file in your "\addons\sourcemod\translations\" folder.
  • Put the "l4d_voice_pitch.smx" file (click Get Plugin) in your "\addons\sourcemod\plugins\" folder.
Attached Files
File Type: txt l4d_voice_pitch.phrases.txt (2.4 KB, 385 views)
File Type: sp Get Plugin or Get Source (l4d_voice_pitch.sp - 467 views - 39.0 KB)
__________________

Last edited by Marttt; 01-15-2023 at 12:20.
Marttt is offline