THE UNI FILE DOCUMENTATION

-------V1.1.2-21-07-2000---------------------------------------------------------------------

by [email protected]



 
 
The General Part
The uni files follows a pattern also seen in the obj file. This pattern at the start of records made it finally easy to write a program that can split and and output the files in various formats together with a interpreting logmodule.

With help of this tool it was possible to deconstruct the nodes and chop the file into its records or rewrite the data to csv-files enbloc ( for use in Excel)

The following basic types where found by this processing:
 
SQUADRON RECORDS
BATTALION RECORDS
FLIGHTS
PACKAGE CONTAINERS

The header format
Word.Rec@0000 [ct-pointer]
DWord.Rec@0002 <unit-id-spaces>
Word.Rec@0006 0
Word.Rec@0008 0
Word.Rec@000A [ct-pointer]
Word.Rec@000C <x-loc>
Word.Rec@000E <y-loc>
if version<70 z-locfloat
Float.Rec@0010 z-loc
DWord.Rec@0014 SpotTime
Word.Rec@0018 Spotted
Word.Rec@001A Baseflags
Byte.Rec@001C <SIDE-CODE>
Word.Rec@001D <UNIT-IN-GAME-ID>
------------------------------------------------------------------------

 
 
unit-id-spaces
4008(4029) - 6000 Squadrons (pilots) and battalions and naval units
6006-8000 Package containers (flight-ids)
10006-14000 Flights(waypoint records)
Differences between TAC &CAM files Tac files start enumerating at 4008 and inside the uni file is a ghost (4025) f16 squadron at kimpo intl.

The cam squadron and mechanical units are above 4028. Maybe this feature explains why the files wont interoperate?


 
X-loc/Y-loc
Range 0..1023

 
 
side-codes
ID
Country
0
1 USA
2 ROK
3 JAPAN
4 RUSSIA
5 CHINA
6 DPRK
7 GORN (Germany)
Differences between templates and save day X-XX-XX-XX files (save0 save1 save2):The codes used are not in this range - Needs further analysis!

When a game is saved for later continuation the country codes apply as stated above. This holds also for missions saved for use in Tactical Engagements provided that you repainted the team distribution to match with the above table.

In stdr te_new the land is distributed between sideID 1 and 2
USA AND DPRK 


 
unit-in-game-id
TAC-FILES 97,110,3685,3686......
CAM-FILES (see note) 2K and 4K # and  small id's
Differences between templates and save day X-XX-XX-XX files The templates have all id 0! So the above number range applies only after a launched game is saved again!
See also side-code

 
Unit-records
Waypoint records for mobile units
Word.Rec@001F LastCheck
roster
unitflags
destx
desty
target
campid>1
cargoid
moved
losses
tactics
curwp
nameid
reinforcements

 +WPSTREAM!


 
 
 
 
GroundUnit-records
orders
division

 
aobj

 
 
 
Brigade-records

 
 
battalion-records

 
 
AirUnit-records NO VARIABLES READ FROM STREAM!

 
flight-records

 
package records
uchar elements
VU_ID felement[elements]
#elements
VU_ID interceptor
campversion>7
VU_ID AWACS
VU_ID JSTAR
VU_ID ECM
VU_ID TANKER
uchar wait-cuycles
Savespace-section
short requests
campversion<35 /missing
short threatstats
short missionreq.mission
short missionreq.context
VU_ID missionreq.requesterID
VU_ID missionreq.targetID
campversion>16 /missing
campaignTime missionreq.yot
campversion>=35
uchar misreq.actiontype
campversion>=41 /missing
short
misreq.priority
STANDARDSECTION
uchar flights
short waitfor
GridIndex iax
GridIndex iay
GridIndex eax
GridIndex eay
GridIndex bpx
GridIndex bpy
GridIndex tpx
GridIndex tpy
campaignTime takeoff
campaignTime tp-time
ulong packageflags
short caps
short requests
campversion<35
short threatstats
short responses
uchar wps
Wps#trecord
uchar haves
GridIndex GridX
GridIndex GridY
GridIndex GridZ
CampaignTime Arrive
short action
uchar routeaction
uchar formation
short flags
LOGICAL HAVES& wp_have_target
VU_ID TARGETID
LOGICAL HAVES& wp_have_target
UCHAR TargetBuilding
LOGICAL HAVES& wp_have_deptime
campaignTime depart
Missionrequest
campversion<35
byte string[64]
campversion>=35
VU_ID requesterID
VU_ID targetID
VU_ID secondaryID
VU_ID pakID
Team who
Team vs
CampaignTime tot
GridIndex tx
GridIndex ty
ulong flags
short caps
short target_num
short speed
short match-strenght
short priority
uchar tot-type
uchar action-type
uchar mission
ucahr aircraft
uchar context
uchar roecheck
uchar delayed
uchar start-block
uchar final-blok
uchar slots[4]
char min_to
char max_to
 

 

 
 
squadrone-records
long fuel
uchar speciality
campversion<69 [200]/[MAXIMUM_WEAPTYPE]
uchar stores[?]
campversion =>47
byte pilot_data[8*48]
campversion <47 campversion =>29
byte pilot_data[8*36]
campversion < 29
PilotClass pilot_data
long schedule[16]
VU_ID airbase
VU_ID hotspot
campversion  => 6 < 16 else missing!
VU_ID junk
uchar rating[16]
short aa-kills
short ag-kills
short as-kills
short an-kills
short mission-flown
short mission_score
uchar losses
campversion>=9 else missing
uchar pilot-losses
campversion=>45 else missing
uchar squadronpatch

 
taskforce-records
orders
supply