Warcraft II Forum

Warcraft II => Mods & Development => Topic started by: fois on December 07, 2019, 10:21:19 AM

Title: PlaySound plugin - Plays a sound of your choice on events (Game Start/Join game)
Post by: fois on December 07, 2019, 10:21:19 AM
This plugin will play a sound of your choice on certain events. e.g. the host just started the game or someone joined your game. It's useful in case your game is minimized and you don't want to miss the game start or you want to hear when someone joined your game.


You can replace the .wav files with any sounds you want, I got the ones that are included from here: https://www.soundjay.com/ (https://www.soundjay.com/)

If you only want to get notified about a game start but you don't want to get notified about someone joining a game then just delete the matching .wav files.



Filenames: JoinGame.wav, StartGame.wav, LeaveGame.wav, Message.wav, PrivateMessage.wav, GameEnd.wav, Kicked.wav

Example:
Use "JoinGame.wav" if you want the sound to play no matter if the game window got the focus or not.

Use "JoinGameNoFocus.wav" if you only want the sound to play if the game doesn't have the focus / is minimized (Make sure you don't have "JoinGame.wav" in the folder)

Use "JoinGameFocus.wav" if you only want the sound to play if the game is active and got the focus (Make sure you don't have "JoinGame.wav" in the folder)


Download Here (http://forum.war2.ru/index.php/topic,5714.0.html)


Title: Re: PlaySound plugin - Plays a sound of your choice when someone joins your game
Post by: Tolean on December 07, 2019, 10:41:08 AM
Cool!
Title: Re: PlaySound plugin - Plays a sound of your choice when someone joins your game
Post by: shesycompany on December 07, 2019, 07:13:56 PM
wow nice! mp3 soundtrack plugin?
Title: Re: PlaySound plugin - Plays a sound of your choice when someone joins your game
Post by: Lambchops on December 07, 2019, 08:28:27 PM
Nice one  :thumbsup:
Title: Re: PlaySound plugin - Plays a sound of your choice on events (Game Start/Join game)
Post by: fois on December 08, 2019, 12:04:28 AM
wow nice! mp3 soundtrack plugin?

I think windows vista and above can play mp3 files, but windows xp can't... so maybe it's possible :D



Update:

Just updated the plugin, there is now a new sound included that will trigger when the host is starting the game so you don't miss the game start anymore
Title: Re: PlaySound plugin - Plays a sound of your choice on events (Game Start/Join game)
Post by: iL on December 08, 2019, 04:41:59 AM
Just updated the plugin, there is now a new sound included that will trigger when the host is starting the game so you don't miss the game start anymore
Nice idea! That's what i thought about: these 5 beeps are not being played then your are in alt-tab, very unlikely. Great if you can listen the game being started.
Title: Re: PlaySound plugin - Plays a sound of your choice on events (Game Start/Join game)
Post by: (PLS DELETE MY ACC) on December 09, 2019, 03:44:29 PM
This plugin will play a sound of your choice on certain events. e.g. the host just started the game or someone joined your game. It's useful in case your game is minimized and you don't want to miss the game start or you want to hear when someone joined your game.

Put PlaySound.w2p and the Sounds folder into your plugin folder and that's it. If you don't have a plugin folder then install combat 45 standard or full.

You can replace the .wav files with any sounds you want, I got the ones that are included from here: https://www.soundjay.com/ (https://www.soundjay.com/)

If you only want to get notified about a game start but you don't want to get notified about someone joining a game then just delete the matching .wav files.



Got any more ideas of any sounds we need in case the game is minimized or windowed? Post here...

NOICE. I ACTUALLY HAD THE SAME IDEA AND EVEN USED IT FOR A PERIOD OF TIME YEEEEEARZ AGO. NOBODY WAS INTERESTED THEN // NO1 TRUSTED ME ENOUGH TO USE IT
Title: Re: PlaySound plugin - Plays a sound of your choice on events (Game Start/Join game)
Post by: Player on December 12, 2019, 01:28:05 AM
This is cool, but I don't hear anything when I'm on my desktop and war2 is minimized.  Is it me or is that how the plug in is at this time?
Title: Re: PlaySound plugin - Plays a sound of your choice on events (Game Start/Join game)
Post by: fois on December 12, 2019, 09:13:14 AM
This is cool, but I don't hear anything when I'm on my desktop and war2 is minimized.  Is it me or is that how the plug in is at this time?


What windows do you have?

Did you try to install war2 combat 46 (it has everything properly set up and works fine)?

And just to make it clear, the game will still turn the sound off when you minimize it, the plugin just plays 2 sounds you can hear when the game is minimized (when someone joined a game or the host started the game)
Title: Re: PlaySound plugin - Plays a sound of your choice on events (Game Start/Join game)
Post by: fois on December 12, 2019, 11:04:07 AM
Update:

StartGame sound is now the same one the game is using (2 beeps instead of 5 though) and only plays if the game is minimized or doesn't have the focus
Title: Re: PlaySound plugin - Plays a sound of your choice on events (Game Start/Join game)
Post by: Available on December 12, 2019, 03:43:32 PM
Is it possible to hear when someone sends messages in lobby and/or leaving?

here two "soundpacks" that may be useful. (external 'sound' folder works for countdown, etc)
Title: Re: PlaySound plugin - Plays a sound of your choice on events (Game Start/Join game)
Post by: fois on December 12, 2019, 07:33:02 PM
Is it possible to hear when someone sends messages in lobby and/or leaving?

here two "soundpacks" that may be useful. (external 'sound' folder works for countdown, etc)

nice!

Yeah I can add that tomorrow.

What's going on with that sound folder? Does that already work or you want me to do something with that one too?

Title: Re: PlaySound plugin - Plays a sound of your choice on events (Game Start/Join game)
Post by: Player on December 13, 2019, 12:23:47 AM
This is cool, but I don't hear anything when I'm on my desktop and war2 is minimized.  Is it me or is that how the plug in is at this time?


What windows do you have?

Did you try to install war2 combat 46 (it has everything properly set up and works fine)?

And just to make it clear, the game will still turn the sound off when you minimize it, the plugin just plays 2 sounds you can hear when the game is minimized (when someone joined a game or the host started the game)

Ignore me, it works fine.  I just wasn't listening.
Title: Re: PlaySound plugin - Plays a sound of your choice on events (Game Start/Join game)
Post by: fois on December 13, 2019, 09:10:46 AM
Here is a test version that supports more sounds and lets you choose if a sound should always play or not.

Filenames: JoinGame.wav, StartGame.wav, LeaveGame.wav, Message.wav, PrivateMessage.wav

Example:
Use "JoinGame.wav" if you want the sound to play no matter if the game window got the focus or not.

Use "JoinGameNoFocus.wav" if you only want the sound to play if the game doesn't have the focus / is minimized (Make sure you don't have "JoinGame.wav" in the folder)

Use "JoinGameFocus.wav" if you only want the sound to play if the game is active and got the focus (Make sure you don't have "JoinGame.wav" in the folder)


Edit: Download in first post updated

Title: Re: PlaySound plugin - Plays a sound of your choice on events (Game Start/Join game)
Post by: Available on December 13, 2019, 11:29:53 AM
What's going on with that sound folder? Does that already work

Yes it will work simply placed in war2 folder (with saved directories structure)

Title: Re: PlaySound plugin - Plays a sound of your choice on events (Game Start/Join game)
Post by: Nox on December 19, 2019, 10:36:43 PM
Is there a sound for when the game finish and goes to result screen?

Exemple.... I play team game, i die, i goes alt tab untill game finish but i miss it...

Game goes to result score board and game send me a special sound..

So i can com back and dont miss the next game.
Title: Re: PlaySound plugin - Plays a sound of your choice on events (Game Start/Join game)
Post by: fois on December 21, 2019, 09:23:58 PM
@Equinox Yeah that's a good idea, I just added it. You need a file with the name "GameEnd.wav" to activate it

Download in first post updated

Title: Re: PlaySound plugin - Plays a sound of your choice on events (Game Start/Join game)
Post by: Nox on December 21, 2019, 09:46:32 PM
Thank you sir.
Title: Re: PlaySound plugin - Plays a sound of your choice on events (Game Start/Join game)
Post by: Player on December 24, 2019, 12:05:12 PM
Is it possible to get a sound when you're in the game lobby and the game is cancelled or you're booted/banned?
Title: Re: PlaySound plugin - Plays a sound of your choice on events (Game Start/Join game)
Post by: fois on December 24, 2019, 07:33:15 PM
Is it possible to get a sound when you're in the game lobby and the game is cancelled or you're booted/banned?

Just added it, filename is "Kicked.wav"
Title: Re: PlaySound plugin - Plays a sound of your choice on events (Game Start/Join game)
Post by: Player on December 26, 2019, 12:26:27 PM
Cool, thanks!!
Title: Re: PlaySound plugin - Plays a sound of your choice on events (Game Start/Join game)
Post by: fois on March 19, 2020, 11:15:54 AM
Updated the plugin:

Added all sound files that lesnik created + improved the way the plugin is patching the game so it doesn't interfere with other plugins in the future