Raised This Month: $51 Target: $400
 12% 

TF2 Endround sound


Post New Thread Reply   
 
Thread Tools Display Modes
Author
omgiafs
Junior Member
Join Date: Jul 2008
Location: Russia
Plugin ID:
762
Plugin Version:
1.0
Plugin Category:
General Purpose
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Plays random sound from set of sounds at teamplay_round_win event
    Old 02-11-2009 , 01:42   TF2 Endround sound
    Reply With Quote #1

    TF2 Endround sound

    This very simple plugin plays random sound from set of sounds at teamplay_round_win event. This plugin harvest sound files, download files to client and send command "play SOUNDFILE" to client. Because of this command, standart sound of win/loose your team supressed.

    Set of sounds are configured in configs/endroundsound.cfg.
    Paths to sounds inside sound/ folder, for example for file
    "path_to_server/tf/sounds/gl_endmusic/endround1.mp3" path in endroundsound.cfg must be "gl_endmusic/endround1.mp3".

    Sample of configs/endroundsound.cfg:
    Code:
    "Sound Combinations"
    	{
    		"teamplay_round_win"  // Word trigger to randomly select 1 of multiple sounds
    		{
    			"file"    "gl_endmusic/endround1.mp3"
    			"file2"    "gl_endmusic/endround2.mp3"
    			"file3"    "gl_endmusic/endround3.mp3"
    			"file4"    "gl_endmusic/endround4.mp3"
    			"file5"    "gl_endmusic/endround5.mp3"
    			"file6"    "gl_endmusic/endround6.mp3"
    			"file7"    "gl_endmusic/endround7.mp3"
    			"file8"    "gl_endmusic/endround8.mp3"
    			"file9"    "gl_endmusic/endround9.mp3"
    			"file10"    "gl_endmusic/endround10.mp3"
    			"file11"    "gl_endmusic/endround11.mp3"
    			"count"    "11"        // number of sounds (default is 1)
    		}
    	}
    ATTENTION!
    If you use sv_pure "1" on your server, you MUST add your custom sound files into tf/pure_server_whitelist.txt

    Sample of pure_server_whitelist.txt:
    Code:
    whitelist
    {
    	//
    	// 3 modifiers are allowed on file specifications:
    	//
    	//	from_steam			- only check the Steam cache for the file (ignore anything on disk)
    	//	allow_from_disk		- allow the file to come from disk
    	//	check_crc			- used with allow_from_disk - server does CRC checks on the client's file to make sure it matches
    	//
    	//	The default modifier on all files is allow_from_disk. Thus, all files can come from disk and don't need CRC checks unless 
    	//	allow_from_disk can be set at the same time as check_crc. Use the + character in between them to signify this: allow_from_disk+check_crc.
    
    
    	//
    	// Three types of file specifications:
    	//
    	//	1. directory\*.*			- refers to all files under the directory
    	//	2. directory\...			- refers to all files under the directory and all directories under that (recursively)
    	//	3. directory\filename		- refers to a single file
    	
    
    	//	
    	// By default, when in pure server mode, most content file types are only allowed to come from Steam.
    	//
    	materials\...		from_steam
    	models\...			from_steam
    	sound\...			from_steam
    	sound\gl_endmusic\*.*	allow_from_disk+check_crc
    	
    	
    	//
    	// Allow custom player models. Don't do CRC checks on them because the clients may all
    	// have different custom models and the server won't have them all.
    	//	
    	models\player\...			allow_from_disk
    	materials\models\player\...	allow_from_disk
    
    	//
    	// Allow custom spray decals.
    	//
    	materials\temp\...			allow_from_disk
    	materials\vgui\logos\...	allow_from_disk
    	materials\vgui\logos\ui\...	allow_from_disk
    	
    	
    	//
    	// (Uncomment and edit these for mods).
    	// Allow mod resources to come from disk.
    	//
    	// materials\mymod\...		allow_from_disk+check_crc
    	// models\mymod\...			allow_from_disk+check_crc
    	// sound\mymod\...			allow_from_disk+check_crc
    }
    If you don't do this, client's get message in their console that sound file not found in repository and sound woudn't be played.

    IMPORTANT NOTICE
    You MUST disable plugin when ClanWar mode enabled, because in CW mode custom game resources are denied. Otherwise, you will be dropped from server with reason of failed sv_pure check.
    Attached Files
    File Type: cfg endroundsound.cfg (657 Bytes, 2252 views)
    File Type: smx endround.smx (4.0 KB, 1903 views)
    File Type: sp Get Plugin or Get Source (endround.sp - 2597 views - 3.0 KB)

    Last edited by omgiafs; 02-12-2009 at 04:11.
    omgiafs is offline
    Send a message via ICQ to omgiafs Send a message via Skype™ to omgiafs
    DontWannaName
    Veteran Member
    Join Date: Jun 2007
    Location: VALVe Land, WA
    Old 02-11-2009 , 03:04   Re: TF2 Endround sound
    Reply With Quote #2

    I would suggest making the event as a cvar so we can make sounds play based on events that we choose. Or we could just change the event in the source?
    __________________

    DontWannaName is offline
    omgiafs
    Junior Member
    Join Date: Jul 2008
    Location: Russia
    Old 02-11-2009 , 11:16   Re: TF2 Endround sound
    Reply With Quote #3

    You can do with this plugin anything you want, this plugin was written because Say Sounds Hybrid can't realize this feature(play at round_end with supressing standart sound) and because this feature looks very good (depends of sounds to play ).
    I don't planning to upgrade this plugin, and i hope somebody make new plugin, modyfying my plugin and make it very-very powerfull tool for making gameplay more fun!

    Sorry for my bad English, i hope you understood me .
    omgiafs is offline
    Send a message via ICQ to omgiafs Send a message via Skype™ to omgiafs
    DontWannaName
    Veteran Member
    Join Date: Jun 2007
    Location: VALVe Land, WA
    Old 02-11-2009 , 17:04   Re: TF2 Endround sound
    Reply With Quote #4

    How does it suppress the other sound, does the engine just play this instead of the sound at that event?
    __________________

    DontWannaName is offline
    omgiafs
    Junior Member
    Join Date: Jul 2008
    Location: Russia
    Old 02-12-2009 , 04:08   Re: TF2 Endround sound
    Reply With Quote #5

    I don't know how standart sound supressed, may be "play" and "teamplay_round_end" uses one CHANNEL_AUTO soundchannel.
    But trust me, it works .
    If !trust(omgiafs){
    install_plugin;
    configure_plugin;
    run_server;
    server_connect;
    capture_all_points;
    }

    IMPORTANT NOTICE
    You MUST disable plugin when ClanWar mode enabled, because in CW mode custom game resources are denied.
    omgiafs is offline
    Send a message via ICQ to omgiafs Send a message via Skype™ to omgiafs
    FernFerret
    Member
    Join Date: Feb 2008
    Old 02-20-2009 , 14:03   Re: TF2 Endround sound
    Reply With Quote #6

    It seems that this feature could be easily implemented into SSHE. I like the idea of this, but I don't think i'd want to install a plugin to do it alone. I'll take a look at it, but omgiafs, feel free to take a look at the SSHE source, and have a crack at it. I'm a bit busy with another plugin at the moment.

    --FF
    __________________
    Check out the SaySounds Hybrid Edition with Action Sounds! http://forums.alliedmods.net/showthread.php?t=82220
    FernFerret is offline
    gH0sTy
    SourceMod Donor
    Join Date: Jul 2008
    Location: DE
    Old 02-21-2009 , 08:05   Re: TF2 Endround sound
    Reply With Quote #7

    Nice one, will implement it into the Say Sounds Plugin.
    gH0sTy is offline
    Carnivore17
    New Member
    Join Date: Mar 2009
    Old 03-23-2009 , 19:29   Re: TF2 Endround sound
    Reply With Quote #8

    =/ not working for me
    in the cfg i deleted the extra lines of sounds and just edited them so they fit my setup. heres wat my config looks like
    endroundsound.cfg
    Code:
    "Sound Combinations"
        {
            "teamplay_round_win"  // Word trigger to randomly select 1 of multiple sounds
            {
                "file"    "gl_endmusic/endround.mp3"
                "file2"   "gl_endmusic/mariovictory.mp3"
                "count"   "2"        // number of sounds (default is 1)
            }
        }
    Am I doing something wrong? I added those two sounds to gl_endmusic folder which is in sounds folder. Wutz wrong?
    Carnivore17 is offline
    retsam
    Veteran Member
    Join Date: Aug 2008
    Location: so-cal
    Old 03-23-2009 , 19:32   Re: TF2 Endround sound
    Reply With Quote #9

    Id double check the sounds are there, cause this plugin works, at least in tf2 nayways. I actually edited it for gates open sounds instead.

    Everything looks right tho. Make sure you compile with the sm ver you have.
    retsam is offline
    Carnivore17
    New Member
    Join Date: Mar 2009
    Old 03-23-2009 , 21:13   Re: TF2 Endround sound
    Reply With Quote #10

    Yup the sounds are there. I just realized, i checked the console and when the round ends it says that the sound had an invalid sample rate (8000). So my q now is wat do i need to set it at for it to work?

    And sorry but wut you mean compile for my sm version? I have the newest version of sm, though im not editing any code or anything in the plugin besides the config, just installing the plugin

    EDIT: Nevermind I got the settings right. I used dbPowerAmp first to set it at like 44.1 and turned it into a wav, then turned it back into an mp3 by recoding again. E-z and it works! Just make sure its loud enough to be heard, i had to use Goldwave to increase volume in filter>equalizer by 5.0 at least in each one

    Last edited by Carnivore17; 03-24-2009 at 17:39.
    Carnivore17 is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 07:58.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode