-
Notifications
You must be signed in to change notification settings - Fork 6
/
scenario_50_gaps.lua
4387 lines (4273 loc) · 188 KB
/
scenario_50_gaps.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: Close the Gaps
-- Description: Using Nautilus class mine layer, lay mines across the space lanes expected to be used by invading enemies
---
--- Version 1 - Nov2021
---
--- Mission advice: It's better to hit an asteroid than a mine
-- Type: Mission
-- Setting[Settings]: Configures time/goal/the amount of enemies spawned in the scenario.
-- Settings[Easy]: Easy goals and/or enemies
-- Settings[Normal|Default]: Normal goals and/or enemies.
-- Settings[Hard]: Hard goals and/or enemies
-- Settings[Quixotic]: Practically impossible goals and/or enemies, definitely time consuming
-- Settings[Timed Normal]: Complete the mission in less than 30 minutes
-- Settings[Timed Easy]: Easy goals and/or enemies, Complete the mission in less than 30 minutes
-- Settings[Timed Hard]: Hard goals and/or enemies, Complete the mission in less than 30 minutes
-- Settings[Timed Quixotic]: Practically impossible goals and/or enemies, Complete the mission in less than 30 minutes
require("utils.lua")
--[[-------------------------------------------------------------------
Initialization routines
--]]-------------------------------------------------------------------
function init()
setSettings()
missile_types = {'Homing', 'Nuke', 'Mine', 'EMP', 'HVLI'}
--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}
--Player Ship Beams
psb = {}
psb["MP52 Hornet"] = 2
psb["Phobos M3P"] = 2
psb["Flavia P.Falcon"] = 2
psb["Atlantis"] = 2
psb["Player Cruiser"] = 2
psb["Player Fighter"] = 2
psb["Striker"] = 2
psb["ZX-Lindworm"] = 1
psb["Ender"] = 12
psb["Repulse"] = 2
psb["Benedict"] = 2
psb["Kiriya"] = 2
psb["Nautilus"] = 2
psb["Hathcock"] = 4
-- 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,0, 0,3,-3,1, 1,3,-3,-1,-1, 3,-3,2, 2,3,-3,-2,-2, 3,-3,3, 3,-3,-3,4,0,-4, 0,4,-4, 4,-4,-4,-4,-4,-4,-4,-4,4, 4,4, 4,4, 4, 1,-1, 2,-2, 3,-3,1,-1,2,-2,3,-3,5,-5,0, 0,5, 5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,5, 5,5, 5,5, 5,5, 5, 1,-1, 2,-2, 3,-3, 4,-4,1,-1,2,-2,3,-3,4,-4}
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,3,-3,0, 0,3,-3,1, 1, 3,-3,-1,-1,3,-3,2, 2, 3,-3,-2,-2,3,-3, 3,-3,0,4, 0,-4,4,-4,-4, 4, 1,-1, 2,-2, 3,-3,1,-1,2,-2,3,-3,-4,-4,-4,-4,-4,-4,4, 4,4, 4,4, 4,0, 0,5,-5,5,-5, 5,-5, 1,-1, 2,-2, 3,-3, 4,-4,1,-1,2,-2,3,-3,4,-4,-5,-5,-5,-5,-5,-5,-5,-5,5, 5,5, 5,5, 5,5, 5}
-- 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,8,-8,4,-4, 4,-4,5,5 ,-5,-5,2, 2,-2,-2,0, 0,6, 6,-6,-6,7, 7,-7,-7,10,-10,5, 5,-5,-5,6, 6,-6,-6,7, 7,-7,-7,8, 8,-8,-8,9, 9,-9,-9,3, 3,-3,-3,1, 1,-1,-1,12,-12,6,-6, 6,-6,7,-7, 7,-7,8,-8, 8,-8,9,-9, 9,-9,10,-10,10,-10,11,-11,11,-11,4,-4, 4,-4,2,-2, 2,-2,0, 0}
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,0, 0,4,-4,-4, 4,3,-3, 3,-3,4,-4, 4,-4,4,-4,2,-2, 2,-2,1,-1, 1,-1, 0, 0,5,-5, 5,-5,4,-4, 4,-4,3,-3, 3,-7,2,-2, 2,-2,1,-1, 1,-1,5,-5, 5,-5,5,-5, 5,-5, 0, 0,6, 6,-6,-6,5, 5,-5,-5,4, 4,-4,-4,3, 3,-3,-3, 2, 2,-2, -2, 1, 1,-1, -1,6, 6,-6,-6,6, 6,-6,-6,6,-6}
--list of goods available to buy, sell or trade (sell still under development)
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} }
diagnostic = false
spawnStrings = {}
GMDiagnosticOn = _("buttonGM", "Turn On Diagnostic")
addGMFunction(GMDiagnosticOn,turnOnDiagnostic)
interWave = 150
GMDelayNormalToSlow = _("buttonGM", "Delay normal to slow")
addGMFunction(GMDelayNormalToSlow,delayNormalToSlow)
goods = {} --overall tracking of goods
stationList = {} --friendly and neutral stations
enemyStationList = {}
tradeFood = {} --stations that will trade food for other goods
tradeLuxury = {} --stations that will trade luxury for other goods
tradeMedicine = {} --stations that will trade medicine for other goods
--array of functions to facilitate randomized station placement (friendly and neutral)
placeStation = {placeAlcaleica, -- 1
placeAnderson, -- 2
placeArcher, -- 3
placeArchimedes, -- 4
placeArmstrong, -- 5
placeAsimov, -- 6
placeBarclay, -- 7
placeBethesda, -- 8
placeBroeck, -- 9
placeCalifornia, --10
placeCalvin, --11
placeCavor, --12
placeChatuchak, --13
placeCoulomb, --14
placeCyrus, --15
placeDeckard, --16
placeDeer, --17
placeErickson, --18
placeEvondos, --19
placeFeynman, --20
placeGrasberg, --21
placeHayden, --22
placeHeyes, --23
placeHossam, --24
placeImpala, --25
placeKomov, --26
placeKrak, --27
placeKruk, --28
placeLipkin, --29
placeMadison, --30
placeMaiman, --31
placeMarconi, --32
placeMayo, --33
placeMiller, --34
placeMuddville, --35
placeNexus6, --36
placeOBrien, --37
placeOlympus, --38
placeOrgana, --39
placeOutpost15, --40
placeOutpost21, --41
placeOwen, --42
placePanduit, --43
placeRipley, --44
placeRutherford, --45
placeScience7, --46
placeShawyer, --47
placeShree, --48
placeSoong, --49
placeTiberius, --50
placeTokra, --51
placeToohie, --52
placeUtopiaPlanitia, --53
placeVactel, --54
placeVeloquan, --55
placeZefram} --56
--array of functions to facilitate randomized station placement (friendly, neutral or enemy)
placeGenericStation = {placeJabba, -- 1
placeKrik, -- 2
placeLando, -- 3
placeMaverick, -- 4
placeNefatha, -- 5
placeOkun, -- 6
placeOutpost7, -- 7
placeOutpost8, -- 8
placeOutpost33, -- 9
placePrada, --10
placeResearch11, --11
placeResearch19, --12
placeRubis, --13
placeScience2, --14
placeScience4, --15
placeSkandar, --16
placeSpot, --17
placeStarnet, --18
placeTandon, --19
placeVaiken, --20
placeValero} --21
--array of functions to facilitate randomized station placement (enemy)
placeEnemyStation = {placeAramanth, -- 1
placeEmpok, -- 2
placeGandala, -- 3
placeHassenstadt, -- 4
placeKaldor, -- 5
placeMagMesra, -- 6
placeMosEisley, -- 7
placeQuestaVerde, -- 8
placeRlyeh, -- 9
placeScarletCit, --10
placeStahlstadt, --11
placeTic} --12
buildStations()
--Player ship name lists to supplant standard randomized call sign generation
playerShipNamesForMP52Hornet = {"Dragonfly","Scarab","Mantis","Yellow Jacket","Jimminy","Flik","Thorny","Buzz"}
playerShipNamesForPiranha = {"Razor","Biter","Ripper","Voracious","Carnivorous","Characid","Vulture","Predator"}
playerShipNamesForFlaviaPFalcon = {"Ladyhawke","Hunter","Seeker","Gyrefalcon","Kestrel","Magpie","Bandit","Buccaneer"}
playerShipNamesForPhobosM3P = {"Blinder","Shadow","Distortion","Diemos","Ganymede","Castillo","Thebe","Retrograde"}
playerShipNamesForAtlantis = {"Excaliber","Thrasher","Punisher","Vorpal","Protang","Drummond","Parchim","Coronado"}
playerShipNamesForCruiser = {"Excelsior","Velociraptor","Thunder","Kona","Encounter","Perth","Aspern","Panther"}
playerShipNamesForMissileCruiser = {"Projectus","Hurlmeister","Flinger","Ovod","Amatola","Nakhimov","Antigone"}
playerShipNamesForFighter = {"Buzzer","Flitter","Zippiticus","Hopper","Molt","Stinger","Stripe"}
playerShipNamesForBenedict = {"Elizabeth","Ford","Vikramaditya","Liaoning","Avenger","Naruebet","Washington","Lincoln","Garibaldi","Eisenhower"}
playerShipNamesForKiriya = {"Cavour","Reagan","Gaulle","Paulo","Truman","Stennis","Kuznetsov","Roosevelt","Vinson","Old Salt"}
playerShipNamesForStriker = {"Sparrow","Sizzle","Squawk","Crow","Phoenix","Snowbird","Hawk"}
playerShipNamesForLindworm = {"Seagull","Catapult","Blowhard","Flapper","Nixie","Pixie","Tinkerbell"}
playerShipNamesForRepulse = {"Fiddler","Brinks","Loomis","Mowag","Patria","Pandur","Terrex","Komatsu","Eitan"}
playerShipNamesForEnder = {"Mongo","Godzilla","Leviathan","Kraken","Jupiter","Saturn"}
playerShipNamesForNautilus = {"October", "Abdiel", "Manxman", "Newcon", "Nusret", "Pluton", "Amiral", "Amur", "Heinkel", "Dornier"}
playerShipNamesForHathcock = {"Hayha", "Waldron", "Plunkett", "Mawhinney", "Furlong", "Zaytsev", "Pavlichenko", "Pegahmagabow", "Fett", "Hawkeye", "Hanzo"}
playerShipNamesForLeftovers = {"Foregone","Righteous","Masher"}
primaryOrders = ""
secondaryOrders = ""
optionalOrders = ""
transportList = {}
transportSpawnDelay = 10
plotT = transportPlot
plotH = healthCheck
healthCheckTimer = 5
healthCheckTimerInterval = 5
px, py = vectorFromAngle(random(0,360),random(2500,3000))
player = PlayerSpaceship():setFaction("Human Navy"):setTemplate("Nautilus"):setPosition(px,py)
ni = math.random(1,#playerShipNamesForNautilus)
player:setCallSign(playerShipNamesForNautilus[ni])
table.remove(playerShipNamesForNautilus,ni)
player.nameAssigned = true
player.shipScore = 12
player.maxCargo = 7
player.cargo = 7
player.maxRepairCrew = player:getRepairCrewCount()
player.healthyShield = 1.0
player.prevShield = 1.0
player.healthyReactor = 1.0
player.prevReactor = 1.0
player.healthyManeuver = 1.0
player.prevManeuver = 1.0
player.healthyImpulse = 1.0
player.prevImpulse = 1.0
player.healthyBeam = 1.0
player.prevBeam = 1.0
player.healthyMissile = 1.0
player.prevMissile = 1.0
player.healthyJump = 1.0
player.prevJump = 1.0
player.healthyWarp = 1.0
player.prevWarp = 1.0
goods[player] = goodsList
player:addReputationPoints(100)
player.initialRep = true
plot1 = initialInstructions
initialOrderTimer = 3
lowerDensity = 70
upperDensity = 150
thickness = 2000
--Arcs
createRandomAlongArc(Asteroid, random(lowerDensity,upperDensity), 0, 0, 20000, 5, 85, thickness)
createRandomAlongArc(Asteroid, random(lowerDensity,upperDensity), 0, 0, 20000, 95, 175, thickness)
createRandomAlongArc(Asteroid, random(lowerDensity,upperDensity), 0, 0, 20000, 185, 265, thickness)
createRandomAlongArc(Asteroid, random(lowerDensity,upperDensity), 0, 0, 20000, 275, 355, thickness)
--Bulges
ax, ay = vectorFromAngle(random(20,70),20000)
placeRandomAroundPoint(Asteroid,40,1,5000,ax,ay)
ax, ay = vectorFromAngle(random(110,160),20000)
placeRandomAroundPoint(Asteroid,40,1,5000,ax,ay)
ax, ay = vectorFromAngle(random(200,250),20000)
placeRandomAroundPoint(Asteroid,40,1,5000,ax,ay)
ax, ay = vectorFromAngle(random(290,340),20000)
placeRandomAroundPoint(Asteroid,40,1,5000,ax,ay)
--color
if not diagnostic then
createRandomAlongArc(Nebula, difficulty*10, 50000, 50000, 70000, 180, 270, 35000)
end
northMineCount = -1
southMineCount = -1
eastMineCount = -1
westMineCount = -1
northObjCount = -1
southObjCount = -1
eastObjCount = -1
westObjCount = -1
northClosed = false
southClosed = false
eastClosed = false
westClosed = false
northMet = false
southMet = false
eastMet = false
westMet = false
wfv = "end of init"
end
-- Diagnostic enable/disable buttons on GM screen
function turnOnDiagnostic()
diagnostic = true
removeGMFunction(GMDiagnosticOn)
GMDiagnosticOff = _("buttonGM", "Turn Off Diagnostic")
addGMFunction(GMDiagnosticOff,turnOffDiagnostic)
end
function turnOffDiagnostic()
diagnostic = false
removeGMFunction(GMDiagnosticOff)
GMDiagnosticOn = _("buttonGM", "Turn On Diagnostic")
addGMFunction(GMDiagnosticOn,turnOnDiagnostic)
end
------- In game GM buttons to change the delay between waves -------
-- Default is normal, so the fist button switches from a normal delay to a slow delay.
-- The slow delay is used for typical mission testing when the tester does not wish to
-- spend all their time fighting off enemies.
-- The second button switches from slow to fast. This facilitates testing the enemy
-- spawning routines. The third button goes from fast to normal.
function delayNormalToSlow()
interWave = 600
removeGMFunction(GMDelayNormalToSlow)
GMDelaySlowToFast = _("buttonGM", "Delay slow to fast")
addGMFunction(GMDelaySlowToFast,delaySlowToFast)
end
function delaySlowToFast()
interWave = 20
removeGMFunction(GMDelaySlowToFast)
GMDelayFastToNormal = _("buttonGM", "Delay fast to normal")
addGMFunction(GMDelayFastToNormal,delayFastToNormal)
end
function delayFastToNormal()
interWave = 150
removeGMFunction(GMDelayFastToNormal)
GMDelayNormalToSlow = _("buttonGM", "Delay normal to slow")
addGMFunction(GMDelayNormalToSlow,delayNormalToSlow)
end
--translate settings into a numeric difficulty value
function setSettings()
missionLength = 1
if string.find(getScenarioSetting("Settings"),"Easy") then
difficulty = .5
gapCheckDelayTimer = 5
elseif string.find(getScenarioSetting("Settings"),"Hard") then
difficulty = 2
gapCheckDelayTimer = 15
elseif string.find(getScenarioSetting("Settings"),"Quixotic") then
difficulty = 3
gapCheckDelayTimer = 30
missionLength = 2
else
difficulty = 1 --default (normal)
gapCheckDelayTimer = 10
end
gapCheckInterval = gapCheckDelayTimer
gameTimeLimit = 0
if string.find(getScenarioSetting("Settings"),"Timed") then
playWithTimeLimit = true
gameTimeLimit = 30*60
else
playWithTimeLimit = false
end
end
-- 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)
function createRandomAlongArc(object_type, amount, x, y, distance, startArc, endArcClockwise, randomize)
if randomize == nil then randomize = 0 end
if amount == nil then amount = 1 end
arcLen = endArcClockwise - startArc
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 buildStations()
stationFaction = "Human Navy"
psx = 0 --place station x coordinate
psy = 0 --place station y coordinate
si = math.random(1,#placeStation) --station index
pStation = placeStation[si]() --place selected station
table.remove(placeStation,si) --remove station from placement list
table.insert(stationList,pStation) --save station in general station list
homeStation = pStation --identify home station
stationFaction = "Independent"
psx = 31000
psy = 31000
si = math.random(1,#placeStation) --station index
pStation = placeStation[si]() --place selected station
table.remove(placeStation,si) --remove station from placement list
table.insert(stationList,pStation) --save station in general station list
psx = -31000
psy = 31000
si = math.random(1,#placeStation) --station index
pStation = placeStation[si]() --place selected station
table.remove(placeStation,si) --remove station from placement list
table.insert(stationList,pStation) --save station in general station list
psx = 31000
psy = -31000
si = math.random(1,#placeStation) --station index
pStation = placeStation[si]() --place selected station
table.remove(placeStation,si) --remove station from placement list
table.insert(stationList,pStation) --save station in general station list
psx = -31000
psy = -31000
si = math.random(1,#placeStation) --station index
pStation = placeStation[si]() --place selected station
table.remove(placeStation,si) --remove station from placement list
table.insert(stationList,pStation) --save station in general station list
stationFaction = "Kraylor"
psx = 0
psy = -60000
si = math.random(1,#placeEnemyStation)
pStation = placeEnemyStation[si]()
table.remove(placeEnemyStation,si)
table.insert(enemyStationList,pStation)
hf = spawnEnemies(psx,psy,10,"Kraylor")
for _, enemy in ipairs(hf) do
enemy:orderDefendTarget(pStation)
end
stationFaction = "Ghosts"
psy = 60000
si = math.random(1,#placeEnemyStation)
pStation = placeEnemyStation[si]()
table.remove(placeEnemyStation,si)
table.insert(enemyStationList,pStation)
hf = spawnEnemies(psx,psy,10,"Ghosts")
for _, enemy in ipairs(hf) do
enemy:orderDefendTarget(pStation)
end
stationFaction = "Exuari"
psx = 60000
psy = 0
si = math.random(1,#placeEnemyStation)
pStation = placeEnemyStation[si]()
table.remove(placeEnemyStation,si)
table.insert(enemyStationList,pStation)
hf = spawnEnemies(psx,psy,10,"Exuari")
for _, enemy in ipairs(hf) do
enemy:orderDefendTarget(pStation)
end
stationFaction = "Ktlitans"
psx = -60000
si = math.random(1,#placeEnemyStation)
pStation = placeEnemyStation[si]()
table.remove(placeEnemyStation,si)
table.insert(enemyStationList,pStation)
hf = spawnEnemies(psx,psy,10,"Ktlitans")
for _, enemy in ipairs(hf) do
enemy:orderDefendTarget(pStation)
end
end
--Randomly choose station size template
function szt()
stationSizeRandom = random(1,100)
if stationSizeRandom <= 8 then
sizeTemplate = "Huge Station" -- 8 percent huge
elseif stationSizeRandom <= 24 then
sizeTemplate = "Large Station" --16 percent large
elseif stationSizeRandom <= 50 then
sizeTemplate = "Medium Station" --26 percent medium
else
sizeTemplate = "Small Station" --50 percent small
end
return sizeTemplate
end
--[[-------------------------------------------------------------------
Human and neutral stations to be placed (all need some kind of goods)
--]]-------------------------------------------------------------------
function placeAlcaleica()
--Alcaleica
stationAlcaleica = SpaceStation():setTemplate(szt()):setFaction(stationFaction):setCommsScript(""):setCommsFunction(commsStation)
stationAlcaleica:setPosition(psx,psy):setCallSign("Alcaleica"):setDescription(_("scienceDescription-station", "Optical Components"))
if stationFaction == "Human Navy" then
if random(1,5) <= 1 then
goods[stationAlcaleica] = {{"food",math.random(5,10),1},{"medicine",5,5},{"optic",5,66}}
else
goods[stationAlcaleica] = {{"food",math.random(5,10),1},{"optic",5,66}}
tradeMedicine[stationAlcaleica] = true
end
else
goods[stationAlcaleica] = {{"optic",5,66}}
tradeFood[stationAlcaleica] = true
tradeMedicine[stationAlcaleica] = true
end
stationAlcaleica.publicRelations = true
stationAlcaleica.generalInformation = _("stationGeneralInfo-comms", "We make and supply optic components for various station and ship systems")
stationAlcaleica.stationHistory = _("stationStory-comms", "This station continues the businesses from Earth based on the merging of several companies including Leica from Switzerland, the lens manufacturer and the Japanese advanced low carbon electronic and optic company")
return stationAlcaleica
end
function placeAnderson()
--Anderson
stationAnderson = SpaceStation():setTemplate(szt()):setFaction(stationFaction):setCommsScript(""):setCommsFunction(commsStation)
stationAnderson:setPosition(psx,psy):setCallSign("Anderson"):setDescription(_("scienceDescription-station", "Battery and software engineering"))
if stationFaction == "Human Navy" then
if random(1,5) <= 1 then
goods[stationAnderson] = {{"food",math.random(5,10),1},{"medicine",5,5},{"battery",5,65},{"software",5,115}}
else
goods[stationAnderson] = {{"food",math.random(5,10),1},{"battery",5,65},{"software",5,115}}
end
else
goods[stationAnderson] = {{"battery",5,65},{"software",5,115}}
end
tradeLuxury[stationAnderson] = true
stationAnderson.publicRelations = true
stationAnderson.generalInformation = _("stationGeneralInfo-comms", "We provide high quality high capacity batteries and specialized software for all shipboard systems")
stationAnderson.stationHistory = _("stationStory-comms", "The station is named after a fictional software engineer in a late 20th century movie depicting humanity unknowingly conquered by aliens and kept docile by software generated illusion")
return stationAnderson
end
function placeArcher()
--Archer
stationArcher = SpaceStation():setTemplate(szt()):setFaction(stationFaction):setCommsScript(""):setCommsFunction(commsStation)
stationArcher:setPosition(psx,psy):setCallSign("Archer"):setDescription(_("scienceDescription-station", "Shield and Armor Research"))
if stationFaction == "Human Navy" then
if random(1,5) <= 1 then
goods[stationArcher] = {{"food",math.random(5,10),1},{"medicine",5,5},{"shield",5,90}}
else
goods[stationArcher] = {{"food",math.random(5,10),1},{"shield",5,90}}
tradeMedicine[stationArcher] = true
end
else
goods[stationArcher] = {{"shield",5,90}}
tradeMedicine[stationArcher] = true
end
tradeLuxury[stationArcher] = true
stationArcher.publicRelations = true
stationArcher.generalInformation = _("stationGeneralInfo-comms", "The finest shield and armor manufacturer in the quadrant")
stationArcher.stationHistory = _("stationStory-comms", "We named this station for the pioneering spirit of the 22nd century Starfleet explorer, Captain Jonathan Archer")
return stationArcher
end
function placeArchimedes()
--Archimedes
stationArchimedes = SpaceStation():setTemplate(szt()):setFaction(stationFaction):setCommsScript(""):setCommsFunction(commsStation)
stationArchimedes:setPosition(psx,psy):setCallSign("Archimedes"):setDescription(_("scienceDescription-station", "Energy and particle beam components"))
if stationFaction == "Human Navy" then
if random(1,5) <= 1 then
goods[stationArchimedes] = {{"food",math.random(5,10),1},{"medicine",5,5},{"beam",5,80}}
else
goods[stationArchimedes] = {{"food",math.random(5,10),1},{"beam",5,80}}
tradeMedicine[stationArchimedes] = true
end
else
goods[stationArchimedes] = {{"beam",5,80}}
tradeFood[stationArchimedes] = true
end
tradeLuxury[stationArchimedes] = true
stationArchimedes.publicRelations = true
stationArchimedes.generalInformation = _("stationGeneralInfo-comms", "We fabricate general and specialized components for ship beam systems")
stationArchimedes.stationHistory = _("stationStory-comms", "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")
return stationArchimedes
end
function placeArmstrong()
--Armstrong
stationArmstrong = SpaceStation():setTemplate(szt()):setFaction(stationFaction):setCommsScript(""):setCommsFunction(commsStation)
stationArmstrong:setPosition(psx,psy):setCallSign("Armstrong"):setDescription(_("scienceDescription-station", "Warp and Impulse engine manufacturing"))
if stationFaction == "Human Navy" then
if random(1,5) <= 1 then
goods[stationArmstrong] = {{"food",math.random(5,10),1},{"medicine",5,5},{"repulsor",5,62}}
else
goods[stationArmstrong] = {{"food",math.random(5,10),1},{"repulsor",5,62}}
end
else
goods[stationArmstrong] = {{"repulsor",5,62}}
end
-- table.insert(goods[stationArmstrong],{"warp",5,77})
stationArmstrong.publicRelations = true
stationArmstrong.generalInformation = _("stationGeneralInfo-comms", "We manufacture warp, impulse and jump engines for the human navy fleet as well as other independent clients on a contract basis")
stationArmstrong.stationHistory = _("stationStory-comms", "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.")
return stationArmstrong
end
function placeAsimov()
--Asimov
stationAsimov = SpaceStation():setTemplate(szt()):setFaction(stationFaction):setCommsScript(""):setCommsFunction(commsStation)
stationAsimov:setCallSign("Asimov"):setDescription(_("scienceDescription-station", "Training and Coordination")):setPosition(psx,psy)
if stationFaction == "Human Navy" then
if random(1,5) <= 1 then
goods[stationAsimov] = {{"food",math.random(5,10),1},{"medicine",5,5},{"tractor",5,48}}
else
goods[stationAsimov] = {{"food",math.random(5,10),1},{"tractor",5,48}}
end
else
goods[stationAsimov] = {{"tractor",5,48}}
end
stationAsimov.publicRelations = true
stationAsimov.generalInformation = _("stationGeneralInfo-comms", "We train naval cadets in routine and specialized functions aboard space vessels and coordinate naval activity throughout the sector")
stationAsimov.stationHistory = _("stationStory-comms", "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")
return stationAsimov
end
function placeBarclay()
--Barclay
stationBarclay = SpaceStation():setTemplate(szt()):setFaction(stationFaction):setCommsScript(""):setCommsFunction(commsStation)
stationBarclay:setPosition(psx,psy):setCallSign("Barclay"):setDescription(_("scienceDescription-station", "Communication components"))
if stationFaction == "Human Navy" then
if random(1,5) <= 1 then
goods[stationBarclay] = {{"food",math.random(5,10),1},{"medicine",5,5},{"communication",5,58}}
else
goods[stationBarclay] = {{"food",math.random(5,10),1},{"communication",5,58}}
tradeMedicine[stationBarclay] = true
end
else
goods[stationBarclay] = {{"communication",5,58}}
tradeMedicine[stationBarclay] = true
end
stationBarclay.publicRelations = true
stationBarclay.generalInformation = _("stationGeneralInfo-comms", "We provide a range of communication equipment and software for use aboard ships")
stationBarclay.stationHistory = _("stationStory-comms", "The station is named after Reginald Barclay who established the first transgalactic com link through the creative application of a quantum singularity. Station personnel often refer to the station as the Broccoli station")
return stationBarclay
end
function placeBethesda()
--Bethesda
stationBethesda = SpaceStation():setTemplate(szt()):setFaction(stationFaction):setCommsScript(""):setCommsFunction(commsStation)
stationBethesda:setPosition(psx,psy):setCallSign("Bethesda"):setDescription(_("scienceDescription-station", "Medical research"))
goods[stationBethesda] = {{"food",math.random(5,10),1},{"medicine",5,5},{"autodoc",5,36}}
stationBethesda.publicRelations = true
stationBethesda.generalInformation = _("stationGeneralInfo-comms", "We research and treat exotic medical conditions")
stationBethesda.stationHistory = _("stationStory-comms", "The station is named after the United States national medical research center based in Bethesda, Maryland on earth which was established in the mid 20th century")
return stationBethesda
end
function placeBroeck()
--Broeck
stationBroeck = SpaceStation():setTemplate(szt()):setFaction(stationFaction):setCommsScript(""):setCommsFunction(commsStation)
stationBroeck:setPosition(psx,psy):setCallSign("Broeck"):setDescription(_("scienceDescription-station", "Warp drive components"))
if stationFaction == "Human Navy" then
if random(1,5) <= 1 then
goods[stationBroeck] = {{"food",math.random(5,10),1},{"medicine",5,5},{"warp",5,130}}
if random(1,100) < 62 then tradeLuxury[stationBroeck] = true end
else
goods[stationBroeck] = {{"food",math.random(5,10),1},{"warp",5,130}}
if random(1,100) < 53 then tradeMedicine[stationBroeck] = true end
if random(1,100) < 62 then tradeLuxury[stationBroeck] = true end
end
else
goods[stationBroeck] = {{"warp",5,130}}
if random(1,100) < 53 then tradeMedicine[stationBroeck] = true end
if random(1,100) < 14 then tradeFood[stationBroeck] = true end
if random(1,100) < 62 then tradeLuxury[stationBroeck] = true end
end
stationBroeck.publicRelations = true
stationBroeck.generalInformation = _("stationGeneralInfo-comms", "We provide warp drive engines and components")
stationBroeck.stationHistory = _("stationStory-comms", "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")
return stationBroeck
end
function placeCalifornia()
--California
stationCalifornia = SpaceStation():setTemplate(szt()):setFaction(stationFaction):setCommsScript(""):setCommsFunction(commsStation)
stationCalifornia:setPosition(psx,psy):setCallSign("California"):setDescription(_("scienceDescription-station", "Mining station"))
if stationFaction == "Human Navy" then
if random(1,5) <= 1 then
goods[stationCalifornia] = {{"food",math.random(5,10),1},{"medicine",5,5},{"gold",5,25},{"dilithium",2,25}}
else
goods[stationCalifornia] = {{"food",math.random(5,10),1},{"gold",5,25},{"dilithium",2,25}}
end
else
goods[stationCalifornia] = {{"gold",5,25},{"dilithium",2,25}}
end
return stationCalifornia
end
function placeCalvin()
--Calvin
stationCalvin = SpaceStation():setTemplate(szt()):setFaction(stationFaction):setCommsScript(""):setCommsFunction(commsStation)
stationCalvin:setPosition(psx,psy):setCallSign("Calvin"):setDescription(_("scienceDescription-station", "Robotic research"))
if stationFaction == "Human Navy" then
if random(1,5) <= 1 then
goods[stationCalvin] = {{"food",math.random(5,10),1},{"medicine",5,5},{"robotic",5,87}}
else
goods[stationCalvin] = {{"food",math.random(5,10),1},{"robotic",5,87}}
end
else
goods[stationCalvin] = {{"robotic",5,87}}
if random(1,100) < 8 then tradeFood[stationCalvin] = true end
end
tradeLuxury[stationCalvin] = true
stationCalvin.publicRelations = true
stationCalvin.generalInformation = _("stationGeneralInfo-comms", "We research and provide robotic systems and components")
stationCalvin.stationHistory = _("stationStory-comms", "This station is named after Dr. Susan Calvin who pioneered robotic behavioral research and programming")
return stationCalvin
end
function placeCavor()
--Cavor
stationCavor = SpaceStation():setTemplate(szt()):setFaction(stationFaction):setCommsScript(""):setCommsFunction(commsStation)
stationCavor:setPosition(psx,psy):setCallSign("Cavor"):setDescription(_("scienceDescription-station", "Advanced Material components"))
if stationFaction == "Human Navy" then
if random(1,5) <= 1 then
goods[stationCavor] = {{"food",math.random(5,10),1},{"medicine",5,5},{"filament",5,42}}
if random(1,100) < 33 then tradeLuxury[stationCavor] = true end
else
goods[stationCavor] = {{"food",math.random(5,10),1},{"filament",5,42}}
if random(1,100) < 50 then
tradeMedicine[stationCavor] = true
else
tradeLuxury[stationCavor] = true
end
end
else
goods[stationCavor] = {{"filament",5,42}}
whatTrade = random(1,100)
if whatTrade < 33 then
tradeMedicine[stationCavor] = true
elseif whatTrade > 66 then
tradeFood[stationCavor] = true
else
tradeLuxury[stationCavor] = true
end
end
stationCavor.publicRelations = true
stationCavor.generalInformation = _("stationGeneralInfo-comms", "We fabricate several different kinds of materials critical to various space industries like ship building, station construction and mineral extraction")
stationCavor.stationHistory = _("stationStory-comms", "We named our station after Dr. Cavor, the physicist that invented a barrier material for gravity waves - Cavorite")
return stationCavor
end
function placeChatuchak()
--Chatuchak
stationChatuchak = SpaceStation():setTemplate(szt()):setFaction(stationFaction):setCommsScript(""):setCommsFunction(commsStation)
stationChatuchak:setPosition(psx,psy):setCallSign("Chatuchak"):setDescription(_("scienceDescription-station", "Trading station"))
if stationFaction == "Human Navy" then
if random(1,5) <= 1 then
goods[stationChatuchak] = {{"food",math.random(5,10),1},{"medicine",5,5},{"luxury",5,60}}
else
goods[stationChatuchak] = {{"food",math.random(5,10),1},{"luxury",5,60}}
end
else
goods[stationChatuchak] = {{"luxury",5,60}}
end
stationChatuchak.publicRelations = true
stationChatuchak.generalInformation = _("stationGeneralInfo-comms", "Only the largest market and trading location in twenty sectors. You can find your heart's desire here")
stationChatuchak.stationHistory = _("stationStory-comms", "Modeled after the early 21st century bazaar on Earth in Bangkok, Thailand. Designed and built with trade and commerce in mind")
return stationChatuchak
end
function placeCoulomb()
--Coulomb
stationCoulomb = SpaceStation():setTemplate(szt()):setFaction(stationFaction):setCommsScript(""):setCommsFunction(commsStation)
stationCoulomb:setPosition(psx,psy):setCallSign("Coulomb"):setDescription(_("scienceDescription-station", "Shielded circuitry fabrication"))
if stationFaction == "Human Navy" then
if random(1,5) <= 1 then
goods[stationCoulomb] = {{"food",math.random(5,10),1},{"medicine",5,5},{"circuit",5,50}}
else
goods[stationCoulomb] = {{"food",math.random(5,10),1},{"circuit",5,50}}
if random(1,100) < 27 then tradeMedicine[stationCoulomb] = true end
end
else
goods[stationCoulomb] = {{"circuit",5,50}}
if random(1,100) < 27 then tradeMedicine[stationCoulomb] = true end
if random(1,100) < 16 then tradeFood[stationCoulomb] = true end
end
if random(1,100) < 82 then tradeLuxury[stationCoulomb] = true end
stationCoulomb.publicRelations = true
stationCoulomb.generalInformation = _("stationGeneralInfo-comms", "We make a large variety of circuits for numerous ship systems shielded from sensor detection and external control interference")
stationCoulomb.stationHistory = _("stationStory-comms", "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")
return stationCoulomb
end
function placeCyrus()
--Cyrus
stationCyrus = SpaceStation():setTemplate(szt()):setFaction(stationFaction):setCommsScript(""):setCommsFunction(commsStation)
stationCyrus:setPosition(psx,psy):setCallSign("Cyrus"):setDescription(_("scienceDescription-station", "Impulse engine components"))
if stationFaction == "Human Navy" then
if random(1,5) <= 1 then
goods[stationCyrus] = {{"food",math.random(5,10),1},{"medicine",5,5},{"impulse",5,124}}
else
goods[stationCyrus] = {{"food",math.random(5,10),1},{"impulse",5,124}}
if random(1,100) < 34 then tradeMedicine[stationCyrus] = true end
end
else
goods[stationCyrus] = {{"impulse",5,124}}
if random(1,100) < 34 then tradeMedicine[stationCyrus] = true end
if random(1,100) < 13 then tradeFood[stationCyrus] = true end
end
if random(1,100) < 78 then tradeLuxury[stationCyrus] = true end
stationCyrus.publicRelations = true
stationCyrus.generalInformation = _("stationGeneralInfo-comms", "We supply high quality impulse engines and parts for use aboard ships")
stationCyrus.stationHistory = _("stationStory-comms", "This station was named after the fictional engineer, Cyrus Smith created by 19th century author Jules Verne")
return stationCyrus
end
function placeDeckard()
--Deckard
stationDeckard = SpaceStation():setTemplate(szt()):setFaction(stationFaction):setCommsScript(""):setCommsFunction(commsStation)
stationDeckard:setPosition(psx,psy):setCallSign("Deckard"):setDescription(_("scienceDescription-station", "Android components"))
if stationFaction == "Human Navy" then
if random(1,5) <= 1 then
goods[stationDeckard] = {{"food",math.random(5,10),1},{"medicine",5,5},{"android",5,73}}
else
goods[stationDeckard] = {{"food",math.random(5,10),1},{"android",5,73}}
end
else
goods[stationDeckard] = {{"android",5,73}}
tradeFood[stationDeckard] = true
end
tradeLuxury[stationDeckard] = true
stationDeckard.publicRelations = true
stationDeckard.generalInformation = _("stationGeneralInfo-comms", "Supplier of android components, programming and service")
stationDeckard.stationHistory = _("stationStory-comms", "Named for Richard Deckard who inspired many of the sophisticated safety security algorithms now required for all androids")
return stationDeckard
end
function placeDeer()
--Deer
stationDeer = SpaceStation():setTemplate(szt()):setFaction(stationFaction):setCommsScript(""):setCommsFunction(commsStation)
stationDeer:setPosition(psx,psy):setCallSign("Deer"):setDescription(_("scienceDescription-station", "Repulsor and Tractor Beam Components"))
if stationFaction == "Human Navy" then
if random(1,5) <= 1 then
goods[stationDeer] = {{"food",math.random(5,10),1},{"medicine",5,5},{"tractor",5,90},{"repulsor",5,95}}
else
goods[stationDeer] = {{"food",math.random(5,10),1},{"tractor",5,90},{"repulsor",5,95}}
tradeMedicine[stationDeer] = true
end
else
goods[stationDeer] = {{"tractor",5,90},{"repulsor",5,95}}
tradeFood[stationDeer] = true
tradeMedicine[stationDeer] = true
end
tradeLuxury[stationDeer] = true
stationDeer.publicRelations = true
stationDeer.generalInformation = _("stationGeneralInfo-comms", "We can meet all your pushing and pulling needs with specialized equipment custom made")
stationDeer.stationHistory = _("stationStory-comms", "The station name comes from a short story by the 20th century author Clifford D. Simak as well as from the 19th century developer John Deere who inspired a company that makes the Earth bound equivalents of our products")
return stationDeer
end
function placeErickson()
--Erickson
stationErickson = SpaceStation():setTemplate(szt()):setFaction(stationFaction):setCommsScript(""):setCommsFunction(commsStation)
stationErickson:setPosition(psx,psy):setCallSign("Erickson"):setDescription(_("scienceDescription-station", "Transporter components"))
if stationFaction == "Human Navy" then
if random(1,5) <= 1 then
goods[stationErickson] = {{"food",math.random(5,10),1},{"medicine",5,5},{"transporter",5,63}}
else
goods[stationErickson] = {{"food",math.random(5,10),1},{"transporter",5,63}}
tradeMedicine[stationErickson] = true
end
else
goods[stationErickson] = {{"transporter",5,63}}
tradeFood[stationErickson] = true
tradeMedicine[stationErickson] = true
end
tradeLuxury[stationErickson] = true
stationErickson.publicRelations = true
stationErickson.generalInformation = _("stationGeneralInfo-comms", "We provide transporters used aboard ships as well as the components for repair and maintenance")
stationErickson.stationHistory = _("stationStory-comms", "The station is named after the early 22nd century inventor of the transporter, Dr. Emory Erickson. This station is proud to have received the endorsement of Admiral Leonard McCoy")
return stationErickson
end
function placeEvondos()
--Evondos
stationEvondos = SpaceStation():setTemplate(szt()):setFaction(stationFaction):setCommsScript(""):setCommsFunction(commsStation)
stationEvondos:setPosition(psx,psy):setCallSign("Evondos"):setDescription(_("scienceDescription-station", "Autodoc components"))
if stationFaction == "Human Navy" then
if random(1,5) <= 1 then
goods[stationEvondos] = {{"food",math.random(5,10),1},{"medicine",5,5},{"autodoc",5,56}}
else
goods[stationEvondos] = {{"food",math.random(5,10),1},{"autodoc",5,56}}
tradeMedicine[stationEvondos] = true
end
else
goods[stationEvondos] = {{"autodoc",5,56}}
tradeMedicine[stationEvondos] = true
end
if random(1,100) < 41 then tradeLuxury[stationEvondos] = true end
stationEvondos.publicRelations = true
stationEvondos.generalInformation = _("stationGeneralInfo-comms", "We provide components for automated medical machinery")
stationEvondos.stationHistory = _("stationStory-comms", "The station is the evolution of the company that started automated pharmaceutical dispensing in the early 21st century on Earth in Finland")
return stationEvondos
end
function placeFeynman()
--Feynman
stationFeynman = SpaceStation():setTemplate(szt()):setFaction(stationFaction):setCommsScript(""):setCommsFunction(commsStation)
stationFeynman:setPosition(psx,psy):setCallSign("Feynman"):setDescription(_("scienceDescription-station", "Nanotechnology research"))
if stationFaction == "Human Navy" then
if random(1,5) <= 1 then
goods[stationFeynman] = {{"food",math.random(5,10),1},{"medicine",5,5},{"nanites",5,79},{"software",5,115}}
else
goods[stationFeynman] = {{"food",math.random(5,10),1},{"nanites",5,79},{"software",5,115}}
end
else
goods[stationFeynman] = {{"nanites",5,79},{"software",5,115}}
tradeFood[stationFeynman] = true
if random(1,100) < 26 then tradeFood[stationFeynman] = true end
end
tradeLuxury[stationFeynman] = true
stationFeynman.publicRelations = true
stationFeynman.generalInformation = _("stationGeneralInfo-comms", "We provide nanites and software for a variety of ship-board systems")
stationFeynman.stationHistory = _("stationStory-comms", "This station's name recognizes one of the first scientific researchers into nanotechnology, physicist Richard Feynman")
return stationFeynman
end
function placeGrasberg()
--Grasberg
placeRandomAroundPoint(Asteroid,15,1,15000,psx,psy)
stationGrasberg = SpaceStation():setTemplate(szt()):setFaction(stationFaction):setCommsScript(""):setCommsFunction(commsStation)
stationGrasberg:setPosition(psx,psy):setCallSign("Grasberg"):setDescription(_("scienceDescription-station", "Mining"))
stationGrasberg.publicRelations = true
stationGrasberg.generalInformation = _("stationGeneralInfo-comms", "We mine nearby asteroids for precious minerals and process them for sale")
stationGrasberg.stationHistory = _("stationStory-comms", "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")
grasbergGoods = random(1,100)
if stationFaction == "Human Navy" then
if random(1,5) <= 1 then
if grasbergGoods < 20 then
goods[stationGrasberg] = {{"luxury",5,70},{"gold",5,25},{"cobalt",4,50},{"food",math.random(5,10),1},{"medicine",5,5}}
elseif grasbergGoods < 40 then
goods[stationGrasberg] = {{"luxury",5,70},{"gold",5,25},{"food",math.random(5,10),1},{"medicine",5,5}}
elseif grasbergGoods < 60 then
goods[stationGrasberg] = {{"luxury",5,70},{"cobalt",4,50},{"food",math.random(5,10),1},{"medicine",5,5}}
else
goods[stationGrasberg] = {{"luxury",5,70},{"food",math.random(5,10),1},{"medicine",5,5}}
end
else
if grasbergGoods < 20 then
goods[stationGrasberg] = {{"luxury",5,70},{"gold",5,25},{"cobalt",4,50},{"food",math.random(5,10),1}}
elseif grasbergGoods < 40 then
goods[stationGrasberg] = {{"luxury",5,70},{"gold",5,25},{"food",math.random(5,10),1}}
elseif grasbergGoods < 60 then
goods[stationGrasberg] = {{"luxury",5,70},{"cobalt",4,50},{"food",math.random(5,10),1}}
else
goods[stationGrasberg] = {{"luxury",5,70},{"food",math.random(5,10),1}}
end
end
else
if grasbergGoods < 20 then
goods[stationGrasberg] = {{"luxury",5,70},{"gold",5,25},{"cobalt",4,50}}
elseif grasbergGoods < 40 then
goods[stationGrasberg] = {{"luxury",5,70},{"gold",5,25}}
elseif grasbergGoods < 60 then
goods[stationGrasberg] = {{"luxury",5,70},{"cobalt",4,50}}
else
goods[stationGrasberg] = {{"luxury",5,70}}
end
tradeFood[stationGrasberg] = true
end
return stationGrasberg
end
function placeHayden()
--Hayden
stationHayden = SpaceStation():setTemplate(szt()):setFaction(stationFaction):setCommsScript(""):setCommsFunction(commsStation)
stationHayden:setPosition(psx,psy):setCallSign("Hayden"):setDescription(_("scienceDescription-station", "Observatory and stellar mapping"))
if stationFaction == "Human Navy" then
if random(1,5) <= 1 then
goods[stationHayden] = {{"food",math.random(5,10),1},{"medicine",5,5},{"nanites",5,65}}
else
goods[stationHayden] = {{"food",math.random(5,10),1},{"nanites",5,65}}
end
else
goods[stationHayden] = {{"nanites",5,65}}
end
stationHayden.publicRelations = true
stationHayden.generalInformation = _("stationGeneralInfo-comms", "We study the cosmos and map stellar phenomena. We also track moving asteroids. Look out! Just kidding")
return stationHayden
end
function placeHeyes()
--Heyes
stationHeyes = SpaceStation():setTemplate(szt()):setFaction(stationFaction):setCommsScript(""):setCommsFunction(commsStation)
stationHeyes:setPosition(psx,psy):setCallSign("Heyes"):setDescription(_("scienceDescription-station", "Sensor components"))
if stationFaction == "Human Navy" then
if random(1,5) <= 1 then
goods[stationHeyes] = {{"food",math.random(5,10),1},{"medicine",5,5},{"sensor",5,72}}
else
goods[stationHeyes] = {{"food",math.random(5,10),1},{"sensor",5,72}}
end
else
goods[stationHeyes] = {{"sensor",5,72}}
end
tradeLuxury[stationHeyes] = true
stationHeyes.publicRelations = true
stationHeyes.generalInformation = _("stationGeneralInfo-comms", "We research and manufacture sensor components and systems")
stationHeyes.stationHistory = _("stationStory-comms", "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")
return stationHeyes
end
function placeHossam()
--Hossam
stationHossam = SpaceStation():setTemplate(szt()):setFaction(stationFaction):setCommsScript(""):setCommsFunction(commsStation)
stationHossam:setPosition(psx,psy):setCallSign("Hossam"):setDescription(_("scienceDescription-station", "Nanite supplier"))
if stationFaction == "Human Navy" then
if random(1,5) <= 1 then
goods[stationHossam] = {{"food",math.random(5,10),1},{"medicine",5,5},{"nanites",5,48}}
else
goods[stationHossam] = {{"food",math.random(5,10),1},{"nanites",5,48}}
if random(1,100) < 44 then tradeMedicine[stationHossam] = true end
end
else
goods[stationHossam] = {{"nanites",5,48}}