-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMission_XWA.txt
1705 lines (1560 loc) · 45.3 KB
/
Mission_XWA.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
XWA Mission File
Author: Michael Gaisser (mjgaisser@gmail.com)
Site: https://github.com/MikeG621
Updated: 2024.08.18
=====
This is going to be a very lengthy definition of the XWA mission file. If you
see portions of this write-up that look similar to the TIE95 write-up, that's
because they're probably word-for-word.
The file itself is made of up multiple sections, for the purpose of this file
each is documented as a struct beginning at '0', such that to find an offset
in a later section you simply add the total length of the sections before it to
get there. This is what I use in my personal notes, so this is what I am
forcing upon you. I win. I'll try to keep the mission design comments to a
minimum, but I promise nothing.
=====
XWA Mission Overview
The mission files are found in the \MISSION directory, have the .TIE file
extension, but require the naming convention seen in LEC missions. XWA throws
a fit it you attempt to name it anything other than #B#M#*.tie. # is the
number of players, B# is the battle number the mission is in, M# is the mission
number, and * is just that, the * wildcard. Put anything you want there, XWA
doesn't care at that point.
=====
XWA Mission Structure
The following values are used through this and all of my file definitions
unless otherwise specified:
NAME LENGTH DESC
---- ------ ----
BOOL 1 0=false, 1=true
BYTE 1 unsigned 8-bit
SBYTE 1 signed 8-bit, [-128, +127]
CHAR 1 ASCII character
SHORT 2 signed Int16
DWORD 4 signed Int32
STR(*) * null-terminated string, * is an integer length
NOTE: Any byte locations that are between defined values and are not explicitly
defined are deemed as Reserved(0), and have only been found to have zero
values. All unknowns have been discovered and named accordingly per the LEC
format spec, their previous Unknown designation is listed next to it. Some
values are known to be editor only or have no effect in-game, others may or may
not be "active". Inactive values are named in paranethesis, questionable have
"*" prefixes. In addition, Enum values such as triggers or orders that could
not be set or were actively re-mapped to other values are noted as (Mapped),
unless they are known to work properly.
NOTE2: **IMPORTANT** The And/Or Trigger BOOLs (and possibly all BOOLs) are
actually making a (value & 1) comparison to determine TRUE, not a non-zero
check. For standard read/write this isn't an issue, but if you're dealing with
a poorly formatted mission file, this can cause unexpected results as 2 would
be FALSE but 3 is TRUE again.
--
FileHeader
FlightGroup[NumFGs]
Message[NumMessages]
GlobalGoal[10]
Team[10]
Briefing[2]
STR(0x187C) EditorNotes
STR(100)[128] BriefingStringNotes
STR(100)[64] MessageNotes
STR(100)[10,7] EomNotes
STR(100)[3] DescriptionNotes
STR(*)[NumFGs,8,3] FGGoalStrings
STR(*)[10,7,4,3] GlobalGoalStrings
STR(*)[192,16] OrderStrings
STR(4096)[3] Descriptions
---
struct FileHeader (size 0x23F0)
{
0x0000 SHORT PlatformID (0x12)
0x0002 SHORT NumFGs
0x0004 SHORT NumMessages
0x0006 BYTE *TimeLimitMin
0x0007 BYTE *TimeLimitSec
0x0008 BYTE *WinType (was Unknown1, default 1)
0x0009 BYTE *Backdrop
0x000A BYTE *Rescue
0x000B BYTE *AllWayShown (was Unknown2, probably editor only)
0x000C BYTE[8] *Vars
0x0014 STR(20)[4] IffNames3-6
0x0064 Region[4] Regions
0x0274 GlbCrg[16] GlobalCargos
0x0B34 GlbUn[32] GlobalGroups
0x1C32 GlbUn[40] GlobalUnits
0x23AC BYTE Hangar (enum)
0x23AD BOOL GoalsUnimportant
0x23AE BYTE TimeLimitMinutes
0x23AF BOOL EndMissionWhenComplete
0x23B0 BYTE BriefingOfficer (enum)
0x23B1 BYTE BriefingLogo (enum) (also known as CommandOfficer)
0x23B2 BYTE BriefingOfficerEntryLine
0x23B3 BYTE *SecondaryVersion (0x62 'b', was Unknown3, might be editor only)
0x23B4 BYTE WinOfficer (enum) (was Unknown4)
0x23B5 BYTE FailOfficer (enum) (was Unknown5)
0x23B6 (58) (Reserved)
}
struct Region (size 0x84)
{
0x00 STR(64) Name
0x40 DWORD ID
0x44 (64) (Reserved)
}
struct GlbCrg "GlobalCargo" (size 0x8C)
{
0x00 STR(64) Cargo
0x40 DWORD ID
0x44 DWORD Count (was Unknown1)
0x48 BYTE Type (was Unknown2) {solid, liquid, gas}
0x49 BYTE Volume (was Unknown3)
0x4A BYTE Value (was Unknown4)
0x4B BYTE Volatility (was Unknown5) {low, med, high, kaboom!}
0x4C (64) (Reserved)
}
struct GlbUn "GlobalUnit" (size 0x57)
{
0x00 STR(64) Name
0x40 BYTE Leader
0x41 BYTE SpecialCargoCraft
0x42 STR(20) SpecialCargo
0x56 BOOL RandSpecCraft
}
struct FlightGroup (size 0xE3E)
{
0x000 STR(20) Name
0x014 BYTE EnableDesignation
0x015 BYTE EnableDesignation2
0x016 BYTE Designation1 (enum)
0x017 BYTE Designation2 (enum)
0x018 BYTE Comm (was Unknown1) {None, Minimal, Normal, Verbose}
0x019 BYTE GlobalCargoIndex
0x01A BYTE GlobalSpecialCargoIndex
0x1B (13) (Unused)
0x028 STR(20) Cargo
0x03C STR(20) SpecialCargo
0x050 STR(20) CraftRole
0x069 BYTE SpecialCargoCraft
0x06A BOOL RandomSpecialCargoCraft
0x06B BYTE CraftType (enum)
0x06C BYTE NumberOfCraft
0x06D BYTE Status1 (enum)
0x06E BYTE Warhead (enum)
0x06F BYTE Beam (enum)
0x070 BYTE Iff
0x071 BYTE Team
0x072 BYTE GroupAI (enum)
0x073 BYTE Markings (enum)
0x074 BYTE Radio (enum)
0x075 BYTE (Unused)
0x076 BYTE Formation (enum)
0x077 BYTE FormationSpacing
0x078 BYTE GlobalGroup
0x079 BYTE (Unused) (was LeaderSpacing)
0x07A BYTE NumberOfWaves
0x07B BYTE WavesDelay (was Unknown3)
0x07C BYTE StopArrivingWhen
0x07D BYTE PlayerNumber
0x07E BOOL ArriveOnlyIfHuman
0x07F BYTE PlayerCraft
0x080 BYTE Yaw
0x081 BYTE Pitch
0x082 BYTE Roll
0x083 BYTE (IOReserved)
0x084 SHORT *LinkID (was Unknown4)
0x086 BYTE (Unused) (was Unknown5)
0x087 BYTE ArrivalDifficulty (enum)
0x088 TPair[2] Arrival (contained Unknown6)
0x0A8 BOOL Arrivals12OrArrivals34
0x0A9 BYTE ArrivalRandDelayMinutes
0x0AA BYTE ArrivalDelayMinutes
0x0AB BYTE ArrivalDelaySeconds
0x0AC TPair Departure
0x0BC BYTE DepartureDelayMinutes
0x0BD BYTE DepartureDelaySeconds
0x0BE BYTE AbortTrigger (enum)
0x0BF BYTE ArrivalRandDelaySeconds (was Unknown7)
0x0C0 SHORT (Editor use, CurrentMothership) (was Unknown8)
0x0C2 BYTE ArrivalMothership
0x0C3 BYTE ArrivalMethod {Hyper, Mothership, Hyp Rgn FG}
0x0C4 BYTE DepartureMothership
0x0C5 BOOL DepartMethod {Hyper, Mothership, Planet}
0x0C6 BYTE AlternateMothership
0x0C7 BOOL AlternateMothershipUsed
0x0C8 BYTE CapturedDepartureMothership
0x0C9 BOOL CapturedDepartViaMothership
0x0CA Order[16] Orders
0xA0A TPair[16] SkipTriggers
0xB0A GoalFG[8] FGGoals
0xD8A Wypt[2] StartPoints
0xD9A Wypt CaptureHyperPoint
0xDA2 Wypt HyperPoint
0xDAA BYTE[2] StartPointRegions
0xDAC BYTE CaptureHyperRegion
0xDAD BYTE HyperPointRegion
0xDAE BYTE[20] (Unused) [was Unks16-31]
0xDC2 BYTE (Editor use, WaypointShown)
0xDC3 BYTE (Unused)
0xDC4 BOOL DisableWaveNumbering
0xDC5 BYTE DepartureClockMin (was Unknown32)
0xDC6 BYTE DepartureClockSec (was Unknown33)
0xDC7 BYTE Countermeasures
0xDC8 BYTE CraftExplosionTime
0xDC9 BYTE Status2
0xDCA BYTE GlobalUnit
0xDCB BYTE Handicap {None, FavorRebels, EvenOnly, FavorImps, FavorRebsEven, FavorImpsEven}
0xDCC BYTE[8] OptionalWarheads
0xDD4 BYTE[4] OptionalBeams
0xDDA BYTE[3] OptionalCountermeasures
0xDDE BYTE OptionalCraftCategory
0xDDF BYTE[10] OptionalCraft
0xDE9 BYTE[10] NumberOfOptionalCraft
0xDF3 BYTE[10] NumberofOptionalCraftWaves
0xDFD STR(20) PilotID
0xE11 BYTE (IOReserved)
0xE12 DWORD Backdrop
0xE16 (40) (Reserved) (contained Unk34-41)
}
struct TPair "TriggerPair" (size 0x10)
{
0x00 Trigger Trigger1
0x06 Trigger Trigger2
0x0C BYTE[2] (Unused)
0x0E BOOL T1OrT2
0x0F BYTE (IOReserved)
}
struct Trigger (size 0x6)
{
0x0 BYTE Condition (enum)
0x1 BYTE VariableType (enum)
0x2 BYTE Variable
0x3 BYTE Amount (enum)
0x4 SHORT Parameter
}
struct Order (size 0x94)
{
0x00 BYTE Order (enum)
0x01 BYTE Throttle
0x02 BYTE[4] Variables (contains Unknown9)
0x06 BYTE Target3Type (enum VariableType)
0x07 BYTE Target4Type (enum VariableType)
0x08 BYTE Target3
0x09 BYTE Target4
0x0A BOOL Target3OrTarget4
0x0B BYTE (Unused)
0x0C BYTE Target1Type (enum VariableType)
0x0D BYTE Target1
0x0E BYTE Target2Type (enum VariableType)
0x0F BYTE Target2
0x10 BOOL Target1OrTarget2
0x11 BYTE (Unused)
0x12 BYTE Speed
0x13 BYTE (IOReserved)
0x14 Wypt[8] Waypoints
0x54 (64) (Reserved)
}
struct Wypt (size 0x8)
{
0x0 SHORT X
0x2 SHORT Y
0x4 SHORT Z
0x6 BOOL Enabled [Note: this is really defined as a SHORT]
0x7 BYTE (Unused)
}
struct GoalFG (size 0x50)
{
0x00 BYTE Argument
0x01 BYTE Condition
0x02 BYTE Amount
0x03 SBYTE Points
0x04 BOOL[10] EnabledForTeam
0x0E BYTE Parameter or Goal time limit depending on order
0x0F BYTE ActiveSequence
0x10 (64) (Reserved)
}
struct Message (size 0xA2)
{
0x00 SHORT MessageIndex
0x02 STR(80) Message
0x52 BYTE[10] SentToTeam
0x5C TPair[2] Triggers (contained Unknown1)
0x7C STR(8) Voice
0x84 DWORD OriginatingFG
0x88 DWORD Type
0x8C BYTE Delay
0x8D BOOL Triggers12OrTriggers34
0x8E BYTE Color/IFF
0x8F BOOL SpeakerHeader (was Unknown2)
0x90 TPair Special
0xA0 BYTE SpecialMeaning (was Unknown3) {Ignore, Stop, Finished, Both}
0xA0 BYTE (IOReserved)
}
struct GlobalGoal (size 0x170)
{
0x00 SHORT NumGoals (3)
0x02 GoalGlobal[3] Goals
}
struct GoalGlobal (size 0x7A)
{
0x00 TPair[2] Triggers (contained Unknown1)
0x20 STR(16) Name (contains Unknown2)
0x30 BYTE Version
0x31 BOOL Triggers12OrTriggers34
0x32 BYTE Delay (was Unknown3)
0x33 SBYTE Points
0x34 BYTE[4] PointsPerTrigger (was Unknown4-6)
0x38 BYTE ActiveSquence
0x39 BYTE (IOReserved)
0x3A (64) (Reserved)
}
struct Team (size 0x1E7)
{
0x000 SHORT (Reserved) (1)
0x002 STR(16) Name
0x012 (8) Reserved
0x01A BYTE[10] Allegiances
0x024 CHAR[6][64] EndOfMissionMessages
0x1A4 BYTE[3] EomMessageDelay (was Unknowns)
0x1A7 BYTE[3] EomSourceFG (was Unknowns)
0x1AA CHAR[3][20] EomVoiceIDs
0x1E6 (1) (Reserved)
}
struct Briefing
{
0x0000 SHORT RunningTime
0x0002 SHORT CurrentTime (was Unknown1)
0x0004 SHORT StartLength
0x0006 SHORT EventsLength
0x0008 SHORT Tile
0x000A Event[] Events
0x320A Icon[192] Icons
0x440A BOOL[10] ViewedByTeam
0x4414 BrfStr[128] Tags
BrfStr[128] Strings
}
struct Event
{
0x0 SHORT Time
0x2 SHORT Type (enum EventType)
0x4 SHORT[] Variables
}
struct Icon (size 0x18)
{
0x00 BYTE Species
0x01 BYTE IFF
0x02 SHORT X
0x04 SHORT Y
0x06 SHORT Orientation
0x08 (16) (Reserved)
}
struct BrfStr
{
0x0 SHORT Length
0x2 CHAR[Length] Text
}
=====
XWA Mission Detail
Hopefully I named the variables descriptive enough for you that you can figure
out what they mean, but I'm going to delve into each section anyway. Names may
differ from previous editors or official documents, depending on if I think
they made sense or not. Supplementary definitions and enums follow after the
writeup details.
-- FileHeader --
The first 6 bytes are standard vlues. TimeLimitMin to Rescue appear to be
legacy values and not used. AllWayShown appears to be an editor flag only and
not have an effect in-game, and the Vars don't seem to do anything. After that
follows the IFF names and the Region names, which are new in XWA. The ID value
of the Region structs don't appear to serve a purpose in-game and normally
aren't set, likely was used for back-end coding at one point.
GlobalCargo is something I stumbled upon when I was using the New Horizons
editor, before I started using AlliED. NH uses these values for the craft's
normal Cargo values, not using the one in the flight group's definition. These
cargoes can be assigned to multiple flight groups, and there is even a
TrigVar/Target Type that can be used similar to GG and GU triggers. Unknown if
the values in the struct have a real purpose, although Volatility I believe
changes the craft explosion when destroyed. A more detailed explanation belongs
in a mission design writeup instead of here.
After those come the Global Group details. The Name will display instead of
listing out all of the craft as in previous games. The GG has its own Special
settings. Then there's another similar section for Global Unit as well.
We have Hangar, which determines how the mission starts, a flag for ignoring
goals, and the true Time limit value. XWA changed how single-value delays
(i.e. not having separate TimerMin and TimerSec values) are interpreted. If
the value is 0 to 20 it's just the number of seconds. Over 20, each increment
adds 5 seconds. Over 196 (15:00), each increment adds 10 seconds. A maximum of
255 translates to 24:50 waiting time.
The EndMissionWhenComplete value forces the mission to end once all primary
goals are completed, BriefingOfficer decides voice-overs within the
briefing room, the BriefingLogo is what shows up on the first screen of the
briefing with the craft list, and although I list that out as a separate enum,
it's actually the same list as Officer. EntryLine I think is for what the
officer says as you're walking into the briefing room. SecondaryVersion
should be editor-only in conjunction with PlatformID to help determine exactly
how to read the file format, and then we have the Officers that are for the Win
and Lose conditions, though they're effectively editor notes since they don't
appear in-game.
-- FlightGroup --
The first string should be obvious. Designation roles provide an informational
note in the HUD when the player selects them and also trigger specific radio
messages when certain actions occur. EnableDesignation (enum) determines if
the role is used. Designation (enum) determines the actual role. For example,
"Command Ship" or "Primary Target". Unlike XvT, XWA can only have a maximum of
two roles assigned. The Comm value also modifies the callout when mentioned
over the radio.
The next two values determine use of GlobalCargo. The first assigns a GC to the
flight group, and is what you'd see in the mission instead of whatever the
usual Cargo is. The next value is the same, but for the craft's Special Cargo.
If no GC is to be used, the value is 0xFF (-1). There's some interesting GC
interactions during boarding operations, but again that belongs in a mission
design guide.
Then we get to the normal Cargo strings and the CraftRole (aka "Duty"). It is
unknown if the string itself drives something within the game, or if it's just
a display. I'm not even sure where it displays.
A bunch of values which should be pretty straightforward. Radio operates in
XWA much like XvT, in that instead of a binary switch the value can be set to
any team or player, 1-8.
GlobalGroup is a great way grouping craft primarily for order and trigger use.
Instead of listing out each FG or craft type in a order you can lump everything
to a GG and use a single target. WavesDelay adds a bit of lag before the next
wave comes in, and StopArrivingWhen determines the condition when waves stop
entering the mission. Useful to prevent say a FG from coming in, having
orders completed, leaving, the next wave coming in, leaving, etc.
Formation has no effect on mines. They use the Status1 field instead. Possible
values are:
0: Floor (X-Y plane)
1: Side (Y-Z plane)
2: Front (X-Z plane)
3: All overlap a single point. They'll destroy each other with friendly-fire.
Anything beyond repeats this sequence. There is no way to change the spacing.
NumberOfWaves is zero-indexed, but the number you'll likely see in editors is
the number of total waves. A few values have been inserted here, the first
being PlayerNumber. One-indexed, with zero meaning AI-controlled. Next is
ArriveOnlyIfHuman which is a boolean value that as its name suggests, when
active will prevent a Flight Group from appearing in the mission if there isn't
a human pilot behind the controls. PlayerCraft works the same as TIE, with
00 being the default and 01 starting at position 2. Yaw, Pitch and Roll values
work for all craft in XWA, not just objects.
Now we're into the Arrival conditions. In sentence form, Triggers are "if
Amount of VariableType Variable are Condition, then true". The Arrival and
Departure triggers are just that. The Alternate mothership can be used if
the originals aren't available for whatever reason, and the Capture mothership
is for post-capture, since it'd be silly for a captured craft to return to a
hangar belonging to the original team. *Or* booleans are evaluated as
And=false, Or=true. For the case of Triggers, determines if one or both
Triggers must be completed to evaluate to true. The 12Or34 value likewise
determines if both trigger pairs must evaluate to true or not. The ArrivalDelay
countdown starts after the full Trigger has been fired, same for the
DepartureDelay values. The RandDelay values define the maximum amount of
additional time that can be added on top of the ArrivalDelay. The AbortTrigger
value applies only to individual craft, not the entire flight group. The
ViaMothership/Used values when false will cause craft to use hyperspace,
though for the Arrival and Depart methods in XWA there's a third option that
can be used, so it's no longer a BOOL. The only addition to XWA triggers are
the Parameter values. Parameter is used for region-specific triggers, proximity
triggers and a couple others.
Special note for VariableType 0xE (14), Delay. In this case, the Trigger takes
the form "After Variable delay, then TRUE". I believe this is counting from
the mission timer, but more testing needs to be done.
Orders, they're what make the world go 'round. Pick the Order from the list
and go from there. The Throttle value has been simplified from XvT, in that it
is evaluated as (Throttle% / 10). The Variables are controlled by the order
itself, as different orders take different amounts for different reasons.
Target# and Target#Type are the same as a Trigger's Variable and VariableType.
The Speed value can override the simple Throttle method and set the FG's exact
speed in MGLT. Helpful for convoys of differing craft. The value stored is
not actually the MGLT value, but a fairly close approximation of MGLT / 2.2235
(I say fairly close because that's what I tweaked the multipler to get no
difference up to index 100).
XWA stores the Waypoints in the orders themselves, so each order in each region
has a different WP set to allow further control and realism in the mission.
There are 4 Orders and 4 Regions, so the Order array goes from R1O1, R1O2,
R1O3, R1O4, R2O1...
Expanding upon XvT, XWA also has Skip triggers for every order. If this
trigger fires the FG will immediately jump to the appropriate order. The array
is ordered in the same manner as the Orders, going through each order in each
region.
Goals are for that specific flight group. In XWA you have 8 for a given FG,
and all can be given point values, stored as (Points / 25), yielding a range of
[-3200, +3175]. XWA has the Argument value which can be one of these:
00 must
01 must NOT
02 BONUS must
03 BONUS must NOT
In addition the Teams can be set, as well as the Parameter and ActiveSequence
value, like any other trigger. This is the preferred method of applying
mission goals if they only apply to a single FG.
The remaining Waypts are stored next; two start points, the HYP after capture
and the regular HYP are available here. The Region values determine which
region the point applies to. Note that there are no briefing points in XWA,
that's because XWA finally uses a true animated briefing. More on that later.
A lot of unused space, a switch to disable number across multiple waves, and
then a departure timer that is based on the mission clock, not a trigger.
Then we have the Countermeasures, this is a very short list of
00 None
01 Chaff
02 Flare
03 ClusterMine
CraftExplosionTime acts strangely, and I haven't pinned it down exactly yet.
It does affect how long it takes for a dying craft to despawn, but seems to
act differently with different ship classes and there is an unknown multipler
from the stored value to seconds.
Another Status value for you to use, followed by GlobalUnit. Similar to GG,
GU can take multiple Flight Groups and assign them a single number for easy
triggers and targets. Another use is to share numbering, good for multiple
definitions of a flight group, this keeps the numbering consistent between
them. Flight Groups do not need the same name to share numbering.
I don't know what the Handicap value does.
The Optional values are the alternate loadouts that the player can select when
going over their craft. As you can see you can list the majority of items and
several craft at any given time. The Category value allows you to easily
select a given ship list.
00 None
01 All Flyable
02 All Rebel Flyable
03 All Imperial Flyable
04 User Defined
Pilot has no real effect in XWA, but is most often used for a note as to which
voice is used for the FG's messages. Just a bookkeeping value, can be ignored.
-- Backdrops --
Backdrops (stars, planets, etc) are special types of flight groups. Value
definitions change for these purposes, which will be laid out here. For
starters, Name becomes LightRGB, where the color values are 0.0-1.0 so a
white light will be "1.0 1.0 1.0" and no light would be "0.0 0.0 0.0".
The DeathStarII Backdrop is a unique case, where the Name instead becomes a
timer definition. "60.00 600.00" means 60 seconds from mission start until the
first shot, and 600 seconds (10 min) between shots after that.
The GlobalCargoIndex number is used as the Shadow. Note however, that not
every backdrop uses this exact list, some remove items and renumber
accordingly. Start with this list and work from there if you notice it
doesn't match up.
FF None
00 Right 3/4
01 Right Half
02 Right Quarter
03 Left Quarter
04 Left Half
05 Left 3/4
06 ???
Cargo is instead the Brightness, which also uses a numeric value of increasing
intensity. "1.0" is the default.
SpecialCargo is the size of the object, to be used for backdrops and not so
much pure light sources. Also a numeric value.
The Backdrop value is used here, and this defines the image that is used. If
the value is zero, then it is just a light source.
Due to how XWA places backdrops within the game, the start location CANNOT be
0, 0, 0. Allied and YOGEME both check for this as it will crash the game.
-- Message --
A simple section, nothing really tricky here. The Voice appears to simply
be a note on the voice itself (RP1, Wedge, etc), and Color is the following:
00 Green
01 Red
02 Blue
03 Yellow
04 Red
05 Purple
OriginatingFG is used as the FG that the message is coming from. Zero-indexed,
and since the player craft is usually the first ship in the craft listing, a
value of zero implies it's coming from your ship, a value of 1 is from the next
ship, etc. Not every LA mission uses it, and there doesn't appear to be any
game mechanic behind it, as a message from a given ship will still fire even if
that ship is destroyed. This is the "Unk" value in the lower-right in AlliED.
Just looks like another bookkeeping value.
Not sure what the "Type" really does, this might be a simple Cancel condition
based on the speaker FG. Don't know what SpeakerHeader does either. Need to
do some testing to see if they really do anything.
New to XWA is yet another function to add realism, is the Special trigger.
Normally, this is used as a Cancel trigger, which in effect sets all of the
trigger conditions to "Never". By changing the SpecialMeaning value you can
tweak exactly what this does, but unsure of what the other settings really do.
-- GlobalGoal --
When FG goals just won't cut it, that's what there are for. This Section is
repeated 10 times, once for each team. What is there should be mostly familiar
by now. The Name value I believe is just an editor note. I don't know if the
Version value has a real function. The Delay should between when the triggers
fire and when the Goal is marked as complete in the log. In addition to the
points for completion, there's also the ability to set points for individual
triggers. This can allow for different point totals based on which OR trigger
is completed.
The GoalGlobal array is comprised of the Primary, Prevent and Bonus goals in
that order. It is possible for more than 3 sets to exist, potentially up to 7
though I've never seen it. The remaining sets are MissionOver, Extra1, Extra2,
Extra3. For sizing in this document I've assumed there's only ever 3 sets, and
that's the minimum allowed per the spec. What's used as the flag for the extra
goals is if the Name is used; if it's not blank, it was saved.
-- Team --
This section also repeats 10 times, once for each team. In here we have
obviously the Name, allies the end-of-mission messages, and the other details
for them.
Allegiance can have the following values:
00 Hostile
01 Friendly
02 Neutral
EndOfMissionMessages are 64 character strings, not terminated. It's really a
[3,2][64] array, as the strings are PrimaryComplete1, PrimaryComplete2,
PrimaryFailed1, PrimaryFailed2, Outstanding1, Oustanding2.
-- Briefing --
Okay, we finally get to the briefing. The command listing itself I'll leave
for the list definition, that'll also have the variable listing as well. The
first value is the duration of the briefing itself in ticks. XWA uses 0x19
ticks per second. CurrentTime I believe is mainly used by the game and editor,
and is overwritten regardless of what is here.
Each Event is marked by the briefing time (in ticks) and the EventType,
followed by 0-4 additional variables. These variables are to be omitted if
they are not used for a given command. The last four active bytes in the Event
array is always 0F 27 22 00, which is the EndBriefing command at time 9999, and
usually isn't the last four bytes in the section (that would be a rather busy
briefing).
The StartsLength value is the number of SHORTs, Variables included, that occur
at Time=0. EventsLength is the total number of SHORTs occupied in the Events
array up to and including the EndBriefing command. Don't know what Tile is.
The Icons are essentially the internal clipboard used to keep track of them in
the legacy editor. Unsure if there's any use in-game, but they are read and
were written to file if not purged beforehand.
The Tag and String arrays are not fixed sizes. They have a minimum length of
256 bytes, which is the case of every length being zero. If a Length is zero,
then the CHAR[] is omitted. That's the real highlight right there.
-- EditorNotes --
There's really nothing to speak of here. It's a long string used only in the
editor.
-- MessageNotes --
64 strings, all 100CHAR null-termed. Doesn't seem to be much else to it. These
were used as notes for the voice actors.
-- DescriptionNotes --
Appears to be the exact same thing as MessageNotes, but instead applying to
the Description strings in the order Successful, Description and Failed.
-- FGGoalStrings --
Simple, fast, and the majority of the time empty. Instead of using the default
strings on the goal listing you can define your own here. This section is
dynamic in size, with * being 1 if 00, 64 otherwise.
The array structure is 3 strings per goal, 8 goals per FG. Incomplete, Complete
and Failed in that order.
-- GlobalGoalStrings --
For the most part, the same as above. Define your own strings, this
section is always here in the same dynamic manner and repeats 10 times, once
for each team. As before * is 1 if 00, 64 otherwise.
The array structure here is 3 strings per Trigger, 4 Triggers per goal, 7 goals
per Team. Strings are Incomplete, Complete and Failed in that order. Goals are
Primary, Prevent and Secondary (Bonus) in that order. Even though the Goals
only use the first 3 sets, here all 7 are defined, though the last 4 will just
be the empty lengths.
Prevent Failed is always 00. Secondary Incomplete and Failed are always 00.
-- OrderStrings --
XWA also allows custom strings for craft orders that are displayed in the CMD
and in-flight craft listings. Array appears to be sized for 192 craft, even
though that's beyond the mission limits. As in the previous sections, * is 1 if
00, 64 otherwise.
Array follows same pattern as Orders; R1O1, R1O2...
-- Descriptions --
It's a few really long strings, Successful, Failed and Mission Description in
that order.
There you have it, the XWA Mission file format. Enjoy :P
=====
List Definitions
Hangar
00 Tutorial
01 Obstacle
02 Melee
03 Exercise
04 Skirmish
05 Death Star run
06 Calamari Cruiser
07 Family Mission
BriefingOfficer
00 Devers
01 Kupalo
02 Zaletta
03 Wedge
04 Nammo
05 Yamarus
06 Ackbar
07 Aeron
08 Emkay
09 Antan
0A Emon
0B Galin
0C Tomaas
0D Dunari
BriefingLogo
04 Defiance
05 Liberty
06 Independence
07 Family
08 Phantom Squadron [will only see "Squadron", no logo]
09 Vector Squadron
0A Rogue Squadron
0B Family Transport
DesignationTeam
00 Team1
01 Team2
02 Team3
03 Team4
04 Team5
05 Team6
06 Team7
07 Team8
08 All
09 Others
0A Hostile
0B Friendly
0C Rebel
0D Imperial
FF None
Designation
00 Command Ship
01 Base
02 Station
03 Mission Critical Craft
04 Convoy Craft
05 Strike Craft
06 Reload Craft
07 Primary Target
08 Secondary Target
09 Tertiary Target
0A Research Facility
0B Manufacturing Facility
0C HYP from Region 1
0D HYP from Region 2
0E HYP from Region 3
0F HYP from Region 4
10 HYP to Region 1
11 HYP to Region 2
12 HYP to Region 3
13 HYP to Region 4
14 HYP from Any Region
15 HYP to Any Region
CraftType
00 None
01 X-wing
02 Y-wing
03 A-wing
04 B-wing
05 TIE Fighter
06 TIE Interceptor
07 TIE Bomber
08 TIE Advanced
09 TIE Defender
0A IRD Fighter
0B Toscan Fighter
0C Missile Boat
0D T-wing
0E Z-95 Headhunter
0F R-41 Starchaser
10 Assault Gunboat
11 Shuttle
12 Escort Shuttle
13 System Patrol Craft
14 *Scout Craft
15 Stormtrooper Transport
16 Assault Transport
17 Escort Transport
18 Tug
19 Combat Utility Vehicle
1A Container A
1B Container B
1C Container C
1D Container D
1E Heavy Lifter
1F Mole Miner
20 Bulk Freighter
21 Cargo Ferry
22 Modular Conveyor
23 *Container Transport
24 Medium Transport
25 Murrian Transport
26 Corellian Transport
27 Millenium Falcon
28 Corellian Corvette
29 Modified Corvette
2A Nebulon-B Frigate
2B Modified Frigate
2C *C-3 Passenger Liner
2D *Carrack Cruiser
2E Strike Cruiser
2F Escort Carrier
30 Dreadnaught
31 MC80a Cruiser
32 MC40a Light Cruiser
33 Interdictor Cruiser
34 Victory-class Star Destroyer
35 Imperator-class Star Destroyer
36 Executor-class Star Destroyer
37 Container E
38 Container F
39 Container G
3A Container H
3B Container I
3C Platform A
3D Platform B
3E Platform C
3F Platform D
40 Platform E
41 Platform F
42 Asteroid R&D Station
43 Asteroid Laser Battery
44 Asteroid Warhead Battery
45 X/7 Factory
46 Satellite 1
47 Satellite 2
48 Satellite 3
49 *Satellite 4
4A *Satellite 5
4B Mine A
4C Mine B
4D Mine C
4E Gun Emplacement
4F *Mine 5
50 Probe A
51 Probe B
52 *Probe 3
53 Nav Buoy A
54 Nav Buoy B
55 Hyper Buoy
56 Asteroid Field
57 Planet
58 Rendezvous Buoy
59 Cargo Canister
5A Shipyard
5B Repair Yard
5C *Modified Strike Cruiser
5D Lancer Frigate
5E Bulk Cruiser
5F Assault Frigate
60 Corellian Gunship
61 Imperial Landing Craft
62 Assault Shuttle
63 Marauder Corvette
64 Star Galleon
65 Imperial Research Ship
66 Luxury Yacht 3000
67 Ferryboat Liner
68 Modified Action Transport
69 Mobquet Transport
6A Xiytiar Transport
6B Freight Transport/C
6C Freight Transport/H
6D Freight Transport/K
6E YT-2000
6F YT-2400
70 Suprosa
71 Skipray Blastboat
72 T/e m1
73 T/e m2
74 T/e m3
75 T/e m4
76 T/e m5
77 Cloakshape Fighter
78 Razor Fighter
79 Planetary Fighter
7A Supa Fighter
7B Pinook Fighter
7C Booster Pack
7D Preybird Fighter
7E *StarViper
7F Firespray
80 Pursuer
81 Golan 1
82 Golan 2
83 Golan 3
84 Derilyn Platform
85 Sensor Array
86 Comm Relay
87 Space Colony 1
88 Space Colony 2
89 Space Colony 3
8A Casino
8B Cargo Facility 1
8C Cargo Facility 2
8D Asteroid Mining Plant
8E Processing Plant
8F Rebel Platform
90 Imperial Research Center
91 Family Base
92 Family Repair Yard
93 Pirate Shipyard
94 Industrical Complex
95 *Pirate Junkyard Base
96 Escape Pod 1
97 Pressure Tank
98 Container J
99 Container K
9A Container L
9B Container Hangar
9C Large Gun Emplacement
9D Large Gun/Warhead Emplacement
9E Proximity Mine A
9F Proximity Mine B
A0 *Homing Mine A
A1 Homing Mine B
A2 New Laser Battery
A3 New Ion Battery
A4 Cargo Freighter
A5 *Cargo Freighter 2
A6 *Cargo Freighter 3
A7 *Cargo Freighter 4
A8 *Cargo Freighter 5
A9 Cargo Tanker
AA *Cargo Tanker 2