forked from kronosaur/Transcendence
-
Notifications
You must be signed in to change notification settings - Fork 0
/
KorolovShipping.xml
1666 lines (1419 loc) · 51.9 KB
/
KorolovShipping.xml
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
<?xml version="1.0" encoding="utf-8"?>
<TranscendenceModule>
<!-- Korolov Shipping
Type holds all global data associated with Korolov Escort missions
GLOBAL DATA
level: Player's level:
Nil = Not yet initialized
-1 = Blacklisted
1 = Apprentice
2 = Journeyman
3 = Master
4 = Legend
opsIntroDone: If True, no need for ops intro.
record{shipUNID}: Escort record for given freighter
({successful} {unsuccessful})
recordStrongholds: Number of Charon primary strongholds destroyed
xp: Number of experience points.
-->
<Type UNID="&unidKorolovShipping;">
<StaticData>
<assistantDirectorTable>
( ; last name
("Ash" )
("Burke" )
("Czerniawski" )
("Gordievsky" )
("Jones" )
("Leung" )
("Price" )
("Penkovsky" )
("Reagan" )
("Sheppard" )
("Sorge" )
("Valerii" )
)
</assistantDirectorTable>
</StaticData>
<Events>
<GetGlobalAchievements>
(block (theList)
(if (typGetData &unidKorolovShipping; 'level)
(block (
(successList (plyGetKeyEventStat gPlayer 'missionSuccess Nil "* +korolov; +escort;"))
(failureList (plyGetKeyEventStat gPlayer 'missionFailure Nil "* +korolov; +escort;"))
)
(setq theList (list
(list
"Korolov rank"
(typTranslate &unidKorolovShipping; 'PlayerRank)
)
(list
"Korolov shipping missions"
(rpgMissionAchievementString (count successList) (count failureList))
"missions & activities"
)
))
)
)
theList
)
</GetGlobalAchievements>
</Events>
<Language>
<Text id="PlayerRank">
(block (
(level (korGetPlayerLevel))
)
(switch
(not level) "No rank"
(= level -1) "Blacklisted"
(= level 0) "None"
(= level 1) "Apprentice"
(= level 2) "Journeyman"
(= level 3) "Master"
(= level 4) "Legend"
(cat "ERROR: Korolov level: " level)
)
)
</Text>
<Text id="SuccessDebrief:FirstMission">
"Excellent work, captain! You seem to have the aptitude to handle these missions.
Everytime you successfully escort a freighter you will earn money and increase your skills.
"We've deposited %reward% in your account."
</Text>
<Text id="SuccessDebrief:Apprentice:1">
(cat
"\"Excellent work, captain! Your skills are improving rapidly. "
(random
'( "During your apprenticeship you will escort small freighters such as the EI100. When you become a Journeyman, you will be rated to escort larger freighters with more valuable cargo."
"But here is some advice: Remember that pirates seek out the most valuable cargo; pirates will send out larger and more powerful attacks against expensive cargos. Always be vigilant."
"But don't get cocky; escorting a fast EI200 or EI100 is much easier than protecting a slow and defenseless Antares-class."
"But don't lower your guard; the pirates will keep coming—at least until we wipe out their primary stronghold in the system."
"After a few more successful missions you will be ready for a promotion to Journeyman—and ready for a greater challenge!"
)
)
"\n\n\"We've deposited " (@ gData 'reward) " in your account.\""
)
</Text>
<Text id="SuccessDebrief:Apprentice:2">
(cat
"\"Excellent work, captain! Your apprenticeship is almost complete. "
"If you can successfully complete the next escort mission, "
"we will be confident in your skills and promote you."
"\n\n\"We've deposited " (@ gData 'reward) " in your account.\""
)
</Text>
<Text id="SuccessDebrief:Apprentice:3">
(cat
"\"Excellent work, captain! I knew from the beginning that you had the skills to succeed."
"\n\n\"We've deposited " (@ gData 'reward) " in your account.\""
)
</Text>
<Text id="SuccessDebrief:Kronosaurus">
(cat
"\"Your skills are truly impressive! But the news that you've destroyed several Charon frigates has alarmed the pirates. "
"They're sending the Kronosaurus after you! It is the deadliest frigate in the Charon fleet and it will not stop until you are destroyed."
"\n\n\"We've deposited " (@ gData 'reward) " in your account. You better spend them wisely!\""
)
</Text>
<Text id="SuccessDebrief:Default">
(cat
"\"Well done, captain! You've shown skill and bravery in facing those pirates.\n\n"
"\"We've deposited " (@ gData 'reward) " in your account.\""
)
</Text>
</Language>
</Type>
<!-- Korolov Shipping
EXTRA DATA
assistantDirector: Last name of the assistant director overseeing this station
charonStronghold: Primary Charon base in the system
-->
<StationType UNID="&stKorolovShipping;"
name= ": Korolov Shipping"
sovereign= "&svCorporate;"
inherit= "&baCorporateStation;"
attributes= "corporate, corporateCustoms, corporateDecon, envAir, envEarth, envFire, envWater, friendly, generic, human, majorStation, korolovShipping, populated"
dockScreen= "Dispatch"
abandonedScreen= "&dsAbandonedStation;"
level= "4"
size= "390"
armorID= "&itPlasteelPlate;"
hitPoints= "630"
multiHull= "true"
regen= "6"
shipRegen= "6"
canAttack= "true"
explosionType= "&vtBlastExplosion3;"
ejectaType= "&vtWreckEjecta;"
>
<!-- Encounter Info -->
<Encounter
levelFrequency= "ccc-- ----- ----- ----- -----"
locationCriteria= "+planetary"
unique= "inSystem"
enemyExclusionRadius="50"
/>
<!-- Trade and Items -->
<Trade currency="credit" max="100000" replenish="5000">
<Sell criteria="m +commonwealth; +basicAmmo; -illegal; -notForSale; -notStandard;" priceAdj="110" inventoryAdj="200" levelFrequency="systemLevel:ruc|c|cur"/>
<Sell criteria="*NU -illegal; -notForSale; -notStandard;" priceAdj="110" noDescription="true"/>
<Refuel criteria="f +BasicFuel; L:1-5;" priceAdj="90"/>
<RepairArmor criteria="a L:1-8;" priceAdj="100"/>
<ReplaceArmor criteria="a L:1-8;" priceAdj="100"/>
<InstallDevice criteria="d L:1-6;" priceAdj="100"/>
<RemoveDevice criteria="d L:1-6;" priceAdj="100"/>
</Trade>
<Items>
<RandomItem count="1d4" criteria="r -illegal; -military; -notForSale; -notStandard; L:3-6;" levelFrequency="systemLevel:ru|c|curv"/>
</Items>
<!-- Configuration -->
<!-- Satellites -->
<Satellites>
<Orbitals count="1d4" distance="2d8+6" angle="random">
<Station type="&stSealedCargoContainer;"/>
</Orbitals>
</Satellites>
<!-- Ships and Defenses -->
<Ships>
<Ship count="1d2" class="&scRoninC;" orders="guard"/>
<Table count="1d4+1">
<Ship chance="20" count="1" class="&scEI100;" eventHandler="&evKorolovFreighterBehavior;"/>
<Ship chance="20" count="1" class="&scEI200;" eventHandler="&evKorolovFreighterBehavior;"/>
<Ship chance="15" count="1" class="&scEI7000;" eventHandler="&evKorolovFreighterBehavior;"/>
<Ship chance="15" count="1" class="&scAntaresI;" eventHandler="&evKorolovFreighterBehavior;"/>
<Ship chance="15" count="1" class="&scAntaresII;" eventHandler="&evKorolovFreighterBehavior;"/>
<Ship chance="15" count="1" class="&scAntaresV;" eventHandler="&evKorolovFreighterBehavior;"/>
</Table>
</Ships>
<!-- Image and Effects -->
<Image imageID="&rsKorolovShipping;" imageWidth="292" imageHeight="364"/>
<DockingPorts>
<Port x="-18" y="128" />
<Port x="100" y="127" />
<Port x="156" y="31" />
<Port x="165" y="-45" />
<Port x="98" y="-75" />
<Port x="120" y="-153" />
<Port x="0" y="-162" />
<Port x="-90" y="-165" />
<Port x="-103" y="-82" />
<Port x="-178" y="-46" />
<Port x="-113" y="43" />
<Port x="-98" y="122" />
</DockingPorts>
<!-- Dock Screen -->
<DockScreens>
<Dispatch>
<Panes>
<Default>
<OnPaneInit>
(scrSetDescTranslate gScreen 'descWelcome)
</OnPaneInit>
<Actions>
<Action id="actionOperations" default="1">
(block (
(playerLevel (korGetPlayerLevel))
theMission
)
; If we've done enough escort missions we need to destroy any
; remaining open escort missions.
(if (= (objGetData gSource 'remainingMissions) 0)
(enum (msnFind gSource "oS +korolov; +escort;") theMission
(msnDestroy theMission)
)
)
(switch
; If we have an active mission from this station then we show it.
(setq theMission (@ (msnFind gSource "aS +korolov;") 0))
(scrShowScreen gScreen &dsRPGMission; { missionObj: theMission })
; Check if we have any special (non-escort) missions
(setq theMission (rpgMissionGetAssignment {
missionCriteria: "n +korolov; -escort;"
displayCriteria: "n +korolov; -escort;"
}))
(scrShowScreen gScreen &dsRPGMission; { missionObj: theMission })
; Too many failures
(= playerLevel -1)
(scrShowScreen gScreen &dsRPGDialog; { desc:(scrTranslate gScreen 'descTooManyFailures) })
; Already a legend
(= playerLevel 4)
(scrShowScreen gScreen &dsRPGDialog; { desc:(scrTranslate gScreen 'descAlreadyALegend) })
; If the main stronghold is destroyed, no need for escorts
(objIsAbandoned (objGetObjRefData gSource 'charonStronghold))
(scrShowScreen gScreen &dsRPGDialog; { desc:(scrTranslate gScreen 'descNoEscortsNeeded) })
; If we failed to destroy stronghold, we stop missions
(objGetData gSource 'charonDominates)
(scrShowScreen gScreen &dsRPGDialog; { desc:(scrTranslate gScreen 'descFreightersGrounded) })
; If the Charon Fortress is destroyed, no missions
(= (typGetGlobalData &stCharonPirateFortress; 'status) 'destroyed)
(scrShowScreen gScreen &dsRPGDialog; { desc:(scrTranslate gScreen 'descFortressDestroyed) })
; If we're giving out escort missions, then show the list of
; freighters.
(and (gr (objGetData gSource 'remainingMissions) 0)
(find '(0 1 2 3) playerLevel)
(not (objIsAbandoned (objGetObjRefData gSource 'charonStronghold)))
)
(scrShowScreen gScreen &dsKorolovEscortList;)
; Otherwise, nothing
(scrShowScreen gScreen &dsRPGDialog; { desc:(scrTranslate gScreen 'descNoMissions) })
)
)
</Action>
<Action id="actionSituationScreen">
(if (typGetData &unidKorolovShipping; 'level)
(scrShowScreen gScreen "SituationBoard")
(scrShowScreen gScreen &dsRPGMessage; {
desc: (scrTranslate gScreen 'descNoServiceRecord)
})
)
</Action>
<Action id="actionDockServices">
(if (typGetData &unidKorolovShipping; 'level)
(rpgDockServices gPlayerShip {
checkMilitaryID: True
})
(scrShowScreen gScreen &dsRPGMessage; {
desc: (scrTranslate gScreen 'descNoDockServicesAccess)
})
)
</Action>
<Action id="actionUndock" cancel="1">
<Exit/>
</Action>
</Actions>
</Default>
</Panes>
</Dispatch>
<SituationBoard
name= "Situation Screen"
backgroundID= "none"
>
<Display>
<Image left="207" top="69" width="152" height="150" transparent="true">
(resCreateImageDesc &rsKorolovLogo; 0 0 152 150)
</Image>
<Text left="11" top="234" width="546" height="32" font="SubTitle" color="131, 137, 130" align="center">
"Korolov Shipping Corporation"
</Text>
<Text left="11" top="266" width="546" height="32" font="LargeBold" color="131, 137, 130" align="center">
"Situation Screen Interface"
</Text>
</Display>
<Panes>
<Default>
<OnPaneInit>
(scrSetDescTranslate gScreen 'descSelectOption)
</OnPaneInit>
<Actions>
<Action id="actionRecord">
(scrShowScreen gScreen "ServiceRecord")
</Action>
<Action id="actionFreighterData">
(block (
; Get a list of freighter types and names so we can sort alphabetically
(shipList (map (korFreighterTypes) theType {ship:theType name:(shpGetClassName theType 1)}))
)
(scrShowScreen gScreen "ShipData" {
shipType: 'freighter
shipList: (map (sort shipList 'ascending 'name) theEntry (@ theEntry 'ship))
})
)
</Action>
<Action id="actionEnemyData">
(scrShowScreen gScreen "ShipData" {
shipType: 'warship
shipList: (typGetStaticData &stKorolovShipping; 'pirateShips)
})
</Action>
<Action id="actionDone" cancel="1">
(scrShowScreen gScreen "Dispatch")
</Action>
</Actions>
</Default>
</Panes>
</SituationBoard>
<ServiceRecord
name= "Situation Screen"
backgroundID= "none"
>
<OnScreenInit>
(block (
(shipList (sort (map (korFreighterTypes) theType {
class:theType
name:(shpGetClassName theType 0x080)
level:(max (typGetStaticData theType 'korolovMinLevel) 1)
})
'ascending 'name))
(levelList (map (make 'sequence 3) level (filter shipList theShip (= (@ theShip 'level) level))))
)
(scrSetData gScreen 'nameList
(join (map levelList theList (join (map theList theShip (@ theShip 'name)) "\n")) "\n\n")
)
(scrSetData gScreen 'levelList levelList)
)
</OnScreenInit>
<Display>
<Text left="140" top="24" right="-24" height="28" font="SubTitle" color="255,210,152">
(plyComposeString gPlayer "%name%")
</Text>
<Image left="12" top="24" width="120" height="120" transparent="true">
(block (
(level (korGetPlayerLevel))
)
(if (gr level 0)
(resCreateImageDesc
&rsKorolovInsignia;
(multiply 120 (subtract level 1))
0
120
120
)
Nil
)
)
</Image>
<Text left="140" top="52" right="-24" height="32" font="Large" color="200,206,199">
(@
'(
"Dishonorably discharged" ; -1 blacklisted
"New pilot in the Korolov Shipping Corporation" ; 0
"Apprentice in the Korolov Shipping Corporation" ; 1
"Journeyman in the Korolov Shipping Corporation" ; 2
"Master in the Korolov Shipping Corporation" ; 3
"Legend in the Korolov Shipping Corporation" ; 4
)
(+ (typGetData &unidKorolovShipping; 'level) 1)
)
</Text>
<Text left="140" top="84" right="-24" height="18" font="MediumBold" color="255,210,152">
"Service Record:"
</Text>
<Text left="140" top="102" right="280" bottom="-120" font="LargeBold" color="200,206,199">
(scrGetData gScreen 'nameList)
</Text>
<Text left="280" top="102" right="-24" bottom="-120" font="Large" color="149,153,148">
(join (map (scrGetData gScreen 'levelList) theList
(join (map theList theShip (korEscortRecord (@ theShip 'class))) "\n")
)
"\n\n")
</Text>
<Text left="140" top="400" right="-24" height="18" font="MediumBold" color="255,210,152">
(block (showText)
(setq showText (gr (typGetData &unidKorolovShipping; 'recordStrongholds) 0))
(if showText "Commendations:" "")
)
</Text>
<Text left="140" top="416" right="-24" bottom="-12" font="Large" color="149,153,148">
(block (
(strongholdsDestroyed (typGetData &unidKorolovShipping; 'recordStrongholds))
)
(cat
(switch
(not strongholdsDestroyed)
""
(= strongholdsDestroyed 0)
""
(= strongholdsDestroyed 1)
"Korolov Sign of Distinction for destroying a Charon stronghold.\n"
(cat
"Korolov Sign of Honor for destroying "
(strNumber strongholdsDestroyed)
" Charon strongholds.\n"
)
)
)
)
</Text>
</Display>
<Panes>
<Default>
<OnPaneInit>
</OnPaneInit>
<Actions>
<Action id="actionDone" cancel="1" default="1">
(scrShowScreen gScreen "SituationBoard")
</Action>
</Actions>
</Default>
</Panes>
</ServiceRecord>
<ShipData
name= "Situation Screen"
backgroundID= "none"
>
<OnScreenInit>
(block Nil
(scrSetData gScreen 'shipList (@ gData 'shipList))
(scrSetData gScreen 'shipType (@ gData 'shipType))
(scrSetData gScreen 'selIndex 0)
(scrSetData gScreen 'selData (@ (@ gData 'shipList) 0))
)
</OnScreenInit>
<Display>
<Image left="12" right="-44" top="62" height="100" align="center" valign="center" transparent="true">
(shpGetImageDesc (scrGetData gScreen 'selData) 0)
</Image>
<Text left="12" right="-44" top="150" height="40" align="center" font="SubTitle" color="255,210,152">
(shpGetClassName (scrGetData gScreen 'selData) 1)
</Text>
<Text left="12" width="250" top="190" bottom="-140" align="right" font="MediumBold" color="200,206,199">
(switch
(= (scrGetData gScreen 'shipType) 'freighter)
(cat
"cargo space:\n"
"max speed:\n"
"armor:\n"
"shields:\n"
"weapon:\n"
"manufacturer:\n"
)
(= (scrGetData gScreen 'shipType) 'warship)
(cat
"max speed:\n"
"armor:\n"
"shields:\n"
"weapon:\n"
"launcher:\n"
)
)
</Text>
<Text right="-44" width="250" top="190" bottom="-140" align="left" font="Medium" color="200,206,199">
(block (
(classUNID (scrGetData gScreen 'selData))
(armor (typGetProperty classUNID 'primaryArmor))
(shield (typGetProperty classUNID 'shield))
(weapon (typGetProperty classUNID 'primaryWeapon))
(launcher (typGetProperty classUNID 'launcher))
)
(switch
(= (scrGetData gScreen 'shipType) 'freighter)
(cat
(fmtNumber (typGetProperty classUNID "cargoSpace")) " tons\n"
(fmtNumber 'speed (typGetProperty classUNID "maxSpeed")) "\n"
(if armor (strCapitalize armor) "None") "\n"
(if shield (strCapitalize shield) "None") "\n"
(if weapon (strCapitalize weapon) "None") "\n"
(typGetProperty classUNID "manufacturer") "\n"
)
(= (scrGetData gScreen 'shipType) 'warship)
(cat
(fmtNumber 'speed (typGetProperty classUNID "maxSpeed")) "\n"
(if armor (strCapitalize armor) "None") "\n"
(if shield (strCapitalize shield) "None") "\n"
(if weapon (strCapitalize weapon) "None") "\n"
(if launcher (strCapitalize launcher) "None") "\n"
)
)
)
</Text>
<Text left="52" right="-84" bottom="-32" height="120" align="center" font="Large" color="200,206,199">
(block (
(classUNID (scrGetData gScreen 'selData))
shipDesc
)
(switch
(setq shipDesc (typTranslate classUNID 'korolov.shipDesc))
shipDesc
(setq shipDesc (scrTranslate gScreen (cat "korolov.shipDesc." classUNID)))
shipDesc
""
)
)
</Text>
</Display>
<Panes>
<Default>
<OnPaneInit>
(block (
(shipList (scrGetData gScreen 'shipList))
(selIndex (scrGetData gScreen 'selIndex))
)
(scrSetDescTranslate gScreen 'descSelectOption)
(scrEnableAction gScreen 'actionNext (ls (+ selIndex 1) (count shipList)))
(scrEnableAction gScreen 'actionPrev (gr selIndex 0))
)
</OnPaneInit>
<Actions>
<Action id="actionNext" default="1" nextKey="1">
(block (
(shipList (scrGetData gScreen 'shipList))
(selIndex (scrGetData gScreen 'selIndex))
)
(setq selIndex (+ selIndex 1))
(scrSetData gScreen 'selIndex selIndex)
(scrSetData gScreen 'selData (@ shipList selIndex))
(scrShowPane gScreen "Default")
)
</Action>
<Action id="actionPrev" prevKey="1">
(block (
(shipList (scrGetData gScreen 'shipList))
(selIndex (scrGetData gScreen 'selIndex))
)
(setq selIndex (- selIndex 1))
(scrSetData gScreen 'selIndex selIndex)
(scrSetData gScreen 'selData (@ shipList selIndex))
(scrShowPane gScreen "Default")
)
</Action>
<Action id="actionDone" cancel="1">
(scrShowScreen gScreen "SituationBoard")
</Action>
</Actions>
</Default>
</Panes>
</ShipData>
</DockScreens>
<!-- Events and Data -->
<StaticData>
<Data id="pirateShips">
(&scCorsair; &scViking; &scCorsair-II; &scViking-II; &scDrake; &scCharonFrigateRaider;)
</Data>
</StaticData>
<Events>
<OnCreate>
(block (charonStronghold)
; Register a recurring event
(sysAddObjRecurringTimerEvent 240 gSource "OnTrafficControl")
; Every station is overseen by a different AD
(objSetData gSource 'assistantDirector (korNextDirector))
; Allow a finite number of escort missions from each station
(objSetData gSource 'remainingMissions (+ 3 (modulo (objGetDestiny gSource) 7)))
; Find the primary Charon stronghold in the system
(setq charonStronghold (chrGetPrimaryStronghold gSource))
(objSetObjRefData gSource "charonStronghold" charonStronghold)
)
</OnCreate>
<OnDestroy>
(block Nil
(typFireObjEvent &baCorporateStation; gSource 'OnDestroy)
(sysCancelTimerEvent gSource "OnTrafficControl")
)
</OnDestroy>
<OnTrafficControl>
(korTrafficControl gSource)
</OnTrafficControl>
<OnObjDocked>
(if (and (eq aDockTarget gSource)
(not (objGetProperty gSource 'abandoned))
(objGetData aObjDocked 'korolov_traffic)
)
(block (theEscort)
(if (setq theEscort (objGetObjRefData aObjDocked 'escortID))
(block Nil
(shpCancelOrders theEscort)
(if (gr (objGetOpenDockingPortCount gSource) 1)
(shpOrder theEscort 'guard gSource)
(shpOrder theEscort 'gate)
)
(objSetData theEscort 'korolovEscort Nil)
)
)
(objSetObjRefData aObjDocked 'escortID Nil)
)
)
</OnObjDocked>
</Events>
<Language>
<Text id="actionOperations">[O]perations Level</Text>
<Text id="actionSituationScreen">[S]ituation Screen</Text>
<Text id="actionRecord">[S]ervice Record</Text>
<Text id="actionFreighterData">[F]reighter Data</Text>
<Text id="actionEnemyData">[E]nemy Intelligence</Text>
<Text id="actionContinue">[C]ontinue</Text>
<Text id="actionDockServices">[D]ock Services</Text>
<Text id="actionDone">[D]one</Text>
<Text id="actionUndock">[U]ndock</Text>
<Text id="actionNext">[N]ext Ship</Text>
<Text id="actionPrev">[P]revious Ship</Text>
<Text id="descNoServiceRecord">You have no service record with the Korolov Shipping Corporation.</Text>
<Text id="descNoDockServicesAccess">The dock services area is restricted to members only.</Text>
<Text id="descWelcome">
(cat
"You are in the main hall of a Korolov Shipping Company station. "
(block (
(level (korGetPlayerLevel))
)
(switch
(= level -1) ; Blacklisted
"Conversations stop as you enter the room. Whispered condemnations make it clear that you are not welcome among the freighter crews and captains."
(= level 1) ; Apprentice
"The walls are decorated with holopanes honoring the men and women who have died defending Korolov freighters."
(= level 2) ; Journeyman
"The freighter captains welcome you as you enter."
(= level 3) ; Master
"The more experienced escort captains welcome you as you enter; you are treated with deference and respect."
(= level 4) ; Legend
"Murmured excitement ripples across the hall as you enter; everyone crowds around to greet you."
; Default
"The walls are decorated with holopanes honoring the men and women who have died defending Korolov freighters."
)
)
)
</Text>
<String id="descNoMissions">
"Sorry, there are no missions currently available."
</String>
<Text id="descTooManyFailures">
"Sorry, captain, but your escort record is terrible.
No freighter wants to be defended by you."
</Text>
<Text id="descAlreadyALegend">
"Sorry, but Director Hammil doesn't want to risk your life.
The other shipping companies don't have a legendary pilot like you!"
</Text>
<Text id="descNoEscortsNeeded">
"Sorry, there is no need for your escort skills now that the Charon base
in the system has been destroyed. I bet other systems could use your help, though."
</Text>
<Text id="descFreightersGrounded">
"Sorry, all freighters are grounded. The Charon stronghold in
this system is too strong."
</Text>
<Text id="descFortressDestroyed">
"Sorry, there is no need for your escort skills now that
the Fortress of the Charon Pirates has been destroyed."
</Text>
<Text id="descSelectOption">Select an option:</Text>
<Text id="korolov.shipDesc.1454081">
The backbone of the Charon Pirate fleet consists of these fast and
deadly gunships. Piloted by young and somewhat inexperienced pirates,
they are nonetheless dangerous in large numbers.
</Text>
<Text id="korolov.shipDesc.1454082">
The Viking-class gunship is powerful and well-armored. It is slower
than a Corsair, but more than fast enough to chase down a freighter.
</Text>
<Text id="korolov.shipDesc.1454083">
More than an upgrade, the Corsair-II sports shields and a missile launcher.
</Text>
<Text id="korolov.shipDesc.134414405">
The Viking-II is an upgraded version with shields and dual turbolasers.
</Text>
<Text id="korolov.shipDesc.134414404">
The Drake is the pirates' mobile battering ram. Heavily armored and loaded
with missiles, the Drake will pummel you to pieces from long range.
</Text>
<Text id="korolov.shipDesc.1454084">
The sight of these frigates brings fear to most freighter pilots. Fast,
silent, and loaded with hurt, a Charon frigate can destroy a small fleet of
escort ships. Do not challenge these ships unless you know what you're doing.
</Text>
<Text id="core.mapDescMain">
"Hires freighter escorts"
</Text>
</Language>
</StationType>
<!-- DOCK SCREENS -->
<!-- Escort Missions Available -->
<DockScreen unid="&dsKorolovEscortList;"
nestedScreen= "true"
inherit= "&dsDockScreenBase;"
>
<OnScreenInit>
(korInitMissions gSource)
</OnScreenInit>
<Display type="customPicker"
rowHeight="80"
iconWidth="128"
iconHeight="80"
iconScale="0.7"
>
<OnDisplayInit>
(map (msnFind gSource "oS +korolov; +escort;") theMission
(block (
(freighterObj (objGetObjByID (msnGetData theMission 'freighterID)))
(freighterClass (msnGetData theMission 'escortType))
)
{
title: (typGetProperty freighterClass 'name)
icon: (shpGetImageDesc freighterClass 0)
desc: (msnTranslate theMission 'listSummary)
missionObj: theMission
minLevel: (msnGetData theMission 'minPlayerLevel)
minSpeed: (msnGetData theMission 'minPlayerSpeed)
}
)
)
</OnDisplayInit>
</Display>
<InitialPane>
(switch
(typGetData &unidKorolovShipping; 'opsIntroDone)
"Default"
"EscortIntro"
)
</InitialPane>
<Panes>
<Default>
<OnPaneInit>
(block (
(theEntry (scrGetListEntry gScreen))
(theMission (@ theEntry 'missionObj))
(playerLevel (korGetPlayerLevel))
(canAccept Nil)
)
(switch
(not theEntry)
(scrSetDescTranslate gScreen 'descNoMissions)
; If the player is not rated for this freighter, then
; there is nothing to do.
(ls playerLevel (@ theEntry 'minLevel))
(scrSetDescTranslate gScreen 'descNotRated)
; If the player is too slow to escort this freighter, then
; say so.
(ls (shpGetMaxSpeed gPlayerShip) (@ theEntry 'minSpeed))
(scrSetDescTranslate gScreen 'descTooSlow)
; Otherwise, OK
(block ()
(scrSetDesc gScreen (msnTranslate theMission 'Briefing))
(setq canAccept True)
)
)
(scrEnableAction gScreen 'actionEscortFreighter canAccept)
)
</OnPaneInit>
<Actions>
<Action id="actionEscortFreighter" default="1">
(block (
(theEntry (scrGetListEntry gScreen))
(theMission (@ theEntry 'missionObj))
)
(msnAccept theMission)
(scrShowScreen gScreen &dsRPGMission; { missionObj:theMission status:'accept })
)
</Action>
<Action id="actionCancel" cancel="1">
(scrExitScreen gScreen)
</Action>
</Actions>
</Default>
<EscortIntro>
<OnPaneInit>
(block ()
(scrSetDescTranslate gScreen
(if (scrGetListEntry gScreen)
'descOperationsIntro
'descOperationsIntroNoFreighters
)
)
; Set the intro flag. We do this in case the player clicks on some
; freighter during EscortIntro.
(typSetData &unidKorolovShipping; 'opsIntroDone True)
)
</OnPaneInit>
<Actions>
<Action id="actionContinue">
(scrShowPane gScreen 'Default)
</Action>
</Actions>
</EscortIntro>
</Panes>
<Language>
<Text id="actionEscortFreighter">[E]scort Freighter</Text>
<Text id="descOperationsIntro">
The operations level is filled with traffic controllers and ship captains
coordinating freighter shipments across the system.
A manager walks over to you: "There are some freighters looking for escorts. Check
the display to your left."
</Text>
<Text id="descOperationsIntroNoFreighters">
The operations level is filled with traffic controllers and ship captains
coordinating freighter shipments across the system.
A manager walks over to you: "All our freighters are out, but if you come back
later perhaps some will have returned."
</Text>
<Text id="descNoMissions">
A manager walks over to you:
"All our freighters are out, but if you come back later perhaps some will have
returned."
</Text>
<Text id="descNotRated">
You are not rated to escort this class of freighter.
Once you gain experience escorting other freighters, you will
be promoted.
</Text>
<Text id="descTooSlow">
Unfortunately, your ship is too slow to escort this class of freighter.
</Text>
<Text id="descEscort">
This freighter is looking for an escort.
</Text>
</Language>
</DockScreen>
<!-- Promotion -->