[an error occurred while processing this directive]
SCASM support Index Section 10 format description

DKI file format description 

Contents
Introduction

A section 10 BGL file has a very simple format. It contains a table of ID strings for object shapes inside and a piece of SDL code for each shape. This information is sufficient for FS98 to use dynamic libraries, but not for scenery designers who build dynamic sceneries, because associating long ID strings with meaningful names and remembering other properties, like the gear height, would be difficult.

In order to make life simpler for designers, DynKit introduced .DKI (DynKit Information) files. A DKI file would accompany a dynamic library BGL file and store information for shapes inside useful to scenery designers, for example:

This information can be used by scenery designers manually writing section 15 code, but also by GUI dynamic scenery editors. FS Action! scenery from Abacus and DOD v2.0 already use them. Instead of entering long ID strings, users can simply open the .DKI file for a scenery library and pick the shape by name. DynKit itself also uses .DKI files.

DKI files are basically Windows INI files. They have documented and private entries. Documented entries are intended to be used by other programs, and effort will be made to maintain compatibility. Private entries store DynKit-specific information, such as the version of DynKit used, settings for dialog boxes and the like. It is not guaranteed that these entries will be supported by future versions of DynKit, so I strongly recommend not to use them.

It is my intention to maintain .DKI file format as a sort of a standard, which would help improve compatibility between dynamic scenery design programs. For this reason, I have defined several entries that are not directly used by DynKit, but may be useful to those who use a (hypothetical) other section 10 generator, or write section 10 code by hand. For the same reason, I am willing to define new entries should other programs require them. Authors are welcome to contact me at kukushk@pobox.com.

File format details

For a BGL file containing a section 10, the accompanying DKI file should have the same name, but the extension .DKI. For example, if JETS4.BGL is a dynamic library, the name of the DKI file would be JETS4.DKI.

DKI files are Windows INI files. They consists of several sections, and each section stores individual settings in the form

Name=Value

At the present, 2 sections are defined.

[DynKit]

This section only contains private information for DynKit. It should not be used by other programs.

[Section10]

This section contains information about dynamic object shapes defined in section 10. It contains both documented and private entries. Private DynKit entries begin with X-DynKit- and should not be used by other programs. Documented entries are described below:

NumObjects=n

This entry specifies the total number of shapes defined in section 10.

The following entries specify information about individual shapes. Shapes are numbered from 0 to NumObjects-1, and names of entries for individual shapes contain shape numbers.

IDn=XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX

Specifies the ID string for the shape n. The ID string consists of 16 hexadecimal numbers, separated by spaces, representing 16 bytes of the ID string.

Namen=name

Specifies the name for the shape n.

LowestPointn=lowest point

Specifies the Z coordinate of the lowest point of shape n, in meters, relative to the RefPoint of the shape. Fractional values are allowed. Obviously, the lowest point value is the negative of the gear height.

FeatureBitsn=XXXXXXXX

Specifies features of the shape n controllable by the dynamic scenery, like a retractable landing gear or a propeller. The value is a 32-bit hexadecimal number, and bits corresponding to features that can be controlled are set to 1. The bits used are the same as in DynKit feature constants. In addition, the bit 16 (AND 10000h) is set to 1 if there is a retractable landing gear. Other bits are reserved and should be set to 0. For example, the value for an aircraft with a retractable gear and a propeller that would either stand still or rotate fast enough to be almost invisible would be 00010005.

ColorDescriptionn_0=color name
ColorDescriptionn_1=color name
ColorDescriptionn_2=color name
ColorDescriptionn_3=color name

Specifies names of customizable colors in the shape n. For non-customizable colors, like in many textured objects, the color name should be empty or the whole ColorDescription entry omitted.

Although DynKit writes entries in a particular order, this order is not guaranteed. I recommend using standard Windows functions for reading INI files, which are insensitive to the order of individual entries.


SCASM support Index Section 10 format description

Copyright © 1998 by Konstantin Kukushkin