Forlix.org

2017/10/20 - 23:40
54.92.141.211 - 4992v
 
Last modified 2013/05/08
 

Forlix PlaySound (2011/09)

This addon for SourceMod provides say-sound playback to players in games such as CS:S, TF2 and more. Typing predefined words (aliases) in the chat, any player can play back sounds from the sound list defined by the server operator. This plugin differs from most other say-sound systems in the way that it regenerates the sound credits throughout a round, making it great to use in gameplay modes that have long round times or no round end's at all. The players are enabled to keep playing sounds throughout the round while a rate-limit prevents excessive spamming. The list of sounds can be displayed to players in various ways, and muting of all sounds is also possible and remembered between sessions.
The PlaySound menu as displayed to a player
The PlaySound menu as displayed to a player

Detailed features:

  • Easy sound playback for everyone - type the sound alias directly into the chat
  • Dedicated console command fo_play <sound_name> is provided for key-binding sounds
  • Sound credits can be consumed in quick succession and will regenerate slowly over time
  • Playback limit and regeneration rate are configurable
  • Two modes of sound overlapping: Overlap sounds or stop the previous sound first
  • Muting a players voice stream also mutes the sounds played back by that player
  • Typing !sounds in chat displays the PlaySound menu with sound list and help for players
  • Every player can mute all the sounds from within the menu (this setting is remembered)
  • If available, an HTML sound list prepared by the server operator can be displayed via the menu
  • All playable sounds are defined via the configuration file forlix_playsound.cfg
  • Sound list from configuration file is read on map starts and sorted alphabetically
  • Upon parsing of the configuration file, sound paths are checked for existance and duplicate aliases
  • High performance sound alias recognition from chat texts for minimized server load
  • All player-plugin interactions are rate-limited to prevent flooding
  • Server console/RCON playback of sounds is unlimited and works just the same using fo_play
  • Sound playbacks can be logged to the server log just as with any chat message
  • Multilanguage support; English and German phrase-files are already included

Changes in v1.0: (2011/09)

  • Initial release

Changes in v1.01: (2013/05)

  • Added support for sounds in the "custom" folder

Configuration ConVars:

forlix_playsound_log_playbacks (default 1)
- Enables (1) or disables (0) sound playback logging

forlix_playsound_sound_overlapping (default 0)
- Enables (1) or disables (0) sound overlapping (When 0, any sound stops the previous one)

forlix_playsound_successive_sounds (default 3)
- Amount of sounds a player can play back in quick succession (0 to disable sounds)

forlix_playsound_regenerate_per_minute (default 3)
- Regeneration rate of sounds per minute (after 1 minute player can play another N sounds)

forlix_playsound_soundlist_url (default "none")
- URL to the HTML soundlist (set to "none" to disable)

forlix_playsound_chat_trigger (default "!")
- Set this to one of the ChatTrigger strings configured in SourceMod's core.cfg

forlix_playsound_version
- Version tracking (don't modify this) - Servers running this plugin (GameTracker.com)


Recommendations on file formats and their distribution ("Fast download"):

The recommended file format for say-sounds is 96 to 128 kbps CBR MP3. This proved to be a good compromise between quality and short download times.

When using "Fast download" (that is, sv_downloadurl), create Bzip2 compressed copies of all sound files (extension .bz2 is appended, resulting in .mp3.bz2) and store them in the same directory. The HL2 client always requests the .bz2 file first, and if this fails (the web server responds with code 404), falls back to the uncompressed sound file download. Having the files available only in uncompressed/unzipped form (.mp3) causes not only a lot of entries in the HTTP server's error log, but also two requests for each sound, and thereby unnecessary delays that can become significant when serving a large number of files.

A ZIP-file is available below, containing a few sample sounds prepared according to the above recommendations.


Chat output for repeated sound playback
Chat output for repeated sound playback
Download:

The plugin binary has been built for SourceMod version 1.3 and up.



Forlix PlaySound v1.01
License: GPL

forlix_playsound.zip (SourceMod plugin)
forlix_playsound_spl.zip (Sample sounds)

Source code
forlix_playsound_src.zip (Plugin source)

© 2006-2013 Forlix.org | Terms of use | Contact

Powered by Apache 2.2

Powered by Perl        Valid XHTML 1.1