-
Notifications
You must be signed in to change notification settings - Fork 6
/
scenario_48_visitors.lua
executable file
·7930 lines (7925 loc) · 364 KB
/
scenario_48_visitors.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: Unwanted Visitors
-- Description: Get rid of the unwanted visitors. Other missions follow. Check friendly stations for mission orders. Dispatch office provides new missions. Continue or stand down after each mission.
---
--- Each mission takes 15 - 50 minutes. That can add up. Four missions in the first area, three in the second area and in the third area, one open ended mission, chosen from three possibilities.
---
--- When returning to this scenario, choose "selectable" to perform missions you have not yet completed. Choose "Random" to be surprised at the missions selected.
---
--- GM buttons slow or speed celestial body orbits, turn on or off server voices, insert unique player ships or end the mission.
---
--- USN Discord: https://discord.gg/PntGG3a where you can join a game online.
---
--- Voice Actors:
--- Admiral U. E.
--- David Priddy
--- Jordy Kruijer
--- Kilted Klingon
--- Kristen Priddy
--- Nick Mercier
--- Peter Priddy
--- Slate https://www.amazon.com/T.-L.-Ford/e/B0034Q6Q2S
--- Stephen Priddy
---
--- Version 2
-- Type: Replayable Mission
-- Setting[Enemies]: Configures the strength of the enemies
-- Enemies[Easy]: Enemies are weaker or fewer than normal
-- Enemies[Normal|Default]: Enemies are normal strength
-- Enemies[Hard]: Enemies are stronger or more numerous than normal
-- Enemies[Extreme]: Much stronger, many more enemies
-- Enemies[Quixotic]: Insanely strong and/or inordinately large numbers of enemies
-- Setting[Murphy]: Configures the perversity of the universe according to Murphy's law
-- Murphy[Easy]: Random factors are more in your favor
-- Murphy[Normal|Default]: Random factors are normal
-- Murphy[Hard]: Random factors are more against you
-- Setting[Mission]: Configures the scenario missions. There are different regions with missions. The default setting lets the players choose to move to the next region. The players must always complete the first mission.
-- Mission[Random]: The next mission is randomly selected
-- Mission[Region|Default]: Players may skip to the next region of missions
-- Mission[Selectable]: Players may choose each individual mission in each region
-- Custom Info Indexes
-- Virus Fatality Timer 4
-- Gather Coolant 8
-- Sensor scan time 10
-- Custom Button Indexes
-- Virus Status 9
-- Inventory 6
-- Get Coolant 7
-- Polly scan time 11
require("utils.lua")
require("generate_call_sign_scenario_utility.lua")
require("place_station_scenario_utility.lua")
require("cpu_ship_diversification_scenario_utility.lua")
require("spawn_ships_scenario_utility.lua")
require("control_code_scenario_utility.lua")
function init()
scenario_version = "2.0.9"
ee_version = "2023.06.17"
print(string.format(" ---- Scenario: Unwanted Visitors ---- Version %s ---- Tested with EE version %s ----",scenario_version,ee_version))
print(_VERSION)
--stationCommunication could be nil (default), commsStation (embedded function) or comms_station_enhanced (external script)
stationCommunication = "commsStation"
setVariations()
setGlobals()
setConstants() --missle type names, template names and scores, deployment directions, player ship names, etc.
buildLocalSolarSystem()
setOptionalMissions()
setPlots()
plotManager = plotDelay
--Damage to ship can kill repair crew members
healthCheckTimer = 5
healthCheckTimerInterval = 5
mission_complete_count = 0
mission_region = 0
mainGMButtons()
end
function setGlobals()
updateDiagnostic = false
stationCommsDiagnostic = false
planetologistDiagnostic = false
moveDiagnostic = false
fixSatelliteDiagnostic = false
shipCommsDiagnostic = false
goods = {} --overall tracking of goods
tradeFood = {} --stations that will trade food for other goods
tradeLuxury = {} --stations that will trade luxury for other goods
tradeMedicine = {} --stations that will trade medicine for other goods
server_voices = true
voice_queue = {}
voice_played = {}
end
---------------------------
-- Game Master functions --
---------------------------
function mainGMButtons()
clearGMFunctions()
addGMFunction(_("buttonGM","+Player ships"),playerShipGMButtons)
addGMFunction(_("buttonGM","+Adjust speed"),adjustSpeedGMButtons)
addGMFunction(_("buttonGM","+End Mission"),endMissionGMButtons)
addGMFunction(_("buttonGM","+Voices"),adjustServerVoices)
addGMFunction(_("buttonGM","+Spawn Ship(s)"),spawnGMShips)
addGMFunction(_("buttonGM","+Control Codes"),manageControlCodes)
end
-- GM player ship functions
function playerShipGMButtons()
clearGMFunctions()
addGMFunction(_("buttonGM","-Main"),mainGMButtons)
if playerNarsil == nil then
addGMFunction(_("buttonGM","Narsil"),createPlayerShipNarsil)
end
if playerHeadhunter == nil then
addGMFunction(_("buttonGM","Headhunter"),createPlayerShipHeadhunter)
end
if playerBlazon == nil then
addGMFunction(_("buttonGM","Blazon"),createPlayerShipBlazon)
end
if playerSting == nil then
addGMFunction(_("buttonGM","Sting"),createPlayerShipSting)
end
end
function createPlayerShipNarsil()
playerNarsil = PlayerSpaceship():setTemplate("Atlantis"):setFaction("Human Navy"):setCallSign("Narsil")
playerNarsil:setTypeName("Proto-Atlantis")
playerNarsil:setRepairCrewCount(4) --more repair crew (vs 3)
playerNarsil:setImpulseMaxSpeed(70) --slower impulse max (vs 90)
playerNarsil:setRotationMaxSpeed(14) --faster spin (vs 10)
playerNarsil:setJumpDrive(false) --no Jump
playerNarsil:setWarpDrive(true) --add warp
playerNarsil:setHullMax(200) --weaker hull (vs 250)
playerNarsil:setHull(200)
playerNarsil:setShieldsMax(150,150) --weaker shields (vs 200)
playerNarsil:setShields(150,150)
playerNarsil:setWeaponTubeCount(6) --one more forward tube, less flexible ordnance
playerNarsil:setWeaponTubeDirection(0,0) --front facing
playerNarsil:setWeaponTubeExclusiveFor(0,"HVLI") --HVLI only
playerNarsil:setWeaponTubeDirection(1,-90) --left facing
playerNarsil:weaponTubeDisallowMissle(1,"Mine") --all but mine
playerNarsil:setWeaponTubeDirection(2,-90) --left facing
playerNarsil:setWeaponTubeExclusiveFor(2,"HVLI") --HVLI only
playerNarsil:setWeaponTubeDirection(3,90) --right facing
playerNarsil:weaponTubeDisallowMissle(3,"Mine") --all but mine
playerNarsil:setWeaponTubeDirection(4,90) --right facing
playerNarsil:setWeaponTubeExclusiveFor(4,"HVLI") --HVLI only
playerNarsil:setWeaponTubeDirection(5,180) --rear facing
playerNarsil:setWeaponTubeExclusiveFor(5,"Mine") --Mine only
playerNarsil:addReputationPoints(50)
removeGMFunction("Narsil")
playerShipGMButtons()
end
function createPlayerShipHeadhunter()
playerHeadhunter = PlayerSpaceship():setTemplate("Piranha"):setFaction("Human Navy"):setCallSign("Headhunter")
playerHeadhunter:setTypeName("Redhook")
playerHeadhunter:setRepairCrewCount(4) --more repair crew (vs 2)
playerHeadhunter:setJumpDriveRange(2000,25000) --shorter jump drive range (vs 5-50)
playerHeadhunter:setHullMax(140) --stronger hull (vs 120)
playerHeadhunter:setHull(140)
playerHeadhunter:setShieldsMax(100, 100) --stronger shields (vs 70, 70)
playerHeadhunter:setShields(100, 100)
playerHeadhunter:setBeamWeapon(0, 10, 0, 1200.0, 4.0, 4) --one beam (vs 0)
playerHeadhunter:setBeamWeaponTurret(0, 80, 0, 1) --slow turret
playerHeadhunter:setWeaponTubeCount(7) --one fewer mine tube, but EMPs added
playerHeadhunter:setWeaponTubeDirection(6, 180) --mine tube points straight back
playerHeadhunter:setWeaponTubeExclusiveFor(0,"HVLI")
playerHeadhunter:setWeaponTubeExclusiveFor(1,"HVLI")
playerHeadhunter:setWeaponTubeExclusiveFor(2,"HVLI")
playerHeadhunter:setWeaponTubeExclusiveFor(3,"HVLI")
playerHeadhunter:setWeaponTubeExclusiveFor(4,"HVLI")
playerHeadhunter:setWeaponTubeExclusiveFor(5,"HVLI")
playerHeadhunter:setWeaponTubeExclusiveFor(6,"Mine")
playerHeadhunter:weaponTubeAllowMissle(1,"Homing")
playerHeadhunter:weaponTubeAllowMissle(1,"EMP")
playerHeadhunter:weaponTubeAllowMissle(1,"Nuke")
playerHeadhunter:weaponTubeAllowMissle(4,"Homing")
playerHeadhunter:weaponTubeAllowMissle(4,"EMP")
playerHeadhunter:weaponTubeAllowMissle(4,"Nuke")
playerHeadhunter:setWeaponStorageMax("Mine",4) --fewer mines (vs 8)
playerHeadhunter:setWeaponStorage("Mine", 4)
playerHeadhunter:setWeaponStorageMax("EMP",4) --more EMPs (vs 0)
playerHeadhunter:setWeaponStorage("EMP", 4)
playerHeadhunter:setWeaponStorageMax("Nuke",4) --fewer Nukes (vs 6)
playerHeadhunter:setWeaponStorage("Nuke", 4)
playerHeadhunter:addReputationPoints(50)
removeGMFunction("Headhunter")
playerShipGMButtons()
end
function createPlayerShipBlazon()
playerBlazon = PlayerSpaceship():setTemplate("Striker"):setFaction("Human Navy"):setCallSign("Blazon")
playerBlazon:setTypeName("Stricken")
playerBlazon:setRepairCrewCount(2)
playerBlazon:setImpulseMaxSpeed(105)
playerBlazon:setRotationMaxSpeed(35)
playerBlazon:setShieldsMax(80,50)
playerBlazon:setShields(80,50)
playerBlazon:setBeamWeaponTurret(0,60,-15,2)
playerBlazon:setBeamWeaponTurret(1,60, 15,2)
playerBlazon:setBeamWeapon(2,20,0,1200,6,5)
playerBlazon:setWeaponTubeCount(3)
playerBlazon:setWeaponTubeDirection(0,-60)
playerBlazon:setWeaponTubeDirection(1,60)
playerBlazon:setWeaponTubeDirection(2,180)
playerBlazon:weaponTubeDisallowMissle(0,"Mine")
playerBlazon:weaponTubeDisallowMissle(1,"Mine")
playerBlazon:setWeaponTubeExclusiveFor(2,"Mine")
playerBlazon:setWeaponStorageMax("Homing",6)
playerBlazon:setWeaponStorage("Homing",6)
playerBlazon:setWeaponStorageMax("EMP",2)
playerBlazon:setWeaponStorage("EMP",2)
playerBlazon:setWeaponStorageMax("Nuke",2)
playerBlazon:setWeaponStorage("Nuke",2)
playerBlazon:setWeaponStorageMax("Mine",4)
playerBlazon:setWeaponStorage("Mine",4)
playerBlazon:addReputationPoints(50)
removeGMFunction("Blazon")
playerShipGMButtons()
end
function createPlayerShipSting()
playerSting = PlayerSpaceship():setTemplate("Hathcock"):setFaction("Human Navy"):setCallSign("Sting")
playerSting:setTypeName("Surkov")
playerSting:setRepairCrewCount(3) --more repair crew (vs 2)
playerSting:setImpulseMaxSpeed(60) --faster impulse max (vs 50)
playerSting:setJumpDrive(false) --no jump
playerSting:setWarpDrive(true) --add warp
playerSting:setWeaponTubeCount(3) --one more tube for mines, no heavy ordnance
playerSting:setWeaponTubeDirection(0, -90)
playerSting:weaponTubeDisallowMissle(0,"Mine")
playerSting:weaponTubeDisallowMissle(0,"Nuke")
playerSting:weaponTubeDisallowMissle(0,"EMP")
playerSting:setWeaponStorageMax("Mine",3)
playerSting:setWeaponStorage("Mine",3)
playerSting:setWeaponStorageMax("Nuke",0)
playerSting:setWeaponStorage("Nuke",0)
playerSting:setWeaponStorageMax("EMP",0)
playerSting:setWeaponStorage("EMP",0)
playerSting:setWeaponTubeDirection(1, 90)
playerSting:weaponTubeDisallowMissle(1,"Mine")
playerSting:weaponTubeDisallowMissle(1,"Nuke")
playerSting:weaponTubeDisallowMissle(1,"EMP")
playerSting:setWeaponTubeDirection(2,180)
playerSting:setWeaponTubeExclusiveFor(2,"Mine")
playerSting:addReputationPoints(50)
removeGMFunction("Sting")
playerShipGMButtons()
end
-- GM adjust speed functions
function adjustSpeedGMButtons()
if speed_button_explanation == nil then
speed_button_explanation = "sent"
addGMMessage(string.format(_("msgGM","Primus is the planet closest to the sun. Secondus is the next planet out from the sun. Tertius is the third planet out from the sun. Sol Belt 1 is the belt of asteroids and stations closest to the sun. Sol Belt 2 is the next one out. Tertius moon belt is the asteroid, moon and station belt orbiting Tertius. Tertius belt 2 is the next one out from Tertius.\n--- Celestial Body Names ---\nSun: %s\nPrimus: %s\nSecondus: %s\nTertius: %s"),planetSol:getCallSign(),planetPrimus:getCallSign(),planetSecondus:getCallSign(),planetTertius:getCallSign()))
end
clearGMFunctions()
addGMFunction(_("buttonGM","-Main"),mainGMButtons)
addGMFunction(_("buttonGM","Primus"),adjustPrimusSpeed)
addGMFunction(_("buttonGM","Primus Moon"),adjustPrimusMoonSpeed)
addGMFunction(_("buttonGM","Secondus"),adjustSecondusSpeed)
addGMFunction(_("buttonGM","Secondus Station"),adjustSecondusStationSpeed)
addGMFunction(_("buttonGM","Sol Belt 1"),adjustSolBelt1Speed)
addGMFunction(_("buttonGM","Sol Belt 2"),adjustSolBelt2Speed)
addGMFunction(_("buttonGM","Tertius"),adjustTertiusSpeed)
addGMFunction(_("buttonGM","Tertius Moon Belt"),adjustTertiusMoonBeltSpeed)
addGMFunction(_("buttonGM","Tertius Belt 2"),adjustTertiusBelt2Speed)
end
function adjustPrimusSpeed()
clearGMFunctions()
addGMFunction(_("buttonGM","-Main"),mainGMButtons)
addGMFunction(_("buttonGM","-From Primus"),adjustSpeedGMButtons)
addGMFunction(_("buttonGM","Slower"),function()
local msg = string.format(_("msgGM","Current Primus speed: %.1f"),planetPrimus.orbit_speed)
planetPrimus.orbit_speed = planetPrimus.orbit_speed * 1.1
planetPrimus:setOrbit(planetSol,planetPrimus.orbit_speed)
msg = string.format(_("msgGM","%s\nNew slower Primus speed: %.1f"),msg,planetPrimus.orbit_speed)
addGMMessage(msg)
end)
addGMFunction(_("buttonGM","Faster"),function()
local msg = string.format(_("msgGM","Current Primus speed: %.1f"),planetPrimus.orbit_speed)
planetPrimus.orbit_speed = planetPrimus.orbit_speed * .9
planetPrimus:setOrbit(planetSol,planetPrimus.orbit_speed)
msg = string.format(_("msgGM","%s\nNew faster Primus speed: %.1f"),msg,planetPrimus.orbit_speed)
addGMMessage(msg)
end)
end
function adjustPrimusMoonSpeed()
clearGMFunctions()
addGMFunction(_("buttonGM","-Main"),mainGMButtons)
addGMFunction(_("buttonGM","-From Primus Moon"),adjustSpeedGMButtons)
addGMFunction(_("buttonGM","Slower"),function()
local msg = string.format(_("msgGM","Current Primus moon speed: %.1f"),planetPrimusMoonOrbitTime)
planetPrimusMoonOrbitTime = planetPrimusMoonOrbitTime * 1.1
planetPrimusMoon:setOrbit(planetPrimus,planetPrimusMoonOrbitTime)
msg = string.format(_("msgGM","%s\nNew slower Primus moon speed: %.1f"),msg,planetPrimusMoonOrbitTime)
addGMMessage(msg)
end)
addGMFunction(_("buttonGM","Faster"),function()
local msg = string.format(_("msgGM","Current Primus moon speed: %.1f"),planetPrimusMoonOrbitTime)
planetPrimusMoonOrbitTime = planetPrimusMoonOrbitTime * .9
planetPrimusMoon:setOrbit(planetPrimus,planetPrimusMoonOrbitTime)
msg = string.format(_("msgGM","%s\nNew faster Primus moon speed: %.1f"),msg,planetPrimusMoonOrbitTime)
addGMMessage(msg)
end)
end
function adjustSecondusSpeed()
clearGMFunctions()
addGMFunction(_("buttonGM","-Main"),mainGMButtons)
addGMFunction(_("buttonGM","-From Secondus"),adjustSpeedGMButtons)
addGMFunction(_("buttonGM","Slower"),function()
local msg = string.format(_("msgGM","Current Secondus speed: %.1f"),planetSecondus.orbit_speed)
planetSecondus.orbit_speed = planetSecondus.orbit_speed * 1.1
planetSecondus:setOrbit(planetSol,planetSecondus.orbit_speed)
msg = string.format(_("msgGM","%s\nNew slower Secondus speed: %.1f"),msg,planetSecondus.orbit_speed)
addGMMessage(msg)
end)
addGMFunction(_("buttonGM","Faster"),function()
local msg = string.format(_("msgGM","Current Secondus speed: %.1f"),planetSecondus.orbit_speed)
planetSecondus.orbit_speed = planetSecondus.orbit_speed * .9
planetSecondus:setOrbit(planetSol,planetSecondus.orbit_speed)
msg = string.format(_("msgGM","%s\nNew faster Secondus speed: %.1f"),msg,planetSecondus.orbit_speed)
addGMMessage(msg)
end)
end
function adjustSecondusStationSpeed()
clearGMFunctions()
addGMFunction(_("buttonGM","-Main"),mainGMButtons)
addGMFunction(_("buttonGM","-From Secondus Stn"),adjustSpeedGMButtons)
addGMFunction(_("buttonGM","Slower"),function()
local msg = string.format(_("msgGM","Current Secondus station speed: %.3f"),secondusStationOrbitIncrement)
secondusStationOrbitIncrement = secondusStationOrbitIncrement * .9
msg = string.format(_("msgGM","%s\nNew slower Secondus station speed: %.3f"),msg,secondusStationOrbitIncrement)
addGMMessage(msg)
end)
addGMFunction(_("buttonGM","Faster"),function()
local msg = string.format(_("msgGM","Current Secondus station speed: %.3f"),secondusStationOrbitIncrement)
secondusStationOrbitIncrement = secondusStationOrbitIncrement * 1.1
msg = string.format(_("msgGM","%s\nNew faster Secondus station speed: %.3f"),msg,secondusStationOrbitIncrement)
addGMMessage(msg)
end)
end
function adjustSolBelt1Speed()
clearGMFunctions()
addGMFunction(_("buttonGM","-Main"),mainGMButtons)
addGMFunction(_("buttonGM","-From Sol Belt 1"),adjustSpeedGMButtons)
addGMFunction(_("buttonGM","Slower"),function()
local msg = string.format(_("msgGM","Current Sol Belt 1 speed: %.3f"),belt1OrbitalSpeed)
belt1OrbitalSpeed = belt1OrbitalSpeed * .9
for i=1,#beltAsteroidList do
local ta = beltAsteroidList[i]
if ta ~= nil and ta:isValid() and ta.belt_id == "belt1" then
ta.speed = belt1OrbitalSpeed
end
end
msg = string.format(_("msgGM","%s\nNew slower Sol Belt 1 speed: %.3f"),msg,belt1OrbitalSpeed)
addGMMessage(msg)
end)
addGMFunction(_("buttonGM","Faster"),function()
local msg = string.format(_("msgGM","Current Sol Belt 1 speed: %.3f"),belt1OrbitalSpeed)
belt1OrbitalSpeed = belt1OrbitalSpeed * 1.1
for i=1,#beltAsteroidList do
local ta = beltAsteroidList[i]
if ta ~= nil and ta:isValid() and ta.belt_id == "belt1" then
ta.speed = belt1OrbitalSpeed
end
end
msg = string.format(_("msgGM","%s\nNew faster Sol Belt 1 speed: %.3f"),msg,belt1OrbitalSpeed)
addGMMessage(msg)
end)
end
function adjustSolBelt2Speed()
clearGMFunctions()
addGMFunction(_("buttonGM","-Main"),mainGMButtons)
addGMFunction(_("buttonGM","-From Sol Belt 2"),adjustSpeedGMButtons)
addGMFunction(_("buttonGM","Slower"),function()
local msg = string.format(_("msgGM","Current Sol Belt 2 speed: %.3f"),belt2OrbitalSpeed)
belt2OrbitalSpeed = belt2OrbitalSpeed * .9
for i=1,#beltAsteroidList do
local ta = beltAsteroidList[i]
if ta ~= nil and ta:isValid() and ta.belt_id == "belt2" then
ta.speed = belt2OrbitalSpeed
end
end
msg = string.format(_("msgGM","%s\nNew slower Sol Belt 2 speed: %.3f"),msg,belt2OrbitalSpeed)
addGMMessage(msg)
end)
addGMFunction(_("buttonGM","Faster"),function()
local msg = string.format(_("msgGM","Current Sol Belt 2 speed: %.3f"),belt2OrbitalSpeed)
belt2OrbitalSpeed = belt2OrbitalSpeed * 1.1
for i=1,#beltAsteroidList do
local ta = beltAsteroidList[i]
if ta ~= nil and ta:isValid() and ta.belt_id == "belt2" then
ta.speed = belt2OrbitalSpeed
end
end
msg = string.format(_("msgGM","%s\nNew faster Sol Belt 2 speed: %.3f"),msg,belt2OrbitalSpeed)
addGMMessage(msg)
end)
end
function adjustTertiusSpeed()
clearGMFunctions()
addGMFunction(_("buttonGM","-Main"),mainGMButtons)
addGMFunction(_("buttonGM","-From Tertius"),adjustSpeedGMButtons)
addGMFunction(_("buttonGM","Slower"),function()
local msg = string.format(_("msgGM","Current Tertius speed: %.1f"),planetTertius.orbit_speed)
planetTertius.orbit_speed = planetTertius.orbit_speed * 1.1
planetTertius:setOrbit(planetSol,planetTertius.orbit_speed)
msg = string.format(_("msgGM","%s\nNew slower Tertius speed: %.1f"),msg,planetTertius.orbit_speed)
addGMMessage(msg)
end)
addGMFunction(_("buttonGM","Faster"),function()
local msg = string.format(_("msgGM","Current Tertius speed: %.1f"),planetTertius.orbit_speed)
planetTertius.orbit_speed = planetTertius.orbit_speed * .9
planetTertius:setOrbit(planetSol,planetTertius.orbit_speed)
msg = string.format(_("msgGM","%s\nNew faster Tertius speed: %.1f"),msg,planetTertius.orbit_speed)
addGMMessage(msg)
end)
end
function adjustTertiusMoonBeltSpeed()
clearGMFunctions()
addGMFunction(_("buttonGM","-Main"),mainGMButtons)
addGMFunction(_("buttonGM","-From Tertius Moon"),adjustSpeedGMButtons)
addGMFunction(_("buttonGM","Slower"),function()
local msg = string.format(_("msgGM","Current Tertius Moon Belt speed: %.3f"),tertiusOrbitalBodyIncrement)
tertiusOrbitalBodyIncrement = tertiusOrbitalBodyIncrement * .9
for i=1,#tertiusAsteroids do
local ta = tertiusAsteroids[i]
if ta ~= nil and ta:isValid() and ta.belt_id == "tMoonBelt" then
ta.speed = tertiusOrbitalBodyIncrement
end
end
msg = string.format(_("msgGM","%s\nNew slower Tertius Moon Belt speed: %.3f"),msg,tertiusOrbitalBodyIncrement)
addGMMessage(msg)
end)
addGMFunction(_("buttonGM","Faster"),function()
local msg = string.format(_("msgGM","Current Tertius Moon Belt speed: %.3f"),tertiusOrbitalBodyIncrement)
tertiusOrbitalBodyIncrement = tertiusOrbitalBodyIncrement * 1.1
for i=1,#tertiusAsteroids do
local ta = tertiusAsteroids[i]
if ta ~= nil and ta:isValid() and ta.belt_id == "tMoonBelt" then
ta.speed = tertiusOrbitalBodyIncrement
end
end
msg = string.format(_("msgGM","%s\nNew faster Tertius Moon Belt speed: %.3f"),msg,tertiusOrbitalBodyIncrement)
addGMMessage(msg)
end)
end
function adjustTertiusBelt2Speed()
clearGMFunctions()
addGMFunction(_("buttonGM","-Main"),mainGMButtons)
addGMFunction(_("buttonGM","-From Tertius Belt 2"),adjustSpeedGMButtons)
addGMFunction(_("buttonGM","Slower"),function()
local msg = string.format(_("msgGM","Current Tertius Belt 2 speed: %.3f"),tertiusAsteroidBeltIncrement)
tertiusAsteroidBeltIncrement = tertiusAsteroidBeltIncrement * .9
for i=1,#tertiusAsteroids do
local ta = tertiusAsteroids[i]
if ta ~= nil and ta:isValid() and ta.belt_id == "tBelt2" then
ta.speed = tertiusAsteroidBeltIncrement
end
end
for i=1,#tertiusAsteroidStations do
local tbs = tertiusAsteroidStations[i]
if tbs ~= nil and tbs:isValid() then
tbs.speed = tertiusAsteroidBeltIncrement
end
end
msg = string.format(_("msgGM","%s\nNew slower Tertius Belt 2 speed: %.3f"),msg,tertiusAsteroidBeltIncrement)
addGMMessage(msg)
end)
addGMFunction(_("buttonGM","Faster"),function()
local msg = string.format(_("msgGM","Current Tertius Belt 2 speed: %.3f"),tertiusAsteroidBeltIncrement)
tertiusAsteroidBeltIncrement = tertiusAsteroidBeltIncrement * 1.1
for i=1,#tertiusAsteroids do
local ta = tertiusAsteroids[i]
if ta ~= nil and ta:isValid() and ta.belt_id == "tBelt2" then
ta.speed = tertiusAsteroidBeltIncrement
end
end
for i=1,#tertiusAsteroidStations do
local tbs = tertiusAsteroidStations[i]
if tbs ~= nil and tbs:isValid() then
tbs.speed = tertiusAsteroidBeltIncrement
end
end
msg = string.format(_("msgGM","%s\nNew faster Tertius Belt 2 speed: %.3f"),msg,tertiusAsteroidBeltIncrement)
addGMMessage(msg)
end)
end
-- GM end mission functions
function endMissionGMButtons()
clearGMFunctions()
addGMFunction(_("buttonGM","-Main"),mainGMButtons)
addGMFunction(_("buttonGM","Human victory"),function()
showEndStats()
victory("Human Navy")
end)
addGMFunction(_("buttonGM","Exuari victory"),function()
showEndStats()
victory("Exuari")
end)
end
-- GM adjust voices
function adjustServerVoices()
clearGMFunctions()
addGMFunction(_("buttonGM","-Main"),mainGMButtons)
local button_label = _("buttonGM","Voices On")
if server_voices then
button_label = button_label .. "*"
end
addGMFunction(button_label,function()
server_voices = true
adjustServerVoices()
end)
button_label = _("buttonGM","Voices Off")
if not server_voices then
button_label = button_label .. "*"
end
addGMFunction(button_label,function()
server_voices = false
adjustServerVoices()
end)
end
------------------------------------------
-- Initialization and utility functions --
------------------------------------------
function setVariations()
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 murphy_config = {
["Easy"] = {number = .5, adverse = .999, lose_coolant = .99999, gain_coolant = .005, rep = 40, start_danger = .4},
["Normal"] = {number = 1, adverse = .995, lose_coolant = .99995, gain_coolant = .001, rep = 20, start_danger = .8},
["Hard"] = {number = 2, adverse = .99, lose_coolant = .9999, gain_coolant = .0001, rep = 0, start_danger = 1.2},
}
difficulty = murphy_config[getScenarioSetting("Murphy")].number
adverseEffect = murphy_config[getScenarioSetting("Murphy")].adverse
coolant_loss = murphy_config[getScenarioSetting("Murphy")].lose_coolant
coolant_gain = murphy_config[getScenarioSetting("Murphy")].gain_coolant
reputation_start_amount=murphy_config[getScenarioSetting("Murphy")].rep
current_danger = murphy_config[getScenarioSetting("Murphy")].start_danger
mission_choices = {
["Region"] = "Region Selectable",
["Random"] = "Random",
["Selectable"] = "Selectable",
}
mission_choice = mission_choices[getScenarioSetting("Mission")]
gameTimeLimit = 0
playWithTimeLimit = false
end
function setConstants()
repeatExitBoundary = 100
ship_template = { --ordered by relative strength
["Gnat"] = {strength = 2, short_range_radar = 4500, create = gnat},
["Lite Drone"] = {strength = 3, short_range_radar = 5000, create = droneLite},
["Jacket Drone"] = {strength = 4, short_range_radar = 5000, create = droneJacket},
["Ktlitan Drone"] = {strength = 4, short_range_radar = 5000, create = stockTemplate},
["Heavy Drone"] = {strength = 5, short_range_radar = 5500, create = droneHeavy},
["Adder MK3"] = {strength = 5, short_range_radar = 5000, create = stockTemplate},
["MT52 Hornet"] = {strength = 5, short_range_radar = 5000, create = stockTemplate},
["MU52 Hornet"] = {strength = 5, short_range_radar = 5000, create = stockTemplate},
["Dagger"] = {strength = 6, short_range_radar = 5000, create = stockTemplate},
["MV52 Hornet"] = {strength = 6, short_range_radar = 5000, create = hornetMV52},
["MT55 Hornet"] = {strength = 6, short_range_radar = 5000, create = hornetMT55},
["Adder MK4"] = {strength = 6, short_range_radar = 5000, create = stockTemplate},
["Fighter"] = {strength = 6, short_range_radar = 5000, create = stockTemplate},
["Ktlitan Fighter"] = {strength = 6, short_range_radar = 5000, create = stockTemplate},
["FX64 Hornet"] = {strength = 7, short_range_radar = 5000, create = hornetFX64},
["Blade"] = {strength = 7, short_range_radar = 5000, create = stockTemplate},
["Gunner"] = {strength = 7, short_range_radar = 5000, create = stockTemplate},
["K2 Fighter"] = {strength = 7, short_range_radar = 5000, create = k2fighter},
["Adder MK5"] = {strength = 7, short_range_radar = 5000, create = stockTemplate},
["WX-Lindworm"] = {strength = 7, short_range_radar = 5500, create = stockTemplate},
["K3 Fighter"] = {strength = 8, short_range_radar = 5000, create = k3fighter},
["Shooter"] = {strength = 8, short_range_radar = 5000, create = stockTemplate},
["Jagger"] = {strength = 8, short_range_radar = 5000, create = stockTemplate},
["Adder MK6"] = {strength = 8, short_range_radar = 5000, create = stockTemplate},
["Ktlitan Scout"] = {strength = 8, short_range_radar = 7000, create = stockTemplate},
["WZ-Lindworm"] = {strength = 9, short_range_radar = 5500, create = wzLindworm},
["Adder MK7"] = {strength = 9, short_range_radar = 5000, create = stockTemplate},
["Adder MK8"] = {strength = 10, short_range_radar = 5500, create = stockTemplate},
["Adder MK9"] = {strength = 11, short_range_radar = 6000, create = stockTemplate},
["Nirvana R3"] = {strength = 12, short_range_radar = 5000, create = stockTemplate},
["Phobos R2"] = {strength = 13, short_range_radar = 5000, create = phobosR2},
["Missile Cruiser"] = {strength = 14, short_range_radar = 7000, create = stockTemplate},
["Waddle 5"] = {strength = 15, short_range_radar = 5000, create = waddle5},
["Jade 5"] = {strength = 15, short_range_radar = 5000, create = jade5},
["Phobos T3"] = {strength = 15, short_range_radar = 5000, create = stockTemplate},
["Guard"] = {strength = 15, short_range_radar = 5000, create = stockTemplate},
["Piranha F8"] = {strength = 15, short_range_radar = 6000, create = stockTemplate},
["Piranha F12"] = {strength = 15, short_range_radar = 6000, create = stockTemplate},
["Piranha F12.M"] = {strength = 16, short_range_radar = 6000, create = stockTemplate},
["Phobos M3"] = {strength = 16, short_range_radar = 5500, create = stockTemplate},
["Farco 3"] = {strength = 16, short_range_radar = 8000, create = farco3},
["Farco 5"] = {strength = 16, short_range_radar = 8000, create = farco5},
["Karnack"] = {strength = 17, short_range_radar = 5000, create = stockTemplate},
["Gunship"] = {strength = 17, short_range_radar = 5000, create = stockTemplate},
["Phobos T4"] = {strength = 18, short_range_radar = 5000, create = phobosT4},
["Cruiser"] = {strength = 18, short_range_radar = 6000, create = stockTemplate},
["Nirvana R5"] = {strength = 19, short_range_radar = 5000, create = stockTemplate},
["Farco 8"] = {strength = 19, short_range_radar = 8000, create = farco8},
["Nirvana R5A"] = {strength = 20, short_range_radar = 5000, create = stockTemplate},
["Adv. Gunship"] = {strength = 20, short_range_radar = 7000, create = stockTemplate},
["Ktlitan Worker"] = {strength = 20, short_range_radar = 5000, create = stockTemplate},
["Farco 11"] = {strength = 21, short_range_radar = 8000, create = farco11},
["Storm"] = {strength = 22, short_range_radar = 6000, create = stockTemplate},
["Warden"] = {strength = 22, short_range_radar = 6000, create = stockTemplate},
["Racer"] = {strength = 22, short_range_radar = 5000, create = stockTemplate},
["Strike"] = {strength = 23, short_range_radar = 5500, create = stockTemplate},
["Dash"] = {strength = 23, short_range_radar = 5500, create = stockTemplate},
["Farco 13"] = {strength = 24, short_range_radar = 5000, create = farco13},
["Sentinel"] = {strength = 24, short_range_radar = 5000, create = stockTemplate},
["Ranus U"] = {strength = 25, short_range_radar = 6000, create = stockTemplate},
["Flash"] = {strength = 25, short_range_radar = 6000, create = stockTemplate},
["Ranger"] = {strength = 25, short_range_radar = 6000, create = stockTemplate},
["Buster"] = {strength = 25, short_range_radar = 6000, create = stockTemplate},
["Stalker Q7"] = {strength = 25, short_range_radar = 5000, create = stockTemplate},
["Stalker R7"] = {strength = 25, short_range_radar = 5000, create = stockTemplate},
["Whirlwind"] = {strength = 26, short_range_radar = 6000, create = whirlwind},
["Hunter"] = {strength = 26, short_range_radar = 5500, create = stockTemplate},
["Adv. Striker"] = {strength = 27, short_range_radar = 5000, create = stockTemplate},
["Tempest"] = {strength = 30, short_range_radar = 6000, create = tempest},
["Strikeship"] = {strength = 30, short_range_radar = 5000, create = stockTemplate},
["Maniapak"] = {strength = 34, short_range_radar = 6000, create = maniapak},
["Fiend G4"] = {strength = 35, short_range_radar = 6500, create = stockTemplate},
["Cucaracha"] = {strength = 36, short_range_radar = 5000, create = cucaracha},
["Fiend G6"] = {strength = 39, short_range_radar = 6500, create = stockTemplate},
["Predator"] = {strength = 42, short_range_radar = 7500, create = predator},
["Ktlitan Breaker"] = {strength = 45, short_range_radar = 5000, create = stockTemplate},
["Hurricane"] = {strength = 46, short_range_radar = 6000, create = hurricane},
["Ktlitan Feeder"] = {strength = 48, short_range_radar = 5000, create = stockTemplate},
["Atlantis X23"] = {strength = 50, short_range_radar = 10000, create = stockTemplate},
["Ktlitan Destroyer"] = {strength = 50, short_range_radar = 9000, create = stockTemplate},
["K2 Breaker"] = {strength = 55, short_range_radar = 5000, create = k2breaker},
["Atlantis Y42"] = {strength = 60, short_range_radar = 10000, create = atlantisY42},
["Blockade Runner"] = {strength = 63, short_range_radar = 5500, create = stockTemplate},
["Starhammer II"] = {strength = 70, short_range_radar = 10000, create = stockTemplate},
["Enforcer"] = {strength = 75, short_range_radar = 9000, create = enforcer},
["Dreadnought"] = {strength = 80, short_range_radar = 9000, create = stockTemplate},
["Starhammer III"] = {strength = 85, short_range_radar = 12000, create = starhammerIII},
["Starhammer V"] = {strength = 90, short_range_radar = 15000, create = starhammerV},
["Tyr"] = {strength = 150,short_range_radar = 9500, create = tyr},
}
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
--Player ship name lists to supplant standard randomized call sign generation
playerShipNamesFor = {
["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"},
["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",""},
}
player_ship_stats = {
["MP52 Hornet"] = { strength = 7, cargo = 3, distance = 100, long_range_radar = 18000, short_range_radar = 4000, tractor = false, mining = false, cm_boost = 600, cm_strafe = 0, },
["Piranha"] = { strength = 16, cargo = 8, distance = 200, long_range_radar = 25000, short_range_radar = 6000, tractor = false, mining = false, cm_boost = 200, cm_strafe = 150, },
["Flavia P.Falcon"] = { strength = 13, cargo = 15, distance = 200, long_range_radar = 40000, short_range_radar = 5000, tractor = true, mining = true, cm_boost = 250, cm_strafe = 150, },
["Phobos M3P"] = { strength = 19, cargo = 10, distance = 200, long_range_radar = 25000, short_range_radar = 5000, tractor = true, mining = false, cm_boost = 400, cm_strafe = 250, },
["Atlantis"] = { strength = 52, cargo = 6, distance = 400, long_range_radar = 30000, short_range_radar = 5000, tractor = true, mining = true, cm_boost = 400, cm_strafe = 250, },
["Player Cruiser"] = { strength = 40, cargo = 6, distance = 400, long_range_radar = 30000, short_range_radar = 5000, tractor = false, mining = false, cm_boost = 400, cm_strafe = 250, },
["Player Missile Cr."] = { strength = 45, cargo = 8, distance = 200, long_range_radar = 35000, short_range_radar = 6000, tractor = false, mining = false, cm_boost = 450, cm_strafe = 150, },
["Player Fighter"] = { strength = 7, cargo = 3, distance = 100, long_range_radar = 15000, short_range_radar = 4500, tractor = false, mining = false, cm_boost = 600, cm_strafe = 0, },
["Benedict"] = { strength = 10, cargo = 9, distance = 400, long_range_radar = 30000, short_range_radar = 5000, tractor = true, mining = true, cm_boost = 400, cm_strafe = 250, },
["Kiriya"] = { strength = 10, cargo = 9, distance = 400, long_range_radar = 35000, short_range_radar = 5000, tractor = true, mining = true, cm_boost = 400, cm_strafe = 250, },
["Striker"] = { strength = 8, cargo = 4, distance = 200, long_range_radar = 35000, short_range_radar = 5000, tractor = false, mining = false, cm_boost = 250, cm_strafe = 150, },
["ZX-Lindworm"] = { strength = 8, cargo = 3, distance = 100, long_range_radar = 18000, short_range_radar = 5500, tractor = false, mining = false, cm_boost = 250, cm_strafe = 150, },
["Repulse"] = { strength = 14, cargo = 12, distance = 200, long_range_radar = 38000, short_range_radar = 5000, tractor = true, mining = false, cm_boost = 250, cm_strafe = 150, },
["Ender"] = { strength = 100, cargo = 20, distance = 2000,long_range_radar = 45000, short_range_radar = 7000, tractor = true, mining = false, cm_boost = 800, cm_strafe = 500, },
["Nautilus"] = { strength = 12, cargo = 7, distance = 200, long_range_radar = 22000, short_range_radar = 4000, tractor = false, mining = false, cm_boost = 250, cm_strafe = 150, },
["Hathcock"] = { strength = 30, cargo = 6, distance = 200, long_range_radar = 35000, short_range_radar = 6000, tractor = false, mining = true, cm_boost = 200, cm_strafe = 150, },
["Maverick"] = { strength = 45, cargo = 5, distance = 200, long_range_radar = 20000, short_range_radar = 4000, tractor = false, mining = true, cm_boost = 400, cm_strafe = 250, },
["Crucible"] = { strength = 45, cargo = 5, distance = 200, long_range_radar = 20000, short_range_radar = 6000, tractor = false, mining = false, cm_boost = 400, cm_strafe = 250, },
["Proto-Atlantis"] = { strength = 40, cargo = 4, distance = 400, long_range_radar = 30000, short_range_radar = 4500, tractor = false, mining = true, cm_boost = 400, cm_strafe = 250, },
["Stricken"] = { strength = 40, cargo = 4, distance = 200, long_range_radar = 20000, short_range_radar = 4000, tractor = false, mining = false, cm_boost = 250, cm_strafe = 150, },
["Surkov"] = { strength = 35, cargo = 6, distance = 200, long_range_radar = 35000, short_range_radar = 6000, tractor = false, mining = false, cm_boost = 200, cm_strafe = 150, },
["Redhook"] = { strength = 11, cargo = 8, distance = 200, long_range_radar = 20000, short_range_radar = 6000, tractor = false, mining = false, cm_boost = 200, cm_strafe = 150, },
["Pacu"] = { strength = 18, cargo = 7, distance = 200, long_range_radar = 20000, short_range_radar = 6000, tractor = false, mining = false, cm_boost = 200, cm_strafe = 150, },
["Phobos T2"] = { strength = 19, cargo = 9, distance = 200, long_range_radar = 25000, short_range_radar = 5000, tractor = true, mining = false, cm_boost = 400, cm_strafe = 250, },
["Wombat"] = { strength = 13, cargo = 3, distance = 100, long_range_radar = 18000, short_range_radar = 6000, tractor = false, mining = false, cm_boost = 250, cm_strafe = 150, },
["Holmes"] = { strength = 35, cargo = 6, distance = 200, long_range_radar = 35000, short_range_radar = 4000, tractor = true, mining = false, cm_boost = 400, cm_strafe = 250, },
["Focus"] = { strength = 35, cargo = 4, distance = 200, long_range_radar = 32000, short_range_radar = 5000, tractor = false, mining = true, cm_boost = 400, cm_strafe = 250, },
["Flavia 2C"] = { strength = 25, cargo = 12, distance = 200, long_range_radar = 30000, short_range_radar = 5000, tractor = false, mining = true, cm_boost = 250, cm_strafe = 150, },
["Destroyer IV"] = { strength = 25, cargo = 5, distance = 400, long_range_radar = 30000, short_range_radar = 5000, tractor = false, mining = false, cm_boost = 400, cm_strafe = 250, },
["Destroyer III"] = { strength = 25, cargo = 7, distance = 200, long_range_radar = 30000, short_range_radar = 5000, tractor = false, mining = false, cm_boost = 450, cm_strafe = 150, },
["MX-Lindworm"] = { strength = 10, cargo = 3, distance = 100, long_range_radar = 30000, short_range_radar = 5000, tractor = false, mining = false, cm_boost = 250, cm_strafe = 150, },
["Striker LX"] = { strength = 16, cargo = 4, distance = 200, long_range_radar = 20000, short_range_radar = 4000, tractor = false, mining = false, cm_boost = 250, cm_strafe = 150, },
["Maverick XP"] = { strength = 23, cargo = 5, distance = 200, long_range_radar = 25000, short_range_radar = 7000, tractor = true, mining = false, cm_boost = 400, cm_strafe = 250, },
["Era"] = { strength = 14, cargo = 14, distance = 200, long_range_radar = 50000, short_range_radar = 5000, tractor = true, mining = true, cm_boost = 250, cm_strafe = 150, },
["Squid"] = { strength = 14, cargo = 8, distance = 200, long_range_radar = 25000, short_range_radar = 5000, tractor = false, mining = false, cm_boost = 200, cm_strafe = 150, },
["Atlantis II"] = { strength = 60, cargo = 6, distance = 400, long_range_radar = 30000, short_range_radar = 5000, tractor = true, mining = true, cm_boost = 400, cm_strafe = 250, },
}
if server_voices then
primusNames = {"Minos","Talos","Primus"}
secondusNames = {"Secondus","Aurora","Covenant"}
tertiusNames = {"Tertius","Megas","Tadmore"}
solNames = {"Sun","Tau Ceti","Barnard"}
else
primusNames = {"Minos","Talos","Thor","Minotaur","Thanatos","Hades","Tartarus","Erebus","Primus"}
secondusNames = {"New Terra","Gaia","Home","Secondus","Thulcandra","Territa","Garth","Aurora","Covenant"}
tertiusNames = {"Cat's Eye","Tertius","Dagoba","Pitcairn","Tl'ho","Megas","Amateru","Tadmore","Brahe"}
solNames = {"Sol","Sun","Groombridge 34","Tau Ceti","Wolf 1061","Gliese 876","Barnard"}
end
station_sizes = {
["Huge Station"] = {strength = 10, short_lo = 150, short_hi = 500},
["Large Station"] = {strength = 5, short_lo = 90, short_hi = 300},
["Medium Station"] = {strength = 3, short_lo = 60, short_hi = 200},
["Small Station"] = {strength = 1, short_lo = 35, short_hi = 100},
}
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"}
characterNames = {"Frank Brown",
"Joyce Miller",
"Harry Jones",
"Emma Davis",
"Zhang Wei Chen",
"Yu Yan Li",
"Li Wei Wang",
"Li Na Zhao",
"Sai Laghari",
"Anaya Khatri",
"Vihaan Reddy",
"Trisha Varma",
"Henry Gunawan",
"Putri Febrian",
"Stanley Hartono",
"Citra Mulyadi",
"Bashir Pitafi",
"Hania Kohli",
"Gohar Lehri",
"Sohelia Lau",
"Gabriel Santos",
"Ana Melo",
"Lucas Barbosa",
"Juliana Rocha",
"Habib Oni",
"Chinara Adebayo",
"Tanimu Ali",
"Naija Bello",
"Shamim Khan",
"Barsha Tripura",
"Sumon Das",
"Farah Munsi",
"Denis Popov",
"Pasha Sokolov",
"Burian Ivanov",
"Radka Vasiliev",
"Jose Hernandez",
"Victoria Garcia",
"Miguel Lopez",
"Renata Rodriguez"}
-- short clip name length in seconds
voice_clips = {
["Avery01"] = 0.971,
["Avery02"] = 7.187,
["Ellis01"] = 14.433,
["Ellis02"] = 2.810,
["Enrique01"] = 2.995,
["Enrique02"] = 1.741,
["Enrique03"] = 2.241,
["Enrique04"] = 4.040,
["Enrique05"] = 0.720,
["Enrique06"] = 2.345,
["Enrique07"] = 3.170,
["Enrique08"] = 2.322,
["Enrique09"] = 1.358,
["Enrique10"] = 0.441,
["Enrique11"] = 2.682,
["Enrique12"] = 1.858,
["Enrique13"] = 2.055,
["Enrique14"] = 1.544,
["Enrique15"] = 1.486,
["Enrique16"] = 2.229,
["Enrique17"] = 2.159,
["Enrique18"] = 3.413,
["Enrique19"] = 2.728,
["Enrique20"] = 3.239,
["Enrique21"] = 0.467,
["Enrique22"] = 1.405,
["Enrique23"] = 2.125,
["Hayden01"] = 5.468,
["Hayden02"] = 11.378,
["Hayden03"] = 5.027,
["Hayden04"] = 11.459,
["Hayden05"] = 0.569,
["Hayden06"] = 8.731,
["Hayden07"] = 1.463,
["Hayden08"] = 2.264,
["Jamie01"] = 7.883,
["Jamie02"] = 8.406,
["Karsyn01"] = 1.231,
["Karsyn02"] = 4.841,
["Ozzie01"] = 0.360,
["Ozzie02"] = 0.557,
["Ozzie03"] = 0.360,
["Ozzie04"] = 1.707,
["Ozzie05"] = 1.335,
["Ozzie06"] = 1.161,
["Ozzie07"] = 0.418,
["Ozzie08"] = 0.615,
["Ozzie09"] = 0.929,
["Parker01"] = 1.753,
["Parker02"] = 1.614,
["Pat01Aurora"] = 7.327,
["Pat01Covenant"] = 7.248,
["Pat01Secondus"] = 7.587,
["Pat02Minos"] = 15.140,
["Pat02Primus"] = 15.681,
["Pat02Talos"] = 15.681,
["Pat03"] = 18.429,
["Pat04"] = 5.354,
["Pat05"] = 3.179,
["Pat06"] = 6.672,
["Peyton01"] = 12.327,
["Peyton02"] = 1.792,
["Phoenix01"] = 1.815,
["Polly0110"] = 6.966,
["Polly0120"] = 7.094,
["Polly0140"] = 7.523,
["Polly02"] = 8.893,