The Dink Network

The Ultimate Dink File Format FAQ

August 8th, 2014
Score : 5.5 fair
Peasant Female Australia steam 
The reason this file is so highly-rated is because not many people really bothered to check to see if it was accurate or not. Guess what? It isn't.

For a long time before the Dink source was released one had to reverse-engineer the game data by changing a value in DinkEdit then comparing the resulting file with what was there previously if they wanted to have any fun with map.dat/hard.dat/dink.dat. It was only after the source was released that one was able to understand the files properly as there are quite a lot of unused features that happen to be in them. This file attempted to demystify the map settings so that others might be able to make tools of their own. Unfortunately a lot of what WC wrote is either wrong (factually as well as in terms of grammar and spelling) or poorly explained.

First of all is a breakdown of the contents of Hard.dat. The individual tiles are described along with a diagram that appears to illustrate how the tiles are formatted in the file. This is partially correct, as each tile starts from the top left rather than in the bottom-right as is usually the case. However if one tries to follow any further they'll end up with their tiles coming out sideways as each byte changes the Y value and not the X value as is indicated. The row of "junk data" he refers to is not at the end of each tile, it is actually comprised of every fiftieth byte or so.

Afterwards we learn about Dink.dat and the data it contains. The oversights here may not be WC's fault but the "Smallwood" field is actually 20 bytes long, not 24, and the location container actually holds 769 entries because Seth was kind of weird about zeroes for some reason. In fact this is consistent for the rest of the file's description; those four "junk bytes" are actually indices that are never edited. WC repeatedly claims that each field is two bytes long when even a casual glance in a hex editor will immediately show that each value obviously takes up FOUR bytes.

Finally map.dat, the largest of the files is explained in detail with the tiles described first of all. Strangely enough WC claims that he doesn't know what alt_hard is for and that it's never used when any casual modder will be able to explain that alt_hard tiles are those stamped onto map tiles that aren't the default for that particular tile. Next up are the sprites of which there are one hundred plus their attributes which are listed twice with descriptions for each, except for "base hit" which took me a while to figure out as this omission completely ruins the offsets of the attributes after it if you leave it out. The sizes of the unused script fields are also not given which would mean that most would assume them to be consistent with his claim of "one byte per field" (which again is actually four bytes).

Overall, the most bizarre part in all of this is that WC helped write WinDinkEdit which is supposed to edit all of these things accurately. In terms of the document's title, a lot of Dink files are left out such as save files, dink.ini, and dir.ff files which means the title doesn't really fit. Considering the Dink engine source was released not too long after this document was written I don't understand why WC never went back and fixed it up. I do have to give him some points for effort though as this preceded everything else.