Visit the Ironworks Gaming Website Email the Webmaster Graphics Library Rules and Regulations Help Support Ironworks Forum with a Donation to Keep us Online - We rely totally on Donations from members Donation goal Meter

Ironworks Gaming Radio

Ironworks Gaming Forum

Go Back   Ironworks Gaming Forum > Ironworks Gaming Classics > Wizards & Warriors Forum

Reply
 
Thread Tools Search this Thread
Old 01-14-2008, 09:05 PM   #1
Shadow Stranger
Avatar
 

Join Date: December 9, 2007
Posts: 572
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 06:21 AM.
Shadow Stranger is offline   Reply With Quote
Old 01-14-2008, 10:26 PM   #2
Bungleau
40th Level Warrior
 

Join Date: October 29, 2001
Location: Western Wilds of Michigan
Posts: 11,752
Default Re: Key Wizards & Warriors Data Files

You are impressive, Shadow Stranger! I stand in awe of your focus and investigations!

I wonder... do you think your investigations will lead into the actual storyline? It would be interesting to do a mod for W&W... something that extends what happens in the Gael Serran, or at least fleshes out a few rough spots
__________________
*B*
Save Early, Save Often Save Before, Save After
Two-Star General, Spelling Soldiers
-+-+-+
Give 'em a hug one more time. It might be the last.
Bungleau is offline   Reply With Quote
Old 01-15-2008, 03:48 AM   #3
Shadow Stranger
Avatar
 

Join Date: December 9, 2007
Posts: 572
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 06:40 AM.
Shadow Stranger is offline   Reply With Quote
Old 01-16-2008, 04:12 PM   #4
Wyvern
Ironworks Moderator
 

Join Date: January 7, 2001
Location: Rural Paradise, MI
Posts: 5,681
Default Re: Key Wizards & Warriors Data Files

Amazing stuff, Shadow Stranger!!!
__________________
Wyvern is offline   Reply With Quote
Old 02-02-2008, 05:26 AM   #5
Shadow Stranger
Avatar
 

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

Finally, the first glimmer of a breakthrough. The bol files list props, monsters and loose items.
Column 1 lists the type: I = item, M = Monster and P = prop. (0000 = ?)
Columns 2:4 list the number of the object as found in the relevant D6 file, D6Item.dat, D6Mons.dat and D6Prop.dat. Thus “M009” means monster #9, which is F’Lokis Ra. (Take 1 away from the line number and you have the correct number for the object. This assumes that the you have the correct number of characters per line: 284, 340 or 56.

Now I need to decrypt the location which is proving tougher than expected.

It seems that no “bol” file means none of the features found in “D6Prop.dat”. From what I have seen so far, if you remove the bol file before you explore a dungeon there are no props and no npcs. However after you explore, all of these things have been recorded in the save file, hence you won’t realize what the bol file does if you remove it then.
Props have the following numbering scheme when used in a Bol file:
0 (null)
1 Forest Tree
2 Cedar Tree
3 Willow
4 Sequoia Tree
5 Lever
6 Treasure Chest
&&&&&&&&&&&&&
234 Flora
235 Giant Boulder
236 Idol Of Bongu
237 Unearthly Cello
238 Possessed Violin

Roster.dat
Roster.dat has an initial section of 120 characters and 15 records of 10,232 characters. Hence the records are not exactly the same as the ones below. Initial section has 15 long, four digit, numbers giving starting locations of each record along with 15 four digit “in party” sections. If the character is in the party the in party section starts with a “1”.
Exactly how they compare to the save game records is something that I will need to look into. From what I can see with a quick glance: there is no difference in the 10,232 characters that the files have in common.

Last edited by Shadow Stranger; 03-03-2014 at 09:16 AM. Reason: Add Roster.dat information
Shadow Stranger is offline   Reply With Quote
Old 02-06-2014, 07:11 AM   #6
Shadow Stranger
Avatar
 

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

NPCData.pak
Dialog, topics of conversation and their answers.
Offsets 0 to 1,112: table of contents for code part of dialog
Offsets 1,296 to 2,392: table of contents for text strings part of dialog
Offsets 2,576 to 3,672: table of contents for keywords part of dialog

Offsets 3,848 to 7,171: table of contents for a list of text strings that immediately follows next.
Offsets 7,172 to 13,920: table of contents for text strings part of dialog

Gaps between various sections above is due to the file having provision for 160 speaking NPCs but only using 137 of those slots.
(The list of NPCs is found in D6NPC.dat.)

In the three sections below, each record is assigned to an individual NPC:
Offsets 13,921 to 104,911: code part of dialog
Offsets 104,912 to 343,367: text strings part of dialog
Offsets 343,368 to 365,938: keywords part of dialog
EOF

Some of the dialog is interesting, there are two versions of the Spirit of Nivius, the second one has only this to say:
"You have violated the Sacred Oath of the Mavin!..Once again, the one who has taken the Blade has been consumed by its terrible wrath...
Alas, the Watchers must await another Champion..."
Shadow Stranger is offline   Reply With Quote
Old 03-28-2014, 11:00 PM   #7
Shadow Stranger
Avatar
 

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

A Bol file is used to list the monsters, items and props found in a dungeon.
For the three outdoor zones, a place may be covered by its own Bol file if it has a "building", tower, hut, dungeon entrance... Other than that, the place is covered by a Tol file.
Tol files are just like Bol files, except that the former have provision for recording the outdoor Bol areas.
Shadow Stranger is offline   Reply With Quote
Old 03-29-2014, 09:10 AM   #8
Wyvern
Ironworks Moderator
 

Join Date: January 7, 2001
Location: Rural Paradise, MI
Posts: 5,681
Default Re: Key Wizards & Warriors Data Files

Sounds like greek to me, but glad that it is making sense to you!! =^..^=
Wyvern is offline   Reply With Quote
Old 03-29-2014, 10:56 PM   #9
Shadow Stranger
Avatar
 

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

I would not make a good teacher, explaining things is not my forte.
There are only 3 Tol files but there are 53 Bol files. For each of the three outdoor zones there is only one Tol file. For a given piece of outdoor terrain in a given zone, the default is that said terrain will be covered by the relevant Tol file. Hence any items, creatures or props occurring in that terrain will be found in the Tol file.
Exceptions to this rule only occur where there is a "building" (tower, hut, dungeon entrance...) nearby. Then and only then the place gets its own outdoor Bol file.
So Erzbette is in a hut in the second zone, the hut gets its own Bol file, (thutb.bol) where she is found. By contrast, Scanthril and colleagues are standing around in the outdoors so they are found in the Tol file.

Last edited by Shadow Stranger; 03-29-2014 at 11:02 PM.
Shadow Stranger is offline   Reply With Quote
Old 03-30-2014, 10:21 AM   #10
Wyvern
Ironworks Moderator
 

Join Date: January 7, 2001
Location: Rural Paradise, MI
Posts: 5,681
Default Re: Key Wizards & Warriors Data Files

That explanation helps a lot!!
Wyvern is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Installation of ToB: "Data.cab" Files, PLEASE HELP!! DUDEmojo Baldurs Gate II: Shadows of Amn & Throne of Bhaal 7 07-05-2001 02:39 AM
Wizards and Warriors? Bluestar Wizards & Warriors Forum 5 06-16-2001 05:17 AM
Where are the Data Files? Jisha Wizards & Warriors Forum 3 06-13-2001 07:21 PM
wizards &warriors warlock7 Wizards & Warriors Forum 2 01-14-2001 05:45 AM
Wizards and Warriors IRC Channel - #wizards Zero Wizards & Warriors Archives 0 09-29-2000 08:25 PM


All times are GMT -4. The time now is 07:24 AM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
©2017 Ironworks Gaming TM & The Great Escape Studios - All Rights Reserved