User Tools

Site Tools


falcon4:file_formats:cam_trn_tac:cmp_file

.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 signed 32-bit integer4Size, in bytes, of the compressed file to follow (includes 4 bytes for the “Uncompressed Size” field at the start of the data)
UncompressedSizesigned 32-bit integer4Size, 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
TheaterName_TCHAR[40]40 All
Scenario_TCHAR[40]40 All
SaveFile_TCHAR[40]40 All
UIName_TCHAR[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
teamName_TCHAR[20]20
teamMotto_TCHAR[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
airbaseName_TCHAR[40]40 All
airbaseNameExt_TCHAR[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 field is only useful in-memory and is meaningless when restored from disk
UiEventNodeInt32 pointer4as a pointer, this field is only useful in-memory and is meaningless when restored from disk
eventTextSizeunsigned 16-bit integer2
eventText_TCHAR[eventTextSize]eventTextSize
falcon4/file_formats/cam_trn_tac/cmp_file.txt · Last modified: 2009-02-15 19:47 (external edit)