View Single Post
Old 01-14-2008, 08:05 PM   #1
Shadow Stranger
Avatar
 

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

This post will be updated as new information comes to hand.

Wizards & Warriors files frequently follow a certain format: the first line is empty except for the first two places, these give the number of distinct entries in the file. (Hence the file can be altered to increase the number of entries, thus you can create wholly new items or monsters or whatever.) Notation is little end first, thus the base – 256 digit is on the left while the base – 256 power is on the right.

D6Helm.dat
Not too clear about this one, line width = 76, there are 192 lines of meaningful data. The first number is 24, now 8*24 = 192 alright. But I would expect eight blank lines and I only see three plus. Or it could be 384*38 for all I know.

D6Item.dat
Line width = 284, in the official file there are 857 entries. Decryption of this file is covered in its own post.

D6Mons.dat
Line width = 340, before hacking there are 372 entries. Decryption of this file is also covered in its own post.

D6Monsnd.dat
Line length is 184.

D6NPC.dat
Line width = 36, before hacking there are 137 entries.

D6Prop.dat
238 entries of 56 lines each, seems to govern basic terrain: doors, locks, handles, levers, urns&&& Entries are numbered 1 thru 238. First 23-odd columns are the name. Many entries share the same name, my count is that 138 out of 238 do so. So you have four props with the name "crate". You can tell which is which by altering the name to include the number, thus in the game the number will show up. To make trees pushable I changed column 43 from 0 to 11 and column 44 from 0 to 66.

Column 25 is the mdl number, this has to be abstracted from the program file starting at line 26,668.
Column 31 is the drag icon bitmap, for items that can be dragged.
Column 44 seems to be connected to whether the item can be dragged.
Column 45 decrees what replaces the terrain when it is broken, so this applies to crates and barrels.

D6Treas.dat
236 entries of 200 lines each. This file seems to govern the contents of treasure chests, when you delete all the entries, no treasure chest yields any treasure. The lock works properly, the chest is opened in the normal way, there is just no treasure. Hence this file only deals with the treasure itself, not the chest.

The 200 lines seem to be divided into ten groups of twenty characters each.
Each group refers to:
· a specific item,
· the generation of a random item,
· no item at all.

Generation of a random item means choosing from among a group of items found in the file D6Trlist.dat, I don’t know what percentages are used. I suspect that not all items in each group are equally likely to occur.

If a group refers to a specific item, the item number is found in places 13 and 14. Now within each group I am not too sure what a lot of the numbers mean. Clearly one number may indicate the percentage chance of an item occuring. (There may also be mechanisms to ensure that at least some treasure is generated for each chest.)

Currently I guess that each entry corresponds to one or more treasure chest(s) in the game. The entry on line 117 corresponds to one chest in a graveyard sw of Dragon Spire, it always yields Plate Mail +1, 2handed Greatsword +1 and a Crusader Helm +1. There are many chests which contain unique items, for example Algamesh’s Amulet, the location of these will be easy to find.

I can’t find any formula to determine which entry belongs to what chest, it must be worked out by trial and error, unless there is a unique item. (It seems that D6Trap##.dat and D6Entr####.dat files are producing answers here.)

Edit: I think the idea is to compile all the D6Trap## files into one spreadsheet, then do the same for all the D6Entr#### files. This seems to work, I understand that many chests have the same formulas for treasure, (use the same entry in D6Treas.dat) these formulas feature random items. This file may also cover random treasure like that found in the crypt coffins.

D6TrList.dat
62 entries of 60 columns each. First 20 characters are the title of the line, "Level 1 weapons" or whatever. The remaining 40 are lists of twenty items. I am currently not clear what this file actually does, create initial shop inventories? Generating the random part of treasure in chests is also a good guess.

Events.dcl
Contains a list of the 115 functions, also has brief notes on each.

Textpak.000
This file contains the game text, 269 entries of highly variable length: 26 through 1,009 characters. Average length is around 158.

First four places give the number of entries in the file: “13 01” = 13 + 256 = 269.

Then comes the table of contents part of the file, this lists where each entry starts and how long it is. Here L is 12 there seem to be three groups of columns: 1-4, 5-8 and 9-12. I call the first group “guide numbers”, the second group gives the starting place of the entry and the third says how long the entry is.

The first group steadily increases in size, starting from 5 and going up to 13,170. Now the interval between each entry is variable, usually 5 or 10. My guess is that when it exceeds this number, a new zone has started. There are thirteen zones, 00 through 12. the number found in this group, divided by 1,000, will give the zone number. Here there is a fourteenth number, #13, that may mostly deal with inscriptions on items.

Then finally, the entries themselves, typically sorted into dungeon groups.


There is likely to be a “correct” length, it thus should be opened after checking the “Binary” box and inserting the correct number into the Line Width place.

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