User Tools

Site Tools


falcon4:file_formats:cam_trn_tac:cmp_file

This is an old revision of the document!


.CMP file

The .CMP file is one of the files embedded within a .CAM/.TRN/.TAC file. The CMP file has most of the basic data for the campaign. It is loaded by the campaign engine to show an overview of the file you have selected, so contains some information that is more correctly found in other files, but also copied into this file for convenience.

.CMP file format

Raw format (compressed contents)

FieldData TypeWidth (in bytes)Description
CompressedSize DWORD4Size, in bytes, of the compressed file to follow (includes 4 bytes for the “Uncompressed Size” field at the start of the data)
UncompressedSizeDWORD4Size, in bytes, of the content that follows, when it's uncompressed
DATAbyte[](CompressedSize-4)LZSS-compressed binary data.

Uncompressed contents of the DATA field

FieldData TypeWidth (in bytes)DescriptionVersions
CurrentTimeunsigned 32-bit integer4 All
TE_StartTimeunsigned 32-bit integer4 >=48
TE_TimeLimitunsigned 32-bit integer4 >=48
TE_VictoryPointsSigned 32-bit integer4 >=49
TE_TypeSigned 32-bit integer4 >=52
TE_number_teamsSigned 32-bit integer4 >=52
TE_number_aircraft[]array of Signed 32-bit integer * 84*8=32 >=52
TE_number_f16s[]array of Signed 32-bit integer * 84*8=32 >=52
TE_teamSigned 32-bit integer4 >=52
TE_team_pts[]array of Signed 32-bit integer *8 4*8=32 >=52
TE_flagsSigned 32-bit integer4 >=52
TeamInfo[]TeamBasicInfo[8]222 *8 = 1776 >=52
LastMajorEventunsigned 32-bit integer4 >=19
lastResupplyunsigned 32-bit integer4 All
lastRepairunsigned 32-bit integer4 All
lastReinforcementunsigned 32-bit integer4 All
TimeStampSigned 16-bit integer2 All
GroupSigned 16-bit integer2 All
GroundRatioSigned 16-bit integer2 All
AirRatioSigned 16-bit integer2 All
AirDefenseRatioSigned 16-bit integer2 All
NavalRatioSigned 16-bit integer2 All
BriefSigned 16-bit integer2 All
TheaterSizeXSigned 16-bit integer2 All
TheaterSizeYSigned 16-bit integer2 All
CurrentDaybyte1 All
ActiveTeambyte1 All
DayZerobyte1 All
EndgameResultbyte1 All
Situationbyte1 All
EnemyAirExpbyte1 All
EnemyADExpbyte1 All
BullseyeNamebyte1 All
BullseyeXSigned 16-bit integer2 All
BullseyeYSigned 16-bit integer2 All
TheaterNameTCHAR[40]40 All
ScenarioTCHAR[40]40 All
SaveFileTCHAR[40]40 All
UINameTCHAR[40]40 All
PlayerSquadronIDVU_ID8 All
NumRecentEventEntriesSigned 16-bit integer2 All
RecentEventEntries[]EventNode[NumRecentEventEntries]sizeof(EventNode)*NumRecentEventEntries All
NumPriorityEventEntriesSigned 16-bit integer2 All
PriorityEventEntries[]EventNode[NumPriorityEventEntries]sizeof(EventNode)*NumPriorityEventEntries All
CampMapSizeSigned 16-bit integer2 All
CampMap[]byte[CampMapSize](CampMapSize) bytes All
LastIndexNumSigned 16-bit integer2 All
NumAvailableSquadronsSigned 16-bit integer2 All
SquadInfo[]SquadInfo[NumAvailableSquadrons]sizeof(SquadInfo)*NumAvailableSquadrons All
Tempobyte1 >=31
CreatorIPSigned 32-bit integer4 >=43
CreationTimeSigned 32-bit integer4 >=43
CreationRandSigned 32-bit integer4 >=43

Structures used

TeamBasicInfo structure

FieldData TypeWidth (in bytes)Description
teamFlagbyte1
teamColorbyte1
teamNameT_CHAR[20]20
teamMottoT_CHAR[200]200

VU_ID structure

FieldData TypeWidth (in bytes)Description
num_unsigned 32-bit integer4
creator_unsigned 32-bit integer4

SquadInfo structure

FieldData TypeWidth (in bytes)DescriptionVersion
xsingle-precision 32-bit floating point4 All
ysingle-precision 32-bit floating point4 All
idVU_ID8 All
descriptionIndexSigned 16-bit integer4 All
nameIdSigned 16-bit integer4 All
airbaseIconSigned 16-bit integer4 All
squadronPathSigned 16-bit integer4 All
specialtybyte1 All
currentStrengthbyte1 All
countrybyte1 All
airbaseNameTCHAR[40]40 All
airbaseNameExtTCHAR[40]40additional 40 characters of airbaseName (only supported in earlier versions) <42
paddingbyte1needed for the structure's fields to align on an Int32 boundaryAll

EventNode structure

FieldData TypeWidth (in bytes)Description
xSigned 16-bit integer2
ySigned 16-bit integer2
timeunsigned 32-bit integer4
flagsbyte1
Teambyte1
paddingbyte2needed for the structure's fields to align on an Int32 boundary
EventTextInt32 pointer4as a pointer, this is only useful in-memory and is meaningless when restored from disk
UiEventNodeInt32 pointer4as a pointer, only useful in-memory and is meaningless when restored from disk
eventTextSizeunsigned 16-bit integer2
eventTextTCHAR[eventTextSize]eventTextSize
falcon4/file_formats/cam_trn_tac/cmp_file.1234643785.txt.gz · Last modified: 2009-02-14 20:36 (external edit)