-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMission_XvT.txt
1324 lines (1180 loc) · 39.4 KB
/
Mission_XvT.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
XvT Mission File
Author: Michael Gaisser ([email protected])
Contributor: "JB" (Random Starfighter) ([email protected])
Site: https://github.com/MikeG621
Updated: 2024.06.08
=====
This is going to be a very lengthy definition of the XvT mission file. Due
to the size of the files we'll be dealing with, I'll be using the extended
structure write-up first seen in the TIE95 Mission File definition. 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, equatable to a single resource
in a LFD with multiple subheaders. For the purpose of these file descriptions,
each section will will begin 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.
=====
XvT Mission Overview
The mission files are found in the \TRAIN directory, have the .TIE file
extension and no required naming convention, just that the appropriate .LST
has the filename spelled correctly to be able to play it. The LEC naming
convention for the files is a little more involved than in TIE95 and varies
depending on the type of mission you're creating. The naming convention doesn't
have any effect on the game, so I'm not going to detail it here.
=====
XvT 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. Rest assured you have everything here to piece together a mission
file from scratch, but please note offsets if creating read/write procedures.
--
FileHeader
FlightGroup[NumFGs]
Message[NumMessages]
GlobalGoal[10]
Team[10]
Briefing[8]
STR(64)[NumFGs,8,3] FGGoalStrings
GlobalGoalStrings[10]
#if (PlatformID==12) (XvT)
STR(1024) MissionDescription
#elseif (PlatformID==14) (BoP)
STR(4096)[3]
#endif
--
struct FileHeader (size 0xA4)
{
0x00 SHORT PlatformID
0x02 SHORT NumFGs
0x04 SHORT NumMessages
0x06 BYTE *TimeLimitMin (was Unknown1)
0x07 BYTE *TimeLimitSec
0x08 BYTE WinType (was Unknown2)
0x09 BYTE RndSeed
0x0A BYTE *Rescue
0x0B BOOL *AllWayShown (was Unknown3)
0x0C BYTE[8] *Vars
0x14 STR(20)[4] IffNames3-6
0x64 BYTE MissionType
0x65 BOOL GoalsUnimportant
0x66 BYTE TimeLimitMinutes
0x67 BYTE TimeLimitSeconds
}
struct FlightGroup (size 0x562)
{
0x000 STR(20) Name
0x014 Role[4] Roles
0x028 STR(20) Cargo
0x03C STR(20) SpecialCargo
0x050 BYTE SpecialCargoCraft
0x051 BOOL RandomSpecialCargo
0x052 BYTE CraftType (enum)
0x053 BYTE NumberOfCraft
0x054 BYTE Status1 (enum)
0x055 BYTE Warhead (enum)
0x056 BYTE Beam (enum)
0x057 BYTE IFF
0x058 BYTE Team
0x059 BYTE GroupAI (enum)
0x05A BYTE Markings (enum)
0x05B BYTE Radio (enum)
0x05C BYTE (Unused)
0x05D BYTE Formation (enum)
0x05E BYTE FormationSpacing
0x05F BYTE GlobalGroup
0x060 BYTE (Unused) (was LeaderSpacing)
0x061 BYTE NumberOfWaves
0x062 BYTE WavesDelay (was Unknown1)
0x063 BYTE StopArrivingWhen (enum)
0x064 BYTE PlayerNumber
0x065 BYTE ArriveOnlyIfHuman
0x066 BYTE PlayerCraft
0x067 BYTE Yaw
0x068 BYTE Pitch
0x069 BYTE Roll
0x06A BOOL (Unused, PermaDeathEnabled)
0x06B BYTE (Unused, PermaDeathID)
0x06C BYTE (Unused)
0x06D BYTE ArrivalDifficulty (enum)
0x06E TPair Arrival1And2
0x079 TPair Arrival3And4
0x084 BOOL Arrival12OrArrival34
0x085 BYTE RandomArrivalDelayExtraMinutes
0x086 BYTE ArrivalDelayMinutes
0x087 BYTE ArrivalDelaySeconds
0x088 TPair Departure
0x093 BYTE DepartureDelayMinutes
0x094 BYTE DepartureDelaySeconds
0x095 BYTE AbortTrigger (enum)
0x096 BYTE RandomArrivalDelayExtraSeconds
0x097 BYTE (IOReserved)
0x098 SHORT (Editor use, CurrentMothership) (was Unknown5)
0x09A BYTE ArrivalMothership
0x09B BYTE ArriveViaMothership
0x09C BYTE DepartureMothership
0x09D BYTE DepartViaMothership
0x09E BYTE AlternateMothership
0x09F BYTE AlternateMothershipUsed
0x0A0 BYTE CapturedDepartureMothership
0x0A1 BYTE CapturedDepartViaMothership
0x0A2 Order[4] Orders
0x1EA TPair SkipToOrder4
0x1F5 GoalFG[8] Goals
0x466 Waypt[4] Waypoints
0x516 BOOL (Editor use, WaypointShown) (was Unknown17)
0x517 BYTE (Unused)
0x518 BYTE[8] (Editor use, BriefingLinked) (was Unknown18)
0x520 BOOL PreventCraftNumbering
0x521 BYTE DepartureClockMinutes
0x522 BYTE DepartureClockSeconds
0x523 BYTE Countermeasures
0x524 BYTE CraftExplosionTime
0x525 BYTE Status2 (enum)
0x526 BYTE GlobalUnit
0x527 BYTE[8] (Editor use, BriefingStart) (was Unknown22-29)
0x52F BYTE Handicap
0x530 BYTE[8] OptionalWarheads
0x538 BYTE[4] OptionalBeams
0x53E BYTE[3] OptionalCountermeasures
0x542 BYTE OptionalCraftCategory
0x543 BYTE[10] OptionalCraft
0x54D BYTE[10] NumberOfOptionalCraft
0x557 BYTE[10] NumberOfOptionalCraftWaves
}
struct Role (size 0x4)
{
0x0 CHAR[1] DesignationTeam
0x1 CHAR[3] Designation (enum)
}
struct TPair "TriggerPair" (size 0x0B)
{
0x00 Trigger Trigger1
0x04 Trigger Trigger2
0x08 BYTE[2] (Unused)
0x0A BOOL T1OrT2
}
struct Trigger (size 0x4)
{
0x0 BYTE Condition (enum)
0x1 BYTE VariableType (enum)
0x2 BYTE Variable
0x3 BYTE Amount (enum)
}
struct Order (size 0x52)
{
0x00 BYTE Order (enum)
0x01 BYTE Throttle
0x02 BYTE[4] Variables (contains Unknown6-7)
0x06 BYTE Target3Type (enum VariableType)
0x07 BYTE Target4Type (enum VariableType)
0x08 BYTE Target3
0x09 BYTE Target4
0x0A BOOL Target3OrTarget4
0x0B BYTE (Unused) (was Unknown8)
0x0C BYTE Target1Type (enum VariableType)
0x0D BYTE Target1
0x0E BYTE Target2Type (enum VariableType)
0x0F BYTE Target2
0x10 BOOL Target1OrTarget2
0x11 BYTE (Unused) (was Unknown9)
0x12 BYTE Speed
0x13 STR(16) Designation
}
struct GoalFG (size 0x4E)
{
0x00 BYTE Argument
0x01 BYTE Condition (enum)
0x02 BYTE Amount (enum)
0x03 SBYTE Points
0x04 BOOL[10] EnabledForTeam Unknown10 through Unknown15
0x0E BYTE TimeLimit Seconds * 5
0x0F (63) (Reserved)
}
struct Waypt (size 0x2C)
{
0x00 SHORT[4] StartPoints
0x08 SHORT[8] Waypoints
0x18 SHORT Rendezvous
0x1A SHORT Hyperspace
0x1C SHORT[8] Briefings
}
struct Message (size 0x74)
{
0x00 SHORT MessageIndex
0x02 CHAR[64] Message
0x42 BYTE[10] SentToTeams
0x4C TPair[2] Triggers
0x62 STR(16) EditorNote
0x72 BYTE Delay
0x73 BOOL Triggers12OrTriggers34
}
struct GlobalGoal (size 0x80)
{
0x00 SHORT NumGoals (3)
0x02 GoalGlobal[3] Goals
}
struct GoalGlobal (size 0x2A)
{
0x00 TPair[2] Triggers
0x16 STR(16) Name
0x26 BYTE Version
0x27 BOOL Triggers12OrTriggers34
0x28 BYTE Delay
0x29 SBYTE Points
}
struct Team (size 0x1E7)
{
0x000 SHORT (Reserved) (1)
0x002 STR(16) Name
0x01A BOOL[10] Allegiances
0x024 CHAR[6][64] EndOfMissionMessages
0x1A4 BYTE[3] EomMessageDelays
}
struct Briefing
{
0x000 SHORT RunningTime
0x002 SHORT CurrentTime
0x004 SHORT StartEvents
0x006 SHORT EventsLength
0x008 SHORT Tile
0x00A Event[] Events
0x32A BOOL[10] ViewedByTeam
0x334 BrfStr[32] Tags
BrfStr[32] Strings
}
struct Event
{
0x0 SHORT Time
0x2 SHORT Type (enum EventType)
0x4 SHORT[] Variables
}
struct BrfStr
{
0x0 SHORT Length
0x2 CHAR[Length]
}
struct GlobalGoalStrings (size 0x1500)
{
0x0000 STR(64)[3,4,3] TriggerString
}
=====
XvT 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.
Supplementary definitions and lists follow after the detail.
-- FileHeader --
Much like TIE95, the first 6 bytes are well-defined. The PlatformID byte can be
one of two values.
12 XvT
14 BoP
The only known difference between platforms is seen at the very end, and a few
more Unknown values
RndSeed is an initializer to the pseudo-random number generator, for the
purpose of randomizing backdrops and asteroid spawns. It helps ensure that
these features are synchronized in multiplayer.
IffNames is a list of four custom strings for IFF #3 to 6. It is used
exclusively for displaying IFF global goals in the in-game goal overlay. The
first two IFF names (Rebel, Imperial) are accessed directly from localized
strings found in "strings.txt" and cannot be modified in this list. If the
first character of a string is "1", that first character is ignored.
The MissionType value defines the mission as either a Training (normal) mission
or a combat mission.
00 Training
01 Unknown
02 Melee
03 Multiplayer Training
04 Multiplayer Combat
The unknown mission type seems to be some kind of prototype melee. End mission
combat statistics are not recorded in the pilot file. There may be other
differences too.
GoalsUnimportant indicates that a mission outcome can never be resolved.
Neither failure or victory is possible. Typically used for melee scenarios
where accumulation of points is all that matters.
Following that are the TimeLimit values, and a seemingly bunch of blank space.
-- FlightGroup --
The first string is obvious. The Pilot string from TIE95 has been removed, and
instead there's a new section for craft roles. This is where the specialized
messages are controlled. The full listing will be below. Roles can only be
set for Imperials, Rebels, Team 3 and Team 4. It is also possible to set a
role for all teams. The Designation stored is only the first three letters of
the full item. The Team is a CHAR and uses the DesignationTeam enum.
It is unknown if the remaining teams can have roles, but they have been seen
in LEC-produced missions. An alternate usage seen in LEC missions is defining
an AI level across both the Team and Designation fields, instead using this
area as a different string value. The effect of this is unknown, as the strings
seen don't match the craft's, but it's possible that it may instead give the
Designation to a team, it may give it to a certain AI level. It may also be
garbage info and not do anything.
Now we're back to traditional values, with both Cargo strings, and a bunch of
familiar values you've seen in TIE95. The only item inserted here is Team,
which should be easy enough to figure out. Radio operates differently
in XvT. Instead of a binary switch, the value can be set to any team or
player, 1-8. The full listing is defined later.
Formation is obvious, but I'll explain the next couple. FormationSpacing is
the spacing between the craft. GlobalGroup is a great way grouping (gasp)
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. LeaderSpacing is how far ahead of the rest of the flight group the
flight leader is. Having a flight leader way out front can absorb fire and let
the rest of the group fire salvos before being attacked themselves.
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.
StopArrivingWhen is a previously unknown value. It is a special condition that
that is checked any time a new wave is supposed to spawn. If the condition is
met, the wave will not spawn, and all remaining waves will be flagged as having
come and gone. There are 4 possible values. See the enum listing.
Yaw, Pitch and Roll values only work for Space Objects (mines, buoys, etc), and
like TIE the flight engine automaticlly adds a -90° (nose down) pitch angle.
Another obvious value, then the Arrival Triggers. In sentence form, Triggers
are "if Amount of VariableType Variable are Condition, then true". The Arrival
and Departure triggers are just that. The Alternate triggers are there for if
the originals can't be satisfied (mothership isn't in play). *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
detmines if both trigger pairs must evaluate to true or not. The ARR_DELAY
works as expected, with the countdown starting after the Trigger has been
fired. The DEP_DELAY changed from TIE, in that it now too starts the countdown
from the firing of the Trigger. The AbortTrigger value applies only to
individual craft, not the entire flight group. The Arrive/DepartViaMothership
values when false will cause craft to use hyperspace.
Two obscure values, RandomArrivalDelayExtraMinutes and Seconds control extra
delay time that stacks additively with the ordinary arrival delay once the
trigger is activated. The extra delay is calculated as seconds. If Randomize
is enabled in the mission options, the extra delay will be anything from zero
to the specified extra delay. If Randomize is disabled, it will always choose
half the total delay.
Orders, they're what make the world go 'round. Pick the Order from the list
and go from there. Throttle is expressed as (10 - %Throttle / 10). So 100%
Throttle would be 00, 90% would be 01, 80% would be 02, etc. 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 Flight Group's 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). The Designation
string is a note that will show in the CMD as the craft's orders when you
target it.
XvT also gives us the first attempt at a dynamic mission with the
SkipToOrder4 triggers. As you can guess, if this trigger fires the FG will
immediately jump to their Order[3]. There is a number of uses for this, but
that's best saved for a mission creation guide.
Goals are for that specific flight group. In XvT you have 8 for a given FG,
and all can be given point values, stored as (Points / 250), yielding a range
of [-32000, +31750]. A new value in XvT is the Argument, which is defined as
00 must
01 must NOT
02 BONUS must
03 BONUS must NOT
The Team values lets you assign to which team the goals apply, and the Enabled
is just another boolean on/off switch. One of the Unkonwns in the goal may be
time related, as XvTEd has a "Time?" box, but this isn't something I've played
with yet. For the love of God use these goals instead of Global Goals if
possible.
Waypoints are pretty simple, the array is X, Y, Z and Enabled in that order.
The values are expressed as (Coordinate * 160), such that a value of 50 is
0.50km, A0 is 1.00km, etc. The Enable value just tells the application if it
needs to pay attention to it or not and is boolean, although it does occupy a
SHORT. If more than one StartPoint is enabled, the application will pick one to
use. Note that there are 8 different briefing WPs you can use, one for each.
Now here is where the bulk of the new material has been placed.
PreventCraftNumbering is a bool. If enabled, multiple craft in a wave (or global
unit) will not have craft numbering. (For example, Alpha instead of Alpha 1,
Alpha 2, etc.)
DepartureClockMinutes and DepartureClockSeconds are previously unknown values
that appear to control an absolute departure time based on the total elapsed
time from the start of the mission, rather than the trigger activation.
If the time has been met or exceeded, the flight group will withdraw.
Countermeasures, this is a very short list of
00 None
01 Chaff
02 Flare
03 Cluster Mine (unused/extra type, behaves like a flare)
CraftExplosionTime acts strangely, and I haven't pinned it down exactly yet.
It does affect how long it takes for a dying craft to dissappear, 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 craft numbering.
The Optional values are the alternate loadouts that the player can select when
going over his 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
-- Section 2a - Backdrops --
Backdrops (stars, planets, etc) are special types of flight groups. Value
definitions change for these purposes, which will be laid out here.
The primary value here is Status1, which becomes the Backdrop value. This
determines the graphic used. The majority of other values are ignored.
-- Message --
A simple section, there is the message string, the SendTo* array, the triggers,
a delay, and the *Or* value. The EditorNote serves no purpose within the game
itself, and is merely there for bookkeeping use in the editor. The only special
item of note is that the Delay value is evaluated to (seconds / 5), such that
01 is 5s, 03 is 15s, etc.
The message string actually holds a second purpose, that is defining the color
of the message itself. The default message color is red, if the message starts
with '1' it is green, '2' is blue and '3' is yellow. The number will not appear
when displayed in-game.
Technical note: the game will allow the full 64 characters to be used without
any negative side effects. The final character is not required to be a null
terminator. It will overflow into the SendTo* array, but most of it is null
anyway, or is a non-printable char. Even so there's a hard limit of 70 chars
that are copied into the actual message log.
The Delay is multipled by 5 to get the number of seconds, resulting in a
maximum delay of 1275s or 21:15.
-- GlobalGoal --
When FG goals just won't cut it, that's what there are for. Nothing really new
here, Points is the same as GoalFG.Points. The array is Primary, Prevent and
Secondary in that order. This Section is repeated 10 times, once for each team.
-- Team --
This section also repeats 10 times, once for each team. In here we have
obviously the Name, its alliances (boolean values), and the mission goal
messages. There's enough blank space at the end of the section for another
string, but as far as I know it's never used. The goal messages also follow
the same color behaviour as in-flight messages.
EndOfMissionMessages are 64 character strings, not terminated. It's really a
[3,2][64] array, as the strings are PrimaryComplete1, PrimaryComplete2,
PrimaryFailed1, PrimaryFailed2, SecondaryComplete1, SecondaryComplete2.
-- 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. XvT uses 0x14
ticks per second.
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.
The Tag and String arrays are not fixed sizes. They have a minimum length of
64 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.
Technical note: Attempting to render a text tag with a string character
length >= 40 will crash the game.
-- 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 a
fixed size, and occurs once for each Flight Group.
The array structure is 3 strings per goal, 8 goals per FG. Incomplete, Complete
and Failed in that order.
-- GlobalGoalString --
For the most part, the same as FGGoalStrings. Define your own strings, this
section is always here with a fixed size and repeats 10 times, once for each
team.
The array structure here is 3 strings per Trigger, 4 Triggers per goal, 3 goals
per Team. Strings are Incomplete, Complete and Failed in that order. Goals are
Primary, Prevent and Secondary in that order. So it starts with PrimT1Inc, then
PrimT1Comp and PrimT1Fail before moving to PrimT2Inc, etc.
Prevent Failed is always empty. Secondary Incomplete and Failed are always
empty.
There's a bunch of empty space, so even though the strings themselves take up
0x900, there's another 0xC00 to skip over.
-- MissionDescription --
As noted in the structure listing, this section differs depending on platform.
It's a really long string(s), it's so hard. For BoP, the array is
SuccessfulDebrief, FailedDebrief, MissionDescription in that order.
There you have it, the XvT Mission file format. Enjoy :P
=====
List Definitions
DesignationTeam
'1' Team1
'2' Team2
'3' Team3
'4' Team4
'5' Team5
'6' Team6
'7' Team7
'8' Team8
'A' All
'O' Others
'H' Hostiles
'F' Friendly
FF None
Designation (number values shown are the XWA mapping)
FF NONe
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
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 Unused
0B Unused
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 Unused
20 Bulk Freighter
21 Cargo Ferry
22 Modular Conveyor
23 *Container Transport
24 Medium Transport
25 Murrian Transport
26 Corellian Transport
27 Unused
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 Mon Calamari Cruiser
32 Light Mon Calamari 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 Unused
49 Unused
4A Unused
4B Mine A
4C Mine B
4D Mine C
4E Gun Emplacement
4F Unused
50 Probe A
51 Probe B
52 Unused
53 Nav Buoy A
54 Nav Buoy B
55 Unused
56 Asteroid Field
57 Planet
58 Unused
59 Unused
5A Shipyard
5B Repair Yard
5C Modified Strike Cruiser
Status
00 None
01 2X Warheads
02 1/2 Warheads
03 No Shields
04 1/2 Shields
05 No Turrets
06 No Hyperdrive
07 Shields 0%, charging
08 Shields added or 200%
09 Hyperdrive added
0A Unknown
0B Unknown
0C (200% Shields)
0D Shields 50%, Charging
0E (No Turrets)
0F Unknown
10 Shields + Hyperdrive added
11 Unknown
12 200% Shields
13 (50% Shields)
14 Invincible
15 Infinite Ammo
Notes:
0x05 and 0x0E (both No Turrets) will deactivate all gun turrets on a ship.
Fixed forward-firing cannons are unaffected. 0x0E goes further, disabling the
scripts that are responsible for managing turret behavior. Could possibly save
CPU cycles, but both are otherwise identical from a gameplay perspective.
0x15 (Infinite Ammo) applies to cannon energy, warheads, and countermeasures.
Other duplicates are just that, essentially aliases that do the same thing.
The unknowns don't seem to be used at all.
Warhead
00 None
01 Space Bomb
02 Heavy Rocket
03 Concussion Missile
04 Torpedo
05 Advanced Concussion Missile
06 Advanced Torpedo
07 Mag Pulse Torpedo
08 Ion Torpedo (extra/unknown, looks like mag pulse yet impacts like advanced missile)
Beam
00 None
01 Tractor Beam
02 Jamming Beam
03 Decoy Beam
04 Energy Beam (extra/unknown, appears to do nothing)
GroupAI
00 Rookie (None)
01 Officer
02 Veteran
03 Ace
04 Top Ace
05 Jedi (Invincible)
Markings
00 Red (TIE - None)
01 Gold (TIE - Red)
02 Blue (TIE - Gold)
03 Green (TIE - Blue)
Radio
00 None
01 Team 1 (Imperial)
02 Team 2 (Rebel)
03 Team 3
04 Team 4
05 Team 5
06 Team 6
07 Team 7
08 Team 8
09 Player 1
0A Player 2
0B Player 3
0C Player 4
0D Player 5
0E Player 6
0F Player 7
10 Player 8
Formation
00 Vic
01 Finger Four
02 Line Astern
03 Line Abreast
04 Echelon Right
05 Echelon Left
06 Double Astern
07 Diamond
08 Stack
09 High X
0A Vic Abreast
0B High Vic
0C Reverse High Vic
0D Reverse Line Astern
0E Stacked Low
0F Abreast Right
10 Abreast Left
11 Wing Forward
12 Wing Back
13 Line Astern Up
14 Line Astern Down
15 Abreast V
16 Abreast Inverted V
17 Double Astern Mirror
18 Double Stacked Astern
19 Double Stacked High
1A Diamond 1
1B Diamond 2
1C Flat Pentagon
1D Side Pentagon
1E Front Pentagon
1F Flat Hexagon
20 Side Hexagon
21 Front Hexagon
ArrivalDifficulty
00 All
01 Easy
02 Medium
03 Hard
04 Medium, Hard
05 Easy, Medium
06 Never
StopArrivingWhen
00 No condition
01 Any of this FG completes mission
02 Team mission outcome is victory
03 Team mission outcome is failure
Condition
00 Always (true)
01 Arrived
02 Destroyed
03 Attacked
04 Captured
05 Inspected
06 Finished Being Boarded
07 Finished Docking
08 Disabled
09 Survived (exist)
0A None (false)
0B Unused
0C Completed mission
0D Completed Primary Goals
0E Failed Primary Goals
0F Completed Secondary Goals (unused)
10 Failed Secondary Goals (unused)
11 Completed Bonus Goals
12 Failed Bonus Goals
13 Dropped off
14 Reinforced
15 0% Shields
16 50% Hull
17 Out of Warheads
18 Cannon system disabled
19 be dropped off
1A Destroyed in 1 hit (broken)
1B NOT be disabled
1C NOT be captured
1D Come and go w/o Inspection
1E Begin being boarded
1F NOT being boarded
20 begin docking
21 NOT begin docking
22 50% Shields
23 25% Shields
24 75% Hull
25 25% Hull
26 Always Failed
27 Inspect/Pickup team modifier
28 Unused
29 be all Player Craft
2A be all AI Craft
2B come and go
2C be bagged
2D withdraw
2E be carried away
Notes:
0x09 (Survived) Checks the number of craft that have survived at the moment the
trigger is evaluated. Includes craft that haven't arrived yet. Excludes craft
that have been destroyed by any means.
0x0D/0x0E (Completed/Failed Primary Goals) and 0x11/0x12 (Completed/Failed
Bonus Goals) If VariableType is Team, it checks the mission outcome for that
team. In all other cases, it is true if any team has achieved victory.
0x0F and 0x10 (Completed/Failed Secondary Goals) don't do anything.
0x18 (Cannon system disabled) is true when the cannons are missing or disabled.
Capital ships don't have a cannon subsystem, so it will always be true for
them. Mag pulse does not damage the cannon subsystem of AI craft, but it will
for players, so it can be used to detect a mag pulse hit on a player craft.
0x19 (Be dropped off) Never seems be be true, either as a trigger or goal.
0x1A (Destroyed in 1 hit) A broken condition. It's supposed to be "come and
go without being attacked" but the implementation is broken in a few ways. For
trigger purposes, when it comes-and-goes, it will still evaluate to true even
if attacked by the player. It is only false if attacked by AI, and only AI.
When used as a goal, being attacked by anything (player or AI) is an anti-
condition and will be immediately detected, resulting in instant failure. But
there's another bug. If the player destroys the craft very quickly ("in 1 hit"
such as when using warheads), then "come-and-go" takes precendence over
"attacked" and evaluates to success, even though it was attacked. But this bug
only applies if the FG is one craft of one wave.
0x1B (Not be disabled) A "come and go" condition, but is half broken. For
triggers, it will activate even if the craft was disabled. However it does seem
to work correctly as a goal, since being disabled is an anti-condition.
0x1C (Not be captured) A "come and go" condition that actually seems to work
correctly.
0x1D (Come and go w/o Inspection) Not as straightforward as it would seem.
Statistics per team are only tracked if the craft actually arrives, then leaves
or is destroyed. Global statistics are only tracked if the craft comes and goes
by proxy (mothership destroyed prior to launch, or departure ship destroyed
after landing).
If evaluated as a FG goal, or as a trigger paired with Condition 0x27, it uses
the per-team statistic. Otherwise it uses the global statistic.
0x1F (Not being boarded) A "come and go" condition that is tracked if the craft
was never finished being boarded by another craft.
0x21 (Not begin docking) A "come and go" condition that is tracked if the craft
never finished boarding another craft.
0x26 (Always Failed) Evaluates to failure, as opposed to merely false. If used
for a goal, it will cause immediate failure.
0x27 (Inspect/Pickup team modifier) The game tracks Inspection/Pickup
statistics in two ways. The default way is a grand total, which all teams
contribute to. If any one team inspects a neutral, it's considered inspected by
everyone for the purposes of all basic triggers. This modifier lets you check
a specific team, and how much. It can only be used for particular conditions:
Inspection, Come and Go Without Inspection, or Be Picked Up.
Triggers operate in pairs (A:B). This condition is intended to be used in the B
trigger, which modifies the A trigger to access statistics for a specific team
instead the grand total. Trigger B's VariableType must be set to Team. Variable
must be set to the team index. Amount doesn't matter. The and/or boolean
doesn't matter.
FG Goals don't operate in pairs, instead they automatically use the team they
check against. It's basically an implicit team modifier, for the few conditions
that accept them.
0x29 (be all Player Craft) and 0x2A (be all AI Craft) When combined with a
VariableType of IFF or Team, has a special interaction. Instead of counting all
craft, it counts the number of active player slots out of the total number of
playable FGs. This allows mission design to tailor difficulty based on number
of active players.
0x2C (bagged) Similar to capture. The distinction is that capture is logged
instantaneously, but being bagged requires the captured craft to enter hangar
or hyperspace out. If a craft is picked up (such as by a Heavy Lifter), it is
captured by the craft carrying it.
0x2E (be carried away) This is a pick-up condition, but is distinct from bagged
that it can only operate on friendly craft. They must not be captured.
VariableType
00 None