View Single Post
Old March 24, 2016, 03:14   #4
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,936
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by Nick View Post
I've done very little with the sound system, but what you're suggesting sounds sensible.

One thing I have thought is that the text (with formatting where necessary) of every game message should be in a text file. I don't think that really affects what you're doing, but maybe...

...actually, maybe it does. I don't think you want sound file names in a message text file, but you could have messages indexed by labels, like
Code:
label:MSG_STAT_GAIN
text:You feel %s
color:r
or whatever.

Just thinking aloud, really, but keep the messages->text file idea in mind.
I think it's a bad idea to use format strings like this in external files because they're really brittle. I'd suggest something like "You feel {adjective}" instead, or something like gettext using $1 to mean 'first argument' etc.
__________________
takkaria whispers something about options. -more-
takkaria is offline   Reply With Quote