User Tools

Site Tools


falcon4:file_formats:cam_trn_tac:obj_file

.OBJ file

The OBJ file holds all the objectives in a mission. Objectives are basically static things, like towns, cities, bridges, bases. Things which cannot be moved.

Objectives are usually composed of features. Each feature being a particular part of the overall objective. So an airbase objective may have runway, hangar and control tower as features.

Objectives also have a fixed position on the map governed by their X, Y coordinates. They may also have:

a parent - an objective that they are a child of, used in the naming sometimes.
a name - an index into the strings file used to name the objective. 0 indicates the objective has no name of its own.
a campaign ID - ID2 - used to related things.
an owner - which side owns this objective.
a controller - which side actually controls the objective.
a type - an index into the OCD file showing which objective type this is.
Various flags associated with the objective
Details of each feature composing the objective, detailing how damaged it is.
A list of links to other objectives - this gives routes to other places.

.OBJ File Format

Raw (compressed contents)

FieldData TypeWidth (in bytes)Description
NumObjectives Signed 16-bit integer2Number of objective records in the data that follows
UncompressedSizeSigned 32-bit integer4Size, in bytes, of the data that follows, when it's uncompressed
CompressedSize Signed 32-bit integer4Size, in bytes, of the compressed file to follow
DATAbyte[](CompressedSize)LZSS-compressed binary data.

Uncompressed contents of the DATA field

FieldData TypeWidth (in bytes)DescriptionVersions
objectiveRecords[]ObjectiveRecord[NumObjectives] All

Structures Used

ObjectiveRecord structure

FieldData TypeWidth (in bytes)DescriptionVersions
objectiveTypeunsigned 16-bit integer2 All
objectiveObjectiveClass All

ObjectiveClass structure

FieldData TypeWidth (in bytes)DescriptionVersions
idVU_ID8 All
entityType unsigned 16-bit integer 2 All
x Signed 16-bit integer 2 All
y Signed 16-bit integer 2 All
z single-precision 32-bit floating point 4 >=70
spotTime unsigned 32-bit integer 4 All
spotted signed 16-bit integer 2 All
baseFlags signed 16-bit integer 2 All
owner byte 1 All
campId signed 16-bit integer 2 All
lastRepairunsigned 32-bit integer4 All
obj_flagsunsigned 32-bit integer4 >1
obj_flagsunsigned 16-bit integer2 < = 1
supplybyte1 All
fuelbyte1 All
lossesbyte1 All
numStatusesbyte1 All
fStatus[]byte[numStatuses](numStatuses) bytes All
prioritybyte1 All
nameIdSigned 16-bit integer2 All
parentVU_ID8 All
first_ownerbyte1 All
numLinksbyte1 All
link_data[]ObjectiveLink[numLinks] All
hasRadarDatabyte1 >=20
detect_ratio[]array of single-precision 32-bit floating point * 84*8 = 32 bytes Only present if hasRadarData field <> 0 >=20
FieldData TypeWidth (in bytes)Description
costs[]byte[8]8
newIdVU_ID8

VU_ID structure

FieldData TypeWidth (in bytes)Description
num_unsigned 32-bit integer4
creator_unsigned 32-bit integer4
falcon4/file_formats/cam_trn_tac/obj_file.txt · Last modified: 2009-02-15 19:48 by lightning