-
Notifications
You must be signed in to change notification settings - Fork 494
feat: When a player requests metal or energy, play an alert sound #6236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
feat: When a player requests metal or energy, play an alert sound #6236
Conversation
|
This is pure UI so shouldn't involve a gadget. Use |
|
Thanks for the guidance, I wasn't aware of I've refactored the PR to remove the gadget entirely. Here is the new implementation:
Please let me know if this is the correct approach. I've made an assumption that Thanks for reviewing. |
Probably, but this is for a sound designer to decide, I only look at code quality.
Assets should have their licence specified (somehow). I also haven't listened to the sound (also the job of a sound designer). |
|
Just call WG['notifications'].queueNotification("AllyRequestEnergy") directly in gui_advancedplayerlist You forgot to add I18N (language) def for the new announcement. Sound effect is trash. I like the notification itself though, I was going to add something like this myself. |
|
I'll work on the sound effect, it is trash, more a placeholder for testing. Is there an existing SFX we could re-use that would make sense? If we call I was suggesting this would be a sound effect rather than speech-to-text notification, but keen to get others' opinions. I think most voice announcements are one shot, whereas I see this as more similar to a map ping. I've added the local check for the sender being and ally and added the stackedDelay, thank you for catching this. |
|
I've added a slightly improved sound effect. Please let me know what you think. With regards to the I18N (language) def for the new announcement, is this required if there's no voice line associated with it, only a sound effect? |
Yes because it appears in the messages box. In current state it will show missing localisation string there. Also, We will add a voiceline for it if it gets added. Please put it as |
|
I don't hate this new sound effect but please make sure all the licenses and credits are covered. Also it's too loud. Put it in Audacity or something and compare it to other sound effects, and try to match. |
|
If you don't want this to be a voiced notification then don't use voice notifications system for it, and just play the sound. |
|
I think the idea of putting it in the notification framework was that the sound should still be queued like other notifications so as not to play on top of other sounds, and that one can customize the sound to be voiced. |
|
I hereby release the sound file I have added attestation to the effect of the above in I have lowered the volume of I have added localisations to |
|
For translations do just the English source, the other languages are handled via a dedicated translation platform. |
86524af to
996dbdd
Compare
996dbdd to
141843a
Compare
|
Removed unnecessary language translations, left only |
…msem-me/Beyond-All-Reason into SupportRequestNotificationSound
|
Updated the PR comment to accurate reflect the current state based on feedback. |
|
Something to think about in the future is that "requesting units" also exists, but adding that is not necessarily in the scope of this PR. |
Co-authored-by: sprunk <[email protected]>
Co-authored-by: sprunk <[email protected]>
|
Is there anything else I can provide on this? |
|
Nah, just wait for senpai to notice |
Work done
This PR introduces a new audio notification that plays for teammates when an allied player requests energy or metal. This provides clear, non-visual feedback for resource requests, which at present are only posted to chat and can be easily missed in a busy game.
This widget could be extended in the future to include additional audio and/or visual indicators for ally player requests. For example chat wheel functionality to allow quick team messages such as "Push now", "Building T2 lab" or "Fall back".
These could have visual and/or audio alert notifications, for now this only implements sound effects in addition to the existing chat messages.
It is implemented by hooking into the existing notification system:
gui_advplayerslist.lua: Modified to send a new, uniquealert:allyRequest:energy(or:metal) message when a player clicks the resource icons next to their own name. This is sent in addition to the existingmsg:...message (which goes to chat).snd_notifications_addon_ally_alerts.lua(New Widget): A new, small, widget created to do the following:sounds/voice/config.lua: Added two new event definitions, AllyRequestEnergy and AllyRequestMetal. These are configured to only play a soundEffect, but could be ammended to include a voiceline.sounds/voice-soundeffects/AllyRequest.wav(New Asset): This is the new sound effect that is played.license_sounds.txtupdated with license forAllyRequest.wavlanguage/en/tips.jsonupdated with appropriate messages.The idea was to take a clean, modular approach using the game's existing notification system, so it will respect user settings for notification volume.
AllyRequest.wavwas created by me from scratch using LMMS synthesizers. I hereby release the sound fileAllyRequest.wavincluded in this PR under the CC0 1.0 Universal (CC0 1.0) Public Domain Dedication.Test steps