-
Notifications
You must be signed in to change notification settings - Fork 6
/
scenario_27_liberation.lua
4564 lines (4559 loc) · 217 KB
/
scenario_27_liberation.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: Liberation Day
-- Description: Let's celebrate Liberation Day, when we humans finally freed ourselves from Kraylor occupation! Wait, I wonder how the Exuari celebrate Liberation day. Do they even recognize such a human-centric holiday?
---
--- Designed for one or more player ships. The terrain differs slightly every time the scenario is run. Default length: 30 minutes. May be shortened to 15 minutes or lengthened to an hour.
---
--- USN Discord: https://discord.gg/PntGG3a where you can join a game online. There's usually one every weekend. All experience levels are welcome.
-- Type: Replayable Mission
-- Author: Xansta
-- Setting[First]: Configures how long until the first major event occurs. The default is ten minutes. Shorter is harder. Longer is easier.
-- First[Seconds]: Ten seconds until the first major event occurs. This is used mainly for testing.
-- First[Five]: Five minutes until the first major event occurs.
-- First[Ten|Default]: Ten minutes until the first major event occurs.
-- First[Fifteen]: Fifteen minutes until the first major event occurs.
-- First[Twenty]: Twenty minutes until the first major event occurs.
-- Setting[Enemies]: Configures strength and/or number of enemies in this scenario
-- Enemies[Easy]: Fewer or weaker enemies
-- Enemies[Normal|Default]: Normal number or strength of enemies
-- Enemies[Hard]: More or stronger enemies
-- Enemies[Extreme]: Much stronger, many more enemies
-- Enemies[Quixotic]: Insanely strong and/or inordinately large numbers of enemies
-- Setting[Second]: Configures how long between the first event and the second event. The default is ten minutes. Shorter is harder. Longer is easier.
-- Second[Seconds]: Ten seconds between the first event and the second event. This is used mainly for testing.
-- Second[One]: One minute between the first event and the second event (test)
-- Second[Five]: Five minutes between the first event and the second event.
-- Second[Ten|Default]: Ten minutes between the first event and the second event.
-- Second[Fifteen]: Fifteen minutes between the first event and the second event.
-- Second[Twenty]: Twenty minutes between the first event and the second event.
-- Setting[Third]: Configures how long between the 2nd and 3rd events. Default: 10. Combining 1st, 2nd and 3rd gives you overall scenario length (30 - 60 minutes).
-- Third[Seconds]: Ten seconds between 2nd and 3rd events. Mainly used for testing.
-- Third[Five]: Five minutes between the 2nd and 3rd events.
-- Third[Ten|Default]: Ten minutes between the 2nd and 3rd events.
-- Third[Fifteen]: Fifteen minutes between the 2nd and 3rd events.
-- Third[Twenty]: Twenty minutes between the 2nd and 3rd events.
-- Setting[Cloak]: Degree of device cloaking mechanism
-- Cloak[None]: Device is not cloaked
-- Cloak[Partial|Default]: Device is partially cloaked
-- Cloak[Strong]: Device is mostly cloaked
-- Cloak[Full]: Device is cloaked (but it's not perfect)
---- Leftover configuration options from testing
-- First[Seconds]: Ten seconds until the first major event occurs. This is used mainly for testing.
-- Second[Seconds]: Ten seconds between the first event and the second event. This is used mainly for testing.
-- Second[One]: One minute between the first event and the second event (test)
-- Third[Seconds]: Ten seconds between 2nd and 3rd events. Mainly used for testing.
-- Cloak[None]: Device is not cloaked
require("utils.lua")
require("place_station_scenario_utility.lua")
require("cpu_ship_diversification_scenario_utility.lua")
require("generate_call_sign_scenario_utility.lua")
require("player_ship_upgrade_downgrade_path_scenario_utility.lua")
require("spawn_ships_scenario_utility.lua")
require("comms_scenario_utility.lua")
-- Initialization routines
function init()
scenario_version = "1.0.0"
ee_version = "2024.08.09"
print(string.format(" ---- Scenario: Liberation Day ---- Version %s ---- Tested with EE version %s ----",scenario_version,ee_version))
if _VERSION ~= nil then
print("Lua version:",_VERSION)
end
spawn_enemy_diagnostic = false
control_code_diagnostic = false
setVariations()
setConstants()
setGlobals()
mainGMButtons()
constructEnvironment()
onNewPlayerShip(setPlayers)
end
function setPlayers()
for i,p in ipairs(getActivePlayerShips()) do
if p.shipScore == nil then
updatePlayerSoftTemplate(p)
end
local already_recorded = false
for j,dp in ipairs(deployed_players) do
if p == dp.p then
already_recorded = true
break
end
end
if not already_recorded then
table.insert(deployed_players,{p=p,name=p:getCallSign(),count=1})
end
end
end
function updatePlayerSoftTemplate(p)
p:setPosition(player_spawn_x, player_spawn_y)
--set defaults for those ships not found in the list
p.shipScore = 24
p.maxCargo = 5
p.cargo = p.maxCargo
p.tractor = false
p.tractor_target_lock = false
p.mining = false
p.goods = {}
p:setFaction(player_faction)
p:onDestroyed(playerDestroyed)
p:onDestruction(playerDestruction)
if p:getReputationPoints() == 0 then
p:setReputationPoints(reputation_start_amount)
end
local temp_type_name = p:getTypeName()
if temp_type_name ~= nil then
local p_stat = player_ship_stats[temp_type_name]
if p_stat ~= nil then
p.maxCargo = p_stat.cargo
p.cargo = p.maxCargo
p:setMaxScanProbeCount(p_stat.probes)
p:setScanProbeCount(p:getMaxScanProbeCount())
p:setLongRangeRadarRange(player_ship_stats[temp_type_name].long_range_radar)
p:setShortRangeRadarRange(player_ship_stats[temp_type_name].short_range_radar)
p.normal_long_range_radar = player_ship_stats[temp_type_name].long_range_radar
p.tractor = p_stat.tractor
p.tractor_target_lock = false
p.mining = p_stat.mining
if p.name_set == nil then
local player_ship_name_list = player_ship_names_for[temp_type_name]
local player_ship_name = nil
if player_ship_name_list ~= nil then
player_ship_name = tableRemoveRandom(player_ship_name_list)
end
if player_ship_name == nil then
player_ship_name = tableRemoveRandom(player_ship_names_for["Leftovers"])
end
if player_ship_name ~= nil then
p:setCallSign(player_ship_name)
end
p.name_set = true
end
p.score_settings_source = temp_type_name
else
addGMMessage(string.format("Player ship %s's template type (%s) could not be found in table player_ship_stats",p:getCallSign(),temp_type_name))
end
end
p.maxRepairCrew = p:getRepairCrewCount()
p.healthyShield = 1.0
p.prevShield = 1.0
p.healthyReactor = 1.0
p.prevReactor = 1.0
p.healthyManeuver = 1.0
p.prevManeuver = 1.0
p.healthyImpulse = 1.0
p.prevImpulse = 1.0
if p:getBeamWeaponRange(0) > 0 then
p.healthyBeam = 1.0
p.prevBeam = 1.0
end
local tube_count = p:getWeaponTubeCount()
if tube_count > 0 then
p.healthyMissile = 1.0
p.prevMissile = 1.0
local size_letter = {
["small"] = "S",
["medium"] = "M",
["large"] = "L",
}
p.tube_size = ""
for i=1,tube_count do
p.tube_size = p.tube_size .. size_letter[p:getTubeSize(i-1)]
end
end
if p:hasWarpDrive() then
p.healthyWarp = 1.0
p.prevWarp = 1.0
end
if p:hasJumpDrive() then
p.healthyJump = 1.0
p.prevJump = 1.0
end
p.initialCoolant = p:getMaxCoolant()
local system_types = {"reactor","beamweapons","missilesystem","maneuver","impulse","warp","jumpdrive","frontshield","rearshield"}
p.normal_coolant_rate = {}
p.normal_power_rate = {}
for _, system in ipairs(system_types) do
p.normal_coolant_rate[system] = p:getSystemCoolantRate(system)
p.normal_power_rate[system] = p:getSystemPowerRate(system)
end
end
function setVariations()
local nova_config = {
["Seconds"] = 10,
["Five"] = 5*60,
["Ten"] = 10*60,
["Fifteen"] = 15*60,
["Twenty"] = 20*60,
}
nova_delay = nova_config[getScenarioSetting("First")]
local enemy_config = {
["Easy"] = {number = .5},
["Normal"] = {number = 1},
["Hard"] = {number = 2},
["Extreme"] = {number = 3},
["Quixotic"] = {number = 5},
}
enemy_power = enemy_config[getScenarioSetting("Enemies")].number
local hunt_config = {
["Seconds"] = 10,
["One"] = 60,
["Five"] = 5*60,
["Ten"] = 10*60,
["Fifteen"] = 15*60,
["Twenty"] = 20*60,
}
hunt_delay = hunt_config[getScenarioSetting("Second")]
hunt_time = hunt_delay + nova_delay
local final_nova_config = {
["Seconds"] = 10,
["One"] = 60,
["Five"] = 5*60,
["Ten"] = 10*60,
["Fifteen"] = 15*60,
["Twenty"] = 20*60,
}
final_nova_delay = final_nova_config[getScenarioSetting("Third")]
final_nova_time = final_nova_delay + hunt_time
local cloak_config = {
["None"] = -1,
["Partial"] = 8,
["Strong"] = 20,
["Full"] = 0,
}
cloak_level = cloak_config[getScenarioSetting("Cloak")]
end
function setConstants() --variables that don't change
max_repeat_loop = 50
sensor_impact = 1 --normal
sensor_jammer_power_units = false --false means percentage, true is units
system_list = {
"reactor",
"beamweapons",
"missilesystem",
"maneuver",
"impulse",
"warp",
"jumpdrive",
"frontshield",
"rearshield",
}
station_spacing = {
["Small Station"] = {touch = 300, defend = 2600, platform = 600, outer_platform = 7500},
["Medium Station"] = {touch = 1200, defend = 4000, platform = 2400, outer_platform = 9100},
["Large Station"] = {touch = 1400, defend = 4600, platform = 2800, outer_platform = 9700},
["Huge Station"] = {touch = 2000, defend = 4960, platform = 3500, outer_platform = 10100},
}
fleet_group = {
["adder"] = "Adders",
["Adders"] = "adder",
["missiler"] = "Missilers",
["Missilers"] = "missiler",
["beamer"] = "Beamers",
["Beamers"] = "beamer",
["frigate"] = "Frigates",
["Frigates"] = "frigate",
["chaser"] = "Chasers",
["Chasers"] = "chaser",
["warper"] = "Warpers",
["Warpers"] = "warper",
["jumper"] = "Jumpers",
["Jumpers"] = "jumper",
["fighter"] = "Fighters",
["Fighters"] = "fighter",
["drone"] = "Drones",
["Drones"] = "drone",
}
formation_delta = {
["square"] = {
x = {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},
y = {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},
},
["hexagonal"] = {
x = {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},
y = {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},
},
["pyramid"] = {
[1] = {
{angle = 0, distance = 0},
},
[2] = {
{angle = -1, distance = 1},
{angle = 1, distance = 1},
},
[3] = {
{angle = 0, distance = 0},
{angle = -1, distance = 1},
{angle = 1, distance = 1},
},
[4] = {
{angle = 0, distance = 0},
{angle = -1, distance = 1},
{angle = 1, distance = 1},
{angle = 0, distance = 2},
},
[5] = {
{angle = 0, distance = 0},
{angle = -1, distance = 1},
{angle = 1, distance = 1},
{angle = -2, distance = 2},
{angle = 2, distance = 2},
},
[6] = {
{angle = 0, distance = 0},
{angle = -1, distance = 1},
{angle = 1, distance = 1},
{angle = -2, distance = 2},
{angle = 2, distance = 2},
{angle = 0, distance = 2},
},
[7] = {
{angle = 0, distance = 0},
{angle = -1, distance = 1},
{angle = 1, distance = 1},
{angle = -2, distance = 2},
{angle = 2, distance = 2},
{angle = -3, distance = 3},
{angle = 3, distance = 3},
},
[8] = {
{angle = 0, distance = 0},
{angle = -1, distance = 1},
{angle = 1, distance = 1},
{angle = -2, distance = 2},
{angle = 2, distance = 2},
{angle = 0, distance = 2},
{angle = -3, distance = 3},
{angle = 3, distance = 3},
},
[9] = {
{angle = 0, distance = 0},
{angle = -1, distance = 1},
{angle = 1, distance = 1},
{angle = -2, distance = 2},
{angle = 2, distance = 2},
{angle = -3, distance = 3},
{angle = 3, distance = 3},
{angle = -4, distance = 4},
{angle = 4, distance = 4},
},
[10] = {
{angle = 0, distance = 0},
{angle = -1, distance = 1},
{angle = 1, distance = 1},
{angle = -2, distance = 2},
{angle = 2, distance = 2},
{angle = 0, distance = 2},
{angle = -3, distance = 3},
{angle = 3, distance = 3},
{angle = -2, distance = 3},
{angle = 2, distance = 3},
},
[11] = {
{angle = 0, distance = 0},
{angle = -1, distance = 1},
{angle = 1, distance = 1},
{angle = -2, distance = 2},
{angle = 2, distance = 2},
{angle = -3, distance = 3},
{angle = 3, distance = 3},
{angle = -4, distance = 4},
{angle = 4, distance = 4},
{angle = -3, distance = 4},
{angle = 3, distance = 4},
},
[12] = {
{angle = 0, distance = 0},
{angle = -1, distance = 1},
{angle = 1, distance = 1},
{angle = -2, distance = 2},
{angle = 2, distance = 2},
{angle = 0, distance = 2},
{angle = -3, distance = 3},
{angle = 3, distance = 3},
{angle = -2, distance = 3},
{angle = 2, distance = 3},
{angle = -1, distance = 3},
{angle = 1, distance = 3},
},
[13] = {
{angle = 0, distance = 0},
{angle = -1, distance = 1},
{angle = 1, distance = 1},
{angle = -2, distance = 2},
{angle = 2, distance = 2},
{angle = -3, distance = 3},
{angle = 3, distance = 3},
{angle = 0, distance = 3},
{angle = -2, distance = 4},
{angle = 2, distance = 4},
{angle = -1, distance = 5},
{angle = 1, distance = 5},
{angle = 0, distance = 6},
},
[14] = {
{angle = 0, distance = 0},
{angle = -1, distance = 1},
{angle = 1, distance = 1},
{angle = -2, distance = 2},
{angle = 2, distance = 2},
{angle = 0, distance = 2},
{angle = -3, distance = 3},
{angle = 3, distance = 3},
{angle = 0, distance = 4},
{angle = -2, distance = 4},
{angle = 2, distance = 4},
{angle = -1, distance = 5},
{angle = 1, distance = 5},
{angle = 0, distance = 6},
},
[15] = {
{angle = 0, distance = 0},
{angle = -1, distance = 1},
{angle = 1, distance = 1},
{angle = -2, distance = 2},
{angle = 2, distance = 2},
{angle = 0, distance = 2},
{angle = -3, distance = 3},
{angle = 3, distance = 3},
{angle = 0, distance = 3},
{angle = 0, distance = 4},
{angle = -2, distance = 4},
{angle = 2, distance = 4},
{angle = -1, distance = 5},
{angle = 1, distance = 5},
{angle = 0, distance = 6},
},
},
}
max_pyramid_tier = 15
ship_template = { --ordered by relative strength
-- normal ships that are part of the fleet spawn process
["Gnat"] = {strength = 2, adder = false, missiler = false, beamer = true, frigate = false, chaser = false, warper = false, jumper = false, fighter = true, drone = true, unusual = false, base = false, short_range_radar = 4500, hop_angle = 0, hop_range = 580, create = gnat},
["Lite Drone"] = {strength = 3, adder = false, missiler = false, beamer = true, frigate = false, chaser = false, warper = false, jumper = false, fighter = true, drone = true, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 580, create = droneLite},
["Jacket Drone"] = {strength = 4, adder = false, missiler = false, beamer = true, frigate = false, chaser = false, warper = false, jumper = false, fighter = true, drone = true, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 580, create = droneJacket},
["Ktlitan Drone"] = {strength = 4, adder = false, missiler = false, beamer = true, frigate = false, chaser = false, warper = false, jumper = false, fighter = true, drone = true, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 580, create = stockTemplate},
["Heavy Drone"] = {strength = 5, adder = false, missiler = false, beamer = true, frigate = false, chaser = false, warper = false, jumper = false, fighter = true, drone = true, unusual = false, base = false, short_range_radar = 5500, hop_angle = 0, hop_range = 580, create = droneHeavy},
["Adder MK3"] = {strength = 5, adder = true, missiler = false, beamer = false, frigate = false, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 580, create = stockTemplate},
["MT52 Hornet"] = {strength = 5, adder = false, missiler = false, beamer = true, frigate = false, chaser = false, warper = false, jumper = false, fighter = true, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 680, create = stockTemplate},
["Dagger"] = {strength = 6, adder = false, missiler = false, beamer = true, frigate = false, chaser = false, warper = false, jumper = false, fighter = true, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 980, create = stockTemplate},
["MV52 Hornet"] = {strength = 6, adder = false, missiler = false, beamer = true, frigate = false, chaser = false, warper = false, jumper = false, fighter = true, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 980, create = hornetMV52},
["MT55 Hornet"] = {strength = 6, adder = false, missiler = false, beamer = true, frigate = false, chaser = false, warper = false, jumper = false, fighter = true, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 680, create = hornetMT55},
["Adder MK4"] = {strength = 6, adder = true, missiler = false, beamer = false, frigate = false, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 580, create = stockTemplate},
["Fighter"] = {strength = 6, adder = false, missiler = false, beamer = true, frigate = false, chaser = false, warper = false, jumper = false, fighter = true, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 980, create = stockTemplate},
["Shepherd"] = {strength = 6, adder = false, missiler = false, beamer = true, frigate = false, chaser = false, warper = false, jumper = false, fighter = true, drone = false, unusual = false, base = false, short_range_radar = 5500, hop_angle = 0, hop_range = 2880, create = shepherd},
["Ktlitan Fighter"] = {strength = 6, adder = false, missiler = false, beamer = true, frigate = false, chaser = false, warper = false, jumper = false, fighter = true, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 1180, create = stockTemplate},
["Touchy"] = {strength = 7, adder = false, missiler = false, beamer = true, frigate = false, chaser = false, warper = false, jumper = false, fighter = true, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 2000, create = touchy},
["Blade"] = {strength = 7, adder = false, missiler = false, beamer = true, frigate = false, chaser = false, warper = false, jumper = false, fighter = true, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 980, create = stockTemplate},
["Gunner"] = {strength = 7, adder = false, missiler = false, beamer = false, frigate = false, chaser = false, warper = false, jumper = false, fighter = true, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 980, create = stockTemplate},
["K2 Fighter"] = {strength = 7, adder = false, missiler = false, beamer = true, frigate = false, chaser = false, warper = false, jumper = false, fighter = true, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 1180, create = k2fighter},
["Adder MK5"] = {strength = 7, adder = true, missiler = false, beamer = false, frigate = false, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 580, create = stockTemplate},
["WX-Lindworm"] = {strength = 7, adder = false, missiler = true, beamer = false, frigate = false, chaser = false, warper = false, jumper = false, fighter = true, drone = false, unusual = false, base = false, short_range_radar = 5500, hop_angle = 0, hop_range = 2500, create = stockTemplate},
["K3 Fighter"] = {strength = 8, adder = false, missiler = false, beamer = true, frigate = false, chaser = false, warper = false, jumper = false, fighter = true, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 1180, create = k3fighter},
["Shooter"] = {strength = 8, adder = false, missiler = false, beamer = false, frigate = false, chaser = false, warper = false, jumper = false, fighter = true, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 980, create = stockTemplate},
["Jagger"] = {strength = 8, adder = false, missiler = false, beamer = false, frigate = false, chaser = false, warper = false, jumper = false, fighter = true, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 980, create = stockTemplate},
["Adder MK6"] = {strength = 8, adder = true, missiler = false, beamer = false, frigate = false, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 580, create = stockTemplate},
["Ktlitan Scout"] = {strength = 8, adder = false, missiler = false, beamer = true, frigate = false, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 7000, hop_angle = 0, hop_range = 580, create = stockTemplate},
["WZ-Lindworm"] = {strength = 9, adder = false, missiler = true, beamer = false, frigate = false, chaser = false, warper = false, jumper = false, fighter = true, drone = false, unusual = false, base = false, short_range_radar = 5500, hop_angle = 0, hop_range = 2500, create = wzLindworm},
["Adder MK7"] = {strength = 9, adder = true, missiler = false, beamer = false, frigate = false, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 580, create = stockTemplate},
-- ["Brush"] = {strength = 10, adder = true, missiler = false, beamer = false, frigate = false, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 580, create = brush},
["Adder MK8"] = {strength = 10, adder = true, missiler = false, beamer = false, frigate = false, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5500, hop_angle = 0, hop_range = 580, create = stockTemplate},
["Adder MK9"] = {strength = 11, adder = true, missiler = false, beamer = false, frigate = false, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 6000, hop_angle = 0, hop_range = 580, create = stockTemplate},
["Nirvana R3"] = {strength = 12, adder = false, missiler = false, beamer = true, frigate = false, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 980, create = stockTemplate},
["Phobos R2"] = {strength = 13, adder = false, missiler = false, beamer = false, frigate = true, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 1180, create = phobosR2},
["Missile Cruiser"] = {strength = 14, adder = false, missiler = true, beamer = false, frigate = true, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 7000, hop_angle = 0, hop_range = 2500, create = stockTemplate},
["Waddle 5"] = {strength = 15, adder = true, missiler = false, beamer = false, frigate = false, chaser = true, warper = true, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 580, create = waddle5},
["Jade 5"] = {strength = 15, adder = true, missiler = false, beamer = false, frigate = false, chaser = true, warper = false, jumper = true, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 580, create = jade5},
["Phobos T3"] = {strength = 15, adder = false, missiler = false, beamer = false, frigate = true, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 1180, create = stockTemplate},
["Guard"] = {strength = 15, adder = false, missiler = false, beamer = false, frigate = true, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 1180, create = stockTemplate},
["Piranha F8"] = {strength = 15, adder = false, missiler = true, beamer = false, frigate = true, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 6000, hop_angle = 90, hop_range = 2500, create = stockTemplate},
["Piranha F12"] = {strength = 15, adder = false, missiler = true, beamer = false, frigate = true, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 6000, hop_angle = 90, hop_range = 2500, create = stockTemplate},
["Piranha F12.M"] = {strength = 16, adder = false, missiler = true, beamer = false, frigate = true, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 6000, hop_angle = 90, hop_range = 2500, create = stockTemplate},
["Phobos M3"] = {strength = 16, adder = false, missiler = false, beamer = false, frigate = true, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5500, hop_angle = 0, hop_range = 1180, create = stockTemplate},
["Farco 3"] = {strength = 16, adder = false, missiler = false, beamer = false, frigate = true, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 8000, hop_angle = 0, hop_range = 1480, create = farco3},
["Farco 5"] = {strength = 16, adder = false, missiler = false, beamer = false, frigate = true, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 8000, hop_angle = 0, hop_range = 1180, create = farco5},
["Gunship"] = {strength = 17, adder = false, missiler = false, beamer = false, frigate = true, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 980, create = stockTemplate},
["Phobos T4"] = {strength = 18, adder = false, missiler = false, beamer = false, frigate = true, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 1480, create = phobosT4},
["Cruiser"] = {strength = 18, adder = true, missiler = false, beamer = true, frigate = true, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 6000, hop_angle = 0, hop_range = 980, create = stockTemplate},
["Nirvana R5"] = {strength = 19, adder = false, missiler = false, beamer = true, frigate = true, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 1180, create = stockTemplate},
["Farco 8"] = {strength = 19, adder = false, missiler = false, beamer = false, frigate = true, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 8000, hop_angle = 0, hop_range = 1480, create = farco8},
["Nirvana R5A"] = {strength = 20, adder = false, missiler = false, beamer = true, frigate = true, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 1180, create = stockTemplate},
["Adv. Gunship"] = {strength = 20, adder = false, missiler = false, beamer = false, frigate = true, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 7000, hop_angle = 0, hop_range = 980, create = stockTemplate},
["Ktlitan Worker"] = {strength = 20, adder = false, missiler = false, beamer = true, frigate = false, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 90, hop_range = 580, create = stockTemplate},
["Farco 11"] = {strength = 21, adder = false, missiler = false, beamer = false, frigate = true, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 8000, hop_angle = 0, hop_range = 1480, create = farco11},
["Storm"] = {strength = 22, adder = false, missiler = true, beamer = false, frigate = true, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 6000, hop_angle = 0, hop_range = 1180, create = stockTemplate},
["Warden"] = {strength = 22, adder = false, missiler = false, beamer = false, frigate = true, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 6000, hop_angle = 0, hop_range = 1180, create = stockTemplate},
["Racer"] = {strength = 22, adder = false, missiler = false, beamer = true, frigate = true, chaser = true, warper = true, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 980, create = stockTemplate},
["Stalker R5"] = {strength = 22, adder = false, missiler = false, beamer = true, frigate = true, chaser = true, warper = false, jumper = true, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 980, create = stockTemplate},
["Stalker Q5"] = {strength = 22, adder = false, missiler = false, beamer = true, frigate = true, chaser = true, warper = true, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 980, create = stockTemplate},
["Strike"] = {strength = 23, adder = false, missiler = false, beamer = false, frigate = true, chaser = true, warper = true, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5500, hop_angle = 0, hop_range = 980, create = stockTemplate},
["Dash"] = {strength = 23, adder = false, missiler = false, beamer = false, frigate = true, chaser = true, warper = true, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5500, hop_angle = 0, hop_range = 980, create = stockTemplate},
["Farco 13"] = {strength = 24, adder = false, missiler = false, beamer = false, frigate = true, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 1480, create = farco13},
["Sentinel"] = {strength = 24, adder = false, missiler = false, beamer = true, frigate = true, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 1180, create = stockTemplate},
["Ranus U"] = {strength = 25, adder = false, missiler = true, beamer = false, frigate = true, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 6000, hop_angle = 0, hop_range = 2500, create = stockTemplate},
["Flash"] = {strength = 25, adder = false, missiler = true, beamer = false, frigate = true, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 6000, hop_angle = 0, hop_range = 2500, create = stockTemplate},
["Ranger"] = {strength = 25, adder = false, missiler = true, beamer = false, frigate = true, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 6000, hop_angle = 0, hop_range = 2500, create = stockTemplate},
["Buster"] = {strength = 25, adder = false, missiler = true, beamer = false, frigate = true, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 6000, hop_angle = 0, hop_range = 2500, create = stockTemplate},
["Stalker Q7"] = {strength = 25, adder = false, missiler = false, beamer = true, frigate = true, chaser = true, warper = true, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 980, create = stockTemplate},
["Stalker R7"] = {strength = 25, adder = false, missiler = false, beamer = true, frigate = true, chaser = true, warper = false, jumper = true, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 980, create = stockTemplate},
["Whirlwind"] = {strength = 26, adder = false, missiler = true, beamer = false, frigate = true, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 6000, hop_angle = 90, hop_range = 2500, create = whirlwind},
["Hunter"] = {strength = 26, adder = false, missiler = false, beamer = true, frigate = true, chaser = true, warper = true, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5500, hop_angle = 0, hop_range = 980, create = stockTemplate},
["Adv. Striker"] = {strength = 27, adder = false, missiler = false, beamer = true, frigate = true, chaser = true, warper = false, jumper = true, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 980, create = stockTemplate},
["Elara P2"] = {strength = 28, adder = false, missiler = false, beamer = false, frigate = true, chaser = true, warper = true, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 8000, hop_angle = 0, hop_range = 1480, create = stockTemplate},
["Tempest"] = {strength = 30, adder = false, missiler = true, beamer = false, frigate = true, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 6000, hop_angle = 90, hop_range = 2500, create = tempest},
["Strikeship"] = {strength = 30, adder = false, missiler = false, beamer = true, frigate = true, chaser = true, warper = true, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 980, create = stockTemplate},
["Fiend G3"] = {strength = 33, adder = false, missiler = false, beamer = false, frigate = true, chaser = true, warper = false, jumper = true, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 6500, hop_angle = 0, hop_range = 980, create = stockTemplate},
["Maniapak"] = {strength = 34, adder = true, missiler = false, beamer = false, frigate = false, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 6000, hop_angle = 0, hop_range = 580, create = maniapak},
["Fiend G4"] = {strength = 35, adder = false, missiler = false, beamer = false, frigate = true, chaser = true, warper = true, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 6500, hop_angle = 0, hop_range = 980, create = stockTemplate},
["Cucaracha"] = {strength = 36, adder = false, missiler = false, beamer = true, frigate = false, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 1480, create = cucaracha},
["Fiend G5"] = {strength = 37, adder = false, missiler = false, beamer = false, frigate = true, chaser = true, warper = false, jumper = true, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 6500, hop_angle = 0, hop_range = 980, create = stockTemplate},
["Fiend G6"] = {strength = 39, adder = false, missiler = false, beamer = false, frigate = true, chaser = true, warper = true, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 6500, hop_angle = 0, hop_range = 980, create = stockTemplate},
["Barracuda"] = {strength = 40, adder = false, missiler = false, beamer = false, frigate = true, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5500, hop_angle = 0, hop_range = 1180, create = barracuda},
["Ryder"] = {strength = 41, adder = false, missiler = false, beamer = true, frigate = false, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 8000, hop_angle = 90, hop_range = 1180, create = stockTemplate},
["Predator"] = {strength = 42, adder = false, missiler = false, beamer = false, frigate = true, chaser = true, warper = false, jumper = true, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 7500, hop_angle = 0, hop_range = 980, create = predator},
["Ktlitan Breaker"] = {strength = 45, adder = false, missiler = false, beamer = false, frigate = false, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 780, create = stockTemplate},
["Hurricane"] = {strength = 46, adder = false, missiler = true, beamer = false, frigate = true, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 6000, hop_angle = 15, hop_range = 2500, create = hurricane},
["Ktlitan Feeder"] = {strength = 48, adder = false, missiler = false, beamer = true, frigate = false, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 580, create = stockTemplate},
["Atlantis X23"] = {strength = 50, adder = false, missiler = false, beamer = false, frigate = false, chaser = true, warper = false, jumper = true, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 10000, hop_angle = 0, hop_range = 1480, create = stockTemplate},
["Ktlitan Destroyer"] = {strength = 50, adder = false, missiler = false, beamer = false, frigate = false, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 9000, hop_angle = 0, hop_range = 980, create = stockTemplate},
["K2 Breaker"] = {strength = 55, adder = false, missiler = false, beamer = false, frigate = false, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5000, hop_angle = 0, hop_range = 780, create = k2breaker},
["Atlantis Y42"] = {strength = 60, adder = false, missiler = false, beamer = false, frigate = false, chaser = true, warper = false, jumper = true, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 10000, hop_angle = 0, hop_range = 1480, create = atlantisY42},
["Blockade Runner"] = {strength = 63, adder = false, missiler = false, beamer = true, frigate = false, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 5500, hop_angle = 0, hop_range = 980, create = stockTemplate},
["Starhammer II"] = {strength = 70, adder = false, missiler = false, beamer = false, frigate = false, chaser = true, warper = false, jumper = true, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 10000, hop_angle = 0, hop_range = 1480, create = stockTemplate},
["Enforcer"] = {strength = 75, adder = false, missiler = false, beamer = false, frigate = true, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 9000, hop_angle = 0, hop_range = 1480, create = enforcer},
["Dreadnought"] = {strength = 80, adder = false, missiler = false, beamer = true, frigate = false, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 9000, hop_angle = 0, hop_range = 980, create = stockTemplate},
["Starhammer III"] = {strength = 85, adder = false, missiler = false, beamer = false, frigate = false, chaser = true, warper = false, jumper = true, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 12000, hop_angle = 0, hop_range = 1480, create = starhammerIII},
["Starhammer V"] = {strength = 90, adder = false, missiler = false, beamer = false, frigate = false, chaser = true, warper = false, jumper = true, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 15000, hop_angle = 0, hop_range = 1480, create = starhammerV},
["Battlestation"] = {strength = 100,adder = false, missiler = false, beamer = true, frigate = false, chaser = true, warper = false, jumper = true, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 9000, hop_angle = 90, hop_range = 2480, create = stockTemplate},
["Fortress"] = {strength = 130,adder = false, missiler = false, beamer = true, frigate = false, chaser = false, warper = false, jumper = false, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 9000, hop_angle = 90, hop_range = 2380, create = stockTemplate},
["Tyr"] = {strength = 150,adder = false, missiler = false, beamer = true, frigate = false, chaser = true, warper = false, jumper = true, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 9500, hop_angle = 90, hop_range = 2480, create = tyr},
["Odin"] = {strength = 250,adder = false, missiler = false, beamer = false, frigate = false, chaser = true, warper = false, jumper = true, fighter = false, drone = false, unusual = false, base = false, short_range_radar = 20000, hop_angle = 0, hop_range = 3180, create = stockTemplate},
}
for template,details in pairs(ship_template) do
if details.create == nil then
print(template,"has no create function")
end
end
player_ship_stats = {
["MP52 Hornet"] = { strength = 7, cargo = 3, distance = 100, long_range_radar = 18000, short_range_radar = 4000, probes = 8, tractor = false, mining = false },
["Piranha"] = { strength = 16, cargo = 8, distance = 200, long_range_radar = 25000, short_range_radar = 6000, probes = 8, tractor = false, mining = false },
["Flavia P.Falcon"] = { strength = 13, cargo = 15, distance = 200, long_range_radar = 40000, short_range_radar = 5000, probes = 8, tractor = true, mining = true },
["Phobos M3P"] = { strength = 19, cargo = 10, distance = 200, long_range_radar = 25000, short_range_radar = 5000, probes = 8, tractor = true, mining = false },
["Atlantis"] = { strength = 52, cargo = 6, distance = 400, long_range_radar = 30000, short_range_radar = 5000, probes = 8, tractor = true, mining = true },
["Player Cruiser"] = { strength = 40, cargo = 6, distance = 400, long_range_radar = 30000, short_range_radar = 5000, probes = 8, tractor = false, mining = false },
["Player Missile Cr."] = { strength = 45, cargo = 8, distance = 200, long_range_radar = 35000, short_range_radar = 6000, probes = 8, tractor = false, mining = false },
["Player Fighter"] = { strength = 7, cargo = 3, distance = 100, long_range_radar = 15000, short_range_radar = 4500, probes = 8, tractor = false, mining = false },
["Benedict"] = { strength = 10, cargo = 9, distance = 400, long_range_radar = 30000, short_range_radar = 5000, probes = 8, tractor = true, mining = true },
["Kiriya"] = { strength = 10, cargo = 9, distance = 400, long_range_radar = 35000, short_range_radar = 5000, probes = 8, tractor = true, mining = true },
["Striker"] = { strength = 8, cargo = 4, distance = 200, long_range_radar = 35000, short_range_radar = 5000, probes = 8, tractor = false, mining = false },
["ZX-Lindworm"] = { strength = 8, cargo = 3, distance = 100, long_range_radar = 18000, short_range_radar = 5500, probes = 8, tractor = false, mining = false },
["Repulse"] = { strength = 14, cargo = 12, distance = 200, long_range_radar = 38000, short_range_radar = 5000, probes = 8, tractor = true, mining = false },
["Ender"] = { strength = 100, cargo = 20, distance = 2000,long_range_radar = 45000, short_range_radar = 7000, probes = 8, tractor = true, mining = false },
["Nautilus"] = { strength = 12, cargo = 7, distance = 200, long_range_radar = 22000, short_range_radar = 4000, probes = 8, tractor = false, mining = false },
["Hathcock"] = { strength = 30, cargo = 6, distance = 200, long_range_radar = 35000, short_range_radar = 6000, probes = 8, tractor = false, mining = true },
["Maverick"] = { strength = 45, cargo = 5, distance = 200, long_range_radar = 20000, short_range_radar = 4000, probes = 8, tractor = false, mining = true },
["Crucible"] = { strength = 45, cargo = 5, distance = 200, long_range_radar = 20000, short_range_radar = 6000, probes = 8, tractor = false, mining = false },
["Proto-Atlantis"] = { strength = 40, cargo = 4, distance = 400, long_range_radar = 30000, short_range_radar = 4500, probes = 8, tractor = false, mining = true },
["Saipan"] = { strength = 30, cargo = 4, distance = 200, long_range_radar = 25000, short_range_radar = 4500, probes = 10,tractor = false, mining = false },
["Stricken"] = { strength = 40, cargo = 4, distance = 200, long_range_radar = 20000, short_range_radar = 4000, probes = 8, tractor = false, mining = false },
["Surkov"] = { strength = 35, cargo = 6, distance = 200, long_range_radar = 35000, short_range_radar = 6000, probes = 8, tractor = false, mining = false },
["Redhook"] = { strength = 11, cargo = 8, distance = 200, long_range_radar = 20000, short_range_radar = 6000, probes = 8, tractor = false, mining = false },
["Pacu"] = { strength = 18, cargo = 7, distance = 200, long_range_radar = 20000, short_range_radar = 6000, probes = 8, tractor = false, mining = false },
["Phobos T2"] = { strength = 19, cargo = 9, distance = 200, long_range_radar = 25000, short_range_radar = 5000, probes = 8, tractor = true, mining = false },
["Wombat"] = { strength = 13, cargo = 3, distance = 100, long_range_radar = 18000, short_range_radar = 6000, probes = 8, tractor = false, mining = false },
["Holmes"] = { strength = 35, cargo = 6, distance = 200, long_range_radar = 35000, short_range_radar = 4000, probes = 8, tractor = true, mining = false },
["Focus"] = { strength = 35, cargo = 4, distance = 200, long_range_radar = 32000, short_range_radar = 5000, probes = 8, tractor = false, mining = true },
["Flavia 2C"] = { strength = 25, cargo = 12, distance = 200, long_range_radar = 30000, short_range_radar = 5000, probes = 8, tractor = false, mining = true },
["Destroyer IV"] = { strength = 25, cargo = 5, distance = 400, long_range_radar = 30000, short_range_radar = 5000, probes = 8, tractor = false, mining = false },
["Destroyer III"] = { strength = 25, cargo = 7, distance = 200, long_range_radar = 30000, short_range_radar = 5000, probes = 8, tractor = false, mining = false },
["MX-Lindworm"] = { strength = 10, cargo = 3, distance = 100, long_range_radar = 30000, short_range_radar = 5000, probes = 8, tractor = false, mining = false },
["Striker LX"] = { strength = 16, cargo = 4, distance = 200, long_range_radar = 20000, short_range_radar = 4000, probes = 8, tractor = false, mining = false },
["Maverick XP"] = { strength = 23, cargo = 5, distance = 200, long_range_radar = 25000, short_range_radar = 7000, probes = 8, tractor = true, mining = false },
["Era"] = { strength = 14, cargo = 14, distance = 200, long_range_radar = 50000, short_range_radar = 5000, probes = 8, tractor = true, mining = true },
["Squid"] = { strength = 14, cargo = 8, distance = 200, long_range_radar = 25000, short_range_radar = 5000, probes = 8, tractor = false, mining = false },
["Atlantis II"] = { strength = 60, cargo = 6, distance = 400, long_range_radar = 30000, short_range_radar = 5000, probes = 8, tractor = true, mining = true },
}
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"}
good_desc = {
["food"] = _("trade-comms","food"),
["medicine"] = _("trade-comms","medicine"),
["luxury"] = _("trade-comms","luxury"),
["cobalt"] = _("trade-comms","cobalt"),
["dilithium"] = _("trade-comms","dilithium"),
["gold"] = _("trade-comms","gold"),
["nickel"] = _("trade-comms","nickel"),
["platinum"] = _("trade-comms","platinum"),
["tritanium"] = _("trade-comms","tritanium"),
["autodoc"] = _("trade-comms","autodoc"),
["android"] = _("trade-comms","android"),
["battery"] = _("trade-comms","battery"),
["beam"] = _("trade-comms","beam"),
["circuit"] = _("trade-comms","circuit"),
["communication"] = _("trade-comms","communication"),
["filament"] = _("trade-comms","filament"),
["impulse"] = _("trade-comms","impulse"),
["lifter"] = _("trade-comms","lifter"),
["nanites"] = _("trade-comms","nanites"),
["optic"] = _("trade-comms","optic"),
["repulsor"] = _("trade-comms","repulsor"),
["robotic"] = _("trade-comms","robotic"),
["sensor"] = _("trade-comms","sensor"),
["shield"] = _("trade-comms","shield"),
["software"] = _("trade-comms","software"),
["tractor"] = _("trade-comms","tractor"),
["transporter"] = _("trade-comms","transporter"),
["warp"] = _("trade-comms","warp"),
}
faction_letter = {
["Human Navy"] = "H",
["Independent"] = "I",
["Kraylor"] = "K",
["Ktlitans"] = "B",
["Exuari"] = "E",
["Ghosts"] = "G",
["Arlenians"] = "A",
["TSN"] = "T",
["CUF"] = "C",
["USN"] = "U",
}
end
function setGlobals() --variables that might change
mid_fleet_launched = false
inner_stations = {}
outer_stations = {}
initial_transport_count = 10
final_nova_artifact_created = false
ejecta = {}
process_ejecta = false
reset_nova_process = false
nova_beam_targets = {}
jasmine_purdue_hint = false
jasmine_purdue_answers = {
_("station-comms","She studies the Exuari. She's *the* expert around here"),
_("station-comms","She studies the Exuari so hard that sometimes I wonder if she's got some kind of fixation."),
_("station-comms","I heard that her family was killed by the Exuari. That's why she studies them so much."),
_("station-comms","After studying the Exuari using our extensive resources, she took a job on a freighter to gather more data in the field."),
}
jasmine_freighter_hint = false
jasmine_freighter_identified = false
reputation_start_amount = 50
deployed_players = {}
artifact_number = 0
sensor_jammer_list = {}
warp_jammer_list = {}
warp_jammer_info = {
["Human Navy"] = {id = "H", count = 0},
["Independent"] = {id = "I", count = 0},
["Kraylor"] = {id = "K", count = 0},
["Arlenians"] = {id = "A", count = 0},
["Exuari"] = {id = "E", count = 0},
["Ghosts"] = {id = "G", count = 0},
["Ktlitans"] = {id = "B", count = 0},
["TSN"] = {id = "T", count = 0},
["USN"] = {id = "U", count = 0},
["CUF"] = {id = "C", count = 0},
["Mehklar"] = {id = "M", count = 0},
}
player_ship_names_for = {
["Atlantis"] = {"Excaliber","Thrasher","Punisher","Vorpal","Protang","Drummond","Parchim","Coronado"},
["Atlantis II"] = {"Spyder", "Shelob", "Tarantula", "Aragog", "Charlotte"},
["Benedict"] = {"Elizabeth","Ford","Vikramaditya","Liaoning","Avenger","Naruebet","Washington","Lincoln","Garibaldi","Eisenhower"},
["Crucible"] = {"Sling", "Stark", "Torrid", "Kicker", "Flummox"},
["Ender"] = {"Mongo","Godzilla","Leviathan","Kraken","Jupiter","Saturn"},
["Flavia P.Falcon"] = {"Ladyhawke","Hunter","Seeker","Gyrefalcon","Kestrel","Magpie","Bandit","Buccaneer"},
["Hathcock"] = {"Hayha","Waldron","Plunkett","Mawhinney","Furlong","Zaytsev","Pavlichenko","Pegahmagabow","Fett","Hawkeye","Hanzo"},
["Kiriya"] = {"Cavour","Reagan","Gaulle","Paulo","Truman","Stennis","Kuznetsov","Roosevelt","Vinson","Old Salt"},
["Maverick"] = {"Angel", "Thunderbird", "Roaster", "Magnifier", "Hedge"},
["MP52 Hornet"] = {"Dragonfly","Scarab","Mantis","Yellow Jacket","Jimminy","Flik","Thorny","Buzz"},
["Nautilus"] = {"October","Abdiel","Manxman","Newcon","Nusret","Pluton","Amiral","Amur","Heinkel","Dornier"},
["Phobos M3P"] = {"Blinder","Shadow","Distortion","Diemos","Ganymede","Castillo","Thebe","Retrograde"},
["Piranha"] = {"Razor","Biter","Ripper","Voracious","Carnivorous","Characid","Vulture","Predator"},
["Player Cruiser"] = {"Excelsior","Velociraptor","Thunder","Kona","Encounter","Perth","Aspern","Panther"},
["Player Fighter"] = {"Buzzer","Flitter","Zippiticus","Hopper","Molt","Stinger","Stripe"},
["Player Missile Cr."] ={"Projectus","Hurlmeister","Flinger","Ovod","Amatola","Nakhimov","Antigone"},
["Proto-Atlantis"] = {"Narsil", "Blade", "Decapitator", "Trisect", "Sabre"},
["Redhook"] = {"Headhunter", "Thud", "Troll", "Scalper", "Shark"},
["Repulse"] = {"Fiddler","Brinks","Loomis","Mowag","Patria","Pandur","Terrex","Komatsu","Eitan"},
["Saipan"] = {"Atlas", "Bernard", "Alexander", "Retribution", "Sulaco", "Conestoga", "Saratoga", "Pegasus"},
["Stricken"] = {"Blazon", "Streaker", "Pinto", "Spear", "Javelin"},
["Striker"] = {"Sparrow","Sizzle","Squawk","Crow","Phoenix","Snowbird","Hawk"},
["Surkov"] = {"Sting", "Sneak", "Bingo", "Thrill", "Vivisect"},
["ZX-Lindworm"] = {"Seagull","Catapult","Blowhard","Flapper","Nixie","Pixie","Tinkerbell"},
["Leftovers"] = {"Foregone","Righteous","Scandalous"},
}
star_list = {
{radius = random(600,1400), distance = random(-2500,-1400),
name = {
"Gamma Piscium",
"Beta Lyporis",
"Sigma Draconis",
"Iota Carinae",
"Theta Arietis",
"Epsilon Indi",
"Beta Hydri",
"Acamar",
"Bellatrix",
"Castula",
"Dziban",
"Elnath",
"Flegetonte",
"Geminga",
"Helvetios",
"Inquill",
"Jishui",
"Kaus Borealis",
"Liesma",
"Macondo",
"Nikawiy",
"Orkaria",
"Poerava",
"Stribor",
"Taygeta",
"Tuiren",
"Ukdah",
"Wouri",
"Xihe",
"Yildun",
"Zosma",
},
color = {
red = random(0.8,1), green = random(0.8,1), blue = random(0.8,1)
},
texture = {
atmosphere = "planets/star-1.png"
},
},
}
moon_list = {
{
name = {"Ganymede", "Europa", "Deimos", "Luna"},
texture = {
surface = "planets/moon-1.png"
}
},
{
name = {"Myopia", "Zapata", "Lichen", "Fandango"},
texture = {
surface = "planets/moon-2.png"
}
},
{
name = {"Scratmat", "Tipple", "Dranken", "Calypso"},
texture = {
surface = "planets/moon-3.png"
}
},
}
planet_list = {
{
name = {"Bespin","Aldea","Bersallis"},
texture = {
surface = "planets/gas-1.png"
},
},
{
name = {"Farius Prime","Deneb","Mordan"},
texture = {
surface = "planets/gas-2.png"
},
},
{
name = {"Kepler-7b","Alpha Omicron","Nelvana"},
texture = {
surface = "planets/gas-3.png"
},
},
{
name = {"Alderaan","Dagobah","Dantooine","Rigel"},
color = {
red = random(0,0.2),
green = random(0,0.2),
blue = random(0.8,1)
},
texture = {
surface = "planets/planet-1.png",
cloud = "planets/clouds-1.png",
atmosphere = "planets/atmosphere.png"
},
},
{
name = {"Pahvo","Penthara","Scalos"},
color = {
red = random(0,0.2),
green = random(0,0.2),
blue = random(0.8,1)
},
texture = {
surface = "planets/planet-4.png",
cloud = "planets/clouds-3.png",
atmosphere = "planets/atmosphere.png"
},
},
{
name = {"Tanuga","Vacca","Terlina","Timor"},
color = {
red = random(0,0.2),
green = random(0,0.2),
blue = random(0.8,1)
},
texture = {
surface = "planets/planet-5.png",
cloud = "planets/clouds-2.png",
atmosphere = "planets/atmosphere.png"
},
},
}
end
function mainGMButtons()
clearGMFunctions()
addGMFunction(_("buttonGM","+Spawn Ship(s)"),spawnGMShips)
end
function constructEnvironment()
-- set player faction and friendly factions
player_factions = {"Human Navy","CUF","USN","TSN"}
player_faction = tableSelectRandom(player_factions)
friendly_factions = {"Human Navy"}
if player_faction == "Human Navy" then
friendly_factions = {"CUF","USN","TSN"}
end
tpa = Artifact():setFaction(player_faction) --temporary player artifact
tsa = Artifact() --temporary station artifact
player_spawn_x = random(200000,800000)
player_spawn_y = random(1000000,2000000)
inner_space = {}
outer_space = {}
connecting_space = {}
rescue_inner_space = {}
rescue_inner_ring_space = {}
rescue_outer_ring_space = {}
table.insert(inner_space,{obj=VisualAsteroid():setPosition(player_spawn_x,player_spawn_y),dist=2000,shape="circle"})
constructDoomedBodiesAndStation()
connection_angle = random(0,360)
constructRescueBodies()
constructMinorEnemyTrap()
constructOuterDoomedStations()
constructConnectingStations()
constructRescueStations()
constructNemesisStation()
-- set terrain in the doomed circle
placement_areas = {
["Doomed Ring"] = {
stations = outer_stations,
space = outer_space,
shape = "torus",
center_x = doomed_system_x,
center_y = doomed_system_y,
inner_radius = 35000,
outer_radius = 60000
},
["Doomed Circle"] = {
stations = inner_stations,
space = inner_space,
shape = "circle",
center_x = doomed_system_x,
center_y = doomed_system_y,
radius = 15000
},
}
transport_list = {}
local terrain = {
{chance = 4, count = 0, max = math.random(1,2), func = placeStar, desc = "Star", }, --2
{chance = 7, count = 0, max = -1, func = placeProbe, desc = "Probe", }, --3
{chance = 4, count = 0, max = math.random(7,15), func = placeWarpJammer, desc = "Warp jammer", }, --4
{chance = 7, count = 0, max = math.random(6,15), func = placeSensorJammer, desc = "Sensor jammer", }, --6
{chance = 7, count = 0, max = -1, func = placeSensorBuoy, desc = "Sensor buoy", }, --7
{chance = 9, count = 0, max = -1, func = placeAdBuoy, desc = "Ad buoy", }, --8
{chance = 8, count = 0, max = -1, func = placeNebula, desc = "Nebula", }, --9
{chance = 5, count = 0, max = -1, func = placeMine, desc = "Mine", }, --10
{chance = 5, count = 0, max = math.random(3,9), func = placeMineField, desc = "Mine field", }, --11
{chance = 5, count = 0, max = math.random(2,5), func = placeAsteroidField, desc = "Asteroid field", }, --12
{chance = 6, count = 0, max = math.random(2,5), func = placeAsteroidBlob, desc = "Asteroid blob", }, --14
{chance = 6, count = 0, max = math.random(2,5), func = placeMinefieldBlob, desc = "Minefield blob", }, --15
}
local objects_placed_count = 0
repeat
local roll = random(0,100)
local object_chance = 0
for i,terrain_object in ipairs(terrain) do
object_chance = object_chance + terrain_object.chance
if roll <= object_chance then
if terrain_object.max < 0 or terrain_object.count < terrain_object.max then
local call_function = terrain_object.func
local placement_result = call_function("Doomed Circle")
if placement_result then
terrain_object.count = terrain_object.count + 1
end
else
placeAsteroid("Doomed Circle")
end
break
elseif i == #terrain then
placeAsteroid("Doomed Circle")
end
end
objects_placed_count = objects_placed_count + 1
until(objects_placed_count >= 20)
-- set terrain just outside the doomed circle
terrain = {
{chance = 4, count = 0, max = math.random(1,2), func = placeStar, desc = "Star", }, --2
{chance = 4, count = 0, max = math.random(1,2), func = placeBlackHole, desc = "Black hole", }, --2
{chance = 7, count = 0, max = -1, func = placeProbe, desc = "Probe", }, --3
{chance = 4, count = 0, max = math.random(7,15), func = placeWarpJammer, desc = "Warp jammer", }, --4
{chance = 7, count = 0, max = math.random(6,15), func = placeSensorJammer, desc = "Sensor jammer", }, --6
{chance = 7, count = 0, max = -1, func = placeSensorBuoy, desc = "Sensor buoy", }, --7
{chance = 9, count = 0, max = -1, func = placeAdBuoy, desc = "Ad buoy", }, --8
{chance = 8, count = 0, max = -1, func = placeNebula, desc = "Nebula", }, --9
{chance = 5, count = 0, max = -1, func = placeMine, desc = "Mine", }, --10
{chance = 5, count = 0, max = math.random(3,9), func = placeMineField, desc = "Mine field", }, --11
{chance = 4, count = 0, max = 10, func = placeTransport, desc = "Transport", }, --13
{chance = 5, count = 0, max = math.random(2,15), func = placeAsteroidField, desc = "Asteroid field", }, --12
{chance = 6, count = 0, max = math.random(2,15), func = placeAsteroidBlob, desc = "Asteroid blob", }, --14
{chance = 6, count = 0, max = math.random(2,15), func = placeMinefieldBlob, desc = "Minefield blob", }, --15
}
objects_placed_count = 0
repeat
local roll = random(0,100)
local object_chance = 0
for i,terrain_object in ipairs(terrain) do
object_chance = object_chance + terrain_object.chance
if roll <= object_chance then
if terrain_object.max < 0 or terrain_object.count < terrain_object.max then
local call_function = terrain_object.func
local placement_result = call_function("Doomed Ring")
if placement_result then
terrain_object.count = terrain_object.count + 1
end
else
placeAsteroid("Doomed Ring")
end
break
elseif i == #terrain then
placeAsteroid("Doomed Ring")
end
end
objects_placed_count = objects_placed_count + 1
if objects_placed_count >= 100 then
for i,ter in ipairs(terrain) do
if ter.desc == "Transport" then
ter.chance = 20
break
end
end
end
until(objects_placed_count >= 100 and #transport_list >= 10)
-- set terrain in connecting area
terrain = {
{chance = 4, count = 0, max = math.random(1,2), func = placeStar, desc = "Star", }, --2
{chance = 4, count = 0, max = math.random(1,2), func = placeBlackHole, desc = "Black hole", }, --2
{chance = 7, count = 0, max = -1, func = placeProbe, desc = "Probe", }, --3
{chance = 4, count = 0, max = math.random(7,15), func = placeWarpJammer, desc = "Warp jammer", }, --4
{chance = 7, count = 0, max = math.random(6,15), func = placeSensorJammer, desc = "Sensor jammer", }, --6
{chance = 7, count = 0, max = -1, func = placeSensorBuoy, desc = "Sensor buoy", }, --7
{chance = 9, count = 0, max = -1, func = placeAdBuoy, desc = "Ad buoy", }, --8
{chance = 8, count = 0, max = -1, func = placeNebula, desc = "Nebula", }, --9
{chance = 5, count = 0, max = -1, func = placeMine, desc = "Mine", }, --10
{chance = 5, count = 0, max = math.random(3,9), func = placeMineField, desc = "Mine field", }, --11
{chance = 4, count = 0, max = 10, func = placeTransport, desc = "Transport", }, --13
{chance = 5, count = 0, max = math.random(2,15), func = placeAsteroidField, desc = "Asteroid field", }, --12
{chance = 6, count = 0, max = math.random(2,15), func = placeAsteroidBlob, desc = "Asteroid blob", }, --14
{chance = 6, count = 0, max = math.random(2,15), func = placeMinefieldBlob, desc = "Minefield blob", }, --15
}
objects_placed_count = 0
placement_areas["Connecting Square"] = {
stations = outer_stations,
space = connecting_space,
shape = "central rectangle",
center_x = connecting_space_x,
center_y = connecting_space_y,
width = 40000,
height = 40000,
}
repeat
local roll = random(0,100)
local object_chance = 0
for i,terrain_object in ipairs(terrain) do
object_chance = object_chance + terrain_object.chance
if roll <= object_chance then
if terrain_object.max < 0 or terrain_object.count < terrain_object.max then
local call_function = terrain_object.func
local placement_result = call_function("Connecting Square")
if placement_result then
terrain_object.count = terrain_object.count + 1
end
else
placeAsteroid("Connecting Square")
end
break
elseif i == #terrain then
placeAsteroid("Connecting Square")
end
end
objects_placed_count = objects_placed_count + 1
until(objects_placed_count >= 20)
-- set terrain in the rescue circle
terrain = {
{chance = 4, count = 0, max = math.random(1,2), func = placeStar, desc = "Star", }, --2