
XWing Mission Information (XWI) File Format
This is some documentation for the XWing (classic) mission information file format.
Field  Length  Type  Description 
Version  16 bits  integer  Always 2 
Mission Time Limit  16 bits  integer  In minutes 
End event  16 bits  integer  0 = Rescued 1 = Captured (or Clear Laser Towers) 5 = Hit Exhaust Port 
??  16 bits  ??  0 
Mission Location  16 bits  int  0 = deep space 1 = death star surface 
Completion Message 1  64 bytes  string  pad with zeros 
Completion Message 2  64 bytes  string  
Completion Message 3  64 bytes  string  
Number of flight groups  16 bits  integer  
Number of objects  16 bits  integer  
And then for each flight group:
Field  Length  Type  Description 
Designation  16 bytes  string  pad with zeros. "Red", "Alpha", etc 
Cargo  16 bytes  string  pad with zeros 
Special Cargo  16 bytes  string  pad with zeros 
Special Ship Number  16 bits  integer  0 = one, 1 = two, etc 
Flight Group Type  16 bits  integer  0 = None 1 = XWing 2 = YWing 3 = AWing 4 = TIE Fighter 5 = TIE Interceptor 6 = TIE Bomber 7 = Gunboat 8 = Transport 9 = Shuttle 10 = Tug 11 = Container 12 = Frieghter 13 = Calamari Cruiser 14 = Nebulon B Frigate 15 = Corellian Corvette 16 = Imperial Star Destroyer 17 = TIE Advanced 18 = BWing 
Craft IFF  16 bits  integer  0 = Default 1 = Rebel 2 = Imperial 3 = Neutral 
Craft Status  16 bits  integer  0 = Normal 1 = No Missiles 2 = Half Missiles 3 = No Shields 
Number in wave  16 bits  integer  
Number of waves  16 bits  integer  0 = one, 1 = two, etc 
Arrival event  16 bits  integer  when to arrive 0 = Mission start 1 = arrival FG arrives 2 = arrival FG destroyed 3 = arrival FG attacked 4 = arrival FG boarded 5 = arrival FG identified 6 = arrival FG disabled 
Arrival delay  16 bits  integer  1 = one minute, 2D = 2 minutes, 30 seconds.. hmm, strange encoding 
Arrival FG  16 bits  integer  Arrival event relating to FG. 
Mothership  16 bits  integer  0xffff for none 
Arrive by hyperspace  16 bits  boolean  
Depart by hyperspace  16 bits  boolean  
Start1 X  16 bits  fixed point  value * 160 
Waypoint1 X  16 bits  fixed point  
Waypoint2 X  16 bits  fixed point  
Waypoint3 X  16 bits  fixed point  
Start2 X  16 bits  fixed point  
Start3 X  16 bits  fixed point  
Hyperspace X  16 bits  fixed point  
Start1 Y  16 bits  fixed point  
Waypoint1 Y  16 bits  fixed point  
Waypoint2 Y  16 bits  fixed point  
Waypoint3 Y  16 bits  fixed point  
Start2 Y  16 bits  fixed point  
Start3 Y  16 bits  fixed point  
Hyperspace Y  16 bits  fixed point  
Start1 Z  16 bits  fixed point  
Waypoint1 Z  16 bits  fixed point  
Waypoint2 Z  16 bits  fixed point  
Waypoint3 Z  16 bits  fixed point  
Start2 Z  16 bits  fixed point  
Start3 Z  16 bits  fixed point  
Hyperspace Z  16 bits  fixed point  
Start1 Enabled  16 bits  boolean  set if corresponding value included in flight path 
Waypoint1 Enabled  16 bits  boolean  (thanks to Luke Benstead for these values) 
Waypoint2 Enabled  16 bits  boolean  
Waypoint3 Enabled  16 bits  boolean  
Start2 Enabled  16 bits  boolean  
Start3 Enabled  16 bits  boolean  
Hyperspace Enabled  16 bits  boolean  
Formation  16 bits  integer  0 = Vic 1 = Finger Four 2 = Line Astern 3 = Line Abreast 4 = Echelon Right 5 = Echelon Left 6 = Double Astern 7 = Diamond 8 = Stacked 9 = Spread 10 = HiLo 11 = Spiral 
Player pos  16 bits  integer  position in the fighter group (eg 1, 2, etc) 
Craft AI  16 bits  integer  0 = Rookie, 1 = Officer, 2 = Veteran, 3 = Ace, 4 = Top Ace 
Order  16 bits  integer  0 = Hold steady 1 = Fly home 2 = Circle & Ignore 3 = Fly Once & Ignore 4 = Circle & Evade 5 = Fly once & Evade 6 = Close Escort 7 = Loose Escort 8 = Attack Escorts 9 = Attack Pri and Sec targets 10 = Attack enemies (Fighters, TRNs, SHUs) 11 = Rendezvous 12 = Disabled 13 = Board to deliver 14 = Board to take 15 = Board to exchange 16 = Board to capture 17 = Board to destroy 18 = Disable Pri and Sec Targets 19 = Disable all (Fighters, TRNs, SHUs) 20 = Attack Transports 21 = Attack freighters (includes CRVs) 22 = Attack starships 23 = Attack satelites and mines 24 = Disable frieghters (includes CRVs) 25 = Disable starships 26 = Starship sit and fire 27 = Starship fly dance 28 = Starship circle 29 = Starship await return 30 = Starship await launch 31 = Starship await boarding 
Dock Time or Throttle  16 bits  integer  depending on Order (Dock Time is in minutes) 
Craft Color  16 bits  integer  0 = Red, 1 = Gold, 2 = Blue 
??  16 bits  ??  0 
Objective  16 bits  integer  0 = none 1 = all destroyed 2 = all survive 3 = all captured 4 = all docked 5 = Special craft destroyed 6 = Special craft survive 7 = Special craft captured 8 = Special craft docked 9 = 50% destroyed 10 = 50% survive 11 = 50% captured 12 = 50% docked 13 = all identified 14 = Special craft identifed 15 = 50% identified 16 = Arrive 
Primary target  16 bits  integer  0xffff for no target 
Secondary target  16 bits  integer  
And then for each Object:
Field  Length  Type  Description 
Designation  16 bytes  string  pad with zeros, "Red", "Alpha", etc 
??  16 bytes  ??  
??  16 bytes  ??  
??  16 bits  ??  0 
Object Type  16 bits  integer  18 = Mine1 19 = Mine2 20 = Mine3 21 = Mine4 22 = Satellite 23 = Nav Buoy 24 = Probe 25 = ?? 26 = Asteroid1 27 = Asteroid2 28 = Asteroid3 29 = Asteroid4 30 = Asteroid5 31 = Asteroid6 32 = Asteroid7 33 = Asteroid8 34 = Rock World 35 = Gray Ring World 36 = Gray World 37 = Brown World 38 = Gray World II 39 = Planet & Moon 40 = Gray Crescent 41 = Orange Crescent 1 42 = Orange Crescent 2 43 = Orange Crescent 3 44 = Orange Crescent 4 45 = Orange Crescent 5 46 = Orange Crescent 6 47 = Orange Crescent 7 48 = Orange Crescent 8 49 = Death Star 
Object IFF  16 bits  integer  0 = none, 1 = Rebel, 2 = Imperial, 3 = Neutral 
Form / Objective  16 bits  integer  0 = Flat, 1 = On Edge, 2 = Broadside, 3 = Scattered, (or with 4 = must be destroyed) 
Number of Objects  16 bits  integer  
Position X  16 bits  fixed point  value * 160 
Position Y  16 bits  fixed point  
Position Z  16 bits  fixed point  
??  16 bits  ??  0 
??  16 bits  ??  0x40 
??  16 bits  ??  0 
As you can see, there's still a bit more to go.
Here is some C++ code for reading these in:
xwinglib.cpp and xwinglib.h.
Enjoy.
QuantumG
<< back to my home page
