Post by IsmAvatar on May 17, 2006 12:12:30 GMT -5
Game Maker File Format Documentation
The name is fairly self explanatory. If you've ever seen a *.gmk, *.gm6, or *.gmd file, here's the [3rd party] documentation behind its format.
This will probably continually be a work in progress, although I'm practically done. I'm just marking it as a Finished Product now (as well as the other file format documentations), and any updates will be version updates.
Everything - including resources, path data, and the mystery bytes not covered before - should be documented.
If I missed anything or if you see a spelling mistake or a byte that you know what it does that I missed, tell me or I may never know. Of course, redownload before reporting it, as I may have already updated it without saying anything.
Please notice, for version GM7 (*.gmk), an obfuscation has been applied overtop of the format. Fortunately, we understand the obfuscation as well, and it has been documented here:
GMKrypt Obfuscation Documentation
So you can either de-obfuscate it in 1 pass and read the format in a second pass, or make it de-obfuscate the file as its reading it - either way would work, though the latter is probably more efficient.
Download
www.IsmAvatar.com/lgm/formats/gmformat7.txt
Changes for Version 7
* Now accounts for GM7.0 (gmk) files in addition to the other versions. The 7 in the version number was purely coincidental, really.
** Modifies Game Settings a little
** Adds Extensions (and a Tree entry)
** Adds Include Files
* Some small corrections in the Game Information and Tree
** Mostly just using the right version numbers
* See also the Changes for Version 6, below
Changes For Version 6
* Now accounts for GM5.3 (gmd) files AND GM6.0 and GM6.1 (gm6) files. Support for other versions coming soon.
* Due to the new file format support, I changed the filename.
* Changed the documentation style a bit.
** New terminology (nothing official, just for name's sake)
** Removed the Inclusions version. Thus "ni" will be left out from now on
** Default values documented for most data where applicable.
** Angle brackets < > used for version differentiation and such.
** Other small semantics.
* Documented the mystery bytes before the Resource Tree
** Library Creation Code and Room Execution Order
* Some things were outdated, and are now up to date (e.g. Sounds and Images are now documented as zlib compressed in the heading info)
Archives
Version 6:
www.IsmAvatar.com/lgm/formats/gmformat6.txt
In versions older than 6, "ni" stands for No Inclusions, whereas the other file accounts for Inclusions. See the note below about Inclusions.
Version 5:
userweb.nni.com/cmagicj/gm6format5.txt
userweb.nni.com/cmagicj/gm6formatni5.txt
Version 4:
userweb.nni.com/cmagicj/binformat4.txt
userweb.nni.com/cmagicj/binformatni4.txt
Version 3:
userweb.nni.com/cmagicj/binformat3.txt
userweb.nni.com/cmagicj/binformatni3.txt
Version 2:
userweb.nni.com/cmagicj/binformat2.txt
userweb.nni.com/cmagicj/binformatni2.txt
Version 1:
userweb.nni.com/cmagicj/binformat.txt
userweb.nni.com/cmagicj/binformatni.txt
No Inclusions
I used to keep 2 separate forms - an Inclusions and a No Inclusions form. I no longer do this, since I have found better ways of notating things, and absolute file position is utter nonsense. But the older versions may still use this, so here's what it is:
To the left of some of the stuff is a hex number. This is the position that the data will appear in an empty file. Inclusions are when certain extra data is accounted for that appears when you just save a new file - for example, the Icon Image Data is already there in a new file, and this will offset the location of the next piece of data. Although it is a "String" if you will, prefixed by a 32-bit integer. Therefor, NI was created to set that 32-bit integer to 0 and have no string, thus the next data to appear is immediate, rather than offset. In this respect, NI would be better for the programmer, and Standard would probably be better for someone who just wants to read through the file with a hex editor, perhaps to get acquanted with it.
The name is fairly self explanatory. If you've ever seen a *.gmk, *.gm6, or *.gmd file, here's the [3rd party] documentation behind its format.
This will probably continually be a work in progress, although I'm practically done. I'm just marking it as a Finished Product now (as well as the other file format documentations), and any updates will be version updates.
Everything - including resources, path data, and the mystery bytes not covered before - should be documented.
If I missed anything or if you see a spelling mistake or a byte that you know what it does that I missed, tell me or I may never know. Of course, redownload before reporting it, as I may have already updated it without saying anything.
Please notice, for version GM7 (*.gmk), an obfuscation has been applied overtop of the format. Fortunately, we understand the obfuscation as well, and it has been documented here:
GMKrypt Obfuscation Documentation
So you can either de-obfuscate it in 1 pass and read the format in a second pass, or make it de-obfuscate the file as its reading it - either way would work, though the latter is probably more efficient.
Download
www.IsmAvatar.com/lgm/formats/gmformat7.txt
Changes for Version 7
* Now accounts for GM7.0 (gmk) files in addition to the other versions. The 7 in the version number was purely coincidental, really.
** Modifies Game Settings a little
** Adds Extensions (and a Tree entry)
** Adds Include Files
* Some small corrections in the Game Information and Tree
** Mostly just using the right version numbers
* See also the Changes for Version 6, below
Changes For Version 6
* Now accounts for GM5.3 (gmd) files AND GM6.0 and GM6.1 (gm6) files. Support for other versions coming soon.
* Due to the new file format support, I changed the filename.
* Changed the documentation style a bit.
** New terminology (nothing official, just for name's sake)
** Removed the Inclusions version. Thus "ni" will be left out from now on
** Default values documented for most data where applicable.
** Angle brackets < > used for version differentiation and such.
** Other small semantics.
* Documented the mystery bytes before the Resource Tree
** Library Creation Code and Room Execution Order
* Some things were outdated, and are now up to date (e.g. Sounds and Images are now documented as zlib compressed in the heading info)
Archives
Version 6:
www.IsmAvatar.com/lgm/formats/gmformat6.txt
In versions older than 6, "ni" stands for No Inclusions, whereas the other file accounts for Inclusions. See the note below about Inclusions.
Version 5:
userweb.nni.com/cmagicj/gm6format5.txt
userweb.nni.com/cmagicj/gm6formatni5.txt
Version 4:
userweb.nni.com/cmagicj/binformat4.txt
userweb.nni.com/cmagicj/binformatni4.txt
Version 3:
userweb.nni.com/cmagicj/binformat3.txt
userweb.nni.com/cmagicj/binformatni3.txt
Version 2:
userweb.nni.com/cmagicj/binformat2.txt
userweb.nni.com/cmagicj/binformatni2.txt
Version 1:
userweb.nni.com/cmagicj/binformat.txt
userweb.nni.com/cmagicj/binformatni.txt
No Inclusions
I used to keep 2 separate forms - an Inclusions and a No Inclusions form. I no longer do this, since I have found better ways of notating things, and absolute file position is utter nonsense. But the older versions may still use this, so here's what it is:
To the left of some of the stuff is a hex number. This is the position that the data will appear in an empty file. Inclusions are when certain extra data is accounted for that appears when you just save a new file - for example, the Icon Image Data is already there in a new file, and this will offset the location of the next piece of data. Although it is a "String" if you will, prefixed by a 32-bit integer. Therefor, NI was created to set that 32-bit integer to 0 and have no string, thus the next data to appear is immediate, rather than offset. In this respect, NI would be better for the programmer, and Standard would probably be better for someone who just wants to read through the file with a hex editor, perhaps to get acquanted with it.