View Single Post
Old 01-15-2008, 02:48 AM   #3
Shadow Stranger
Avatar
 

Join Date: December 9, 2007
Posts: 594
Default Re: Key Wizards & Warriors Data Files

A mod would be wonderful. Unfortunately I don't have enough knowledge of key areas, terrain in particular. This expertise may come soon I don't know.

If and when a better understanding is achieved there may still be a problem. The mods that I know about are all based on Bioware's Infinity engine, a well-known and widely used thing. By contrast, the W&W engine is more obscure, few people know anything much about it.

Here and now a lot of the problems and annoyances can still be fixed. New monsters and items can be introduced, new dialog might be possible. Most of the W&W files that I have seen have room for additions, that is a hopeful sign.

Edit:
I will switch Crypta and Cryptb files one at a time, and see what gets messed up, this may give me an idea as to what each type of file does.

Data Files
There is likely to be a “correct” length, any such file should be opened after checking the “Binary” box and inserting the correct number into the Line Width place.

D6Boun00.dat
How many characters per line? The first character in the file has a numerical value of 62, this suggests that there should be 62 distinct entries in the file. It is likely, based upon past experience, that there are 63 lines in the file, the first line will often be empty except for the first character. Denote line width by the letter L, there are 36 lines in the file when it is opened at the default: L = 70. Now 36*70 = 2,520 and 2,520/63 = 40. Thus 40 should be the correct figure.

D6Link00.dat: L should be 8, D6Spec00.dat: L should be 28, D6Swit00.dat: L should be 20, D6Trap00.dat: L should be 36, D6Trig00.dat: L should be 184.

Another trick is to try and spot where each entry starts. This is useful if you are looking at only a part of the file.

By contrast, Entr0000.dat has no “correct” length, it thus should be opened without checking the Binary box.

D6Trig00.dat
Seems to deal with what Blades of Avernum calls script states.
Columns 57,58: if the function being called is “textmsg” these numbers come from the “table of contents” part of Textpak.000, namely the guide numbers.

(What these files above actually do is not yet clear. I have just put the contents of all seventeen Entr#### files into a RTF document, and I am trying to make sense of what I see.)

As I understand it, there are thirteen zones, three outdoor and ten dungeons.
00 First outdoor zone: Before Ishad N’ha
01 the Crypt
02 the Serpent Temple
03 Second major outdoor zone: Between Ishad N’ha and Brimloch Roon
04 Shurugeon Castle
05 Stout Mines
06 Boogre prison
07 Dragon Spire
08 Skull Castle
09 Colasium
10 Shrine of Anephas
11 Third major outdoor zone: West of Brimloch Roon
12 Pyramid of Cet

Game Files
NPCData.pak
Dialog, topics of conversation and their answers.

GMData.pak
Town dialogue, quests and news.

Dungeon Files
I suspect that both l2n and nvs files are connected with monsters and their movements, these were the files altered for the Toad Village.


Outdoor Files
(Mental health warning: these quick notes are three - odd years old. They were originally written when I didn't know about the Virtual Dub solution to the problems facing Windows XP users trying to play W&W. Hence when I did find out about Virtual Dub I stopped researching the outdoors.)

C:\Program Files\Activision\WizardsWarriors\maps
The ".lm" files: these are the automap resource files. I switched the lm0b1.lm and lm0b9.lm files, the Colasium automap was displayed while the party journeyed through the Crypt. Lines 671 thru 688 were replaced with text taken from elsewhere, to no effect around Ishad N'ha. Here line length was set at L = 256. In the event, lines 1,328 thru 1,345 were then replaced. This caused very obvious distortions in the map around Ishad N'ha, but not in the actual terrain.

The file lm0b0.lm seems to be concerned solely with automaps rather than actual terrain. One consequence is that the outdoors automap is not always accurate, what you see is not what you get sometimes.

The segment 1,303:201 thru 1,879:201 was altered, this only affected a narrow band running through Ishad N'ha. 1,879 - 1,303 = 576 lines, 576 = 24*24. When L = 256, 576 lines = 24*24*256 = 24*24*(16*16) = (24*16)(24*16), and 24*16 = 384. It seems that the correct line length is 384.

The "spoke##.ext"files:
Here "ext" stands for extensions like fol, lit, nav, par, tmr and tol. As far as I can tell, there are nine outdoor regions, with a possible tenth. (I can't recall why I thought this was the case.) But there are only three files for each of the above six types, so presumably there are three basic outdoor maps.

The "spoke##.ext" files seem to be the best bets here. In the case of Spoke00.tmr, the area connected to lines 2,011 thru 2,030 runs just south of the fortune teller's cottage. It seems that the west gate of Ishad N'ha is found around line 5,000 while the area north of the city is found somewhere in the interval 5,100 to 5,150. So the line numbers increase with distance northwards. Just south of the gate: 4,901 to 4,920. The area south of the city is found on lines 4,780 to 4,820. I have found that line 4,803 is suitably far south. The observed pattern is: 4,803 4,804 4,805 where the areas represented by the lines in the file go from west to east.

I switched the 00tmr and 03tmr files: trippy! Seems like these files handle groups of trees, paths, elevation and water. They may not handle individual trees though. To avoid endless handles with being blocked by trees, I had to alter D6Prop.dat to make a lot of trees pushable. From what I can see the areas next to buildings are not connected to a tmr file. My understanding is that the "torcave" group of files, torcave.bol through torcave.twd, are related to the Oracle Cave just before Ishad Nha. Removing them from the W&W directory will cause a crash only in the first outdoor zone, 00. It won't cause a crash in the other two outdoor zones.

The "tom" files seem to do nothing, I deleted them completely and the game still runs fine. Before this I switched the 00 and 11 tom files, this had no effect that I could perceive.

The .nav, .lit and .fol files can be mostly deleted without crashing the game. By contrast, messing with the .tol file will cause a crash. As I recall, the "fol" files provide foliage on trees.

Last edited by Shadow Stranger; 02-04-2008 at 05:40 AM.
Shadow Stranger is offline   Reply With Quote