ikemen-engine / Ikemen-GO

An open-source fighting game engine that supports MUGEN resources.
https://ikemen-engine.github.io
Other
701 stars 124 forks source link

[Feature Request] Optional "snd" parameter for menu.itemname definitions #267

Closed SuperFromND closed 3 years ago

SuperFromND commented 3 years ago

A fairly self-explanatory proposal: adding a completely-optional "snd" parameter that can be specified for menu.itemname. Whenever a menu item is selected that has this parameter filled, it would play the specified sound (as located in whatever .snd file is specified in the snd param in [Files]) in addition to the generic "selected menu item" sound.

A potential use case for a parameter like this would be easy intergration of a "menu announcer" that could announce the name of the game mode you just selected (a well-known example of this within MUGEN circles is the "Enter the heat of battle!" soundbyte played when selecting a game mode in the BrokenMUGEN screenpack). Doing it this way would make it trivially easy to swap around soundbytes if need be, possibly even allowing for support of "multi-lingual announcers" by simply changing group numbers around.

The syntax would look something like this ("menu.itemname.foobar" + ".snd = group, number"):

; Mock-up example with a typical top-level IKEMEN menu

menu.itemname.menuarcade = "ARCADE"
menu.itemname.menuarcade.snd = 4000, 0

menu.itemname.menuversus = "VERSUS"
menu.itemname.menuversus.snd = 4000, 1

menu.itemname.menunetwork = "NETWORK"
menu.itemname.menunetwork.snd = 4000,2

menu.itemname.menuwatch = "WATCH"
menu.itemname.menuwatch.snd = 4000, 3

menu.itemname.menupractice = "PRACTICE"
menu.itemname.menupractice.snd = 4000, 4

menu.itemname.options = "OPTIONS"
menu.itemname.options.snd = 4000, 5
K4thos commented 3 years ago

done, with following syntax: cursor.<itemname>.snd = snd_group, snd_index where <itemname> should be replaced with either submenu itemname or mode itemname. So for example:

cursor.menuarcade.snd = 100,0
cursor.arcade.snd = 100,2

when not defined cursor.done.snd is used, as before