Adding general sound macros

Discussion among members of the development team.

Moderator: Forum Moderators

Post Reply
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Adding general sound macros

Post by zookeeper »

Since some time ago, sounds such as attack, get_hit and death sounds have started accepting a comma-separated list of sounds from which one is randomly chosen every time. I've decided to attempt creating variations on the most commonly heard sounds, and simply for convenience I've come to think that it'd be best to encapsulate the sound variations inside simple macros, so that when a new sword-swish variation is added, only the contents of one macro need to be updated, instead of every unit .cfg that uses sword-swishes.

Unit .cfg's would use them like this:

Code: Select all

[frame]
    begin=-200
    end=0
    sound={SOUND_LIST:SWORD_SWISH}
[/frame]
And the macro itself would simply be defined like this:

Code: Select all

#define SOUND_LIST:SWORD_SWISH
sword-swish-1.ogg,sword-swish-2.ogg,sword-swish-3.ogg #enddef
I would update the relevant unit .cfg's as I add variations, and place all the macros in a new data/sound_utils.cfg. Any objections? Or any objections to having variations in the first place?

PS: I was thinking about doing some generic animation macros, too, since most unit animations are very simple (1-2 frames), but I'll leave that for another time.
User avatar
Jetrel
Posts: 7242
Joined: February 23rd, 2004, 3:36 am
Location: Midwest US

Post by Jetrel »

This is very welcome, from what I can see - the ability to use multiple sound variations is very, very valuable.

FYI, Warcraft III has only three variations of each individual sound sample.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

Due to complete lack of resistance towards this, I committed. The variations for miss and sword-swish sounds are pretty place-holder'ish, but the new walking corpse and soulless gethit sounds demonstrate better what this system is good for.
User avatar
turin
Lord of the East
Posts: 11662
Joined: January 11th, 2004, 7:17 pm
Location: Texas
Contact:

Post by turin »

Is the character ":" allowed in macro names? Even if it is, it might be a good idea not to use it.

Sounds good otherwise.
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
User avatar
Eleazar
Retired Terrain Art Director
Posts: 2481
Joined: July 16th, 2004, 1:47 am
Location: US Midwest
Contact:

Post by Eleazar »

I think it's a great idea.
Feel free to PM me if you start a new terrain oriented thread. It's easy for me to miss them among all the other art threads.
-> What i might be working on
Attempting Lucidity
Post Reply