/
Benedict05A.xml
755 lines (621 loc) · 20.5 KB
/
Benedict05A.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
<?xml version="1.0" encoding="utf-8"?>
<TranscendenceModule>
<!-- Find the Hand of Solace ===============================================
EXTRA DATA
benedictID: ID of Benedict's ship
overlayID: ID of scanning overlay for Sandoval's ship
sandovalID: ID of Sandoval's ship
scanPosID: Marker object for scan position.
wreckID: ObjID of the wreck.
======================================================================== -->
<MissionType UNID="&msFindHandOfSolace;"
name= "Find Hand of Solace"
attributes= "benedictStoryArc, hugoSandovalMission"
level= "4"
maxAppearing= "1"
priority= "100"
failureAfterOutOfSystem="5400"
noDebrief= "true"
>
<StaticData>
<sequence>55</sequence>
</StaticData>
<Events>
<OnCreate>
(block ()
(switch
; See if the mission is still available
(not (benedict_isMissionAvailable (objGetType gSource) { allowActiveMissions:True }))
(msnDestroy gSource)
; OK
)
)
</OnCreate>
<OnAccepted>
(block (
(findSandovalMission (@ (msnFind "a +unid:&msFionaInStKats;;") 0))
(sandovalObj (sysFindObject gSource "sNA +hugoSandoval"))
benedictObj
wreckObj
markerObj
wreckBearing
wreckDist
)
; As soon as we accept, we complete the previous mission.
(if findSandovalMission
(msnSuccess findSandovalMission)
)
; Remember sandoval's ship
(msnSetData gSource 'sandovalID (objGetID sandovalObj))
; Create the wreck of the Hand of Solace
(setq wreckObj
(sysCreateStation &stHandOfSolaceWreck;
(sysVectorRandom
sandovalObj
(lambda () (sysVectorPolarOffset Nil (random 0 359) (random 480 1440)))
120
"sTA"
)
&svCommonwealth;
)
)
(msnSetData gSource 'wreckID (objGetID wreckObj))
(setq wreckBearing (sysVectorAngle wreckObj sandovalObj))
(setq wreckDist (sysVectorDistance wreckObj sandovalObj))
; Create Benedict's ship and dock with the wreck
(setq benedictObj
(rpgCharacterCreateShip
&unidBenedict;
&scBenedictAsterion;
wreckObj
{ repairAll:True }
)
)
(msnSetData gSource 'benedictID (objGetID benedictObj))
(shpCancelOrders benedictObj)
(shpOrder benedictObj 'dock wreckObj)
(objSetProperty benedictObj 'dockingEnabled Nil)
; Pick a scanning spot
(setq markerObj
(sysCreateMarker "ScanPos"
(sysVectorRandom
sandovalObj
(lambda () (sysVectorPolarOffset Nil (+ wreckBearingAngle (random -90 90)) (/ wreckDist 2)))
60
"sTA"
)
&svCommonwealth;
)
)
(msnSetData gSource 'scanPosID (objGetID markerObj))
; Set up enemies
; Mission accepted
(benedict_missionAccepted gSource)
)
</OnAccepted>
<OnAcceptedUndock>
(block (
(sandovalObj (objGetObjByID (msnGetData gSource 'sandovalID)))
(markerObj (objGetObjByID (msnGetData gSource 'scanPosID)))
)
; Order Sandoval's ship
(shpCancelOrders sandovalObj)
(shpOrder sandovalObj 'approach markerObj)
(shpOrder sandovalObj 'fireEvent gSource 'OnScanStart)
(shpOrder sandovalObj 'hold)
)
</OnAcceptedUndock>
<OnSetPlayerTarget>
(switch
(msnGetData gSource 'foundWreck)
(block (
(wreckObj (objGetObjByID (msnGetData gSource 'wreckID)))
)
(rpgSetTarget gSource aReason wreckObj 'dock)
)
)
</OnSetPlayerTarget>
<OnObjDestroyed>
(switch
; We don't care if an object ascends or enters a stargate
(or (= aDestroyReason 'ascended) (= aDestroyReason 'enteredStargate))
Nil
; If Sandoval dies, mission failure.
(= (objGetID aObjDestroyed) (msnGetData gSource 'sandovalID))
(block Nil
(rpgCharacterSetStatus &unidHugoSandoval; 'dead)
(msnFailure gSource)
)
)
</OnObjDestroyed>
<OnCompleted>
(block (
(sandovalObj (objGetObjByID (msnGetData gSource 'sandovalID)))
(benedictObj (objGetObjByID (msnGetData gSource 'benedictID)))
)
; Sandoval heads to SK
(if sandovalObj
(block ()
(shpCancelOrders sandovalObj)
(shpOrder sandovalObj 'gate (sysGetStargateLeadingToNode 'SK))
)
)
; Benedict heads to Sanctuary
(if benedictObj
(block ()
(shpCancelOrders benedictObj)
(shpOrder benedictObj 'gate (sysGetStargateLeadingToNode 'CD))
)
)
)
</OnCompleted>
<OnGlobalSystemStarted>
(switch
; If not in C5, then nothing to do
(!= (sysGetNode) 'C5)
Nil
; If we don't have a mission to meet Sandoval, then
; there's nothing to do.
(not (rpgIsMissionActive &msFionaInStKats;))
Nil
; Create Sandoval here.
(block (
sandovalObj
)
; Pick a position nearest to the gate towards SK
(setq sandovalObj
(rpgCharacterCreateShip
&unidHugoSandoval;
&scHugoSandovalArmstrong;
(sysVectorRandom (sysGetStargateLeadingToNode 'SK) 20 40)
{ repairAll:True }
)
)
; Order appropriately
(shpCancelOrders sandovalObj)
(shpOrder sandovalObj 'hold)
)
)
</OnGlobalSystemStarted>
<OnScanStart>
(block (
(sandovalObj (objGetObjByID (msnGetData gSource 'sandovalID)))
)
(msnSetData gSource 'overlayID
(objAddOverlay sandovalObj &ovBenedict05ScanRange;)
)
)
</OnScanStart>
<OnScanComplete>
(block (
(sandovalObj (objGetObjByID (msnGetData gSource 'sandovalID)))
(wreckObj (objGetObjByID (msnGetData gSource 'wreckID)))
)
; Done with the overlay
(objRemoveOverlay sandovalObj (msnGetData gSource 'overlayID))
; Tell the player and set the target
(objSendMessage gPlayerShip sandovalObj (msnTranslate gSource 'msgFoundWreck))
(msnSetData gSource 'foundWreck True)
(msnSetPlayerTarget gSource)
; Order the ship
(shpCancelOrders sandovalObj)
(shpOrder sandovalObj 'dock wreckObj)
)
</OnScanComplete>
<OnDataAcquired>
(block ()
; Mission success
(typIncData &unidBenedictStoryArc; 'clues 1)
(msnSuccess gSource)
)
</OnDataAcquired>
</Events>
<Language>
<Text id="Name">"Help Sandoval Find the Hand of Solace"</Text>
<Text id="Summary">
(cat
"Follow Sandoval and help him scan for the wreckage of the Hand of Solace. "
"Do not enter or let anyone enter the scanning zone.\n\n"
"System: " (sysGetName) "\n"
"Payment: None"
)
</Text>
<Text id="FirstIntro">
(list
{
desc: (cat
"Sandoval shakes his head and puts his blaster away.\n\n"
"\"So you're Fiona's new pet? "
(if (= (plyGetGenome gPlayer) 'humanFemale)
"Well, I'm not disappointed."
"Well, I expected someone taller."
)
"\""
)
label: "\"[C]an we skip the banter?\""
}
{
desc: (cat
"\"All business, eh? Just like Fiona! OK, let's get to work!\n\n"
"\"We're looking for a tiny wreck in an entire star system. "
"Not my favorite job, by far. But I've got enough equipment "
"here to do it. I'll be able to pick up even the faintest radiation.\""
)
label: "\"[W]hat are we waiting for?\""
}
{
desc: (cat
"\"Nothing's easy, kid. We'll be scanning right in the middle "
"of marauder territory, and we're going to be attracting a lot of "
"attention.\""
)
label: "\"[I] can handle marauders.\""
}
{
desc: (cat
"\"I'm sure you can. But here's the trick: a gunship engine belching "
"hot plasma is going to blind the scanner, right? You'll have to keep "
"all ships away from me until I'm done scanning.\""
)
label: "\"[I]'ll do what I can.\""
}
)
</Text>
<Text id="Intro">
(list
{
desc: (cat
"\"You ready now? Armor all clean? Weapons loaded? Do you need a hug before we go?\""
)
label: "\"[G]o to hell.\""
}
{
desc: (cat
"\"You're not as fun as I expected.\n\n"
"\"Remember, keep all ships away from me until I'm done scanning. It's "
"our best chance to find the Hand of Solace.\""
)
label: "\"[G]ot it.\""
}
)
</Text>
<Text id="Briefing">
(list
{
desc: (cat
"\"Alright. Follow me to the search area.\""
)
acceptLabel: "\"[I]'m right behind you.\""
declineLabel: "\"[L]et me prepare first.\""
}
)
</Text>
<String id="AcceptReply">
"Try to keep up!"
</String>
<String id="DeclineReply">
"Don't take long, right?"
</String>
<String id="InProgress">
"As much as I would enjoy your visit, we've got work to do."
</String>
<Text id="SuccessMsg">
Mission complete!
</Text>
<Text id="msgFoundWreck">Found it! Follow my lead!</Text>
</Language>
</MissionType>
<!-- STATION TYPES -->
<!-- Hand of Solace Wreck -->
<StationType UNID="&stHandOfSolaceWreck;"
name= "wreck of the Hand of Solace"
sovereign= "&svNeutral;"
attributes= "shipwreck, sistersOfDomina, uncharted"
dockScreen= "Main"
scale= "ship"
ejectaType= "&vtWreckEjecta;"
definiteArticle= "true"
>
<!-- Image and Effects -->
<ImageShipwreck class="&scHandOfDomina;"/>
<DockingPorts
portCount= "6"
portRadius= "48"
maxDist= "3"
/>
<!-- Dock Screen -->
<DockScreens>
<Main>
<OnScreenInit>
(block (
(missionObj (@ (msnFind "a +unid:&msFindHandOfSolace;;") 0))
(sandovalObj (objGetObjByID (msnGetData missionObj 'sandovalID)))
)
(switch
; If no mission object, then go to standard loot screen
(not missionObj)
(scrShowScreen gScreen &dsAbandonedShip;)
; If Sandoval is dead, we go to special text without Sandoval
; [This can't happen because the mission fails if Sandoval is dead.]
(not sandovalObj)
(scrSetData gScreen 'dialogTree 'dlgBenedictAlone)
; If Sandoval has not yet docked, then wait for him
(!= (objGetProperty sandovalObj 'dockedAtID) (objGetID gSource))
(scrSetData gScreen 'dialogTree 'dlgWaitForSandoval)
; Otherwise, we go to the normal screen
(scrSetData gScreen 'dialogTree 'dlgHandOfSolace)
)
)
</OnScreenInit>
<Panes>
<Default>
<OnPaneInit>
(rpgPagePaneInit gScreen (objTranslate gSource (scrGetData gScreen 'dialogTree)))
</OnPaneInit>
</Default>
</Panes>
</Main>
</DockScreens>
<!-- Events and Data -->
<Events>
</Events>
<Language>
<Text id="dlgHandOfSolace">
(list
{
desc: (cat
"You board the medical ship behind Sandoval and are immediately "
"confronted by an armored figure. He opens his helmet.\n\n"
"It's Benedict."
)
label: "\"[W]hat are you doing here?\""
}
{
desc: (cat
"\"Fiona was attacked before she could find this wreck. This is what "
"they were trying to keep her from seeing.\"\n\n"
"He looks at Sandoval, arm cannon ready.\n\n"
"\"But I guess you already know that. Hello, Sandoval.\""
)
}
{
desc: (cat
"Sandoval nods with a smirk and casually shows his empty hands.\n\n"
"\"I'm impressed, Benedict. I guess you're not just a mindless gun.\""
)
label: "\"[D]id you find anything?\""
}
{
desc: (cat
"\"No. Everything's been wiped: computers, logs, comms records. Everything.\n\n"
"\"There was definite fighting. The hull's covered in laser scars and blast damage. "
"The reactor's scrammed and useless. No bodies, of course. Everything's clean.\""
)
label: "\"[S]o that's it?\""
}
{
desc: (cat
"Sandoval turns towards him, \"What about propulsion?\"\n\n"
"Benedict shakes his head, \"Dead. Everything's vented...\"\n\n"
"\"The firmware!\" interrupts Sandoval, \"The black-box! Is it still "
"sealed?\""
)
label: "\"[T]he what?\""
}
{
desc: (cat
"Sandoval's magnetic boots clang as he runs to the aft compartments. You and Benedict "
"follow.\n\n"
"\"The drive system logs all acceleration events for servicing and "
"maintenance!\" says Sandoval. \"We can use the data to reconstruct "
"the ship's course. That might tell us something.\""
)
label: "\"[I]f they didn't wipe it.\""
}
{
desc: (cat
"Sandoval plugs into the drive system and downloads its data.\n\n"
"\"It looks OK. I can't reconstruct it here, but I'll take it back "
"to Fiona and we can plot a path.\n\n"
"\"Thanks for your help, %name%. I'll tell Fiona you said hi.\""
)
label: "\"[G]ood luck!\""
}
{
desc: (cat
"Benedict is about to interject, but stops himself. He looks deflated.\n\n"
"Sandoval shakes his head and smiles, \"Don't look like a lost little "
"microsaur! Here, take a copy of the data and do your own analysis. "
"We'll share what we find. Deal?\"\n\n"
"Benedict grunts a thank you to Sandoval. He nods to you, \"I'm heading "
"towards Sanctuary. Maybe we'll meet again!\""
)
code: (lambda ()
(block (
(missionObj (@ (msnFind "a +unid:&msFindHandOfSolace;;") 0))
)
(msnFireEvent missionObj 'OnDataAcquired)
)
)
}
)
</Text>
<Text id="dlgWaitForSandoval">
(list
{
desc: (cat "You decide to wait for Sandoval.")
nextPage: 'forceUndock
}
)
</Text>
<Text id="dlgBenedictAlone">
(list
{
desc: (cat
"LATER: Sandoval is dead, so it's just the two of us."
)
code: (lambda ()
(block (
(missionObj (@ (msnFind "a +unid:&msFindHandOfSolace;;") 0))
)
(msnFireEvent missionObj 'OnDataAcquired)
)
)
}
)
</Text>
</Language>
</StationType>
<!-- OVERLAYS -->
<OverlayType UNID="&ovBenedict05ScanRange;"
attributes= "effect"
>
<Counter style= "radius"
color= "#6666cc"
/>
<Events>
<OnCreate>
(block Nil
(objSetOverlayProperty gSource aOverlayID 'counter 25)
(objSetOverlayData gSource aOverlayID 'scanDuration 1800)
(objSetOverlayData gSource aOverlayID 'scanEnd (+ (unvGetTick) 1800))
(objSetOverlayProperty gSource aOverlayID 'counterLabel (typTranslate &ovBenedict05ScanRange; "msgScanning" { percent:0 }))
(objSendMessage gPlayerShip gSource (typTranslate &ovBenedict05ScanRange; 'msgStartScan))
)
</OnCreate>
<OnUpdate>
(block (
)
(switch
; If we're waiting for the area to clear, then see if there are any
; ships in the area.
(objGetOverlayData gSource aOverlayID 'waitToClear)
(if (not (sysFindObject gSource "sA N:25;"))
(block ()
(objSetOverlayData gSource aOverlayID 'scanEnd (+ (unvGetTick) 1800))
(objSetOverlayProperty gSource aOverlayID 'counterLabel (typTranslate &ovBenedict05ScanRange; "msgScanning" { percent:0 }))
(objSendMessage gPlayerShip gSource (typTranslate &ovBenedict05ScanRange; 'msgRestartScan))
(objSetOverlayData gSource aOverlayID 'waitToClear Nil)
)
)
; If we've finished with our scan, then we can proceed.
(gr (unvGetTick) (objGetOverlayData gSource aOverlayID 'scanEnd))
(msnFireEvent (@ (msnFind "a +unid:&msFindHandOfSolace;;") 0) 'OnScanComplete)
; Check to see if any ships have entered the scanning zone. If so,
; then we restart
(sysFindObject gSource "sA N:25;")
(block Nil
(objSetOverlayProperty gSource aOverlayID 'counterLabel (typTranslate &ovBenedict05ScanRange; "msgInterference"))
(objSendMessage gPlayerShip gSource (typTranslate &ovBenedict05ScanRange; 'msgScanRuined))
(objSetOverlayData gSource aOverlayID 'waitToClear True)
)
; Otherwise, continue scanning
(block (
(scanDuration (objGetOverlayData gSource aOverlayID 'scanDuration))
(scanEnd (objGetOverlayData gSource aOverlayID 'scanEnd))
(scanTime (- (unvGetTick) (- scanEnd scanDuration)))
)
(objSetOverlayProperty gSource aOverlayID 'counterLabel
(typTranslate &ovBenedict05ScanRange; "msgScanning" {
percent: (divide (* 100 scanTime) scanDuration)
})
)
)
)
; Randomly create encounters to attack Sandoval. At 1800 ticks duration, we
; will get called at OnUpdate 60 times (if we never interrupt). We expect to
; get a little more than 1 encounter per minute.
(if (and (= (random 1 50) 1)
(ls (objGetOverlayData gSource aOverlayID 'wavesSent) 10)
(gr (- (unvGetTick) (objGetOverlayData gSource aOverlayID 'lastWaveTime)) 300)
)
(block (enemies)
; Create a wave of ships.
;
; Pick a point where the ships will appear. It must be far enough
; away from Sandoval and out of LRS range of the player.
(setq enemies (sysCreateShip
&tbBenedict05Encounters;
(sysVectorRandom gSource (random 200 250) 50 "sTA")
&svMarauders;
{ target:gSource }
))
; Sandoval tells the player about the wave
(if (geq (count enemies) 1)
(block ()
(objSendMessage gPlayerShip gSource (typTranslate &ovBenedict05ScanRange; 'msgIncomingWave))
(shpCancelOrders gPlayerShip)
(shpOrder gPlayerShip 'attack (@ enemies 0))
)
)
; Keep track of the number of waves created
(objSetOverlayData gSource aOverlayID 'lastWaveTime (unvGetTick))
(objIncOverlayData gSource aOverlayID 'wavesSent)
)
)
)
</OnUpdate>
</Events>
<Language>
<Text id="msgStartScan">
"\"Starting my scan...Keep the area clear!\""
</Text>
<Text id="msgRestartScan">
"\"Restarting scan...Keep the area clear!\""
</Text>
<Text id="msgScanning">
(cat "Scanning..." (@ gData 'percent) "%")
</Text>
<Text id="msgInterference">
Interference!
</Text>
<Text id="msgScanRuined">
Kack! We lost the alignment. We have to recalibrate!
</Text>
<Text id="msgIncomingWave">
(random (list
(cat "Marauders coming in!")
(cat "Here they come!")
(cat "We've got hostiles coming in!")
))
</Text>
</Language>
</OverlayType>
<!-- TABLES AND RESOURCES -->
<EncounterTable UNID="&tbBenedict05Encounters;">
<LevelTable>
<Ship levelFrequency="cccuv -----" class="&scCorsair-II;" count="1" orders="attack" sovereign="&svMarauders;">
<Escorts>
<Table>
<Ship chance="50" count="1d2" class="&scCorsair-II;" orders="escort"/>
<Ship chance="50" count="1d2" class="&scViking-II;" orders="escort"/>
</Table>
</Escorts>
</Ship>
<Ship levelFrequency="-vucu -----" class="&scCorsair-II;" count="1" orders="attack" sovereign="&svMarauders;">
<Escorts>
<Table count="2">
<Ship chance="50" count="1d2" class="&scCorsair-II;" orders="escort"/>
<Ship chance="50" count="1d2" class="&scViking-II;" orders="escort"/>
</Table>
</Escorts>
</Ship>
<Ship levelFrequency="--rru -----" class="&scDrake;" count="1" orders="attack" sovereign="&svMarauders;">
<Escorts>
<Table>
<Ship chance="30" count="1d4" class="&scCorsair-II;" orders="escort"/>
<Ship chance="70" count="1d6" class="&scViking-II;" orders="escort"/>
</Table>
</Escorts>
</Ship>
<Ship levelFrequency="---vu ccccc" class="&scCorsair-II;" count="1" orders="attack" sovereign="&svMarauders;">
<Escorts>
<Table count="3">
<Ship chance="50" count="1d2" class="&scCorsair-II;" orders="escort"/>
<Ship chance="50" count="1d2" class="&scViking-II;" orders="escort"/>
</Table>
</Escorts>
</Ship>
</LevelTable>
</EncounterTable>
</TranscendenceModule>