#2021 closed enhancement (fixed)
[PATCH] UI Alarm for Tech Research Completion
Reported by: | michael | Owned by: | Marcos Paulo Moreti |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 15 |
Component: | UI & Simulation | Keywords: | patch |
Cc: | Patch: |
Description (last modified by )
ESSENTIAL:
Game needs an alarm for the player to hear when a technology is completed being researched.
There is a nice ogg file here that will work:
audio\interface\alarm\alarmupgradearmory_1.ogg
LIKE TO HAVE:
Set the above sound effect as the "default", but then also allow to override it and use a custom sound in the technology json files. Probably something like:
"soundComplete": "interface\alarm\phase_town.ogg",
That way, "normal" techs will use the default sound while we can use some kind of special sound effects for special techs, like Phases.
Attachments (3)
Change History (19)
comment:1 by , 11 years ago
Description: | modified (diff) |
---|
comment:2 by , 11 years ago
Keywords: | simple added |
---|
comment:3 by , 11 years ago
Owner: | set to |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:4 by , 11 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Sorry, managed to mess up my last commit…
comment:5 by , 11 years ago
Owner: | removed |
---|---|
Status: | reopened → new |
comment:6 by , 11 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
by , 11 years ago
Attachment: | alarm_technology.patch added |
---|
comment:7 by , 11 years ago
Keywords: | review patch added |
---|---|
Summary: | UI Alarm for Tech Research Completion → [PATCH] UI Alarm for Tech Research Completion |
It seems to be working. I have set the following sound for phase_town_athen.json, just for testing: "audio/interface/alarm/alarmattackunit_1.ogg" (did not find a sound called phase_town.ogg).
comment:8 by , 11 years ago
I went ahead and did a quick review of your patch, everything looks good except we really shouldn't reuse an existing audio file. For example, I remove the armory and it's related sounds, but I become very confused when it also breaks audible tech notifications.
I would recommend at least copying and renaming the file to something else, but optimally it would be best to try to avoid hard-coding these sorts of things.
comment:9 by , 11 years ago
I agree with Josh, plus you should, just as the Sound.js component, play XML files that allow for variation in sound files, pitch and gain.
For the rest, it looks good.
comment:10 by , 11 years ago
Thanks for the feedback.
I am going to make the changes. Just a question: do you have a suggestion on which configuration file could be used to specify the default sound file?
comment:11 by , 11 years ago
I don't think there should be a default sound file. If no file (or an incorrect file) is given, it should default to be silent (as it is currently, and as the XML files.
by , 11 years ago
Attachment: | alarm_technology2.patch added |
---|
by , 11 years ago
Attachment: | alarmresearchtechphase_1.ogg added |
---|
comment:12 by , 11 years ago
It seems there is a sound for technology (alarm_techcomplete.xml). I am using it on gather_lumbering_ironaxes.json. I created a different one (alarm_techcomplete_phase.xml) to use on phase_town_athen.json. Now there is no more default sound, "soundComplete" needs to be defined in technology json file, otherwise no sound will be played after technology is researched.
comment:13 by , 11 years ago
Looks good to me, I don't see anything blocking it being committed as soon as A14 is released.
comment:14 by , 11 years ago
Milestone: | Backlog → Alpha 15 |
---|
comment:16 by , 11 years ago
Keywords: | UI Sound Interface simple review removed |
---|
Thanks for working on this patch. I didn't include your extra audio files (that's more something for the artists to decide), but I did add your code, and an example on how to use it.
In 13555: