-
Notifications
You must be signed in to change notification settings - Fork 6
/
place_station_scenario_utility.lua
3319 lines (3316 loc) · 112 KB
/
place_station_scenario_utility.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
-- This utility can be used to place a station at a particular location of random size,
-- with a colorful name and description. If you write your station communications
-- routines for it, the station will include various services, general station
-- information and station history. If you define your station comms routine in function
-- commsStation, placement will include setting the station to use that function.
-- Potential global variables that may interact with these functions:
-- function commsStation:
-- If defined, the placed station will be set to use it for communications
-- string stationFaction:
-- Station faction set to it if faction parameter is nil
-- table station_pool:
-- Defined here if not already defined. Helps avoid duplicate stations
-- table componentGoods:
-- Defined here if not already defined
-- table mineralGoods:
-- Defined here if not already defined
-- number difficulty:
-- Default to 1 (normal) if not already defined
-- table station_priority:
-- Defined here if not already defined. See populateStationPool
-- table station_template_chance:
-- Defined here if not already defined. The value is the modification of the
-- chance out of 100 that a station will have a service based on station template.
-- table faction_station_service_chance:
-- Defined here if not already defined. The value is the modification of the
-- chance out of 100 that a station will have a service based on station faction.
-- string sizeTemplate:
-- Set to the station template size if the station size is selected randomly
-- placeStation returns the station placed or nil if there was an error.
-- placeStation sets the global sizeTemplate if selected randomly via szt
function placeStation(x,y,name,faction,size,diagnostic)
--x and y are the position of the station
--name should be the name of the station or the name of the station group
-- omit name to get random station from groups in priority order. See pickStation
-- Special values across groups: Random, RandomHumanNeutral, RandomGenericSinister
--faction is the faction of the station
-- omit faction and global variable stationFaction will be used.
-- If stationFaction is not defined, faction will be set to Independent
--size is the name of the station template to use
-- omit and station template will be chosen at random via szt function
if x == nil then
print("The first parameter that the function placeStation expects is an x coordinate. Nil is not valid")
return nil
end
if y == nil then
print("The second parameter that the function placeStation expects is an y coordinate. Nil is not valid")
return nil
end
local group, station = pickStation(name)
if group == nil then
print("place station error: Sub function pick station did not return a group name. Nil is not valid")
return nil
end
station:setPosition(x,y)
if faction ~= nil then
station:setFaction(faction)
else
if stationFaction ~= nil then
station:setFaction(stationFaction)
faction = stationFaction
else
station:setFaction("Independent")
faction = "Independent"
end
end
if station_template_chance == nil then
station_template_chance = {
["Small Station"] = 0,
["Medium Station"] = 20,
["Large Station"] = 30,
["Huge Station"] = 40,
}
end
if faction_station_service_chance == nil then
faction_station_service_chance = {
["Human Navy"] = 0,
["Kraylor"] = 0,
["Independent"] = 0,
["Arlenians"] = 0,
["Ghosts"] = 0,
["Ktlitans"] = 0,
["Exuari"] = 0,
["TSN"] = 0,
["USN"] = 0,
["CUF"] = 0,
}
end
if size == nil then
station:setTemplate(szt())
else
if station_template_chance[size] ~= nil then
station:setTemplate(size)
else
station:setTemplate(szt())
end
end
if diagnostic == nil then
diagnostic = false
else
diagnostic = true
end
--Randomize the availability of some station services. Unless you write your station
--communication routines to take advantage of these, they'll be ignored,
--except for the last three. See below.
local size_matters = station_template_chance[station:getTypeName()] or 0
local faction_matters = faction_station_service_chance[faction] or 0
if station.comms_data.service_cost == nil then
station.comms_data.service_cost = {}
end
station.comms_data.probe_launch_repair = random(1,100) <= (20 + size_matters + faction_matters)
if station.comms_data.probe_launch_repair then
station.comms_data.service_cost.probe_launch_repair = math.random(2,8)
end
station.comms_data.scan_repair = random(1,100) <= (30 + size_matters + faction_matters)
if station.comms_data.scan_repair then
station.comms_data.service_cost.scan_repair = math.random(2,8)
end
station.comms_data.hack_repair = random(1,100) <= (10 + size_matters + faction_matters)
if station.comms_data.hack_repair then
station.comms_data.service_cost.hack_repair = math.random(2,8)
end
station.comms_data.combat_maneuver_repair = random(1,100) <= (15 + size_matters + faction_matters)
if station.comms_data.combat_maneuver_repair then
station.comms_data.service_cost.combat_maneuver_repair = math.random(2,8)
end
station.comms_data.self_destruct_repair = random(1,100) <= (25 + size_matters + faction_matters)
if station.comms_data.self_destruct_repair then
station.comms_data.service_cost.self_destruct_repair = math.random(2,8)
end
station.comms_data.jump_overcharge = random(1,100) <= (5 + size_matters + faction_matters)
--If you want a station where the players can dock to provide energy,
--repair hull and restock scan probes, you'll want to set these to true after
--the station gets placed.
station:setSharesEnergyWithDocked(random(1,100) <= (50 + size_matters + faction_matters))
station:setRepairDocked(random(1,100) <= (55 + size_matters + faction_matters))
station:setRestocksScanProbes(random(1,100) <= (45 + size_matters + faction_matters))
-- more repair services
station.comms_data.system_repair = {}
station.comms_data.coolant_pump_repair = {}
local system_list = {"reactor","beamweapons","missilesystem","maneuver","impulse","warp","jumpdrive","frontshield","rearshield"}
for i, system in ipairs(system_list) do
local chance = 60 + size_matters + faction_matters
local eval = random(1,100)
station.comms_data.system_repair[system] = eval <= chance
eval = random(1,100)
station.comms_data.coolant_pump_repair[system] = eval <= chance
end
return station
end
function pickStation(name)
if station_pool == nil then
populateStationPool()
end
local selected_station_name = nil
local station_selection_list = {}
local selected_station = nil
local station = nil
if name == nil then
--default to random in priority order
for _, group in ipairs(station_priority) do
if station_pool[group] ~= nil then
for station, details in pairs(station_pool[group]) do
table.insert(station_selection_list,station)
end
if #station_selection_list > 0 then
if selected_station_name == nil then
selected_station_name = station_selection_list[math.random(1,#station_selection_list)]
station = SpaceStation():setCommsScript(""):setCommsFunction(commsStation):setCallSign(selected_station_name):setDescription(station_pool[group][selected_station_name].description)
station.comms_data = station_pool[group][selected_station_name]
station_pool[group][selected_station_name] = nil
if diagnostic then
print("place station diagnostic: pick station returned group:",group,"...and station:",station,station:getCallSign(),"name is nil")
end
return group, station
end
end
end
end
if diagnostic then
print("place station diagnostic: pick station returned nothing, station selection lists empty, all groups exhausted, name is nil")
end
else
if name == "Random" then
--random across all groups
for group, list in pairs(station_pool) do
for station_name, station_details in pairs(list) do
table.insert(station_selection_list,{group = group, station_name = station_name, station_details = station_details})
end
end
if #station_selection_list > 0 then
selected_station = station_selection_list[math.random(1,#station_selection_list)]
station = SpaceStation():setCallSign(selected_station.station_name):setDescription(selected_station.station_details.description)
if commsStation ~= nil then
station:setCommsScript(""):setCommsFunction(commsStation)
end
station.comms_data = selected_station.station_details
station_pool[selected_station.group][selected_station.station_name] = nil
if diagnostic then
print("place station diagnostic: pick station returned group:",selected_station.group,"...and station:",station,station:getCallSign(),"name is Random")
end
return selected_station.group, station
end
if diagnostic then
print("place station diagnostic: pick station returned nothing, station selection lists empty, all groups exhausted, name is Random")
end
elseif name == "RandomHumanNeutral" then
for group, list in pairs(station_pool) do
if group ~= "Generic" and group ~= "Sinister" then
for station_name, station_details in pairs(list) do
table.insert(station_selection_list,{group = group, station_name = station_name, station_details = station_details})
end
end
end
if #station_selection_list > 0 then
selected_station = station_selection_list[math.random(1,#station_selection_list)]
station = SpaceStation():setCallSign(selected_station.station_name):setDescription(selected_station.station_details.description)
if commsStation ~= nil then
station:setCommsScript(""):setCommsFunction(commsStation)
end
station.comms_data = selected_station.station_details
station_pool[selected_station.group][selected_station.station_name] = nil
if diagnostic then
print("place station diagnostic: pick station returned group:",selected_station.group,"...and station:",station,station:getCallSign(),"name is RandomHumanNeutral")
end
return selected_station.group, station
end
if diagnostic then
print("place station diagnostic: pick station returned nothing, station selection lists that are not Generic and not Sinister are empty, name is RandomHumanNeutral")
end
elseif name == "RandomGenericSinister" then
for group, list in pairs(station_pool) do
if group == "Generic" or group == "Sinister" then
for station_name, station_details in pairs(list) do
table.insert(station_selection_list,{group = group, station_name = station_name, station_details = station_details})
end
end
end
if #station_selection_list > 0 then
selected_station = station_selection_list[math.random(1,#station_selection_list)]
station = SpaceStation():setCallSign(selected_station.station_name):setDescription(selected_station.station_details.description)
if commsStation ~= nil then
station:setCommsScript(""):setCommsFunction(commsStation)
end
station.comms_data = selected_station.station_details
station_pool[selected_station.group][selected_station.station_name] = nil
if diagnostic then
print("place station diagnostic: pick station returned group:",selected_station.group,"...and station:",station,station:getCallSign(),"name is RandomGenericSinister")
end
return selected_station.group, station
end
if diagnostic then
print("place station diagnostic: pick station returned nothing, station selection lists Generic and Sinister are empty, name is RandomGenericSinister")
end
else
if station_pool[name] ~= nil then
for station_name, station_details in pairs(station_pool[name]) do
table.insert(station_selection_list,{station_name = station_name, station_details = station_details})
end
if #station_selection_list > 0 then
selected_station = station_selection_list[math.random(1,#station_selection_list)]
station = SpaceStation():setCallSign(selected_station.station_name):setDescription(selected_station.station_details.description)
if commsStation ~= nil then
station:setCommsScript(""):setCommsFunction(commsStation)
end
station.comms_data = selected_station.station_details
station_pool[name][selected_station.station_name] = nil
if diagnostic then
print("place station diagnostic: pick station returned group (which was passed in):",name,"...and station:",station,station:getCallSign())
end
return name, station
end
if diagnostic then
print("place station diagnostic: pick station returned nothing, station selection list provided:",name,"...was empty")
end
else
for group, list in pairs(station_pool) do
if station_pool[group][name] ~= nil then
station = SpaceStation():setCallSign(name):setDescription(station_pool[group][name].description)
if commsStation ~= nil then
station:setCommsScript(""):setCommsFunction(commsStation)
end
station.comms_data = station_pool[group][name]
station_pool[group][name] = nil
return group, station
end
end
--name not found in any group
print("place station error: Name provided to place station not found in groups or stations, nor is it an accepted specialized name, like Random, RandomHumanNeutral or RandomGenericSinister")
return nil
end
end
end
return nil
end
function szt()
--Randomly choose station size template
local 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
function randomComponent(exclude)
if componentGoods == nil then
componentGoods = {"impulse","warp","shield","tractor","repulsor","beam","optic","robotic","filament","transporter","sensor","communication","autodoc","lifter","android","nanites","software","circuit","battery"}
end
local good = componentGoods[math.random(1,#componentGoods)]
if exclude == nil then
return good
else
repeat
good = componentGoods[math.random(1,#componentGoods)]
until(good ~= exclude)
return good
end
end
function randomMineral(exclude)
if mineralGoods == nil then
mineralGoods = {"nickel","platinum","gold","dilithium","tritanium","cobalt"}
end
local good = mineralGoods[math.random(1,#mineralGoods)]
if exclude == nil then
return good
else
repeat
good = mineralGoods[math.random(1,#mineralGoods)]
until(good ~= exclude)
return good
end
end
function populateStationPool()
-- expected values for global difficulty variable:
-- 1 = normal
-- .5 = easy
-- 2 = hard
-- default to normal if not defined
if difficulty == nil then
difficulty = 1
end
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 = _("scienceDescription-station", "Training and Coordination"),
general = _("stationGeneralInfo-comms", "We train naval cadets in routine and specialized functions aboard space vessels and coordinate naval activity throughout the sector"),
history = _("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"),
},
["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,
},
repulsor = {
quantity = 5,
cost = 62,
},
},
trade = {
food = random(1,100) <= 45,
medicine = false,
luxury = false,
},
buy = {
[randomMineral()] = math.random(40,200),
},
description = _("scienceDescription-station", "Warp and Impulse engine manufacturing"),
general = _("stationGeneralInfo-comms", "We manufacture warp, impulse and jump engines for the human navy fleet as well as other independent clients on a contract basis"),
history = _("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."),
},
["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 = random(1,100) <= 14,
medicine = false,
luxury = random(1,100) < 62,
},
buy = {
[randomMineral()] = math.random(40,200),
},
description = _("scienceDescription-station", "Warp drive components"),
general = _("stationGeneralInfo-comms", "We provide warp drive engines and components"),
history = _("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"),
},
["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 = random(1,100) <= 35,
medicine = false,
luxury = random(1,100) < 82,
},
buy = {
[randomMineral()] = math.random(40,200),
},
description = _("scienceDescription-station", "Shielded circuitry fabrication"),
general = _("stationGeneralInfo-comms", "We make a large variety of circuits for numerous ship systems shielded from sensor detection and external control interference"),
history = _("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"),
},
["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 = random(1,100) <= 32,
medicine = false,
luxury = true,
},
buy = {
[randomMineral()] = math.random(40,200),
},
description = _("scienceDescription-station", "Sensor components"),
general = _("stationGeneralInfo-comms", "We research and manufacture sensor components and systems"),
history = _("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"),
},
["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 = _("scienceDescription-station", "Nanite supplier"),
general = _("stationGeneralInfo-comms", "We provide nanites for various organic and non-organic systems"),
history = _("stationStory-comms", "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 = random(1,100) <= 75,
medicine = true,
luxury = false,
},
buy = {
[randomMineral()] = math.random(40,200),
},
description = _("scienceDescription-station", "Energy beam components"),
general = _("stationGeneralInfo-comms", "We research and manufacture energy beam components and systems"),
history = _("stationStory-comms", "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 = random(1,100) <= 65,
medicine = false,
luxury = false,
},
description = _("scienceDescription-station", "Gambling and resupply"),
general = _("stationGeneralInfo-comms", "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 = random(1,100) <= 53,
medicine = false,
luxury = true,
},
description = _("scienceDescription-station", "Energy Beam Components"),
general = _("stationGeneralInfo-comms", "We manufacture energy beam components"),
history = _("stationStory-comms", "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 = random(1,100) <= 68,
medicine = false,
luxury = false,
},
description = _("scienceDescription-station", "Exobiology research"),
general = _("stationGeneralInfo-comms", "We study recently discovered life forms not native to Earth"),
history = _("stationStory-comms", "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 = random(1,100) <= 42,
medicine = false,
luxury = true,
},
description = _("scienceDescription-station", "Impulse engine components"),
general = _("stationGeneralInfo-comms", "We research and manufacture impulse engine components and systems"),
history = _("stationStory-comms", "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 = _("scienceDescription-station", "Energy and particle beam components"),
general = _("stationGeneralInfo-comms", "We fabricate general and specialized components for ship beam systems"),
history = _("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"),
},
["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 = _("scienceDescription-station", "Trading station"),
general = _("stationGeneralInfo-comms", "Only the largest market and trading location in twenty sectors. You can find your heart's desire here"),
history = _("stationStory-comms", "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 = _("scienceDescription-station", "Mining"),
general = _("stationGeneralInfo-comms", "We mine nearby asteroids for precious minerals and process them for sale"),
history = _("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"),
},
["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 = random(1,100) <= 85,
medicine = false,
luxury = false,
},
description = _("scienceDescription-station", "Observatory and stellar mapping"),
general = _("stationGeneralInfo-comms", "We study the cosmos and map stellar phenomena. We also track moving asteroids. Look out! Just kidding"),
history = _("stationStory-comms", "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 = _("scienceDescription-station", "Autodoc components"),
general = "",
history = _("stationStory-comms", "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 = _("scienceDescription-station", "Zero gravity sports and entertainment"),
general = _("stationGeneralInfo-comms", "Come take in a game or two or perhaps see a show"),
history = _("stationStory-comms", "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),