Page 1 of 1

Mudding with sounds

Posted: Wed Jul 17, 2019 4:46 am
by Israfel
I've always liked the idea of mudding with some immersive audio - environmental ambient sounds, battle sound effects, music loops and such. So I've been tinkering around with a few functions in MUSHclient that let you program sounds into triggers and things. I'm really enjoying the current early results. The ambient environmental loops make for some nicely immersive mudding. Currently includes:
- environmental ambient audio loop based on the environment you're standing in (forest, cave, mountain etc)
- footfall sounds that play when you move and vary based on the environment you move into (crunching gravel for mountains, soft grassy sounds for meadows)
- a range of battle sound effects that play based on some limited categories of events (hit, miss, fumble, critical hit)
- battle music that fades in and out with combat

Putting it all together currently sounds a bit chaotic at times, especially when the battle music gets slightly too dramatic for the pace of combat you're in. But then again there's really nothing like fighting a gremlin to an epic battle soundtrack. :P

I'd like to make this openly available at some point for people to play around with themselves. The possibilities are quite extensive with this kind of stuff - for example adding all sorts of sound effects to different activities, expanding the battle sounds to add more variety, include a few grunts, taunts and groans etc.

Here's a link to a demo video of the results so far. This shows a few of the environmental ambient effects such as mountains, caves, beach, meadow and forest. It also has a few clips of the combat sounds in full action.

If you're interested in using this or have more ideas on how you'd like to see it extended, I'd be happy to hear it. :)

Re: Mudding with sounds

Posted: Wed Jul 17, 2019 12:15 pm
by Arsicas
Ha, neat. :)

Re: Mudding with sounds

Posted: Wed Aug 07, 2019 4:38 pm
by frowen
I think this is a brilliant idea. I was thinking of making something like this. I don’t have the time to learn Lua. I would be very interested in this. As a blind player, I have made several sound triggers. But having ambient sound would be great! Make the game more exciting. And I’m pretty sure, it would attract more blind players. As this is what they seek when they are looking for muds to play. Nice job thus far!

Re: Mudding with sounds

Posted: Mon Aug 12, 2019 4:30 am
by ferranifer
This is incredibly cool!

Keep the good stuff coming Israfel!

Re: Mudding with sounds

Posted: Tue Aug 13, 2019 3:03 am
by Israfel

Great to see some interest.

Frowen, good point about VI mudding. I have to admit most of my plugins are somewhat visual but I think I could make them a bit more accessible. Not saying they'll be WCAG, but doing away with excess use of symbols to format text is easy enough.

Another interesting idea would be combining the hp/mana bar with sounds, so users could choose to use one or both of those options. An audible version of a health bar for VI players would be something like:
- Health at full plays no sound
- Health decreasing plays a a wince/grunt
- Health increasing plays a relieved sigh
- Health at 'bad shape' plays a regular heartbeat loop
- Health at 'awful' plays a frantic heartbeat loop

This could be combined with visual health bars, or used without them. Ideally, you could do away with having your screenreader repeat the health description line, except in times when you actually want to read it in full. If any VI players want to leave me a post/pm about specific sounds they'd find useful I'm happy to look into it.

I haven't added much more to what you see in the video just yet. The concept works well but there are few things I'd like to tidy up within it - such as making certain sounds easily toggleable from the command line.

In terms of what I plan to add (or have added since the video):
- find a new the ambient town loop (it's a bit rowdy with horses and such and it doesn't fit the abience of all town rooms)
- override 'inside' rooms with a quieter ambient track (DONE)
- add extra ambient sound effects for the environment like animal sounds that will play from a random selection, at random time intervals (I found that some of the looping of ambient tracks got noticeable after a while. This should disguise that)
- miracle and spell sounds
- skill improves & explore world sounds

Other stuff I'd like to be able to do would be:
- varying the attack sounds based on your weapon type and choice of attack (swing/thrust/smash)
- varying the deflect sounds based on the armour you wear (leather, plate, bone etc)
- choice of 'voice' for your character with occasional grunts, groans, taunts etc during combat or other events

Not exactly sure if these last few ideas are possible. They could lead to a very complicated piece of work - which means it'll probably be a while.

Re: Mudding with sounds

Posted: Fri Aug 16, 2019 8:22 pm
by Israfel
Update: variation of some specific combat sounds are in. As I thought, it was somewhat complicated but they do work now after fiddling around with it for quite a while. The sound library is getting pretty big now and I honestly think I'm only scratching the surface. Latest additions:
- deflect will now play an armour hit sound. Sound files can be swapped to more plated or leather sounds which I've got sitting there unused for now.
- dodge will now play a soft footfall/shuffle followed by a missed swing/thrust/smash sound a quarter of a second after to mimic a real dodge
- attacks blocked by a shield play a shieldblock sound. Heavy and light sound file variants are available
- parried attacks play a metallic parry sound.
- any combat sounds that aren't identified as a specific type revert to a general sound. So for example, a 'thrust' attack will be identified, but a special move like 'impale' probably won't so you'll just get a regular 'weapon hitting flesh' sound for that. This is basically a catch-all way to ensure at least some relevant sound plays, even if it isn't perfect.
- Miracle and Spell sounds are in. These are pretty general and don't detect the type of miracle you're casting so a fireball and a lightning strike will both make the same sounds. However, these include different sounds for request, fail, ready, resist, hit, cast, effect starts, effect ends (ie all the things listed in the setcolor list)
- Skill improve and Explore world sounds added
- Draw/Sheathe weapon sounds added. Currently this isn't autodetected but is easy enough to add a 'playsound' line to your weapon alias. Similar to dodge, sounds for drawing two weapons of different types (eg axe and sword) can be accomplished by playing a 'draw axe' sound followed by a 'draw sword' sound a quarter of a second later. The effect is surprisingly good.
- Light sound alert for Orb and similar comms messages
- OOC messages play a sound
- Town ambient loop has been replaced
- Bow sounds: I have sound files for wielding, unwielding, nocking arrows, pulling the bowstring, releasing the arrow, arrow hitting its target, and arrow missing. However, to attach these sounds to events I need to write some very reliable triggers and as a non-bow user I don't have examples of these lines from the MUD. So, these may need users to write their own triggers that will play the sounds (or for them to send me the relevant lines to add to the plugin - assuming this is allowed)
- basic rest, sleep, stand, wake sound files are available
- ticks, beeps, and other variations on alert sounds are in the library and could be attached to things like communications (say, shout, emote etc) but currently aren't because I thought that might get a bit noisy.
- eat and drink sounds are available - I'm not sure I like them. The drinking sounds are kinda gross to be honest.
- fire crackling is available when you light a fire in a room
- mining, sharpening, digging, and searching sounds are available

Like the bow sounds, there are many sounds that I'd like to work into the plugin, but I have only been adding when I come accross those events myself in game. However, there are simply some things my character will never do - like use a bow, cast a spell, brew a potion, write a book (or even read one properly). Other things just haven't happened recently when I'm around. For instance, when a city is under attack the city watch will raise the alarm by sounding the horns. I have some excellent sound effects to add to these situations but haven't got the lines for it yet to set up the required triggers.

I probably want to draw the line somewhere about where to add sounds and where not to. If I'm writing specific triggers for things like miracles, I'm cautious that it's also giving information to players that can really only be found out by playing as a certain character/guild/deity etc. So I will probably just keep all miracles and spells under a general trigger that doesn't give anything away. All specials also fit into that category for now.


Re: Mudding with sounds

Posted: Sat Aug 24, 2019 2:18 am
by frowen
Awesome work israfel. I think you hit all the main ones that i was thinking about. Personally, I think channels are important and so are regular says. Lost count of how many says i miss while travelling in a party hehe. An interesting suggestion would be rare events or effects such as the breaking of bones. As for the bow lines, here are the ones i used, with a few others. If it would be easier for me to send you my triggers file let me know.
* turns to attack you.
>You load your heavy bladed crossbow with *
>You load your strong composite-bow with *
The * died.
The * drops * in pain.
The * is thrown to the ground by *
You have hit your target at *
You have hit your target.
You lose your balance and fall down to the ground.
Your wounds start to bleed.
You load your heavy bladed crossbow with *
You load your strong composite-bow with *
If you notice, i had to do two triggers for the bow and crossbow loadings. This is due to the fact that for some odd reason, those lines appear sometimes with > symbols in front while at other times they do not. Hope this was helpful.

Re: Mudding with sounds

Posted: Mon Aug 26, 2019 3:38 am
by glorfindel
frowen wrote:
Sat Aug 24, 2019 2:18 am
If you notice, i had to do two triggers for the bow and crossbow loadings. This is due to the fact that for some odd reason, those lines appear sometimes with > symbols in front while at other times they do not. Hope this was helpful.
the > symbol is geas default "prompt" (as per options prompt), which is sent to you. If another line is echoed from the game before you issue a command you see that prompt "scrolling up" and you get a new one. You can choose a different character for your prompt or turn it off enitrely if you don't need it.

Alternatively, if your client supports regular expressions, you can have something like this at the beginning of every line:

Code: Select all

, which will match if the line whether or not it has the PROMPT char > and any number of spaces at the line beginning or not.

Re: Mudding with sounds

Posted: Fri Aug 30, 2019 12:02 am
by Israfel
Yeah, I really recommend going to 'prompt none'. I never really understood what it signals to a player. I just thought it was a throwback to telnet days where you typed commands directly into the world window with all the other text. Screws up your triggers and stuff though.

Re: Mudding with sounds

Posted: Fri Aug 30, 2019 6:31 am
by ferranifer
Yes the prompt is a pain to deal with sometimes.

I wish the game would send the GA (Go-Ahead) signal. Mudlet relies on this signal to determine a few things like for example their isPrompt() function, but Geas doesn't send it.

I end up leaving the prompt in so I can at least use it to pseudo-detect GA.