Jump to content

Music in IWD1/2


FredSRichardson

Recommended Posts

It's pretty confusing how music works. I've figured out most stuff from looking at IESDP , NI, ielister and DLTCP, but there are still some odd things.

 

The general mechanism is this. The ARE file has 9 slots for area music which are documented in MUSICS.IDS in both games. The first 6 slots are used with real values in both games (iwd2 puts "0" in the 7th slot for some areas, but this should be the same as "no_music"). The "ambient" fields are never used.

 

The field documented as "SongFlag" for PS:T is in fact used in IWD1 but not in IWD2 (it always 0 there). What do these flags mean? I may have to install PS:T so I can look at SongFlag.IDS The values are either 0 or range from 5 to 18. Maybe this is setting the volume?

Link to comment

Okay, I think I got it. I deserve extra crunchies for this one. The numbers are documented in one of 2 files in IWD1. They may actually both be used depending on whether EAX is on or not. I'll have to see if IWD2 has a different way of doing this:

 

REVERB.IDS:

20
-1 NONE
0 NO_REVERB
1 SMALL_ROOM
2 MEDIUM_ROOM
3 LARGE_ROOM
4 OUTSIDE
5 DUNGEON
6 Small_Wood_Rm
7 Med_Wood_Rm
8 Large_Wood_Rm
9 Small_Stone_Rm
10 Med_Stone_Rm
11 Large_Stone_Rm
12 Small_Cave
13 Large_Cave
14 Small_Crypt
15 Medium_Crypt
16 Large_Crypt
17 Outdoors
18 Outdoors_Slap

 

EAXENVIR.IDS

-1
0 GENERIC
1 PADDEDCELL
2 ROOM
3 BATHROOM
4 LIVINGROOM
5 STONEROOM
6 AUDITORIUM
7 CONCERTHALL
8 CAVE
9 ARENA
10 HANGAR
11 CARPETEDHALLWAY
12 HALLWAY
13 STONECORRIDOR
14 ALLEY
15 FOREST
16 CITY
17 MOUNTAINS
18 QUARRY
19 PLAIN
20 PARKINGLOT
21 SEWERPIPE
22 UNDERWATER
23 DRUGGED
24 DIZZY
25 PSYCHOTIC

EDIT: Actually, I think it must be REVERB.IDS, since the values there make a bit more sense when considering frequency of use. 10, 6 and 9 are used a the most (over 20 times each).

Link to comment

So another neat trick with NIDigGen. I've generated text dumps of all the ARE files in IWD1 and 2 and hashed all the values to see what was used but unknown (I only did this for the header and not for the appended structures). The only interesting thing came out of IWD2:

 

Offset 0x052 is documented as "Unknown weat" by ielister (weather?) This takes values from "00 00h" to "0a 00h" (1 to 10 I think).

 

Offset 0x054 is also an "Unknown", but I haven't seen it documented anywhere. I can tell by looking at the values that this must be 2 one-byte fields. The first field is always less than the second and the difference is less than about 6. The values range from 2 to 20.

 

So I guess I could try changing this field to see what happens.

 

EDIT: The numbers at 0x054 definitely tend to go up with "chapter" or they're zeros. I'll the "main" areas have them. I wonder if the engine does anything with these.

Link to comment
EDIT: Actually, I think it must be REVERB.IDS, since the values there make a bit more sense when considering frequency of use.  10, 6 and 9 are used a the most (over 20 times each).
I concur. It looks like the reverb/EAX map is set in REVERB.2DA (the engine probably uses the 2DA instead of the reference IDS anyway).
Link to comment

Sorry I haven't been back in a bit. I've gotten sucked into ToEE. The game is quite worth playing if one uses the co8 mod (www.co8.org). I've been trying out the Beta 5.0 version. It's really quite nice!

 

As far as the Reverb/EAX goes, it looks like IWD1 and IWD2 handle this differently. The field used in the ARE in IWD1 is not used in IWD2. I'll have to look into this a bit more.

Link to comment

I agree, I really like the music in IWD1 (and it's nice to hear it in IWD2 :rolleyes:).

 

Now I've run into another quandry. I wanted to be able to port in the IWD1 music into IWD2 without stepping on the IWD2 music files. At first I was just going to add an "_" before each file name, and this worked in one test case, but I don't think this will work in general.

 

The problem file is MX9000A. All of the ACM files names are constructed from the MUS files in the Music directory, but MX9000A is hard-wired so that whenever it appears on a line of any MUS files, MX9000/MX9000A.acm is used (I actually found these strings in the executable). IWD2 does the same thing with MX0000A.

 

So now what to do... I can either copy MX9000/MX9000A.acm in IWD1 over to MX0000/MX0000A.acm in IWD2 and translate all other names using "_" as a prefix or I can create another copy of the IWD2 executable changing the string MX0000A to MX9000A (so you'd run a different executable). Neither option is great, and I'll probably just do the first one (backing up the original MX0000A files of course. I'm sure I'll run in to various other hard-wired things...

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...