Map system

From GTAMods Wiki
Revision as of 10:16, 27 December 2010 by Aschratt (talk | contribs) (Created page with 'This article descripes the most important aspects of the GTA map system. It gives an overview over different files and which role they play for the game. Also it descripes genera…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This article descripes the most important aspects of the GTA map system. It gives an overview over different files and which role they play for the game. Also it descripes general information about the game.

Coord system

All Grand Theft Auto games are using the same coord system rules. Unlike DirectX or OpenGL standard coordinate systems a location in the game world gets defined by an east-west, north-south and a height information where the axis are:

  • X – east-west direction
  • Y – north-south direction
  • Z – height information

Map file types

Map listing file

See main article: gta.dat

The map listing file is the first one to get loaded by the game, if a new game is started. It stores information about the files that define the map itself. Each file that defines a part of the map needs to be defined inside this file.

Images

See main article: IMG

Images are collections of different files for GTA. Since the models and textures get streamed to reduce the memory the game allocates they need to be loaded every time they are shown and not yet inside the memory. Files are combined to archives to reduce the amount of processor and hard-drive time that comes with opening a file.

Item definition

See main article: IDE

Item definition files are holding information about the appearance of a model inside the game.

An object typically gets defined by an unique index, a model file, a texture archive file, draw distance information and appearance flags. GTA also allows to define additional information for special objects (like time controlled or animated objects). Once defined an object can be placed multiple times.

To easily address objects every definition gets an unique index. The index range is different for each game and cannot be increased. It defines the size of the object definition pool – a structure holding all item definitions after the game has loaded all IDE files.

Item placement

See main article: IPL

Item placement file store locations of (previously defined) objects or other aspects like map zones, culling zones or garages.

Just like item definitions are limited by an hardcoded index range map placements are limited to map boundaries which differes with each game.

See also