Hard-coded audio messages
Posted: 21 May 2012, 17:38
Inspired by Shadow Wolf's Enhanced SitRep Mod, I've embarked on a complete new version of rules.js to add better audio message reporting of game events.
However, there's a number of audio messages hard-coded in to the C++ code which are causing problems because they cause multiple messages to be played for certain game events.
For example, pcv336.ogg ("construction completed") is played when certain buildings are created - I'd like to have custom audio messages based on the type of building but when I do that the hard-coded audio message also gets played resulting in something like "defensive structure completed. construction completed." when a defence gets built ("defensive structure completed" is an audio message from my rules.js).
So, could some of the hard-coded audio messages be removed from the C++ code - the messages would be better put in rules.js where they are more easily/centrally scripted and modded.
The following messages in C++ code are currently causing me pain:
* pcv336.ogg - construction completed (when some buildings constructed)
* pcv367.ogg - production completed (when unit produced)
* pcv344.ogg - power resource (when power resource detected)
* pcv399.ogg - unit under attack (when unit attacked)
* pcv337.ogg - structure under attack (when structure attacked)
* pcv486.ogg - units transferred (when units gifted to ally)
I'll list more here as I find them. I'll be uploading my version of the Enhanced SitMod addon to Shadow Wolf's topic linked above.
However, there's a number of audio messages hard-coded in to the C++ code which are causing problems because they cause multiple messages to be played for certain game events.
For example, pcv336.ogg ("construction completed") is played when certain buildings are created - I'd like to have custom audio messages based on the type of building but when I do that the hard-coded audio message also gets played resulting in something like "defensive structure completed. construction completed." when a defence gets built ("defensive structure completed" is an audio message from my rules.js).
So, could some of the hard-coded audio messages be removed from the C++ code - the messages would be better put in rules.js where they are more easily/centrally scripted and modded.
The following messages in C++ code are currently causing me pain:
* pcv336.ogg - construction completed (when some buildings constructed)
* pcv367.ogg - production completed (when unit produced)
* pcv344.ogg - power resource (when power resource detected)
* pcv399.ogg - unit under attack (when unit attacked)
* pcv337.ogg - structure under attack (when structure attacked)
* pcv486.ogg - units transferred (when units gifted to ally)
I'll list more here as I find them. I'll be uploading my version of the Enhanced SitMod addon to Shadow Wolf's topic linked above.