Skeleton files

SKLT and SKL files, often called skeleton files, contain 3D model wireframes.

STcGATE.sklt as containted in SET1.BAS

File locations

/<datadir>/wireless/ - Wireframes in heads up display, skl extension.

/<datadir>/setX/objects/, inside SET.bas files. Unit models, sklt extension.

/<datadir>/objects/, “Sky dome” inside every BAS file onto which the sky textures are applied. These BAS files also contain sky textures.

There are also miscellaneous files in other folders, but they are usually not interesting.

Skeleton File Format

The skeleton file format follows standard EA85/IFF format. This means that the first four bytes in the file are “FORM” and the next four bytes is the remaining file size. All numbers in SKLT files are in big endian format.

00 00 00 4E
P O O 2
00 00 00 24
<0x24 bytes of data>
P O L 2
00 00 00 16
<0x16 bytes of data>

(Here file Size - 0x4E (78 bytes) not including FORM identifier.)

POO2 Section

The POO2 section contains the points/vertices of an object. These points are the basic building blocks of creating a building, vehicle, etc.

P O O 2
00000030                          Section size  0x30 (48) bytes
00000000 00000000 c4a78000  Point 0(0 0 -1340)
00000000 00000000 c4a28000  Point 1(0 0 -1300)
447a0000 00000000 442f0000  Point 2(1000 0 700)
c47a0000 00000000 442f0000  Point 3(-1000 0 700)

The units inside this section are encoded as IEEE754 floating point numbers. This means that -1340 is encoded in the file as C4A78000. Each coordinate is represented with 4 bytes and each vertex has 3 coordinates (x, y, z). An easy way to convert between Hex and decimal is with the help of a converter program

POL2 Section

The POL2 section contains the polygons of an object. A line will be drawn from point to point to create a 3D object.

P O L 2
00000016        (Section size  0x16 (22) bytes)
00000003        (Number of polygons)
0002 0000 0003  (Command: 02 means connect line from vertex 0000 to 0003)
0002 0003 0002  (Line from 0003 to 0002)
0002 0002 0001  (Line from 0002 to 0001)

The first four bytes after the POL2 identifier tell the section size and the next four bytes tell the number of polygons (unsigned integers).

Every polygon definition consists of short unsigned integers (2 bytes per number). The first number is the number of vertices in the polygon and the remaining numbers are the vertex numbers (see POO2 section) that belong to the polygon. 0002 is line, 0003 triangle etc.

SEN2 Section

The SEN2 section exists only in some wireframe/skeleton files and it is usually located between POO2 and POL2 sections.

The section consists of floating point numbers (IEEE754) which define 8 vertices (4 bytes per number, 3 numbers per vertex, total 96 bytes). These vertices seem to form a box around the model.

The SEN2 section allows the UA game engine to quickly determine if it must redraw a portion of a model or not. (See for more information)

Editing tools

Hex editors are always useful, examples include HxD and frhed.

SKLT extractor by GoldStar unpacks skeleton files from BAS files.

OpenGL SKLT viewer by GoldStar can be used to view skeleton files in 3D environment.

LabVIEW BAS/SKLT viewer by GoldStar can be used to view the contents of BAS files and show skeleton files in 3D environment.

modding/skl_file.txt · Last modified: 2017/08/01 19:12 by goldstar611
Back to top
CC Attribution-Noncommercial-Share Alike 4.0 International = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0