Raised This Month: $32 Target: $400
 8% 

[DoD:S] Halloween Random sounds


Post New Thread Reply   
 
Thread Tools Display Modes
Author
micmacx
Member
Join Date: May 2021
Plugin ID:
8557
Plugin Version:
1.1
Plugin Category:
Fun Stuff
Plugin Game:
Day of Defeat: Source
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Play Halloween Random sounds...
    Old 10-03-2023 , 21:54   [DoD:S] Halloween Random sounds
    Reply With Quote #1

    Hi,
    There are a lot of sound plugins but I haven't found any that play sounds randomly to add a certain atmosphere in your server, in my case it was for Halloween that I created this script.
    For copyright I will not put any sound with the plugin, but I will explain to you how to modify downloaded sounds, then it will be up to you to take your responsibilities regarding copyright, in my case I used royalty-free sound databases, but when in doubt...

    Since version 1.1, my plugin is modified based on the plugin:Admin Sounds 1.2.2 by Cadav0r
    I used his way of handling precached sounds.

    DESCRIPTION :

    Plugin play automaticaly random sound every 40 seconds for make a certain atmosphere in your server. This plugin uploads sounds automatically to players. It plays sounds only to players who download them, which avoids having players tell you about red lines in their Day of Defeat source console.


    INSTALLATION :
    1. Prepare 26 sounds using these file names:
    son1.mp3
    son2.mp3
    son3.mp3
    .
    .
    .
    son24.mp3
    son25.mp3
    son26.mp3
    Sorry but i make this script in french, the translation for "son" is "sound".

    2. Upload sound files in sound/yourfolder.
    3. Upload plugin and change map, it will create cfg/halloween_sounds/halloween_sounds.cfg
    4. Setting your folder in halloween_sounds.cfg

    // Folder Name in folder sound
    // -
    // Default: "halloween_mx"
    halloween_sounds_folder "halloween_mx"

    5. Change map, it must work.

    In halloween_sounds.cfg you can enable/disable the plugin, change the name of the sounds folder, change the time in seconds after playing a sound that another one will be played, change the volume of sounds.

    PREPARE SOUNDS :

    Convert valid MP3 file for your DoD:S servers using Audacity, Audacity is free, open source, cross-platform software for recording and editing sounds.
    With this software you can convert all sound files to MP3.

    1. Install Audacity on your computer.
    2. Create a sound or download it.
    3. Open sound in audacity.
    4. On the left of the graph it should be written: Stereo, 44100Hz 32bits floating.If it is not 44100, you must select it at the bottom left in the “Project rate in HZ”, then in the Track menu–>Resample–>Validate.
    5. Then in the menu: File–>Export–>Export to MP3.
    6. A window opens and you must setting: bit rate mode-->medium, Quality -->128kbps, channel mode -->stereo, and save the file.


    CHANGELOG :

    03/10/2023 : Plugin 1.0
    05/10/2023 : Plugin 1.1 : Modified way of handling precached sounds
    17/10/2023 : Plugin 1.2 : Correction of the Cvar flags for automatic correctly created the configuration file with all the Cvars.
    Attached Files
    File Type: sp Get Plugin or Get Source (halloween_sound.sp - 76 views - 4.6 KB)
    __________________

    Last edited by micmacx; 10-16-2023 at 19:06. Reason: update
    micmacx is offline
    knoxville101
    Junior Member
    Join Date: Feb 2023
    Old 10-04-2023 , 12:35   Re: Halloween Random sounds
    Reply With Quote #2

    Can we just use random file names and not:

    son24.mp3
    son25.mp3
    son26.mp3

    Due to if you go to a different server that has this same plugin you'll only have the files from server A and not server B
    __________________
    knoxville101 is offline
    finishlast
    Senior Member
    Join Date: Nov 2018
    Location: In Reno with the vitamin
    Old 10-04-2023 , 12:42   Re: Halloween Random sounds
    Reply With Quote #3

    Think there is a cvar where you can make a random name for the folder instead.

    That way it is not important to change the file names.

    CreateConVar("halloween_sounds_folder", "halloween_mx"

    Just set it to something special in the
    halloween_sounds.cfg and then change the folder on your server to it.
    __________________

    Last edited by finishlast; 10-04-2023 at 12:47.
    finishlast is offline
    knoxville101
    Junior Member
    Join Date: Feb 2023
    Old 10-04-2023 , 14:51   Re: Halloween Random sounds
    Reply With Quote #4

    Yeah I misread that. So I added 21 sound files to my server and changed the sample rate. I have other sounds on the server and those all work. For just this plugin I get the failed to decode error...

    All files are 44100

    Not sure why its not decoding...
    __________________
    knoxville101 is offline
    micmacx
    Member
    Join Date: May 2021
    Old 10-04-2023 , 17:34   Re: Halloween Random sounds
    Reply With Quote #5

    Hi,
    It's not 21 sounds but 25 sounds (son1.mp3 ... son26.mp3) that you must create, otherwise at some point you will have problems. ;-)

    +++. :-) :-) :-)
    micmacx is offline
    knoxville101
    Junior Member
    Join Date: Feb 2023
    Old 10-04-2023 , 17:58   Re: Halloween Random sounds
    Reply With Quote #6

    ok I'll add 4 more to make 25 and try it. Thanks
    __________________
    knoxville101 is offline
    knoxville101
    Junior Member
    Join Date: Feb 2023
    Old 10-04-2023 , 18:18   Re: Halloween Random sounds
    Reply With Quote #7

    Have 25 sounds and still saying failed to decode.
    __________________
    knoxville101 is offline
    micmacx
    Member
    Join Date: May 2021
    Old 10-04-2023 , 18:38   Re: Halloween Random sounds
    Reply With Quote #8

    All right,
    I have been on your server and I see 68 plugins, you are the only server that has more plugins than my server, this is not normal.

    I tested on my server on and I also have the same thing but not for all sounds.

    I'm going to try to modify the plugin, I remember that I had already had this problem and I had precached the sound just before playing it, which solved the problem.

    You have some weird stuff on your server, you are using sourcemod 1.11.0.6934 and you have some plugins that are from old versions of sourcemod :

    PHP Code:
     "Basic Commands" (1.11.0.6917by AlliedModders LLC

     
    "MapChooser" (1.10.0.6528by AlliedModders LLC
     
    "RandomCycle" (1.10.0.6528by AlliedModders LLC
     
    "Map Nominations" (1.10.0.6528by AlliedModders LLC 
    I'm not saying that's it but it's weird.

    I put my server in halloween mode if you want to test, skin, bonus round and automatic sound : steam://connect/82.65.74.77:27015

    Last edited by micmacx; 10-04-2023 at 18:39.
    micmacx is offline
    knoxville101
    Junior Member
    Join Date: Feb 2023
    Old 10-04-2023 , 19:09   Re: Halloween Random sounds
    Reply With Quote #9

    Yeah I test everything and there is no issues with those basic plugins. I have disabled the halloween for now. Have you seen the ambient Halloween plugin? I was using that but it only plays one sound. I want the multiple sounds like you came up with.

    https://forums.alliedmods.net/showthread.php?p=2555727
    __________________
    knoxville101 is offline
    micmacx
    Member
    Join Date: May 2021
    Old 10-04-2023 , 20:42   Re: Halloween Random sounds
    Reply With Quote #10

    OK,
    I had the problem on an MP3 file(son16.mp3) on my server.
    I modified my plugin based on the plugin:Admin Sounds 1.2.2 by Cadav0r
    I used his way of handling precached sounds. But I had exactly the same error and exactly the same sound (son16.mp3). I edited the sound with audacity, resampled the track, exported the MP3 and it works.

    So it's only a question of MP3 file encoding but not the plugin, but i will update my plugin.

    If you want more explanation, here is my French site which explains how to make mp3 files for day of defeat source servers, so you can use your browser to tranlate it. ;-)

    For the ambient Halloween plugin, I don't like the fog on the map because some players use hax cvar and disable the fog, which completely unbalances the game.

    Last edited by micmacx; 10-04-2023 at 20:56.
    micmacx is offline
    Reply


    Thread Tools
    Display Modes

    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 05:14.


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