-
Notifications
You must be signed in to change notification settings - Fork 6
/
scenario_30_brokenglass.lua
2529 lines (2283 loc) · 120 KB
/
scenario_30_brokenglass.lua
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
-- Name: Broken Glass
-- Description: Support research activities in the Zeta Belt and keep the researchers safe. Difficulty balances and 10 achievements to complete.
---
---Duration: Plan for 3+ hours on Easy, with harder difficulties taking longer
---Player ships: 1
---
---Author: Chris Sibbitt. Revisions: Xansta, Muerte Jan2023
---Created: Dec2022
---Feedback: USN Discord: https://discord.gg/7Kr32ezJFF
-- Type: Replayable Mission
-- Setting[Difficulty]: Configures the difficulty in the scenario. Default is Easy
-- Difficulty[Easy|Default]: Minor enemy resistance and easier missions.
-- Difficulty[Medium]: More robust resistance with more risk (takes longer).
-- Difficulty[Hard]: Significant enemy resistance.
require("utils.lua")
function init()
SetSettings()
-- == Core area
Coreplanet = Planet():setPosition(29855, -4285):setPlanetRadius(3000):setPlanetAtmosphereColor(0.20,0.20,1.00):setDistanceFromMovementPlane(-2000.00):setPlanetAtmosphereTexture("planets/atmosphere.png"):setPlanetSurfaceTexture("planets/planet-1.png"):setPlanetCloudTexture("planets/clouds-1.png"):setPlanetCloudRadius(3150.00)
Planet():setPosition(30179, 9539):setOrbit(Coreplanet, 120):setPlanetRadius(1000):setDistanceFromMovementPlane(-2000.00):setPlanetSurfaceTexture("planets/moon-1.png"):setPlanetCloudRadius(1050.00):setAxialRotationTime(20.00):setPlanetAtmosphereColor(0.20,0.20,1.00):setPlanetAtmosphereTexture("planets/atmosphere.png")
-- Mission stations
Admin_station = SpaceStation():setTemplate("Small Station"):setFaction("Human Navy"):onTakingDamage(CommsBeingAttacked):setCallSign("Admin Stn"):setPosition(35170, -8650):setRepairDocked(true):setRestocksScanProbes(true):setSharesEnergyWithDocked(true)
Defence_station = SpaceStation():setTemplate("Medium Station"):setFaction("Human Navy"):onTakingDamage(CommsBeingAttacked):setCallSign("Defence Stn"):setPosition(-9366, 7900):setRepairDocked(true):setRestocksScanProbes(true):setSharesEnergyWithDocked(true)
Wormhole_station = SpaceStation():setTemplate("Medium Station"):setFaction("Independent"):onTakingDamage(CommsBeingAttacked):setCallSign("Wormhole Stn"):setPosition(77152, 32816):setRepairDocked(true):setRestocksScanProbes(true):setSharesEnergyWithDocked(true)
-- Resupply stations
Resupply_stations = {
SpaceStation():setTemplate("Medium Station"):setFaction("Human Navy"):setCallSign("DS917"):setPosition(21309, -8207):setRepairDocked(true):setRestocksScanProbes(true):setSharesEnergyWithDocked(true),
SpaceStation():setTemplate("Medium Station"):setFaction("Human Navy"):setCallSign("DS921"):setPosition(26395, 29186):setRepairDocked(true):setRestocksScanProbes(true):setSharesEnergyWithDocked(true),
SpaceStation():setTemplate("Huge Station"):setFaction("Human Navy"):setCallSign("DS963"):setPosition(15750, 15698):setRepairDocked(true):setRestocksScanProbes(true):setSharesEnergyWithDocked(true)
}
-- Patrol Stations
Patrol_stations = {
SpaceStation():setTemplate("Medium Station"):setFaction("Human Navy"):setCallSign("NW Checkpoint"):onTakingDamage(CommsBeingAttacked):setPosition(-14904, -31057):setRepairDocked(true):setRestocksScanProbes(true):setSharesEnergyWithDocked(true),
SpaceStation():setTemplate("Medium Station"):setFaction("Human Navy"):setCallSign("SW Checkpoint"):onTakingDamage(CommsBeingAttacked):setPosition(-29095, 37628):setRepairDocked(true):setRestocksScanProbes(true):setSharesEnergyWithDocked(true),
SpaceStation():setTemplate("Medium Station"):setFaction("Human Navy"):setCallSign("SE Checkpoint"):onTakingDamage(CommsBeingAttacked):setPosition(73035, 26331):setRepairDocked(true):setRestocksScanProbes(true):setSharesEnergyWithDocked(true),
SpaceStation():setTemplate("Medium Station"):setFaction("Human Navy"):setCallSign("NE Checkpoint"):onTakingDamage(CommsBeingAttacked):setPosition(75919, -30678):setRepairDocked(true):setRestocksScanProbes(true):setSharesEnergyWithDocked(true)
}
for _, stn in ipairs(Patrol_stations) do
stn:setCommsFunction(CommsPatrolStation)
end
-- Convoy visibility
Lookout_stations = {
SpaceStation():setTemplate("Medium Station"):setFaction("Human Navy"):setCallSign("DS819"):setPosition(-44255, 22569):setRepairDocked(true):setRestocksScanProbes(true):setSharesEnergyWithDocked(true),
SpaceStation():setTemplate("Medium Station"):setFaction("Human Navy"):setCallSign("DS818"):setPosition(-35690, 21033):setRepairDocked(true):setRestocksScanProbes(true):setSharesEnergyWithDocked(true)
}
SpaceStation():setTemplate("Medium Station"):setFaction("Ghosts"):setCallSign("DS820"):setPosition(-38789, 14192)
SpaceStation():setTemplate("Medium Station"):setFaction("Ghosts"):setCallSign("DS821"):setPosition(-47557, 15983)
-- Wormholes
WormHole():setPosition(71274, 38128):setTargetPosition(334910, 473961)
WormHole():setPosition(332910, 471961):setTargetPosition(69274, 36128)
-- == Western Belt
Asteroid():setPosition(11802, 69624):setSize(128)
Asteroid():setPosition(10934, 68384):setSize(122)
Asteroid():setPosition(15771, 74834):setSize(113)
Asteroid():setPosition(15523, 71981):setSize(115)
Asteroid():setPosition(19988, 68632):setSize(112)
Asteroid():setPosition(1384, 68384):setSize(123)
Asteroid():setPosition(-1806, 65192):setSize(129)
Asteroid():setPosition(-3808, 63960):setSize(121)
Asteroid():setPosition(639, 62555):setSize(119)
Asteroid():setPosition(4360, 64043):setSize(118)
Asteroid():setPosition(8453, 63547):setSize(124)
Asteroid():setPosition(5601, 68384):setSize(126)
Asteroid():setPosition(-496, 57029):setSize(118)
Asteroid():setPosition(-2422, 57568):setSize(130)
Asteroid():setPosition(3740, 56601):setSize(112)
Asteroid():setPosition(2004, 55113):setSize(124)
Asteroid():setPosition(43, 54872):setSize(115)
Asteroid():setPosition(-3346, 61033):setSize(115)
Asteroid():setPosition(428, 61572):setSize(128)
Asteroid():setPosition(-1729, 61264):setSize(129)
Asteroid():setPosition(1044, 58492):setSize(129)
Asteroid():setPosition(-2499, 59493):setSize(122)
Asteroid():setPosition(1198, 53717):setSize(118)
Asteroid():setPosition(-2807, 53332):setSize(110)
Asteroid():setPosition(-2653, 55411):setSize(110)
Asteroid():setPosition(-3500, 46709):setSize(113)
Asteroid():setPosition(-3115, 48480):setSize(115)
Asteroid():setPosition(-5194, 50714):setSize(113)
Asteroid():setPosition(-1575, 51407):setSize(119)
Asteroid():setPosition(-188, 49635):setSize(122)
Asteroid():setPosition(-650, 47017):setSize(123)
Asteroid():setPosition(659, 45323):setSize(125)
Asteroid():setPosition(2969, 47017):setSize(115)
Asteroid():setPosition(1737, 50637):setSize(117)
Asteroid():setPosition(-1343, 44476):setSize(114)
Asteroid():setPosition(-6580, 44630):setSize(114)
Asteroid():setPosition(-3423, 45400):setSize(111)
Asteroid():setPosition(-3731, 43089):setSize(117)
Asteroid():setPosition(-2275, 41442):setSize(117)
Asteroid():setPosition(-5348, 42011):setSize(121)
Asteroid():setPosition(-4640, 41442):setSize(122)
Asteroid():setPosition(386, 42329):setSize(112)
Asteroid():setPosition(-6676, -2264):setSize(116)
Asteroid():setPosition(-6567, -15439):setSize(115)
Asteroid():setPosition(-7135, -13925):setSize(111)
Asteroid():setPosition(-11397, -16132):setSize(119)
Asteroid():setPosition(-2972, -11844):setSize(117)
Asteroid():setPosition(-19342, -20974):setSize(118)
Asteroid():setPosition(-20758, -23197):setSize(118)
Asteroid():setPosition(-21326, -18845):setSize(116)
Asteroid():setPosition(-18443, -22568):setSize(126)
Asteroid():setPosition(-17163, -23007):setSize(116)
Asteroid():setPosition(-10351, -19601):setSize(124)
Asteroid():setPosition(-16739, -21574):setSize(114)
Asteroid():setPosition(-16611, -19236):setSize(126)
Asteroid():setPosition(-13843, -17626):setSize(124)
Asteroid():setPosition(-12811, -18655):setSize(114)
Asteroid():setPosition(-14136, -20926):setSize(112)
Asteroid():setPosition(-13000, -22629):setSize(123)
Asteroid():setPosition(-3653, 18428):setSize(126)
Asteroid():setPosition(-2092, 19915):setSize(115)
Asteroid():setPosition(780, 20351):setSize(112)
Asteroid():setPosition(-1289, 20844):setSize(110)
Asteroid():setPosition(-828, 17833):setSize(123)
Asteroid():setPosition(-3505, 21849):setSize(129)
Asteroid():setPosition(-977, 22964):setSize(121)
Asteroid():setPosition(-4936, 22125):setSize(117)
Asteroid():setPosition(-5921, 25181):setSize(126)
Asteroid():setPosition(-6567, 18964):setSize(124)
Asteroid():setPosition(-2984, 8018):setSize(119)
Asteroid():setPosition(-1423, 10100):setSize(115)
Asteroid():setPosition(-902, 13446):setSize(116)
Asteroid():setPosition(-3282, 12480):setSize(112)
Asteroid():setPosition(-5914, 15481):setSize(129)
Asteroid():setPosition(-2761, 17090):setSize(121)
Asteroid():setPosition(-4471, 16569):setSize(111)
Asteroid():setPosition(-3579, 13372):setSize(125)
Asteroid():setPosition(-5261, 10582):setSize(122)
Asteroid():setPosition(-977, 11885):setSize(123)
Asteroid():setPosition(386, 15522):setSize(129)
Asteroid():setPosition(-5724, 28039):setSize(128)
Asteroid():setPosition(-4640, 30108):setSize(126)
Asteroid():setPosition(-3556, 26068):setSize(114)
Asteroid():setPosition(-2965, 28039):setSize(126)
Asteroid():setPosition(-2472, 29813):setSize(112)
Asteroid():setPosition(-1092, 24294):setSize(120)
Asteroid():setPosition(-2570, 24885):setSize(127)
Asteroid():setPosition(-1585, 25378):setSize(112)
Asteroid():setPosition(-3753, 31587):setSize(120)
Asteroid():setPosition(-2669, 33262):setSize(117)
Asteroid():setPosition(-2373, 34543):setSize(126)
Asteroid():setPosition(-1486, 31981):setSize(129)
Asteroid():setPosition(879, 32769):setSize(111)
Asteroid():setPosition(-994, 27447):setSize(125)
Asteroid():setPosition(-994, 30207):setSize(126)
Asteroid():setPosition(-2910, -1648):setSize(128)
Asteroid():setPosition(-2241, -1127):setSize(130)
Asteroid():setPosition(-3505, -681):setSize(128)
Asteroid():setPosition(-1943, -5663):setSize(127)
Asteroid():setPosition(-4769, -5068):setSize(114)
Asteroid():setPosition(-3505, 6234):setSize(113)
Asteroid():setPosition(-2910, 3780):setSize(110)
Asteroid():setPosition(-1646, 7349):setSize(127)
Asteroid():setPosition(-2687, 880):setSize(124)
Asteroid():setPosition(-4049, 34740):setSize(114)
Asteroid():setPosition(-5724, 33853):setSize(113)
Asteroid():setPosition(-1051, 62):setSize(119)
Asteroid():setPosition(-382, 6457):setSize(116)
Asteroid():setPosition(-1869, -6704):setSize(128)
Asteroid():setPosition(-1497, -10719):setSize(117)
Asteroid():setPosition(-1571, 3631):setSize(123)
Asteroid():setPosition(-1720, -8340):setSize(127)
Asteroid():setPosition(-1274, -3284):setSize(118)
Asteroid():setPosition(-382, -1574):setSize(113)
Asteroid():setPosition(64, -5068):setSize(111)
Asteroid():setPosition(-501, 40062):setSize(113)
Asteroid():setPosition(-2275, 38190):setSize(113)
Asteroid():setPosition(-3753, 40062):setSize(118)
Asteroid():setPosition(-2866, 36317):setSize(128)
Asteroid():setPosition(-4049, 36810):setSize(124)
Asteroid():setPosition(1372, 39077):setSize(128)
Asteroid():setPosition(583, 36416):setSize(117)
Asteroid():setPosition(-1191, 37007):setSize(111)
Asteroid():setPosition(-1011, 2028):setSize(119)
Asteroid():setPosition(-3579, -2912):setSize(128)
Asteroid():setPosition(-2646, -3222):setSize(112)
Asteroid():setPosition(-5261, 2852):setSize(115)
Asteroid():setPosition(-1958, 5385):setSize(124)
Asteroid():setPosition(-6414, 31784):setSize(127)
Asteroid():setPosition(-6316, 36712):setSize(124)
Asteroid():setPosition(-6118, 39175):setSize(115)
Asteroid():setPosition(-4443, 38880):setSize(111)
Asteroid():setPosition(-2373, 40062):setSize(117)
Asteroid():setPosition(-1571, -6035):setSize(113)
Asteroid():setPosition(-4248, -9307):setSize(113)
Asteroid():setPosition(-1486, 34543):setSize(122)
Asteroid():setPosition(-1200, -8117):setSize(123)
-- == Northern Nebula
Nebula():setPosition(-21211, -53117)
Nebula():setPosition(-28590, -51225)
Nebula():setPosition(-35024, -47251)
Nebula():setPosition(-33888, -56333)
Nebula():setPosition(-28590, -58982)
Nebula():setPosition(-53377, -55387)
Nebula():setPosition(-52431, -44981)
Nebula():setPosition(-43728, -54631)
Nebula():setPosition(-45241, -46116)
Nebula():setPosition(-24995, -44791)
Nebula():setPosition(-14399, -44602)
Nebula():setPosition(-13832, -52360)
Nebula():setPosition(-11183, -43278)
Nebula():setPosition(-33113, -63623)
Nebula():setPosition(-27798, -64147)
Nebula():setPosition(-35818, -74415)
Nebula():setPosition(-24693, -70199)
Nebula():setPosition(-16178, -72422)
Nebula():setPosition(-18751, -58982)
Nebula():setPosition(-21287, -63623)
Nebula():setPosition(-14759, -65516)
Nebula():setPosition(-8231, -70341)
Nebula():setPosition(-9480, -57280)
Nebula():setPosition(-11935, -60613)
Nebula():setPosition(9442, -63524)
Nebula():setPosition(3009, -57847)
Nebula():setPosition(8117, -55955)
Nebula():setPosition(14172, -62956)
Nebula():setPosition(17767, -67876)
Nebula():setPosition(17200, -77715)
Nebula():setPosition(14929, -44602)
Nebula():setPosition(7550, -47062)
Nebula():setPosition(16064, -51035)
Nebula():setPosition(15686, -56144)
Nebula():setPosition(7928, -72227)
Nebula():setPosition(4144, -70525)
Nebula():setPosition(-64, -73670)
Nebula():setPosition(-1169, -68092)
Nebula():setPosition(-5676, -63529)
Nebula():setPosition(-28023, -42142)
Nebula():setPosition(-4560, -44034)
Nebula():setPosition(-19, -45548)
Nebula():setPosition(-4560, -50468)
Nebula():setPosition(1684, -50657)
Nebula():setPosition(-54778, -74551)
Nebula():setPosition(-48817, -74693)
Nebula():setPosition(-46641, -62677)
Nebula():setPosition(-42952, -67881)
Nebula():setPosition(-55345, -64475)
Nebula():setPosition(-50893, -69818)
Nebula():setPosition(-15043, -87417)
Nebula():setPosition(-9745, -81741)
Nebula():setPosition(-23746, -83633)
Nebula():setPosition(-19773, -79092)
Nebula():setPosition(-11448, -76206)
Nebula():setPosition(-27625, -90587)
Nebula():setPosition(-29442, -85516)
Nebula():setPosition(-34532, -81930)
Nebula():setPosition(-35572, -90776)
Nebula():setPosition(-20052, -94899)
Nebula():setPosition(-13333, -94475)
Nebula():setPosition(-29612, -94986)
Nebula():setPosition(-28571, -76301)
Nebula():setPosition(15497, -96069)
Nebula():setPosition(7171, -95501)
Nebula():setPosition(9442, -90771)
Nebula():setPosition(9743, -88816)
Nebula():setPosition(2630, -78661)
Nebula():setPosition(-675, -82229)
Nebula():setPosition(8874, -83770)
Nebula():setPosition(16254, -88689)
Nebula():setPosition(13226, -83013)
Nebula():setPosition(1306, -88311)
Nebula():setPosition(3784, -86457)
Nebula():setPosition(-5014, -75355)
Nebula():setPosition(-1086, -93571)
Nebula():setPosition(-6147, -82981)
Nebula():setPosition(-6675, -89873)
Nebula():setPosition(-5525, -97105)
Nebula():setPosition(-36819, -95056)
Nebula():setPosition(-47114, -92100)
Nebula():setPosition(-37938, -76632)
Nebula():setPosition(-43425, -85904)
Nebula():setPosition(-47966, -84201)
Nebula():setPosition(-42839, -79845)
Nebula():setPosition(13424, -38769)
Nebula():setPosition(2630, -97771)
Nebula():setPosition(-41816, -97493)
Nebula():setPosition(-52318, -97871)
Nebula():setPosition(-16923, -39021)
Nebula():setPosition(-25108, -35621)
Nebula():setPosition(-54322, -37888)
Nebula():setPosition(-39841, -38014)
Nebula():setPosition(-44878, -38265)
Nebula():setPosition(-55724, -82356)
Nebula():setPosition(-55913, -91627)
Nebula():setPosition(-40126, -63572)
Nebula():setPosition(-33018, -68732)
Nebula():setPosition(-71826, -63072)
Nebula():setPosition(-71574, -67102)
Nebula():setPosition(-67670, -72013)
Nebula():setPosition(-63389, -63954)
Nebula():setPosition(-64270, -51235)
Nebula():setPosition(-58478, -67228)
Nebula():setPosition(-64522, -77553)
Nebula():setPosition(-63893, -96190)
Nebula():setPosition(-58856, -100849)
Nebula():setPosition(-36190, -101353)
Nebula():setPosition(-4205, -108026)
Nebula():setPosition(-28886, -106264)
Nebula():setPosition(-61248, -41539)
Nebula():setPosition(-33797, -31088)
Nebula():setPosition(22364, -54132)
Nebula():setPosition(24127, -61561)
-- A representative ship to get lost
local northNebulaTLx, northNebulaTLy = sectorToXY("A2")
Admin_station.lost_ship = CpuShip():setFaction("Human Navy"):setTemplate("Equipment Freighter 2"):setCallSign("VS1"):setPosition(northNebulaTLx + irandom(0, 80000), northNebulaTLy + irandom(0,60000)):orderRoaming():setCommsFunction(function()
setCommsMessage(_("lost-comms", "We're pretty busy scanning for treasure... I mean, conducting research in this nebula. Can we call you back?"))
end)
-- Pick random location in nebula for ship to get lost to
Admin_station.lost_location_x = northNebulaTLx + irandom(0, 60000)
Admin_station.lost_location_y = northNebulaTLy + irandom(0, 60000)
-- Some nebula mines
for _ = 0, (7 * Difficulty) do -- 8, 22, or 36 mines
Mine():setPosition(northNebulaTLx + irandom(0, 80000), northNebulaTLy + irandom(0,60000))
end
-- Some nebula treasure
Admin_station.nebula_bonuses = {
nuke = Artifact():setRadarSignatureInfo(0.8,0.25,0),
repair = Artifact():setRadarSignatureInfo(0,0,0.25),
rep = Artifact():setRadarSignatureInfo(0.25,0.25,0),
surprise_attack = Artifact():setRadarSignatureInfo(0,0.8,0)
}
for i, bonus in pairs(Admin_station.nebula_bonuses) do
bonus:setModel("artifact2"):setDescriptions(_("scienceDescription-artifact", "Just a hollow spherical apparition. Kinda looks like it's hiding something."),_("scienceDescription-artifact", "It seems to have changed shape.")):setScanningParameters(1,1):setRadarSignatureInfo(0.25,0,0):setPosition(northNebulaTLx + irandom(0, 80000), northNebulaTLy + irandom(0,60000))
end
Admin_station.nebula_bonuses.nuke.onFullScan = function (self)
self:setModel("ammo_box"):allowPickup(true):onPickUp(function ()
self.wasFound = true
Player:setWeaponStorageMax("Nuke", Player:getWeaponStorageMax("Nuke") + 1)
Player:setWeaponStorage("Nuke", Player:getWeaponStorage("Nuke") + 1)
Player:addToShipLog(_("nebulaBonuses-shipLog", "A Nuke and additional nuke storage have been added to our arsenal"),"Green")
end)
end
Admin_station.nebula_bonuses.repair.onFullScan = function (self)
self:setModel("artifact1"):allowPickup(true):onPickUp(function ()
self.wasFound = true
Player:setRepairCrewCount(Player:getRepairCrewCount() + 1)
Player:addToShipLog(_("nebulaBonuses-shipLog", "A stranded repair crew has been rescued"),"Green")
end)
end
Admin_station.nebula_bonuses.rep.onFullScan = function (self)
self:setModel("artifact3"):allowPickup(true):onPickUp(function ()
self.wasFound = true
Player:addReputationPoints(5)
Player:addToShipLog(_("nebulaBonuses-shipLog", "This scientific data is sure to raise our reputation with the eggheads."),"Green")
end)
end
Admin_station.nebula_bonuses.surprise_attack.onFullScan = function (self)
self:setModel("artifact8"):allowPickup(false)
self:setCallSign("DD Alpha")
self:sendCommsMessage(Player, _("nebulaBonuses-incCall", "DRONE SELF DEFENCE SYSTEM ACTIVATED"))
Player:addToShipLog(_("nebulaBonuses-shipLog", "DRONE SELF DEFENCE SYSTEM ACTIVATED"), "Red")
self:setCallSign("")
local x, y = self:getPosition()
local defenders = SpawnEnemies(x + irandom(-5000, 5000), y + irandom(-5000, 5000), random(.6,1), "Ghosts")
for _, ship in ipairs(defenders) do
table.insert(Defence_station.ghost_defenders, ship)
end
Player:addToShipLog(_("nebulaBonuses-shipLog", "We have activated a drone defence system!"),"Red")
end
-- == Drone area
Drone_stations = {
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS6223"):setPosition(-80404, 26565),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS6224"):setPosition(-84704, 30527),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS6225"):setPosition(-81989, 28198),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS6222"):setPosition(-80788, 21186),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS6226"):setPosition(-81508, 32713),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS6234"):setPosition(-83718, 24644),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS1425"):setPosition(-104181, 26524),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS1435"):setPosition(-106339, 23746),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS6241"):setPosition(-104996, 21138),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS1453"):setPosition(-101798, 22233),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS1433"):setPosition(-98728, 27731),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS1426"):setPosition(-99716, 24125),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS6271"):setPosition(-98611, 20912),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS6231"):setPosition(-87191, 27553),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS6232"):setPosition(-88233, 24260),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS6230"):setPosition(-93180, 27670),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS6229"):setPosition(-90154, 21282),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS6254"):setPosition(-113187, 33418),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS6257"):setPosition(-114746, 30023),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS6263"):setPosition(-118876, 34875),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS6249"):setPosition(-116859, 37036),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS6243"):setPosition(-113257, 21426),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS6244"):setPosition(-117291, 21330),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS6247"):setPosition(-115322, 26325),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS1420"):setPosition(-109366, 27152),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS1418"):setPosition(-107908, 34572),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS1436"):setPosition(-106339, 30558),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS1419"):setPosition(-110691, 30558),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS1454"):setPosition(-109745, 22233),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS6210"):setPosition(-84102, 34490),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS6227"):setPosition(-88817, 30377),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS1447"):setPosition(-94418, 22044),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS1427"):setPosition(-95334, 24236),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS1449"):setPosition(-94229, 33207),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS1445"):setPosition(-89499, 34153),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS6269"):setPosition(-96064, 35728),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS6262"):setPosition(-98980, 34974),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS1443"):setPosition(-103193, 34904),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS1422"):setPosition(-102933, 30937),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS1428"):setPosition(-95411, 29922),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS1437"):setPosition(-98909, 31499),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS6264"):setPosition(-118415, 29798),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS6246"):setPosition(-118973, 24308),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS6266"):setPosition(-118721, 38835),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS6250"):setPosition(-113497, 38189),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS6251"):setPosition(-109558, 37660),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS6204"):setPosition(-97263, 38093),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS6252"):setPosition(-107349, 38717),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS6211"):setPosition(-81220, 38285),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS6206"):setPosition(-85591, 38429),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS6214"):setPosition(-91067, 37228),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS6205"):setPosition(-92844, 39053),
SpaceStation():setTemplate("Small Station"):setFaction("Ghosts"):setCallSign("DS6268"):setPosition(-102543, 39055)
}
-- Using NE instead of more intuitive NW to be backwards compatible with old grid system
local droneNEx, droneNEy = sectorToXY("G1")
Drone_artifacts = {}
for i = 1, 3 + Difficulty do -- 4, 6, or 8 artifacts
local a = Artifact():setPosition(droneNEx - irandom(2000, 38000), droneNEy + irandom(2000, 18000)):setModel("artifact"..i)
table.insert(Drone_artifacts, a)
end
-- == Other side of the wormhole
Parts_station = SpaceStation():setTemplate("Small Station"):setFaction("Exuari"):setCallSign("X472"):setPosition(361326, 527812)
Kw_enemies = {
CpuShip():setFaction("Kraylor"):setTemplate("Strikeship"):setCallSign("BR5"):setPosition(377672, 540642):orderStandGround(),
CpuShip():setFaction("Kraylor"):setTemplate("Strikeship"):setCallSign("BR6"):setPosition(377541, 545431):orderStandGround(),
CpuShip():setFaction("Kraylor"):setTemplate("Missile Cruiser"):setCallSign("CSS4"):setPosition(373724, 542711):orderStandGround()
}
Investigator = Kw_enemies[1]
Kw_stations = {
SpaceStation():setTemplate("Large Station"):setFaction("Kraylor"):setCallSign("KZ2346"):setPosition(376303, 543016),
SpaceStation():setTemplate("Medium Station"):setFaction("Kraylor"):setCallSign("KZ2682"):setPosition(400931, 541600),
SpaceStation():setTemplate("Medium Station"):setFaction("Kraylor"):setCallSign("KZ2683"):setPosition(360825, 561407)
}
Kw_mainStation = Kw_stations[1]
Exuari_junk_stations = {
SpaceStation():setTemplate("Medium Station"):setFaction("Exuari"):setCallSign("X6775"):setPosition(315754, 449577),
SpaceStation():setTemplate("Medium Station"):setFaction("Exuari"):setCallSign("X6774"):setPosition(333160, 452975),
SpaceStation():setTemplate("Medium Station"):setFaction("Exuari"):setCallSign("XS6773"):setPosition(326495, 458049)
}
SpaceStation():setTemplate("Medium Station"):setFaction("Human Navy"):setCallSign("OP722"):setPosition(328913, 490292)
SpaceStation():setTemplate("Medium Station"):setFaction("Independent"):setCallSign("DS456"):setPosition(327511, 477797)
Nebula():setPosition(362828, 522882)
Asteroid():setPosition(387008, 497476):setSize(122)
Asteroid():setPosition(387875, 493898):setSize(129)
Asteroid():setPosition(378443, 492489):setSize(116)
Asteroid():setPosition(366193, 493898):setSize(112)
Asteroid():setPosition(369337, 492272):setSize(120)
Asteroid():setPosition(361893, 551120):setSize(127)
Asteroid():setPosition(365929, 552289):setSize(112)
Asteroid():setPosition(362637, 553244):setSize(119)
Asteroid():setPosition(376020, 552501):setSize(125)
Asteroid():setPosition(372841, 552495):setSize(113)
Asteroid():setPosition(386111, 549739):setSize(116)
Asteroid():setPosition(385898, 551970):setSize(124)
Asteroid():setPosition(377401, 554307):setSize(125)
Asteroid():setPosition(383349, 551970):setSize(112)
Asteroid():setPosition(374757, 494657):setSize(112)
Asteroid():setPosition(371288, 494441):setSize(123)
Asteroid():setPosition(370949, 491946):setSize(118)
Asteroid():setPosition(384189, 495199):setSize(127)
Asteroid():setPosition(384731, 493356):setSize(117)
Asteroid():setPosition(381804, 492381):setSize(118)
Asteroid():setPosition(379310, 495091):setSize(121)
Asteroid():setPosition(387658, 496500):setSize(125)
Asteroid():setPosition(386791, 495091):setSize(128)
Asteroid():setPosition(386217, 556325):setSize(125)
Asteroid():setPosition(389510, 554838):setSize(112)
Asteroid():setPosition(383774, 554094):setSize(113)
Asteroid():setPosition(388979, 549846):setSize(115)
Asteroid():setPosition(389492, 552116):setSize(125)
Asteroid():setPosition(356370, 552926):setSize(116)
Asteroid():setPosition(359028, 553441):setSize(121)
Asteroid():setPosition(380481, 552289):setSize(115)
Asteroid():setPosition(388023, 553669):setSize(125)
Asteroid():setPosition(385474, 554413):setSize(121)
Asteroid():setPosition(361856, 489670):setSize(128)
Asteroid():setPosition(369554, 489887):setSize(121)
Asteroid():setPosition(372084, 490432):setSize(113)
Asteroid():setPosition(356219, 489237):setSize(127)
Asteroid():setPosition(358821, 489128):setSize(130)
Asteroid():setPosition(357954, 493140):setSize(126)
Asteroid():setPosition(358062, 490971):setSize(125)
Asteroid():setPosition(366301, 490104):setSize(125)
Asteroid():setPosition(363266, 487611):setSize(118)
Asteroid():setPosition(376275, 490538):setSize(116)
Asteroid():setPosition(377571, 487972):setSize(124)
Asteroid():setPosition(373456, 487827):setSize(113)
Asteroid():setPosition(370192, 487405):setSize(115)
Asteroid():setPosition(380069, 490863):setSize(126)
Asteroid():setPosition(380031, 488919):setSize(129)
Asteroid():setPosition(375191, 492706):setSize(127)
Asteroid():setPosition(360664, 491730):setSize(127)
Asteroid():setPosition(382671, 490755):setSize(122)
Asteroid():setPosition(385165, 491947):setSize(120)
Asteroid():setPosition(382112, 494217):setSize(127)
Asteroid():setPosition(390249, 493838):setSize(112)
Asteroid():setPosition(364442, 557175):setSize(128)
Asteroid():setPosition(366885, 555050):setSize(125)
Asteroid():setPosition(366992, 557281):setSize(114)
Asteroid():setPosition(355626, 556644):setSize(112)
Asteroid():setPosition(358461, 550792):setSize(121)
Asteroid():setPosition(343702, 550413):setSize(111)
Asteroid():setPosition(348293, 555414):setSize(113)
Asteroid():setPosition(341810, 547575):setSize(123)
Asteroid():setPosition(342377, 541710):setSize(128)
Asteroid():setPosition(364655, 554519):setSize(118)
Asteroid():setPosition(361575, 556962):setSize(116)
Asteroid():setPosition(359556, 557281):setSize(123)
Asteroid():setPosition(351059, 553244):setSize(116)
Asteroid():setPosition(351590, 556325):setSize(127)
Asteroid():setPosition(352758, 554307):setSize(115)
Asteroid():setPosition(352121, 550270):setSize(125)
Asteroid():setPosition(348811, 551170):setSize(120)
Asteroid():setPosition(371559, 555688):setSize(127)
Asteroid():setPosition(374533, 555263):setSize(115)
Asteroid():setPosition(374214, 557387):setSize(123)
Asteroid():setPosition(383349, 556962):setSize(121)
Asteroid():setPosition(377507, 557706):setSize(128)
Asteroid():setPosition(382302, 550035):setSize(111)
Asteroid():setPosition(369541, 557175):setSize(119)
Asteroid():setPosition(369328, 554307):setSize(117)
Asteroid():setPosition(381331, 554944):setSize(122)
Asteroid():setPosition(379842, 557414):setSize(121)
Asteroid():setPosition(336512, 534709):setSize(113)
Asteroid():setPosition(332917, 526762):setSize(124)
Asteroid():setPosition(333552, 512009):setSize(116)
Asteroid():setPosition(333669, 503222):setSize(125)
Asteroid():setPosition(335838, 500728):setSize(130)
Asteroid():setPosition(339918, 501218):setSize(111)
Asteroid():setPosition(336922, 509076):setSize(127)
Asteroid():setPosition(336380, 506799):setSize(115)
Asteroid():setPosition(339524, 507450):setSize(110)
Asteroid():setPosition(334103, 506691):setSize(114)
Asteroid():setPosition(334320, 509726):setSize(122)
Asteroid():setPosition(338982, 511136):setSize(110)
Asteroid():setPosition(336322, 520517):setSize(112)
Asteroid():setPosition(340485, 510489):setSize(128)
Asteroid():setPosition(338889, 512562):setSize(114)
Asteroid():setPosition(335296, 503981):setSize(126)
Asteroid():setPosition(338982, 504848):setSize(118)
Asteroid():setPosition(342054, 501930):setSize(113)
Asteroid():setPosition(338440, 502571):setSize(127)
Asteroid():setPosition(332682, 501527):setSize(114)
Asteroid():setPosition(352208, 492056):setSize(116)
Asteroid():setPosition(353292, 494332):setSize(128)
Asteroid():setPosition(350148, 495525):setSize(125)
Asteroid():setPosition(350798, 488803):setSize(114)
Asteroid():setPosition(352967, 487936):setSize(126)
Asteroid():setPosition(350690, 491297):setSize(124)
Asteroid():setPosition(350690, 493573):setSize(120)
Asteroid():setPosition(352641, 495850):setSize(113)
Asteroid():setPosition(343860, 495308):setSize(127)
Asteroid():setPosition(348197, 492598):setSize(114)
Asteroid():setPosition(345920, 493682):setSize(110)
Asteroid():setPosition(348197, 490321):setSize(129)
Asteroid():setPosition(344511, 491080):setSize(122)
Asteroid():setPosition(340538, 494588):setSize(120)
Asteroid():setPosition(340139, 498259):setSize(130)
Asteroid():setPosition(342559, 499970):setSize(120)
Asteroid():setPosition(342559, 497368):setSize(111)
Asteroid():setPosition(345703, 498777):setSize(129)
Asteroid():setPosition(394380, 501270):setSize(123)
Asteroid():setPosition(396223, 502246):setSize(127)
Asteroid():setPosition(397632, 500945):setSize(117)
Asteroid():setPosition(395138, 499427):setSize(130)
Asteroid():setPosition(394054, 497910):setSize(126)
Asteroid():setPosition(391952, 497812):setSize(112)
Asteroid():setPosition(390477, 497042):setSize(129)
Asteroid():setPosition(392645, 498885):setSize(128)
Asteroid():setPosition(390260, 494657):setSize(122)
Asteroid():setPosition(392645, 495091):setSize(113)
Asteroid():setPosition(392862, 496717):setSize(115)
Asteroid():setPosition(395883, 547827):setSize(121)
Asteroid():setPosition(394608, 547721):setSize(127)
Asteroid():setPosition(394608, 549421):setSize(110)
Asteroid():setPosition(402548, 553819):setSize(111)
Asteroid():setPosition(397901, 542623):setSize(125)
Asteroid():setPosition(397264, 544216):setSize(112)
Asteroid():setPosition(396945, 546128):setSize(122)
Asteroid():setPosition(397051, 539861):setSize(129)
Asteroid():setPosition(398645, 540286):setSize(120)
Asteroid():setPosition(408792, 533762):setSize(115)
Asteroid():setPosition(395357, 544548):setSize(128)
Asteroid():setPosition(392484, 547615):setSize(114)
Asteroid():setPosition(392484, 550695):setSize(129)
Asteroid():setPosition(392590, 552820):setSize(118)
Asteroid():setPosition(403683, 523166):setSize(110)
Asteroid():setPosition(402358, 515598):setSize(127)
Asteroid():setPosition(399709, 538682):setSize(127)
Asteroid():setPosition(397817, 514652):setSize(116)
Asteroid():setPosition(398574, 503110):setSize(123)
Asteroid():setPosition(401034, 503110):setSize(115)
Asteroid():setPosition(398385, 521085):setSize(114)
Asteroid():setPosition(398196, 537547):setSize(123)
Asteroid():setPosition(399709, 529789):setSize(119)
Asteroid():setPosition(360230, 486418):setSize(117)
Asteroid():setPosition(358170, 485551):setSize(113)
Asteroid():setPosition(354376, 486852):setSize(114)
Asteroid():setPosition(363948, 491568):setSize(115)
Asteroid():setPosition(354614, 491044):setSize(130)
Asteroid():setPosition(357648, 482768):setSize(129)
Asteroid():setPosition(351855, 485388):setSize(125)
Asteroid():setPosition(344544, 488837):setSize(122)
Asteroid():setPosition(348406, 497665):setSize(124)
Asteroid():setPosition(342475, 492285):setSize(123)
Asteroid():setPosition(345436, 550018):setSize(120)
Asteroid():setPosition(347500, 548748):setSize(123)
Asteroid():setPosition(344325, 553192):setSize(116)
Asteroid():setPosition(337818, 547954):setSize(129)
Asteroid():setPosition(344008, 544939):setSize(129)
Asteroid():setPosition(341309, 550653):setSize(111)
Asteroid():setPosition(337234, 497389):setSize(128)
Asteroid():setPosition(334484, 539225):setSize(126)
Asteroid():setPosition(330457, 538114):setSize(122)
Asteroid():setPosition(331310, 528749):setSize(122)
Asteroid():setPosition(331151, 534145):setSize(114)
Asteroid():setPosition(338452, 538114):setSize(116)
Asteroid():setPosition(333691, 537320):setSize(128)
Asteroid():setPosition(336706, 541447):setSize(122)
Asteroid():setPosition(336548, 544145):setSize(113)
Asteroid():setPosition(339246, 543986):setSize(116)
Asteroid():setPosition(332421, 521130):setSize(114)
Asteroid():setPosition(330457, 505002):setSize(119)
Asteroid():setPosition(333849, 531606):setSize(114)
Asteroid():setPosition(335913, 526527):setSize(114)
Asteroid():setPosition(360772, 483708):setSize(121)
Asteroid():setPosition(365868, 485984):setSize(123)
Asteroid():setPosition(366735, 482082):setSize(122)
Asteroid():setPosition(407021, 533511):setSize(119)
Asteroid():setPosition(404641, 525416):setSize(114)
Asteroid():setPosition(401149, 525416):setSize(127)
Asteroid():setPosition(404323, 528908):setSize(126)
Asteroid():setPosition(402101, 532717):setSize(115)
Asteroid():setPosition(401942, 519225):setSize(116)
Asteroid():setPosition(399085, 516844):setSize(113)
Asteroid():setPosition(390802, 501162):setSize(125)
Asteroid():setPosition(391195, 502731):setSize(130)
Asteroid():setPosition(391384, 544358):setSize(127)
Asteroid():setPosition(331627, 509702):setSize(120)
Asteroid():setPosition(341923, 507045):setSize(119)
Asteroid():setPosition(335754, 529384):setSize(130)
Asteroid():setPosition(339405, 541606):setSize(117)
Asteroid():setPosition(332103, 542240):setSize(114)
Asteroid():setPosition(334643, 523035):setSize(115)
Asteroid():setPosition(330040, 525098):setSize(125)
Asteroid():setPosition(335913, 513511):setSize(129)
Asteroid():setPosition(334960, 517003):setSize(122)
Asteroid():setPosition(329889, 519382):setSize(126)
-- Northern colony
Colony_area_station = SpaceStation():setTemplate("Medium Station"):setFaction("Human Navy"):setCallSign("DS806"):setPosition(40015, -60153)
Planet():setPosition(41835, -78305):setPlanetRadius(5000):setPlanetCloudRadius(5200.00):setPlanetAtmosphereColor(0.8,0.20,0.40):setPlanetSurfaceTexture("planets/gas-2.png")
Colony_stations = {
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("E437"):setPosition(34457, -71084):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("E146"):setPosition(31997, -76192):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("E544"):setPosition(23031, -75857):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("E236"):setPosition(25371, -73885):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("E245"):setPosition(29204, -74511):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("E335"):setPosition(25371, -78805):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("E338"):setPosition(27077, -70894):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("E465"):setPosition(37335, -71048):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("E939"):setPosition(35632, -65750):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("E869"):setPosition(29010, -63480):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("E166"):setPosition(23668, -68398):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("E770"):setPosition(30334, -67832):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("E671"):setPosition(29388, -79374):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("Z649"):setPosition(31984, -82788):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("Z128"):setPosition(26390, -83457):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("Z342"):setPosition(22418, -88122):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("Z929"):setPosition(21252, -84484):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("Z243"):setPosition(27527, -87933):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("Z750"):setPosition(31280, -87888):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("Z848"):setPosition(33846, -85391):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("Z417"):setPosition(26361, -95457):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("Z359"):setPosition(29766, -97160):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("Z532"):setPosition(32257, -91906):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("Z118"):setPosition(32037, -93754):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("Z441"):setPosition(23248, -92193):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("Z260"):setPosition(35632, -98484):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("H419"):setPosition(43760, -87132):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("H823"):setPosition(51901, -87244):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("H663"):setPosition(52483, -91098):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("H524"):setPosition(52658, -82703):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("H158"):setPosition(48343, -89446):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("H251"):setPosition(43488, -97649):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("H320"):setPosition(42444, -94700):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("H252"):setPosition(43958, -91294):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("H425"):setPosition(56016, -90406):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("H922"):setPosition(57203, -94511):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("H762"):setPosition(54743, -97917):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("H121"):setPosition(49445, -94511):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("H364"):setPosition(47845, -98361):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("X627"):setPosition(51248, -69291):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("X957"):setPosition(43438, -68261):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("X726"):setPosition(55485, -68625):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("X547"):setPosition(49960, -63472):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("X856"):setPosition(46654, -65612):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("X254"):setPosition(53771, -63981):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("X155"):setPosition(43248, -64098):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("X267"):setPosition(53986, -71427):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("X134"):setPosition(56067, -75779):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("X468"):setPosition(49256, -78617):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("X333"):setPosition(50794, -73146):setCommsFunction(CommsColonyStation),
SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCallSign("X361"):setPosition(45996, -70975):setCommsFunction(CommsColonyStation)
}
Asteroid():setPosition(-86049, 1110):setSize(119)
Asteroid():setPosition(-85670, 1677):setSize(120)
Asteroid():setPosition(-83967, 3380):setSize(117)
Asteroid():setPosition(-77534, 12273):setSize(123)
Asteroid():setPosition(-77345, 13030):setSize(119)
Asteroid():setPosition(-71290, 20599):setSize(124)
Asteroid():setPosition(-68452, 23437):setSize(115)
Asteroid():setPosition(-68641, 31573):setSize(119)
Asteroid():setPosition(-72425, 46521):setSize(129)
Asteroid():setPosition(-81886, 59766):setSize(116)
Asteroid():setPosition(-89833, 57874):setSize(121)
Asteroid():setPosition(-79048, 45575):setSize(123)
Asteroid():setPosition(-75642, 33655):setSize(122)
Asteroid():setPosition(-77345, 25897):setSize(119)
Asteroid():setPosition(-82454, 17382):setSize(111)
Asteroid():setPosition(-84346, 4137):setSize(130)
Asteroid():setPosition(-75831, -2485):setSize(119)
Asteroid():setPosition(-62964, 12652):setSize(127)
Asteroid():setPosition(-59559, 39331):setSize(127)
Asteroid():setPosition(-67506, 8111):setSize(126)
Asteroid():setPosition(-70155, 61469):setSize(124)
-- == END OF MAIN MAP ==
--==================================================
--==
--==
--==
--==
--==
--==
--== SETUP
--==
--==
--==
--==
--==
--==
--==
--==================================================
InitPlayer()
InitGM()
Admin_station:setCommsFunction(CommsAdminStation)
Defence_station:setCommsFunction(CommsDefenceStation)
Defence_station.harass_enemies = {}
Defence_station.ghost_defenders = {}
Wormhole_station:setCommsFunction(CommsWormholeStation)
Wormhole_station.insults = {}
Investigator:setCommsFunction(CommsInvestigator)
InitKraylor()
InitPartsStation()
InitDroneStations()
InitCheevos()
InitTraffic()
Defence_station:sendCommsMessage(Player, _("defenceStn-incCall", [[Greetings, Captain.
You've been assigned a tour of duty in the Zeta Belt. It's neutral territory with a bit of everything... nebulae, asteroids, baby planets, and dangerous old scrap.
We don't see many Kraylor around here, but we have a non-aggression treaty with them, so should you encounter any, think twice before engaging. The main security risk is from those damned Ghost and Exuari drones and that keep flying around.
Your primary orders are to support all the research facilities in the area, both Human and Independent. Their safety must be guaranteed, including helping them with dangerous operations. If you can't find anything to do, check in here and we can set you up with a patrol route.
Your ship, the Propitious 1, is well equipped but not exactly a war vessel, so conduct yourself carefully and try not to breach the peace tumultuously.
]]))
end
function InitPlayer()
allowNewPlayerShips(false)
Player = PlayerSpaceship():setFaction("Human Navy"):setTemplate("Phobos M3P"):setCallSign("Propitious 1"):setPosition(8785, 800)
Player:setJumpDrive(true)
Player:setRotation(0):commandTargetRotation(0)
Player:setWeaponStorageMax("Nuke", 0)
Player:setWeaponStorage("Homing", 4)
Player:setWeaponStorage("Nuke", 0)
Player:setWeaponStorage("Mine", 0)
Player:setWeaponStorage("EMP", 0)
Player:setWeaponStorage("HVLI", 6)
Player:setLongRangeRadarRange(20000)
PP1 = Player
end
function InitGM ()
clearGMFunctions()
addGMFunction(_("buttonGM","+Start Mission"),gmStartMission)
addGMFunction(_("buttonGM","+Finish Mission"),gmFinishMission)
addGMFunction(_("buttonGM","+Spawn Stuff"),gmSpawnStuff)
end
function gmSpawnStuff()
clearGMFunctions()
addGMFunction(_("buttonGM","-From Spawn Stuff"),InitGM)
addGMFunction(_("buttonGM","Convoy Enemies"), SpawnConvoyEnemies)
addGMFunction(_("buttonGM","Harrasment"), SpawnHarrasment)
end
function gmFinishMission()
clearGMFunctions()
addGMFunction(_("buttonGM","-From Finish Mission"),InitGM)
addGMFunction(_("buttonGM","Lost"),FinishMissionLost)
addGMFunction(_("buttonGM","Spare Parts"),FinishMissionSpareParts)
addGMFunction(_("buttonGM","Drone Nest"),FinishMissionDroneNest)
addGMFunction(_("buttonGM","Repair"),FinishMissionRepair)
end
function gmStartMission()
clearGMFunctions()
addGMFunction(_("buttonGM","-From Start Mission"),InitGM)
addGMFunction(_("buttonGM","Lost"), StartMissionLost)
addGMFunction(_("buttonGM","Patrol"),function ()
Defence_station.mission_state = "patrol attack"
SpawnPatrolEnemies()
end)
addGMFunction(_("buttonGM","Spare Parts"),StartMissionSpareParts)
addGMFunction(_("buttonGM","Drone Nest"), StartMissionDroneNest)
addGMFunction(_("buttonGM","Repair"), function ()
Wormhole_station.tier2_attack_countdown = 0
Wormhole_station.tier2_mission_state = "wait for attack"
end)
end
function InitDroneStations()
Defence_station.drones_think_were_friendly = false
Defence_station.convoy_enemies = {}
for _, stn in ipairs(Drone_stations) do
stn.spawns_left = 5
stn:setCanBeDestroyed(false)
stn:onTakingDamage(DroneStationGoAggro)
end
Drone_control_station = Drone_stations[irandom(1,#Drone_stations)]
Drone_control_station.x, Drone_control_station.y = Drone_control_station:getPosition()
Drone_control_station:setCanBeDestroyed(true)
Drone_control_station:setShieldsMax(Drone_control_station:getShieldMax(0) - 50)
Drone_control_station:setShields(Drone_control_station:getShieldMax(0))
Drone_control_station:setHullMax(Drone_control_station:getHullMax() - 50)
Drone_control_station:setHull(Drone_control_station:getHullMax())
Drone_control_station:setRadarSignatureInfo(1,1,1) --Not working? Only two of the lines are high, but still higher than others
Drone_control_station.spawns_left = 1
Drone_control_station:onDestroyed(FinishMissionDroneNest)
end
function InitPartsStation()
Parts_station:setCanBeDestroyed(false)
Parts_station:setShieldsMax(1)
Parts_station:setShields(1)
Parts_station:onTakingDamage(function()
Player:addToShipLog(_("wormhole-shipLog", "Firing on invulnerable target"), "Yellow")
if Parts_station.warned == nil then
Parts_station.warned = true
Wormhole_station:sendCommsMessage(Player, _("wormhole-incCall", [[Captain, Stop!
Don't waste your time shooting at that station. It has an Exuari emergency integrity field that will prevent catastrophic hull breach. Just a waste of energy, I promise you.]]))
end
end)
end
function InitKraylor()
for _, e in ipairs(Kw_stations) do
e:onTakingDamage(KWGoAggro)
end
for _, e in ipairs(Kw_enemies) do
e:onTakingDamage(KWGoAggro)
end
end
function InitTraffic()
Traffic = {}
Traffic.docked_ships = {}
Traffic.leaving_ships = {}
Traffic.new_ships = {}
Traffic.factions = {'Independent', 'Independent', 'Independent', 'Independent', 'Arlenians', 'Arlenians', 'TSN'}
Traffic.types = {'Atlantis', 'Transport1x2', 'Maverick', 'Kiriya', 'Hathcock', 'Flavia P.Falcon'}
Traffic.srcdest = {'J2','D0','B10','J8','zz1','zz6','zz8','D10','H11','K5'}
Traffic.stations = {Admin_station, Defence_station, Wormhole_station, Colony_area_station}
for _, stn in ipairs(Patrol_stations) do
table.insert(Traffic.stations,stn)
end
for _, stn in ipairs(Resupply_stations) do
table.insert(Traffic.stations,stn)
end
for _, stn in ipairs(Lookout_stations) do
table.insert(Traffic.stations,stn)
end
Traffic.timer = getScenarioTime()
end
--translate variations into a numeric Difficulty value
function SetSettings()
if string.find(getScenarioSetting("Difficulty"),"Easy") then
Difficulty = 1
elseif string.find(getScenarioSetting("Difficulty"),"Medium") then
Difficulty = 3
elseif string.find(getScenarioSetting("Difficulty"),"Hard") then
Difficulty = 5
else
Difficulty = 1 --default (Easy)
end
end
function InitCheevos()
-- CHEEVOS
-- * Collect all the good nebula treasures ("Experienced treasure hunter")
-- * Destroy all Exuari space stations (can leave spare parts station) ("Clean up the useless space junk")
-- * Leave the spare parts station intact ("Historical relic preservation")
-- * Never trigger a proximity spawn ("Social distancing")
-- * Defeat all the drone stations without using enemy ship ("Our ship is all we need")
-- * Defeat all the drone stations without using the beacons ("No DMCA violations")
-- * Leave no Convites on the map ("I ain't afraid of no ghosts")
-- * Find Dr. Hendrix without asking any stations ("Keep an eye on that doctor")
-- * Use all the insulting options at the wormhole ("Ban wormhole research")
-- * Finish with a combined reputation > 300 ("Heros for the ages")
-- * Grand slam - all cheevos in one run
CHEEVOS = {}
CHEEVOS["treasure"] = false -- DONE
CHEEVOS["junk"] = false -- DONE
CHEEVOS["relic"] = true -- DONE
CHEEVOS["distancing"] = true -- DONE
CHEEVOS["ourship"] = true -- DONE
CHEEVOS["DMCA"] = true -- DONE
CHEEVOS["noghosts"] = false -- DONE
CHEEVOS["eyeondr"] = true -- DONE
CHEEVOS["nowormhole"] = false -- DONE
CHEEVOS["heros"] = false -- DONE
CHEEVOS["grandslam"] = false -- DONE
end
--==================================================
--==
--==
--==
--==
--==
--==
--== ENEMY SPAWNING
--==
--==
--==
--==
--==
--==
--==
--==================================================
function SpawnEnemies(xOrigin, yOrigin, danger, enemyFaction)
-- square grid deployment
local fleetPosDelta1x = {0,1,0,-1, 0,1,-1, 1,-1,2,0,-2, 0,2,-2, 2,-2,2, 2,-2,-2,1,-1, 1,-1}
local fleetPosDelta1y = {0,0,1, 0,-1,1,-1,-1, 1,0,2, 0,-2,2,-2,-2, 2,1,-1, 1,-1,2, 2,-2,-2}
-- rough hexagonal deployment
local fleetPosDelta2x = {0,2,-2,1,-1, 1, 1,4,-4,0, 0,2,-2,-2, 2,3,-3, 3,-3,6,-6,1,-1, 1,-1,3,-3, 3,-3,4,-4, 4,-4,5,-5, 5,-5}
local fleetPosDelta2y = {0,0, 0,1, 1,-1,-1,0, 0,2,-2,2,-2, 2,-2,1,-1,-1, 1,0, 0,3, 3,-3,-3,3,-3,-3, 3,2,-2,-2, 2,1,-1,-1, 1}
--Ship Template Name List
local stnl = {"MT52 Hornet","MU52 Hornet","Adder MK5","Adder MK4","WX-Lindworm","Adder MK6","Phobos T3","Phobos M3","Piranha F8","Piranha F12","Ranus U","Nirvana R5A","Stalker Q7","Stalker R7","Atlantis X23","Starhammer II","Fighter","Cruiser","Missile Cruiser","Strikeship","Adv. Striker","Dreadnought","Battlestation","Blockade Runner","Ktlitan Fighter","Ktlitan Breaker","Ktlitan Worker","Ktlitan Drone","Ktlitan Feeder","Ktlitan Scout","Ktlitan Destroyer","Storm"}
--Ship Template Score List
local stsl = {5 ,5 ,7 ,6 ,7 ,8 ,15 ,16 ,15 ,15 ,25 ,20 ,25 ,25 ,50 ,70 ,6 ,18 ,14 ,30 ,27 ,80 ,100 ,65 ,6 ,45 ,40 ,4 ,48 ,8 ,50 ,22}
if enemyFaction == nil then
enemyFaction = "Kraylor"
end
if danger == nil then
danger = 1
end