Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#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 michael)

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)

alarm_technology.patch (2.4 KB ) - added by Marcos Paulo Moreti 11 years ago.
alarm_technology2.patch (4.0 KB ) - added by Marcos Paulo Moreti 11 years ago.
alarmresearchtechphase_1.ogg (40.2 KB ) - added by Marcos Paulo Moreti 11 years ago.

Download all attachments as: .zip

Change History (19)

comment:1 by michael, 11 years ago

Description: modified (diff)

comment:2 by historic_bruno, 11 years ago

Keywords: simple added

comment:3 by wraitii, 11 years ago

Owner: set to wraitii
Resolution: fixed
Status: newclosed

In 13555:

Probably fixes #2021. Optimization for foam generation while I'm at it (it's faster now, but there's a new temporary array of the size of the map)

comment:4 by wraitii, 11 years ago

Resolution: fixed
Status: closedreopened

Sorry, managed to mess up my last commit…

comment:5 by historic_bruno, 11 years ago

Owner: wraitii removed
Status: reopenednew

comment:6 by Marcos Paulo Moreti, 11 years ago

Owner: set to Marcos Paulo Moreti
Status: newassigned

by Marcos Paulo Moreti, 11 years ago

Attachment: alarm_technology.patch added

comment:7 by Marcos Paulo Moreti, 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 Josh, 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 sanderd17, 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 Marcos Paulo Moreti, 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 sanderd17, 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 Marcos Paulo Moreti, 11 years ago

Attachment: alarm_technology2.patch added

by Marcos Paulo Moreti, 11 years ago

comment:12 by Marcos Paulo Moreti, 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 Josh, 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 historic_bruno, 11 years ago

Milestone: BacklogAlpha 15

comment:15 by sanderd17, 11 years ago

Resolution: fixed
Status: assignedclosed

In 13814:

Enable sound notifications with technology upgrades. Based on patch by mpmoreti. Fixes #2021

comment:16 by sanderd17, 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.

Note: See TracTickets for help on using tickets.