Gods Object Table Format

From ModdingWiki
Jump to navigation Jump to search

The objects that can be placed in a Gods level (potions, treasure, keys, levers and so on) are described in POBJECTS.00n, one file per world (n = 1-4). The file gives each object type its name, its description, its category and its value. The files are compressed with PKWARE DCL Compression; each decompresses to exactly 6336 bytes.

Object types are the type values used in the object block of the Gods Map Format. The same type number can be a different object in different worlds.

File format

The file is 132 records of 48 bytes, one for each object type 0-131. All numbers are big-endian.

Data type Name Description
UINT16BE sprite 170 + type. Not used, see below.
UINT16BE unused Always 0. Never read by the game.
UINT16BE category See below
UINT16BE value For treasure (category 1), the points and money given when collected. Potions (category 0) also have values here, which look like shop prices; other categories are 0.
char[16] name NUL-terminated name, e.g. ceramic vase
char[24] description NUL-terminated description, e.g. restores energy

The name and description are shown on the message line when the player picks up the object. If both are empty the object has no text.

Categories

Value Meaning
0 Potion or other consumable
1 Treasure
2 Carried item: keys, vases, chalices, bowls
3 Lever or switch
4 Special objects such as spikes (trigger action 6 removes these)
5 Unknown (unnamed objects)

The category also controls drawing order: objects of category 3 and 5 are drawn behind the others, and weapon pickups are drawn in front.

Notes

  • The game ignores the sprite field and always uses sprite 170 + type. In POBJECTS.004 the field is off by five (it starts at 175), so an editor that uses the stored value draws every world 4 object with the wrong sprite.
  • Types 132-191 are valid in a map but have no entry in this file. None of the shipped levels use them.
  • The value of record 8 (pile of coins) reads 2 in all four files, where every other treasure value is a round number. This may be an error in the original data.

Source code

From re-gods, the open-source HTML5 port:

Credits

This file format was reverse engineered by VorticonCmdr. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)