-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathscenario_54_PatrolDuty.lua
executable file
·8637 lines (8575 loc) · 319 KB
/
scenario_54_PatrolDuty.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: Delta quadrant patrol duty
-- Description: Patrol between three stations in the Delta quadrant to protect from enemies
---
--- Version 8
-- Type: Mission
-- Variation[Easy]: Easy goals and/or enemies
-- Variation[Hard]: Hard goals and/or enemies
-- Variation[Self-destructive]: Extremely difficult goals and/or enemies
-- Variation[Short]: Fewer mission goals or shorter mission goals, shorter time taken
-- Variation[Timed 15]: End in 15 minutes
-- Variation[Timed 30]: End in 30 minutes
-- Variation[Short Easy]: Shorter time taken, easy goals and/or enemies
-- Variation[Timed 15 Easy]: End in 15 minutes, easy goals and/or enemies
-- Variation[Timed 30 Easy]: End in 30 minutes, easy goals and/or enemies
-- Variation[Short Hard]: Shorter time taken, hard goals and/or enemies
-- Variation[Timed 15 Hard]: End in 15 minutes, hard goals and/or enemies
-- Variation[Timed 30 Hard]: End in 30 minutes, hard goals and/or enemies
-- Variation[Short Self-destructive]: Shorter time taken, extremely difficult goals and/or enemies
-- Variation[Timed 15 Self-destructive]: End in 15 minutes, extremely difficult goals and/or enemies
-- Variation[Timed 30 Self-destructive]: End in 30 minutes, extremely difficult goals and/or enemies
-- Variation[Long]: More mission goals, longer time taken
-- Variation[Long Easy]: Longer time taken, easy goals and/or enemies
-- Variation[Long Hard]: Longer time taken, hard goals and/or enemies
-- Variation[Long Self-destructive]: Longer time taken, extremely difficult goals and/or enemies
-- Variation[Extended]: Longer missions than the long variation, longest time taken
-- Variation[Extended Easy]: Longest time taken, easy goals and/or enemies
-- Variation[Extended Hard]: Longest time taken, hard goals and/or enemies
-- Variation[Extended Self-destructive]: Longest time taken, extremely difficult goals and/or enemies
require("utils.lua")
function tableRemoveRandom(array)
-- Remove random element from array and return it.
-- Returns nil if the array is empty,
-- analogous to `table.remove`.
local array_item_count = #array
if array_item_count == 0 then
return nil
end
local selected_item = math.random(array_item_count)
array[selected_item], array[array_item_count] = array[array_item_count], array[selected_item]
return table.remove(array)
end
function createRandomAlongArc(object_type, amount, x, y, distance, startArc, endArcClockwise, randomize)
-- Create amount of objects of type object_type along arc
-- Center defined by x and y
-- Radius defined by distance
-- Start of arc between 0 and 360 (startArc), end arc: endArcClockwise
-- Use randomize to vary the distance from the center point. Omit to keep distance constant
-- Example:
-- createRandomAlongArc(Asteroid, 100, 500, 3000, 65, 120, 450)
if randomize == nil then randomize = 0 end
if amount == nil then amount = 1 end
local arcLen = endArcClockwise - startArc
local radialPoint = nil
local pointDist = nil
if startArc > endArcClockwise then
endArcClockwise = endArcClockwise + 360
arcLen = arcLen + 360
end
if amount > arcLen then
for ndex=1,arcLen do
radialPoint = startArc+ndex
pointDist = distance + random(-randomize,randomize)
object_type():setPosition(x + math.cos(radialPoint / 180 * math.pi) * pointDist, y + math.sin(radialPoint / 180 * math.pi) * pointDist)
end
for ndex=1,amount-arcLen do
radialPoint = random(startArc,endArcClockwise)
pointDist = distance + random(-randomize,randomize)
object_type():setPosition(x + math.cos(radialPoint / 180 * math.pi) * pointDist, y + math.sin(radialPoint / 180 * math.pi) * pointDist)
end
else
for ndex=1,amount do
radialPoint = random(startArc,endArcClockwise)
pointDist = distance + random(-randomize,randomize)
object_type():setPosition(x + math.cos(radialPoint / 180 * math.pi) * pointDist, y + math.sin(radialPoint / 180 * math.pi) * pointDist)
end
end
end
function createRandomAsteroidAlongArc(amount, x, y, distance, startArc, endArcClockwise, randomize)
-- Create amount of asteroids along arc
-- Center defined by x and y
-- Radius defined by distance
-- Start of arc between 0 and 360 (startArc), end arc: endArcClockwise
-- Use randomize to vary the distance from the center point. Omit to keep distance constant
-- Example:
-- createRandomAsteroidAlongArc(100, 500, 3000, 65, 120, 450)
local function asteroidSize()
return random(1,100) + random(1,75) + random(1,75) + random(1,20) + random(1,20) + random(1,20) + random(1,20) + random(1,20) + random(1,20) + random(1,20)
end
if randomize == nil then randomize = 0 end
if amount == nil then amount = 1 end
local arcLen = endArcClockwise - startArc
if startArc > endArcClockwise then
endArcClockwise = endArcClockwise + 360
arcLen = arcLen + 360
end
if amount > arcLen then
for ndex=1,arcLen do
local radialPoint = startArc+ndex
local pointDist = distance + random(-randomize,randomize)
Asteroid():setPosition(x + math.cos(radialPoint / 180 * math.pi) * pointDist, y + math.sin(radialPoint / 180 * math.pi) * pointDist):setSize(asteroidSize())
end
for ndex=1,amount-arcLen do
radialPoint = random(startArc,endArcClockwise)
pointDist = distance + random(-randomize,randomize)
Asteroid():setPosition(x + math.cos(radialPoint / 180 * math.pi) * pointDist, y + math.sin(radialPoint / 180 * math.pi) * pointDist):setSize(asteroidSize())
end
else
for ndex=1,amount do
radialPoint = random(startArc,endArcClockwise)
pointDist = distance + random(-randomize,randomize)
Asteroid():setPosition(x + math.cos(radialPoint / 180 * math.pi) * pointDist, y + math.sin(radialPoint / 180 * math.pi) * pointDist):setSize(asteroidSize())
end
end
end
function placeRandomAsteroidsAroundPoint(amount, dist_min, dist_max, x0, y0)
-- create amount of asteroid, at a distance between dist_min and dist_max around the point (x0, y0)
for n=1,amount do
local r = random(0, 360)
local distance = random(dist_min, dist_max)
x = x0 + math.cos(r / 180 * math.pi) * distance
y = y0 + math.sin(r / 180 * math.pi) * distance
local asteroid_size = random(1,100) + random(1,75) + random(1,75) + random(1,20) + random(1,20) + random(1,20) + random(1,20) + random(1,20) + random(1,20) + random(1,20)
Asteroid():setPosition(x, y):setSize(asteroid_size)
end
end
function closestPlayerTo(obj)
-- Return the player ship closest to passed object parameter
-- Return nil if no valid result
-- Assumes a maximum of 8 player ships
if obj ~= nil and obj:isValid() then
local closestDistance = 9999999
local closestPlayer = nil
for pidx=1,8 do
p = getPlayerShip(pidx)
if p ~= nil and p:isValid() then
local currentDistance = distance(p,obj)
if currentDistance < closestDistance then
closestPlayer = p
closestDistance = currentDistance
end
end
end
return closestPlayer
else
return nil
end
end
----------------------
-- Initialization --
----------------------
function init()
setVariations()
setConstants()
diagnostic = false
wfv = "nowhere" --wolf fence value - used for debugging
setPlayers()
generateStaticWorld()
--these are to facilitate testing
addGMFunction("Start plot 2 sick Kojak",initiatePlot2)
addGMFunction("Start p 3 McNabbit ride",initiatePlot3)
addGMFunction("St p4 Lisbon's stowaway",initiatePlot4)
addGMFunction("Start plot 5",initiatePlot5)
addGMFunction("Strt plot 8 Sheila dies",initiatePlot8)
addGMFunction("Start plot 9 ambush",initiatePlot9)
addGMFunction("Start plot 10 ambush",initiatePlot10)
addGMFunction("Skip to defend U.P.",skipToDefendUP)
addGMFunction("Skip to destroy S.C.",skipToDestroySC)
end
function setVariations()
-- Difficulty setting: 1 = normal, .5 is easy, 2 is hard, 5 is ridiculously hard
difficultyList = {.5, 1, 2, 5}
difficultySettingList = {"Easy", "Normal", "Hard", "Self-Destructive"}
difficultyIndex = 2 --default to normal difficulty
difficulty = difficultyList[difficultyIndex]
if string.find(getScenarioVariation(),"Short") or string.find(getScenarioVariation(),"Timed") then
patrolGoal = 6 --short and timed missions get a patrol goal of 6
missionLength = 1 --short and timed missions are categorized as mission length 1
else
patrolGoal = 9 --normal, long and extended get a patrol goal of 9
if string.find(getScenarioVariation(),"Long") then
missionLength = 3 --long missions are categorized as mission length 3
elseif string.find(getScenarioVariation(),"Extended") then
missionLength = 4 --extended missions are categorized as mission length 4
else
missionLength = 2 --normal missions are categorized as mission length 2
end
end
if string.find(getScenarioVariation(),"Easy") then
difficulty = .5 --easy missions get a .5 difficulty
elseif string.find(getScenarioVariation(),"Hard") then
difficulty = 2 --hard missions get a difficulty of 2
elseif string.find(getScenarioVariation(),"Self-destructive") then
difficulty = 5 --self destructive missions get a difficulty of 5
else
difficulty = 1 --default: normal mission difficulty of 1
end
playWithTimeLimit = false --assume no time limit
if string.find(getScenarioVariation(),"15") then
gameTimeLimit = 15 --set 15 minute time limit
elseif string.find(getScenarioVariation(),"30") then
gameTimeLimit = 30 --set 30 minute time limit
else
gameTimeLimit = 0 --default: set no time limit
end
if gameTimeLimit > 0 then
gameTimeLimit = gameTimeLimit*60 --convert minutes to seconds for time limit countdown
ambushTime = gameTimeLimit/2 --set halfway point for ambush in timed scenarios
playWithTimeLimit = true --set time limit boolean
plot7 = beforeAmbush --use time limit plot
end
end
function setConstants()
prefix_length = 0
suffix_index = 0
play_button_expire_time = 180
--Ship Template Name List
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","Odin","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
stsl = {5 ,5 ,7 ,6 ,7 ,8 ,15 ,16 ,15 ,15 ,25 ,20 ,25 ,25 ,50 ,70 ,250 ,6 ,18 ,14 ,30 ,27 ,80 ,100 ,65 ,6 ,45 ,40 ,4 ,48 ,8 ,50 ,22}
-- square grid deployment
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}
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
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}
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}
transportList = {}
transportSpawnDelay = 10 --30
commonGoods = {"food","medicine","nickel","platinum","gold","dilithium","tritanium","luxury","cobalt","impulse","warp","shield","tractor","repulsor","beam","optic","robotic","filament","transporter","sensor","communication","autodoc","lifter","android","nanites","software","circuit","battery"}
componentGoods = {"impulse","warp","shield","tractor","repulsor","beam","optic","robotic","filament","transporter","sensor","communication","autodoc","lifter","android","nanites","software","circuit","battery"}
mineralGoods = {"nickel","platinum","gold","dilithium","tritanium","cobalt"}
-- 27 types of goods so far
goodsList = { {"food",0},
{"medicine",0},
{"nickel",0},
{"platinum",0},
{"gold",0},
{"dilithium",0},
{"tritanium",0},
{"luxury",0},
{"cobalt",0},
{"impulse",0},
{"warp",0},
{"shield",0},
{"tractor",0},
{"repulsor",0},
{"beam",0},
{"optic",0},
{"robotic",0},
{"filament",0},
{"transporter",0},
{"sensor",0},
{"communication",0},
{"autodoc",0},
{"lifter",0},
{"android",0},
{"nanites",0},
{"software",0},
{"circuit",0},
{"battery",0} }
goods = {}
--Player ship name lists to supplant standard randomized call sign generation
playerShipNamesFor = {}
-- TODO switch to spelling with space or dash matching the type name
playerShipNamesFor["MP52Hornet"] = {"Dragonfly","Scarab","Mantis","Yellow Jacket","Jimminy","Flik","Thorny","Buzz"}
playerShipNamesFor["Piranha"] = {"Razor","Biter","Ripper","Voracious","Carnivorous","Characid","Vulture","Predator"}
playerShipNamesFor["FlaviaPFalcon"] = {"Ladyhawke","Hunter","Seeker","Gyrefalcon","Kestrel","Magpie","Bandit","Buccaneer"}
playerShipNamesFor["PhobosM3P"] = {"Blinder","Shadow","Distortion","Diemos","Ganymede","Castillo","Thebe","Retrograde"}
playerShipNamesFor["Atlantis"] = {"Excaliber","Thrasher","Punisher","Vorpal","Protang","Drummond","Parchim","Coronado"}
playerShipNamesFor["Cruiser"] = {"Excelsior","Velociraptor","Thunder","Kona","Encounter","Perth","Aspern","Panther"}
playerShipNamesFor["MissileCruiser"] = {"Projectus","Hurlmeister","Flinger","Ovod","Amatola","Nakhimov","Antigone"}
playerShipNamesFor["Fighter"] = {"Buzzer","Flitter","Zippiticus","Hopper","Molt","Stinger","Stripe"}
playerShipNamesFor["Benedict"] = {"Elizabeth","Ford","Vikramaditya","Liaoning","Avenger","Naruebet","Washington","Lincoln","Garibaldi","Eisenhower"}
playerShipNamesFor["Kiriya"] = {"Cavour","Reagan","Gaulle","Paulo","Truman","Stennis","Kuznetsov","Roosevelt","Vinson","Old Salt"}
playerShipNamesFor["Striker"] = {"Sparrow","Sizzle","Squawk","Crow","Phoenix","Snowbird","Hawk"}
playerShipNamesFor["Lindworm"] = {"Seagull","Catapult","Blowhard","Flapper","Nixie","Pixie","Tinkerbell"}
playerShipNamesFor["Repulse"] = {"Fiddler","Brinks","Loomis","Mowag","Patria","Pandur","Terrex","Komatsu","Eitan"}
playerShipNamesFor["Ender"] = {"Mongo","Godzilla","Leviathan","Kraken","Jupiter","Saturn"}
playerShipNamesFor["Nautilus"] = {"October", "Abdiel", "Manxman", "Newcon", "Nusret", "Pluton", "Amiral", "Amur", "Heinkel", "Dornier"}
playerShipNamesFor["Hathcock"] = {"Hayha", "Waldron", "Plunkett", "Mawhinney", "Furlong", "Zaytsev", "Pavlichenko", "Pegahmagabow", "Fett", "Hawkeye", "Hanzo"}
playerShipNamesFor["Crucible"] = {"Sling", "Stark", "Torrid", "Kicker", "Flummox"}
playerShipNamesFor["Maverick"] = {"Angel", "Thunderbird", "Roaster", "Magnifier", "Hedge"}
playerShipNamesFor["Leftovers"] = {"Foregone","Righteous","Masher"}
posseShipNames = {"Bubba","George","Winifred","Daniel","Darla","Stephen","Bob","Porky","Sally","Tommy","Jenny","Johnny","Lizzy","Billy"}
station_pool = {
["Science"] = {
["Asimov"] = {
weapon_available = {
Homing = true,
HVLI = random(1,13)<=(9-difficulty),
Mine = true,
Nuke = random(1,13)<=(5-difficulty),
EMP = random(1,13)<=(6-difficulty),
},
services = {
supplydrop = "friend",
reinforcements = "friend",
jumpsupplydrop = "friend",
},
service_cost = {
supplydrop = math.random(80,120),
reinforcements = math.random(125,175),
jumpsupplydrop = math.random(110,140),
},
reputation_cost_multipliers = {
friend = 1.0,
neutral = 3.0,
},
goods = {
tractor = {
quantity = 5,
cost = 48,
},
repulsor = {
quantity = 5,
cost = 48,
},
},
trade = {
food = false,
medicine = false,
luxury = false,
},
description = "Training and Coordination",
general = "We train naval cadets in routine and specialized functions aboard space vessels and coordinate naval activity throughout the sector",
history = "The original station builders were fans of the late 20th century scientist and author Isaac Asimov. The station was initially named Foundation, but was later changed simply to Asimov. It started off as a stellar observatory, then became a supply stop and as it has grown has become an educational and coordination hub for the region",
},
["Armstrong"] = {
weapon_available = {
Homing = random(1,13)<=(8-difficulty),
HVLI = true,
Mine = random(1,13)<=(7-difficulty),
Nuke = random(1,13)<=(5-difficulty),
EMP = true
},
services = {
supplydrop = "friend",
reinforcements = "friend",
jumpsupplydrop = "friend",
},
service_cost = {
supplydrop = math.random(80,120),
reinforcements = math.random(125,175),
jumpsupplydrop = math.random(110,140),
},
goods = {
warp = {
quantity = 5,
cost = 77,
},
impulse = {
quantity = 5,
cost = 62,
},
},
trade = {
food = false,
medicine = false,
luxury = false,
},
buy = {
[randomMineral()] = math.random(40,200),
},
description = "Warp and Impulse engine manufacturing",
general = "We manufacture warp, impulse and jump engines for the human navy fleet as well as other independent clients on a contract basis",
history = "The station is named after the late 19th century astronaut as well as the fictionlized stations that followed. The station initially constructed entire space worthy vessels. In time, it transitioned into specializeing in propulsion systems.",
},
["Broeck"] = {
weapon_available = {
Homing = random(1,13)<=(8-difficulty),
HVLI = random(1,13)<=(9-difficulty),
Mine = random(1,13)<=(7-difficulty),
Nuke = random(1,13)<=(5-difficulty),
EMP = random(1,13)<=(6-difficulty),
},
services = {
supplydrop = "friend",
reinforcements = "friend",
jumpsupplydrop = "friend",
},
service_cost = {
supplydrop = math.random(80,120),
reinforcements = math.random(125,175),
jumpsupplydrop = math.random(110,140),
},
goods = {
warp = {
quantity = 5,
cost = 36,
},
},
trade = {
food = false,
medicine = false,
luxury = random(1,100) < 62,
},
buy = {
[randomMineral()] = math.random(40,200),
},
description = "Warp drive components",
general = "We provide warp drive engines and components",
history = "This station is named after Chris Van Den Broeck who did some initial research into the possibility of warp drive in the late 20th century on Earth",
},
["Coulomb"] = {
weapon_available = {
Homing = random(1,13)<=(8-difficulty),
HVLI = random(1,13)<=(9-difficulty),
Mine = random(1,13)<=(7-difficulty),
Nuke = random(1,13)<=(5-difficulty),
EMP = random(1,13)<=(6-difficulty),
},
services = {
supplydrop = "friend",
reinforcements = "friend",
jumpsupplydrop = "friend",
},
service_cost = {
supplydrop = math.random(80,120),
reinforcements = math.random(125,175),
jumpsupplydrop = math.random(110,140),
},
reputation_cost_multipliers = {
friend = 1.0,
neutral = 3.0,
},
goods = {
circuit = {
quantity = 5,
cost = 50,
},
},
trade = {
food = false,
medicine = false,
luxury = random(1,100) < 82,
},
buy = {
[randomMineral()] = math.random(40,200),
},
description = "Shielded circuitry fabrication",
general = "We make a large variety of circuits for numerous ship systems shielded from sensor detection and external control interference",
history = "Our station is named after the law which quantifies the amount of force with which stationary electrically charged particals repel or attact each other - a fundamental principle in the design of our circuits",
},
["Heyes"] = {
weapon_available = {
Homing = random(1,13)<=(8-difficulty),
HVLI = true,
Mine = random(1,13)<=(7-difficulty),
Nuke = random(1,13)<=(5-difficulty),
EMP = random(1,13)<=(6-difficulty),
},
services = {
supplydrop = "friend",
reinforcements = "friend",
jumpsupplydrop = "friend",
},
service_cost = {
supplydrop = math.random(80,120),
reinforcements = math.random(125,175),
jumpsupplydrop = math.random(110,140),
},
reputation_cost_multipliers = {
friend = 1.0,
neutral = 3.0,
},
goods = {
sensor = {
quantity = 5,
cost = 72,
},
},
trade = {
food = false,
medicine = false,
luxury = true,
},
buy = {
[randomMineral()] = math.random(40,200),
},
description = "Sensor components",
general = "We research and manufacture sensor components and systems",
history = "The station is named after Tony Heyes the inventor of some of the earliest electromagnetic sensors in the mid 20th century on Earth in the United Kingdom to assist blind human mobility",
},
["Hossam"] = {
weapon_available = {
Homing = random(1,13)<=(8-difficulty),
HVLI = random(1,13)<=(9-difficulty),
Mine = random(1,13)<=(7-difficulty),
Nuke = random(1,13)<=(5-difficulty),
EMP = random(1,13)<=(6-difficulty),
},
services = {
supplydrop = "friend",
reinforcements = "friend",
jumpsupplydrop = "friend",
},
service_cost = {
supplydrop = math.random(80,120),
reinforcements = math.random(125,175),
jumpsupplydrop = math.random(110,140),
},
reputation_cost_multipliers = {
friend = 1.0,
neutral = 3.0,
},
goods = {
nanites = {
quantity = 5,
cost = 90,
},
},
trade = {
food = random(1,100) < 24,
medicine = random(1,100) < 44,
luxury = random(1,100) < 63,
},
description = "Nanite supplier",
general = "We provide nanites for various organic and non-organic systems",
history = "This station is named after the nanotechnologist Hossam Haick from the early 21st century on Earth in Israel",
},
["Maiman"] = {
weapon_available = {
Homing = random(1,13)<=(8-difficulty),
HVLI = false,
Mine = random(1,13)<=(7-difficulty),
Nuke = random(1,13)<=(5-difficulty),
EMP = random(1,13)<=(6-difficulty),
},
services = {
supplydrop = "friend",
reinforcements = "friend",
jumpsupplydrop = "friend",
},
service_cost = {
supplydrop = math.random(80,120),
reinforcements = math.random(125,175),
jumpsupplydrop = math.random(110,140),
},
reputation_cost_multipliers = {
friend = 1.0,
neutral = 3.0,
},
goods = {
beam = {
quantity = 5,
cost = 70,
},
},
trade = {
food = false,
medicine = true,
luxury = false,
},
buy = {
[randomMineral()] = math.random(40,200),
},
description = "Energy beam components",
general = "We research and manufacture energy beam components and systems",
history = "The station is named after Theodore Maiman who researched and built the first laser in the mid 20th century on Earth",
},
["Malthus"] = {
weapon_available = {
Homing = random(1,13)<=(8-difficulty),
HVLI = random(1,13)<=(9-difficulty),
Mine = random(1,13)<=(7-difficulty),
Nuke = random(1,13)<=(5-difficulty),
EMP = random(1,13)<=(6-difficulty),
},
services = {
supplydrop = "friend",
reinforcements = "friend",
jumpsupplydrop = "friend",
},
service_cost = {
supplydrop = math.random(80,120),
reinforcements = math.random(125,175),
jumpsupplydrop = math.random(110,140),
},
reputation_cost_multipliers = {
friend = 1.0,
neutral = 3.0,
},
goods = {},
trade = {
food = false,
medicine = false,
luxury = false,
},
description = "Gambling and resupply",
general = "The oldest station in the quadrant",
history = "",
},
["Marconi"] = {
weapon_available = {
Homing = random(1,13)<=(8-difficulty),
HVLI = random(1,13)<=(9-difficulty),
Mine = random(1,13)<=(7-difficulty),
Nuke = random(1,13)<=(5-difficulty),
EMP = random(1,13)<=(6-difficulty),
},
services = {
supplydrop = "friend",
reinforcements = "friend",
jumpsupplydrop = "friend",
},
service_cost = {
supplydrop = math.random(80,120),
reinforcements = math.random(125,175),
jumpsupplydrop = math.random(110,140),
},
reputation_cost_multipliers = {
friend = 1.0,
neutral = 3.0,
},
goods = {
beam = {
quantity = 5,
cost = 80,
},
},
trade = {
food = false,
medicine = false,
luxury = true,
},
description = "Energy Beam Components",
general = "We manufacture energy beam components",
history = "Station named after Guglielmo Marconi an Italian inventor from early 20th century Earth who, along with Nicolo Tesla, claimed to have invented a death ray or particle beam weapon",
},
["Miller"] = {
weapon_available = {
Homing = random(1,13)<=(8-difficulty),
HVLI = random(1,13)<=(9-difficulty),
Mine = random(1,13)<=(7-difficulty),
Nuke = random(1,13)<=(5-difficulty),
EMP = random(1,13)<=(6-difficulty),
},
services = {
supplydrop = "friend",
reinforcements = "friend",
jumpsupplydrop = "friend",
},
service_cost = {
supplydrop = math.random(80,120),
reinforcements = math.random(125,175),
jumpsupplydrop = math.random(110,140),
},
reputation_cost_multipliers = {
friend = 1.0,
neutral = 3.0,
},
goods = {
optic = {
quantity = 5,
cost = 60,
},
},
trade = {
food = false,
medicine = false,
luxury = false,
},
description = "Exobiology research",
general = "We study recently discovered life forms not native to Earth",
history = "This station was named after one of the early exobiologists from mid 20th century Earth, Dr. Stanley Miller",
},
["Shawyer"] = {
weapon_available = {
Homing = random(1,13)<=(8-difficulty),
HVLI = random(1,13)<=(9-difficulty),
Mine = random(1,13)<=(7-difficulty),
Nuke = random(1,13)<=(5-difficulty),
EMP = random(1,13)<=(6-difficulty),
},
services = {
supplydrop = "friend",
reinforcements = "friend",
jumpsupplydrop = "friend",
},
service_cost = {
supplydrop = math.random(80,120),
reinforcements = math.random(125,175),
jumpsupplydrop = math.random(110,140),
},
reputation_cost_multipliers = {
friend = 1.0,
neutral = 2.0,
},
goods = {
impulse = {
quantity = 5,
cost = 100,
},
},
trade = {
food = false,
medicine = false,
luxury = true,
},
description = "Impulse engine components",
general = "We research and manufacture impulse engine components and systems",
history = "The station is named after Roger Shawyer who built the first prototype impulse engine in the early 21st century",
},
},
["History"] = {
["Archimedes"] = {
weapon_available = {
Homing = random(1,13)<=(8-difficulty),
HVLI = random(1,13)<=(9-difficulty),
Mine = random(1,13)<=(7-difficulty),
Nuke = random(1,13)<=(5-difficulty),
EMP = random(1,13)<=(6-difficulty),
},
services = {
supplydrop = "friend",
reinforcements = "friend",
jumpsupplydrop = "friend",
},
service_cost = {
supplydrop = math.random(80,120),
reinforcements = math.random(125,175),
jumpsupplydrop = math.random(110,140),
},
reputation_cost_multipliers = {
friend = 1.0,
neutral = 3.0,
},
goods = {
beam = {
quantity = 5,
cost = 80,
},
},
trade = {
food = true,
medicine = false,
luxury = true,
},
description = "Energy and particle beam components",
general = "We fabricate general and specialized components for ship beam systems",
history = "This station was named after Archimedes who, according to legend, used a series of adjustable focal length mirrors to focus sunlight on a Roman naval fleet invading Syracuse, setting fire to it",
},
["Chatuchak"] = {
weapon_available = {
Homing = random(1,10)<=(8-difficulty),
HVLI = random(1,10)<=(9-difficulty),
Mine = false,
Nuke = random(1,10)<=(5-difficulty),
EMP = random(1,10)<=(6-difficulty),
},
services = {
supplydrop = "friend",
reinforcements = "friend",
jumpsupplydrop = "friend",
},
service_cost = {
supplydrop = math.random(80,120),
reinforcements = math.random(125,175),
jumpsupplydrop = math.random(110,140),
},
reputation_cost_multipliers = {
friend = 1.0,
neutral = 2.0,
},
goods = {
luxury = {
quantity = 5,
cost = 60,
},
},
trade = {
food = false,
medicine = false,
luxury = false,
},
description = "Trading station",
general = "Only the largest market and trading location in twenty sectors. You can find your heart's desire here",
history = "Modeled after the early 21st century bazaar on Earth in Bangkok, Thailand. Designed and built with trade and commerce in mind",
},
["Grasberg"] = {
weapon_available = {
Homing = random(1,13)<=(8-difficulty),
HVLI = random(1,13)<=(9-difficulty),
Mine = random(1,13)<=(7-difficulty),
Nuke = random(1,13)<=(5-difficulty),
EMP = random(1,13)<=(6-difficulty),
},
services = {
supplydrop = "friend",
reinforcements = "friend",
jumpsupplydrop = "friend",
},
service_cost = {
supplydrop = math.random(80,120),
reinforcements = math.random(125,175),
jumpsupplydrop = math.random(110,140),
},
reputation_cost_multipliers = {
friend = 1.0,
neutral = 2.0,
},
goods = {
luxury = {
quantity = 5,
cost = 70,
},
},
trade = {
food = true,
medicine = false,
luxury = false,
},
buy = {
[randomComponent()] = math.random(40,200),
},
description = "Mining",
general ="We mine nearby asteroids for precious minerals and process them for sale",
history = "This station's name is inspired by a large gold mine on Earth in Indonesia. The station builders hoped to have a similar amount of minerals found amongst these asteroids",
},
["Hayden"] = {
weapon_available = {
Homing = random(1,13)<=(8-difficulty),
HVLI = random(1,13)<=(9-difficulty),
Mine = random(1,13)<=(7-difficulty),
Nuke = random(1,13)<=(5-difficulty),
EMP = random(1,13)<=(6-difficulty),
},
services = {
supplydrop = "friend",
reinforcements = "friend",
jumpsupplydrop = "friend",
},
service_cost = {
supplydrop = math.random(80,120),
reinforcements = math.random(125,175),
jumpsupplydrop = math.random(110,140),
},
reputation_cost_multipliers = {
friend = 1.0,
neutral = 2.0,
},
goods = {
nanites = {
quantity = 5,
cost = 65,
},
},
trade = {
food = false,
medicine = false,
luxury = false,
},
description = "Observatory and stellar mapping",
general = "We study the cosmos and map stellar phenomena. We also track moving asteroids. Look out! Just kidding",
history = "Station named in honor of Charles Hayden whose philanthropy continued astrophysical research and education on Earth in the early 20th century",
},
["Lipkin"] = {
weapon_available = {
Homing = random(1,13)<=(8-difficulty),
HVLI = random(1,13)<=(9-difficulty),
Mine = false,
Nuke = random(1,13)<=(5-difficulty),
EMP = random(1,13)<=(6-difficulty),
},
services = {
supplydrop = "friend",
reinforcements = "friend",
jumpsupplydrop = "friend",
},
service_cost = {
supplydrop = math.random(80,120),
reinforcements = math.random(125,175),
jumpsupplydrop = math.random(110,140),
},
reputation_cost_multipliers = {
friend = 1.0,
neutral = 2.0,
},
goods = {
autodoc = {
quantity = 5,
cost = 76,
},
},
trade = {
food = false,
medicine = false,
luxury = true,
},
description = "Autodoc components",
general = "",
history = "The station is named after Dr. Lipkin who pioneered some of the research and application around robot assisted surgery in the area of partial nephrectomy for renal tumors in the early 21st century on Earth",
},
["Madison"] = {
weapon_available = {
Homing = false,
HVLI = random(1,13)<=(9-difficulty),
Mine = random(1,13)<=(7-difficulty),
Nuke = random(1,13)<=(5-difficulty),
EMP = random(1,13)<=(6-difficulty),
},
services = {
supplydrop = "friend",
reinforcements = "friend",
jumpsupplydrop = "friend",
},
service_cost = {
supplydrop = math.random(80,120),
reinforcements = math.random(125,175),
jumpsupplydrop = math.random(110,140),
},
reputation_cost_multipliers = {
friend = 1.0,
neutral = 2.0,
},
goods = {
luxury = {
quantity = 5,
cost = math.random(60,70),
},
},
trade = {
food = false,
medicine = true,
luxury = false,
},
description = "Zero gravity sports and entertainment",
general = "Come take in a game or two or perhaps see a show",
history = "Named after Madison Square Gardens from 21st century Earth, this station was designed to serve similar purposes in space - a venue for sports and entertainment",
},
["Rutherford"] = {
weapon_available = {
Homing = random(1,13)<=(8-difficulty),
HVLI = random(1,13)<=(9-difficulty),
Mine = random(1,13)<=(7-difficulty),
Nuke = random(1,13)<=(5-difficulty),
EMP = random(1,13)<=(6-difficulty),
},
services = {
supplydrop = "friend",
reinforcements = "friend",
jumpsupplydrop = "friend",
},
service_cost = {
supplydrop = math.random(80,120),
reinforcements = math.random(125,175),
jumpsupplydrop = math.random(110,140),
},
reputation_cost_multipliers = {
friend = 1.0,
neutral = 2.0,
},
goods = {
shield = {
quantity = 5,
cost = 90,
},
},
trade = {
food = false,
medicine = false,
luxury = random(1,100) < 43,
},
description = "Shield components and research",
general = "We research and fabricate components for ship shield systems",
history = "This station was named after the national research institution Rutherford Appleton Laboratory in the United Kingdom which conducted some preliminary research into the feasability of generating an energy shield in the late 20th century",
},
["Toohie"] = {
weapon_available = {
Homing = random(1,13)<=(8-difficulty),
HVLI = random(1,13)<=(9-difficulty),
Mine = random(1,13)<=(7-difficulty),
Nuke = random(1,13)<=(5-difficulty),
EMP = random(1,13)<=(6-difficulty),
},
services = {
supplydrop = "friend",
reinforcements = "friend",
jumpsupplydrop = "friend",
},
service_cost = {
supplydrop = math.random(80,120),
reinforcements = math.random(125,175),
jumpsupplydrop = math.random(110,140),
},
reputation_cost_multipliers = {
friend = 1.0,
neutral = 3.0,
},
goods = {
shield = {
quantity = 5,
cost = 90,
},
},
trade = {
food = false,
medicine = false,
luxury = true,