Stronghold Wiki

GM1 file format

615pages on
this wiki
Add New Page
Comments0 Share

File outlineEdit

  • File Header
  • Palette
  • Image offset list
  • Image sizes list
  • Image Headers
  • Images

File HeaderEdit

The header has a length of 88-bytes, composed of 32-bit integers:

4 -bytes – Unknown(1)
4 -bytes – Unknown(2)
4 -bytes – Unknown(3)
4 -bytes – Quantity, number of pictures in file.
4 -bytes – Unknown(4)
4 -bytes – Data Type
56-bytes – Unknown(5), array of 32bit integers.
4 -bytes – Data Size
4 -bytes - unknown(6)

Data TypeEdit

Data type is and ID that represents what kind of images are stored, they are as follows:

1 – Interface items and some building animations. Images are stored similar to TGX images.
2 – Animations.
3 – Buildings. Images are stored similar to TGX images but with a Tile object.
4 – Font. TGX format.
5 and 7 – Walls, grass, stones and other. No compression, stored with 2-bytes per pixel.

Tile ObjectEdit

The tile object is 512 bytes in size, or 256 pixels (2-bytes per pixel). It is stored like a diamond. Starting with 2 pixels in the first line and then increasing to 6, then 10 and continues in increments of 4 till it reaches 30 and then works its way down also in increments of 4.

Here is the list of pixels per line:


This is a 30x16 tile that is placed under the building.


Size is always 5,120 bytes.

Image HeaderEdit

Image Header has a length of 16 bytes

2-bytes – Image Width
2-bytes – Image Height
2-bytes – Width offset (Horizontal location of current frame on large surface.)
2-bytes – Height offset (Vertical location of current frame on large surface.)
2-bytes – Number, unique ID of image
2-bytes – Distance from top to bottom of image, only used for buildings.
1-byte – Direction, left,right, center... used for building only.
1-byte – Initial horizontal offset of image.
1-byte – Width of building part.
1-byte – Color, used for animated units only.

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.