File Formats References


This section describes the extensions that are found in the game files and the SDK.


General

ExtensionDescription
*.logEvent log. It contains records of program start, operation and termination
*.pdb
*.scopSave file
*.scocSave file
*.xrdemoRecording camera flyover (demo). Created in the game with a console command.
*.ogmThe video format used by the game engine.
*.oggThe sound format used by the game engine.

Configuration and script files

ExtensionDescription
*.ltxConfiguration file, custom ini-like format
*.scriptGame script
*.xmlCarry in text format data related to in-game text, UI element placement, and characters and information within the game world
*.seqText file containing a description of the frame sequence in the 2D animation

AI

ExtensionDescription
*.efdTable of AI heuristic parameters, contains constants for fine-tuning A-Life. They are used as input parameters in scripts

Textures

ExtensionDescription
*.bumpNormal map in A(BGR) format
*.bump#File that fixes DXT compression errors in *_bump.dds
*.ddsGraphic file used by DirectX to store textures
*_detail_map.ddsSame as a regular *.dds texture, needed as an extra map in a *.thm
*.tgaA bitmap graphics format with support for color depth of 1-32 bits per pixel, alpha channels, and RLE compression. Used as a source format.
*.thmThey are used to set the parameters of textures - bump, detail, and more.

Shaders

ExtensionDescription
*.csCompute shader
*.gsGeometry shader
*.dsDomain shader
*.hsHull shader
*.vsVertex shader
*.psPixel shader
*.sScript shader. LUA version of engine blenders

Postprocess

ExtensionDescription
*.ppePostprocess file format. Color-noise effects of the actor’s screen

Models

ExtensionDescription
*.dmEffect of a dynamic weather environment (e.g., rain or lightning)
*.objectThese files are intended for the X-Ray SDK to store 3D content in its original, uncompressed, lossless form. They are source files that store information before compilation into other game compressed formats.
*.ogfCompiled object
*.bonesSkeleton bone data files
bone_parts.*Bone part description file for an object/NPC
*.groupObject groups

Animations

ExtensionDescription
*.anmA set of coordinates, which works as an animation of the actor’s camera movement. It is also used for anomalies, which need to be given a path.
*.sklSkeletal animation
*.sklsSkeletal animations(.skl) in a container
*.omfA specialized S.T.A.L.K.E.R. game format containing animations. This is a separate dedicated file used in conjunction with *.ogf models. Was created in order to optimize process when some different models use the same list of animations.

Archives and Resource Packages

ExtensionDescription
*.dbarchive of game resources. Used in late builds and the final version of the game, has several options (db.“number”, db.“letter”).
*.xrresource library. Contains resources such as particles, Engine Shaders, Compile Shaders. in a packed format.

Game level

ExtensionDescription
*.errContains information about geometry errors during level compilation
levelFile with general information about the game location (light sources, object names, texture and shader names, sectors and portals). Created during compilation
*.prjLevel precompilation file
*.aiAI location grid. Created during compilation
*.cformGeometry for calculating collisions. Calculated by the level compiler. Contains a solid map structure. All tangible objects with materials live here. Because of this, the game knows with what sound and property objects should react when they are hit by bullets or walked on
*.detailsDetail Objects (grass, cigarette butts, construction debris) on the level. Created through LevelEditor SDK at compile time.
*.env_modlocal environment modifiers (environment), set areas on the location with lighting different from the main weather cycle.
*.fog_volVolumetric fog
*.gameCoordinates of the player’s spawn in the multiplayer game. Outdated file.
*.geomContains vertices (position, normals, texture coordinates, etc.), indices, and information for smooth geometry detail.
*.geomxIt contains only geometry. In the renderer it is used in the shadow rendering passes, due to the fact that there is less information - loading data into the buffers - faster.
*.gtcCross table of correspondence between the location graph and the AI grid. Created during compilation
*.homMapping of hierarchical cutoffs
*.levelList of SDK scene objects
*.lightsLight sources for xrLC
*.ps_staticParticle systems. Flies, steam from pipes, etc.
*.graphGlobal graph of AI navigation. Used, among other things, for moving AI objects outside the active level.
*.spawnA file storing spawn data.
*.snd_envVolumetric sound sources.
*.snd_staticStatic point sources of sound. Sound of flies, etc.
*.somGeometry for calculating sound propagation.
*.wallmarksDecals. Bloodstains, faction emblems on walls, etc. Used for the compiled level.
*.partScene objects

Binary files


About

This article is an introduction to binary files.

Before reading the other articles in the “File Formats” category, you should read this one first.

Structure

In binary files, bytes are represented in reverse order.

For example, the number 0x12345678 in a file would look like this: 78 56 34 12.

Data types

Let’s introduce the notation of data types.

These notations will be used in other articles.

DesignationTypeRangeSize (bytes)
BInteger0 … 2551
HInteger0 … 655352
IInteger0 … 42949672954
iInteger-2147483648 … 21474836474
fFractional number-4
sString--

In some files a value may not be stored in the whole byte, but only part of it (e.g. 4 bits).

As a result, one byte will store two values.

In articles about binary files, sizes will be specified either in bits or in bytes.

Strings necessarily have a null byte at the end, which indicates that the string has ended. For example: “test_string0x0”.

As a result, the length of the string is equal to the number of characters in it + 1 (null byte).

Blocks

In X-Ray, some binary files are in RIFF format.

Such files have blocks (also called chunks or sections).

A block is binary data with a header.

Block structure

DataType
IdentifierH
CompressionH
Content size (bytes)I
ContentBinary data

You can see from the identifier what is stored in a particular block.

If the compression is set to 0x0000, the block is uncompressed, and if it is set to 0x8000, the block is compressed by the Huffman method.

You can use a program from xray_re_tools (trunk\garbage\lzhuf\lzhuf.c) to decompress compressed blocks.

In the files of the final version of the game most blocks are uncompressed.

The size of the block content indicates only the number of bytes of data (not including identifier, compression and size bytes).

Binary block data can be represented by nested blocks.


Sources

Source