different sounds on different surfaces


06-09-2003, 04:26 PM
I'm sure the solution is simple, but I haven't been able to find it anywhere.

I have a snowy map and I want the sound, when walking on snow, to be the *snowy crunch* like we have all seen (and heard) it in some maps. But I have no idea whether it's in the texture or some entity or what.

A general explanation in how it's done would be nice so I can change sounds on different surfaces too.

06-09-2003, 05:12 PM
The sound assignment is done via the materials.txt file found in the /sound folder.

The materials.txt file lists a whole swag of texture names, with a single letter code indicating what sound is associated with each.

The easiest way to make your custom texture have the snow sound is to add an entry for it into materials.txt BUT this is no good for distribution, since it requires you to distribute an altered materials.txt file (which could get written over by an update to DOD, for example).

So the best way is to rename your texture to match one in the materials.txt - which you are NOT using in your map - that has the sound you want.

06-10-2003, 04:29 AM
ARGH! So I gotta rename my snow texture and then I gotta 'replant' the texture to almost every surface in my map. Not fun.

But thanks a lot for the info, I'm a lot smarter now.

TheNomad
06-10-2003, 05:25 AM
VERY easy to do... just go to place texture button click on the snow in ur map and go to replace texture.. choosing the new one!

heres a pic to show u!

FistFullofZen
06-25-2004, 11:58 AM
Just having the DoD team take a hit for the team and change the naming conventions in the materials.txt and make it more mapper friendly?

What I propose is that they change the names in the materials.txt to be more generic.

Take, for example, the snow sound effect (N).

In the new materials.txt file, you'd see this:

N snow01
N snow02
N snow03
.
.
.
N snow30

I think that the HL engine can handle up to 30 different textures for each sound, mathematically speaking (not sure, so I'd have to look it up). That should be more than enough for any mapper's needs. So instead of crazy names like sexyroof2 and sexyroof3, you'd see

W wood01
.
.
.
W wood30
W roof01
.
.
.
W roof30

Now, if you want a sound, you can just assign it to the sound name.

OPTIONALLY...
They could actually take the time to organize the damn materials.txt file and group the sounds by sound, so that all of the snow sound textures are together, all of the grass sound textures are together, etc.

My two zents

FFoZ

Gorbachev
06-25-2004, 12:38 PM
This doesn't work for custom sounds in Steam, even if you copy over the newer materials.txt and add your own it's already either maxed out or ignores the new stuff. *sigh* the perils of a custom mapper.

CptMuppet
06-27-2004, 08:00 AM
Just give the new textures you use the same names as those in the MATERIALS.TXT. Eg rename FistFullofZentextureA to OfficialDODtexturenameA; and so forth.

Should solve all your problems. Edit - urr oops it was mentioned above.

That should NOT be hard to do, after all, in a map you only really need 2 or 3 textures attached to a particualr sound, the rest can use generic sounds. Even then, who the hell gives a flying fork?


The DOD team won't be changing whats in it I'm afraid, and the "crazy" names are just those used by the official mappers.
And I'm also afraid that DOD is constrained by the Half Life engine, but its no big deal, you can work around it.

Day of Defeat Forum Archive created by Neil Jedrzejewski.

This in an partial archive of the old Day of Defeat forums orignally hosted by Valve Software LLC.
Material has been archived for the purpose of creating a knowledge base from messages posted between 2003 and 2008.