-
Notifications
You must be signed in to change notification settings - Fork 6
/
scenario_33_early.lua
6763 lines (6729 loc) · 302 KB
/
scenario_33_early.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: Early Evaluation Exercise
-- Description: An entry level, learn to play scenario. Designed for trainees in the Human Navy. Up to 16 player ships may train simultaneously. Based on Earn Your Wings Scenario by Kilted Klingon.
-- Type: Basic
-- Author: Xansta
-- Setting[Orbits]: Configures orbit speeds of planets. Further refinement available on GM screen
-- Orbits[Sedate]: Slowest inner and outer orbit speeds
-- Orbits[Calm]: Slow inner speed, slowest outer speed
-- Orbits[Moving Along]: Average inner speed, slowest outer speed
-- Orbits[Quick Time|Default]: Faster inner and outer speeds
-- Orbits[Ludicrous Speed]: Fastest inner and outer speeds
-- Setting[Ships]: Determines the number of player ships.
-- Ships[1|Default]: One player ship
-- Ships[2]: Two player ships
-- Ships[3]: Three player ships
-- Ships[4]: Four player ships
-- Ships[5]: Five player ships
-- Ships[6]: Six 6 player ships
-- Ships[7]: Seven player ships
-- Ships[8]: Eight player ships
-- Ships[9]: Nine player ships
-- Ships[10]: Ten player ships
-- Ships[11]: Eleven player ships
-- Ships[12]: Twelve player ships
-- Ships[13]: Thirteen player ships
-- Ships[14]: Fourteen player ships
-- Ships[15]: Fifteen player ships
-- Ships[16]: Sixteen player ships
-- Setting[Control]: Configure whether or not control codes will be used
-- Control[Use|Default]: Control codes will be used. GM button Random PShip Names switches to random control codes and player ship names
-- Control[None]: Control codes will not be used
-- Setting[Crutch]: Configure whether a popup message for inexperienced players appears for each task
-- Crutch[Use|Default]: Popup messages will appear for each task
-- Crutch[None]: No popup message will appear
-- Setting[Insight]: Configure whether the players may see the GM evaluation
-- Insight[No|Default]: Players see the number portion of their task evaluation, but not the evaluation portion
-- Insight[Yes]: Players see both the numbers and their evaluation for each task
---------- Tasks given to players ----------
-- First Task: Dock
-- Hurdles: request permission to dock, calibrate shields and beams, power down missiles
-- Participants: Helm, weapons, relay, engineering
-- Second Task: Scan to discriminate targets
-- Hurdles: nebula obscures some targets
-- Participants: Science, relay
-- Third Task: Destroy enemy freighter
-- Hurdles: Limited beam function, only HVLI type missiles
-- Participants: Helm, Weapons, engineering, science, relay
-- Fourth Task: Assist freighter
-- Hurdles: Get parts from station, find freighter, fend off attackers
-- Participants: Helm, science, relay, engineering, weapons
-- Fifth task: Research anomalous planetary orbital behavior
-- Hurdles: Bumping into planets causes severe damage to ship, navigate carefully
-- Participants: Helm, Science, Relay, Engineering
-- Bonus task: Destroy enemy base
-- Hurdles: Enemy space ships, enemy base is far from primary base
-- Participants: Helm, Weapons, Engineering, Science, Relay
require("utils.lua") -- common math/geometry utility library
require("place_station_scenario_utility.lua")
require("cpu_ship_diversification_scenario_utility.lua")
function init()
scenario_version = "1.0.0"
print(string.format(" ----- Scenario: Early Evaluation Exercise ----- Version %s -----",scenario_version))
if _VERSION ~= nil then
print(_VERSION)
end
spawn_enemy_diagnostic = true
func_diagnostic = false
planet_collision_diagnostic = false
setConstants()
setGMButtons()
setVariations()
end
function setVariations()
-- One aspect of this scenario is the multiple planets that are orbiting the center black hole and each other.
-- Early versions of this game had the planets orbiting at rather fast speeds...
-- like warp 5 (or something that seems like that). Some crews found it hilarious, others were
-- rather annoyed that they would get mowed down by a planet that they couldn't avoid, so the
-- orbital speed schema may be configured. Use GM buttons while paused to configure the scheme
-- The speed value represents the number of seconds it takes to complete an orbit.
orbital_schemes = {
["Sedate"] = {inner_multiplier = 6, outer_multiplier = 6},
["Calm"] = {inner_multiplier = 4.5, outer_multiplier = 6},
["Moving Along"] = {inner_multiplier = 3, outer_multiplier = 6},
["Quick Time"] = {inner_multiplier = 2.25, outer_multiplier = 2.25},
["Ludicrous Speed"] = {inner_multiplier = 1, outer_multiplier = 1},
}
orbital_scheme = getScenarioSetting("Orbits")
inner_multiplier = orbital_schemes[orbital_scheme].inner_multiplier
outer_multiplier = orbital_schemes[orbital_scheme].outer_multiplier
crutch = true
if getScenarioSetting("Crutch") == "None" then
crutch = false
end
use_control_codes = true
if getScenarioSetting("Control") == "None" then
use_control_codes = false
end
player_ship_count = getScenarioSetting("Ships")
for i=1,player_ship_count do
local p = PlayerSpaceship():setTemplate("Atlantis")
p.pidx = i
identifyPlayerShip(p,true)
end
player_insight = false
if getScenarioSetting("Insight") == "Yes" then
player_insight = true
end
end
function setConstants()
predefined_player_ships = {
{name = "Chekov", control_code = "SPRINGFIELD443"},
{name = "Defiant", control_code = "VALIANT898"},
{name = "Ganges", control_code = "DANUBE555"},
{name = "Heracles", control_code = "SALADIN676"},
{name = "Intrepid", control_code = "CONSTITUTION424"},
{name = "Magellan", control_code = "GALAXY332"},
{name = "Newton", control_code = "STRIKE535"},
{name = "Reliant", control_code = "MIRANDA909"},
}
storage = getScriptStorage()
storage.gatherStats = gatherStats
-- the first group is the 2 planetoids orbiting closest to the center black hole (the black hole doesn't move)
orb_speed_closest_to_black_hole = 15
orb_speed_second_closest_to_black_hole = 25
-- the second group is the planetary sub-system that starts to the "north" of the black hole; call this 'planet_group_1'
-- there is 1 main planet with 4 planetoids/moons in orbit around the main; these are assigned from main to outer most orbiter
orb_speed_planet_group_1_main = 300 -- this body orbits the central black hole
orb_speed_planet_group_1_orbiter_1 = 30 -- this body orbits planet_group_1_main
orb_speed_planet_group_1_orbiter_2 = 60 -- this body orbits planet_group_1_main
orb_speed_planet_group_1_orbiter_2_1 = 10 -- this body orbits planet_group_1_orbiter_2
orb_speed_planet_group_1_orbiter_2_2 = 60 -- this body orbits planet_group_1_orbiter_2
-- the third group is the planetary sub-system that starts to the "south" of the black hole; call this 'planet_group_2'
-- it is a mirror image of the first/"north" group
-- there is 1 main planet with 4 planetoids/moons in orbit around the main; these are assigned from main to outer most orbiter
orb_speed_planet_group_2_main = 300
orb_speed_planet_group_2_orbiter_1 = 30
orb_speed_planet_group_2_orbiter_2 = 60
orb_speed_planet_group_2_orbiter_2_1 = 10
orb_speed_planet_group_2_orbiter_2_2 = 60
terrain_center_x = 0 --replaces original variable entitled origin_X
terrain_center_y = -20000
trainee_placement_radius = 47000
trainee_base_placement_radius = 50000
human_player_ship_value = 50
human_player_station_value = 150
exuari_score = 0
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
playerShipStats = {
["Atlantis"] = { strength = 52, cargo = 6, distance = 400, long_range_radar = 30000, short_range_radar = 5000, tractor = true, mining = true, probes = 10, pods = 2, },
["Benedict"] = { strength = 10, cargo = 9, distance = 400, long_range_radar = 30000, short_range_radar = 5000, tractor = true, mining = true, probes = 10, pods = 3, },
["Crucible"] = { strength = 45, cargo = 5, distance = 200, long_range_radar = 20000, short_range_radar = 6000, tractor = false, mining = false, probes = 9, pods = 1, },
["Ender"] = { strength = 100, cargo = 20, distance = 2000,long_range_radar = 45000, short_range_radar = 7000, tractor = true, mining = false, probes = 12, pods = 6, },
["Flavia P.Falcon"] = { strength = 13, cargo = 15, distance = 200, long_range_radar = 40000, short_range_radar = 5000, tractor = true, mining = true, probes = 8, pods = 4, },
["Hathcock"] = { strength = 30, cargo = 6, distance = 200, long_range_radar = 35000, short_range_radar = 6000, tractor = false, mining = true, probes = 8, pods = 2, },
["Kiriya"] = { strength = 10, cargo = 9, distance = 400, long_range_radar = 35000, short_range_radar = 5000, tractor = true, mining = true, probes = 10, pods = 3, },
["Maverick"] = { strength = 45, cargo = 5, distance = 200, long_range_radar = 20000, short_range_radar = 4000, tractor = false, mining = true, probes = 9, pods = 1, },
["MP52 Hornet"] = { strength = 7, cargo = 3, distance = 100, long_range_radar = 18000, short_range_radar = 4000, tractor = false, mining = false, probes = 5, pods = 1, },
["Nautilus"] = { strength = 12, cargo = 7, distance = 200, long_range_radar = 22000, short_range_radar = 4000, tractor = false, mining = false, probes = 10, pods = 2, },
["Phobos M3P"] = { strength = 19, cargo = 10, distance = 200, long_range_radar = 25000, short_range_radar = 5000, tractor = true, mining = false, probes = 6, pods = 3, },
["Piranha"] = { strength = 16, cargo = 8, distance = 200, long_range_radar = 25000, short_range_radar = 6000, tractor = false, mining = false, probes = 6, pods = 2, },
["Player Cruiser"] = { strength = 40, cargo = 6, distance = 400, long_range_radar = 30000, short_range_radar = 5000, tractor = false, mining = false, probes = 10, pods = 2, },
["Player Missile Cr."] = { strength = 45, cargo = 8, distance = 200, long_range_radar = 35000, short_range_radar = 6000, tractor = false, mining = false, probes = 9, pods = 2, },
["Player Fighter"] = { strength = 7, cargo = 3, distance = 100, long_range_radar = 15000, short_range_radar = 4500, tractor = false, mining = false, probes = 4, pods = 1, },
["Repulse"] = { strength = 14, cargo = 12, distance = 200, long_range_radar = 38000, short_range_radar = 5000, tractor = true, mining = false, probes = 8, pods = 5, },
["Striker"] = { strength = 8, cargo = 4, distance = 200, long_range_radar = 35000, short_range_radar = 5000, tractor = false, mining = false, probes = 6, pods = 1, },
["ZX-Lindworm"] = { strength = 8, cargo = 3, distance = 100, long_range_radar = 18000, short_range_radar = 5500, tractor = false, mining = false, probes = 4, pods = 1, },
}
shipTemplateDistance = {
["Adder MK3"] = 100,
["Adder MK4"] = 100,
["Adder MK5"] = 100,
["Adder MK6"] = 100,
["Adder MK7"] = 100,
["Adder MK8"] = 100,
["Adder MK9"] = 100,
["Adv. Gunship"] = 400,
["Adv. Striker"] = 300,
["Atlantis X23"] = 400,
["Atlantis Y42"] = 400,
["Battlestation"] = 2000,
["Beast Breaker"] = 300,
["Blockade Runner"] = 400,
["Blade"] = 300,
["Broom"] = 100,
["Brush"] = 100,
["Buster"] = 100,
["Command Base"] = 800,
["Courier"] = 600,
["Cruiser"] = 200,
["Cucaracha"] = 200,
["Dagger"] = 100,
["Dash"] = 200,
["Defense platform"] = 800,
["Diva"] = 350,
["Tsarina"] = 350,
["Brood Mother"] = 350,
["Dread No More"] = 400,
["Dreadnought"] = 400,
["Elara P2"] = 200,
["Enforcer"] = 400,
["Enforcer V2"] = 400,
["Equipment Freighter 1"] = 600,
["Equipment Freighter 2"] = 600,
["Equipment Freighter 3"] = 600,
["Equipment Freighter 4"] = 800,
["Equipment Freighter 5"] = 800,
["Equipment Jump Freighter 3"] = 600,
["Equipment Jump Freighter 4"] = 800,
["Equipment Jump Freighter 5"] = 800,
["Farco 3"] = 200,
["Farco 5"] = 200,
["Farco 8"] = 200,
["Farco 11"] = 200,
["Farco 13"] = 200,
["Fiend G3"] = 400,
["Fiend G4"] = 400,
["Fiend G5"] = 400,
["Fiend G6"] = 400,
["Fighter"] = 200,
["Flash"] = 100,
["Flavia"] = 200,
["Flavia Falcon"] = 200,
["Fortress"] = 2000,
["Foul Feeder"] = 300,
["Fray"] = 200,
["Fuel Freighter 1"] = 600,
["Fuel Freighter 2"] = 600,
["Fuel Freighter 3"] = 600,
["Fuel Freighter 4"] = 800,
["Fuel Freighter 5"] = 800,
["Fuel Jump Freighter 3"] = 600,
["Fuel Jump Freighter 4"] = 800,
["Fuel Jump Freighter 5"] = 800,
["Garbage Freighter 1"] = 600,
["Garbage Freighter 2"] = 600,
["Garbage Freighter 3"] = 600,
["Garbage Freighter 4"] = 800,
["Garbage Freighter 5"] = 800,
["Garbage Jump Freighter 3"] = 600,
["Garbage Jump Freighter 4"] = 800,
["Garbage Jump Freighter 5"] = 800,
["Gnat"] = 300,
["Goods Freighter 1"] = 600,
["Goods Freighter 2"] = 600,
["Goods Freighter 3"] = 600,
["Goods Freighter 4"] = 800,
["Goods Freighter 5"] = 800,
["Goods Jump Freighter 3"] = 600,
["Goods Jump Freighter 4"] = 800,
["Goods Jump Freighter 5"] = 800,
["Guard"] = 600, --transport_1_1
["Gulper"] = 400,
["Gunner"] = 100,
["Gunship"] = 400,
["Heavy Drone"] = 300,
["Hunter"] = 200,
["Jacket Drone"] = 300,
["Jade 5"] = 100,
["Jagger"] = 100,
["Jump Carrier"] = 800,
["Karnack"] = 200,
["K2 Fighter"] = 300,
["K3 Fighter"] = 300,
["Ktlitan Breaker"] = 300,
["Ktlitan Destroyer"] = 500,
["Ktlitan Drone"] = 300,
["Ktlitan Feeder"] = 300,
["Ktlitan Fighter"] = 300,
["Ktlitan Queen"] = 500,
["Ktlitan Scout"] = 300,
["Ktlitan Worker"] = 300,
["Laden Lorry"] = 600,
["Lite Drone"] = 300,
["Loki"] = 1500,
["Maniapak"] = 100,
["Mikado"] = 200,
["Military Outpost"] = 800,
["Missile Pod D1"] = 800,
["Missile Pod D2"] = 800,
["Missile Pod D4"] = 800,
["Missile Pod T1"] = 800,
["Missile Pod T2"] = 800,
["Missile Pod TI2"] = 800,
["Missile Pod TI4"] = 800,
["Missile Pod TI8"] = 800,
["Missile Pod TX4"] = 800,
["Missile Pod TX8"] = 800,
["Missile Pod TX16"] = 800,
["Missile Pod S1"] = 800,
["Missile Pod S4"] = 800,
["Missile Cruiser"] = 200,
["MT52 Hornet"] = 100,
["MT55 Hornet"] = 100,
["MU52 Hornet"] = 100,
["MU55 Hornet"] = 100,
["Munemi"] = 100,
["MV52 Hornet"] = 100,
["Nirvana R3"] = 200,
["Nirvana R5"] = 200,
["Nirvana R5A"] = 200,
["Odin"] = 1500,
["Omnibus"] = 800,
["Personnel Freighter 1"] = 600,
["Personnel Freighter 2"] = 600,
["Personnel Freighter 3"] = 600,
["Personnel Freighter 4"] = 800,
["Personnel Freighter 5"] = 800,
["Personnel Jump Freighter 3"] = 600,
["Personnel Jump Freighter 4"] = 800,
["Personnel Jump Freighter 5"] = 800,
["Phobos M3"] = 200,
["Phobos R2"] = 200,
["Phobos T3"] = 200,
["Phobos T4"] = 200,
["Physics Research"] = 600,
["Piranha F10"] = 200,
["Piranha F12"] = 200,
["Piranha F12.M"] = 200,
["Piranha F8"] = 200,
["Porcupine"] = 400,
["Prador"] = 2000,
["Predator"] = 200,
["Predator V2"] = 200,
["Racer"] = 200,
["Ranger"] = 100,
["Ranus U"] = 200,
["Roc"] = 200,
["Rook"] = 200,
["Ryder"] = 2000,
["Sentinel"] = 600,
["Service Jonque"] = 800,
["Shooter"] = 100,
["Sloop"] = 200,
["Sniper Tower"] = 800,
["Space Sedan"] = 600,
["Stalker Q5"] = 200,
["Stalker Q7"] = 200,
["Stalker R5"] = 200,
["Stalker R7"] = 200,
["Starhammer II"] = 400,
["Starhammer III"] = 400,
["Starhammer V"] = 400,
["Storm"] = 200,
["Strike"] = 200,
["Strikeship"] = 200,
["Strongarm"] = 400,
["Supervisor"] = 400,
["Sweeper"] = 100,
["Tempest"] = 200,
["Transport1x1"] = 600,
["Transport1x2"] = 600,
["Transport1x3"] = 600,
["Transport1x4"] = 800,
["Transport1x5"] = 800,
["Transport2x1"] = 600,
["Transport2x2"] = 600,
["Transport2x3"] = 600,
["Transport2x4"] = 800,
["Transport2x5"] = 800,
["Transport3x1"] = 600,
["Transport3x2"] = 600,
["Transport3x3"] = 600,
["Transport3x4"] = 800,
["Transport3x5"] = 800,
["Transport4x1"] = 600,
["Transport4x2"] = 600,
["Transport4x3"] = 600,
["Transport4x4"] = 800,
["Transport4x5"] = 800,
["Transport5x1"] = 600,
["Transport5x2"] = 600,
["Transport5x3"] = 600,
["Transport5x4"] = 800,
["Transport5x5"] = 800,
["Tug"] = 200,
["Tyr"] = 2000,
["Waddle 5"] = 100,
["Warden"] = 600,
["Weapons platform"] = 200,
["Whirlwind"] = 200,
["Wombat"] = 100,
["Work Wagon"] = 600,
["WX-Lindworm"] = 100,
["WZ-Lindworm"] = 100,
}
player_ship_stats={ --ordered by strength
["Ender"] = { strength = 100, cargo = 20, distance = 2000,long_range_radar = 45000, short_range_radar = 7000},
["Klantis"] = { strength = 60, cargo = 6, distance = 400, long_range_radar = 30000, short_range_radar = 5000},
["Atlantis"] = { strength = 52, cargo = 6, distance = 400, long_range_radar = 30000, short_range_radar = 5000},
["Crucible"] = { strength = 45, cargo = 5, distance = 200, long_range_radar = 20000, short_range_radar = 6000},
["Maverick"] = { strength = 45, cargo = 5, distance = 200, long_range_radar = 20000, short_range_radar = 4000},
["Player Missile Cr."] = { strength = 45, cargo = 8, distance = 200, long_range_radar = 35000, short_range_radar = 6000},
["Player Cruiser"] = { strength = 40, cargo = 6, distance = 400, long_range_radar = 30000, short_range_radar = 5000},
["Hathcock"] = { strength = 30, cargo = 6, distance = 200, long_range_radar = 35000, short_range_radar = 6000},
["Phobos M3P"] = { strength = 19, cargo = 10, distance = 200, long_range_radar = 25000, short_range_radar = 5000},
["Piranha"] = { strength = 16, cargo = 8, distance = 200, long_range_radar = 25000, short_range_radar = 6000},
["Repulse"] = { strength = 14, cargo = 12, distance = 200, long_range_radar = 38000, short_range_radar = 5000},
["Flavia P.Falcon"] = { strength = 13, cargo = 15, distance = 200, long_range_radar = 40000, short_range_radar = 5000},
["Nautilus"] = { strength = 12, cargo = 7, distance = 200, long_range_radar = 22000, short_range_radar = 4000},
["Benedict"] = { strength = 10, cargo = 9, distance = 400, long_range_radar = 30000, short_range_radar = 5000},
["Kiriya"] = { strength = 10, cargo = 9, distance = 400, long_range_radar = 35000, short_range_radar = 5000},
["Striker"] = { strength = 8, cargo = 4, distance = 200, long_range_radar = 35000, short_range_radar = 5000},
["ZX-Lindworm"] = { strength = 8, cargo = 3, distance = 100, long_range_radar = 18000, short_range_radar = 5500},
["MP52 Hornet"] = { strength = 7, cargo = 3, distance = 100, long_range_radar = 18000, short_range_radar = 4000},
["Player Fighter"] = { strength = 7, cargo = 3, distance = 100, long_range_radar = 15000, short_range_radar = 4500},
}
ship_template = { --ordered by relative strength
["Ktlitan Drone"] = {strength = 4, adder = false, missiler = false, beamer = true, frigate = false, chaser = false, fighter = true, drone = true, unusual = false, base = false, create = stockTemplate},
["MT52 Hornet"] = {strength = 5, adder = false, missiler = false, beamer = true, frigate = false, chaser = false, fighter = true, drone = false, unusual = false, base = false, create = stockTemplate},
["MU52 Hornet"] = {strength = 5, adder = false, missiler = false, beamer = true, frigate = false, chaser = false, fighter = true, drone = false, unusual = false, base = false, create = stockTemplate},
["Adder MK4"] = {strength = 6, adder = true, missiler = false, beamer = false, frigate = false, chaser = false, fighter = false, drone = false, unusual = false, base = false, create = stockTemplate},
["Fighter"] = {strength = 6, adder = false, missiler = false, beamer = true, frigate = false, chaser = false, fighter = true, drone = false, unusual = false, base = false, create = stockTemplate},
["Ktlitan Fighter"] = {strength = 6, adder = false, missiler = false, beamer = true, frigate = false, chaser = false, fighter = true, drone = false, unusual = false, base = false, create = stockTemplate},
["Adder MK5"] = {strength = 7, adder = true, missiler = false, beamer = false, frigate = false, chaser = false, fighter = false, drone = false, unusual = false, base = false, create = stockTemplate},
["WX-Lindworm"] = {strength = 7, adder = false, missiler = true, beamer = false, frigate = false, chaser = false, fighter = true, drone = false, unusual = false, base = false, create = stockTemplate},
["Adder MK6"] = {strength = 8, adder = true, missiler = false, beamer = false, frigate = false, chaser = false, fighter = false, drone = false, unusual = false, base = false, create = stockTemplate},
["Ktlitan Scout"] = {strength = 8, adder = false, missiler = false, beamer = true, frigate = false, chaser = false, fighter = false, drone = false, unusual = false, base = false, create = stockTemplate},
["Missile Cruiser"] = {strength = 14, adder = false, missiler = true, beamer = false, frigate = true, chaser = false, fighter = false, drone = false, unusual = false, base = false, create = stockTemplate},
["Phobos T3"] = {strength = 15, adder = false, missiler = false, beamer = false, frigate = true, chaser = false, fighter = false, drone = false, unusual = false, base = false, create = stockTemplate},
["Piranha F8"] = {strength = 15, adder = false, missiler = true, beamer = false, frigate = true, chaser = false, fighter = false, drone = false, unusual = false, base = false, create = stockTemplate},
["Piranha F12"] = {strength = 15, adder = false, missiler = true, beamer = false, frigate = true, chaser = false, fighter = false, drone = false, unusual = false, base = false, create = stockTemplate},
["Piranha F12.M"] = {strength = 16, adder = false, missiler = true, beamer = false, frigate = true, chaser = false, fighter = false, drone = false, unusual = false, base = false, create = stockTemplate},
["Phobos M3"] = {strength = 16, adder = false, missiler = false, beamer = false, frigate = true, chaser = false, fighter = false, drone = false, unusual = false, base = false, create = stockTemplate},
["Karnack"] = {strength = 17, adder = false, missiler = false, beamer = true, frigate = true, chaser = false, fighter = false, drone = false, unusual = false, base = false, create = stockTemplate},
["Gunship"] = {strength = 17, adder = false, missiler = false, beamer = false, frigate = true, chaser = false, fighter = false, drone = false, unusual = false, base = false, create = stockTemplate},
["Cruiser"] = {strength = 18, adder = true, missiler = false, beamer = true, frigate = true, chaser = false, fighter = false, drone = false, unusual = false, base = false, create = stockTemplate},
["Nirvana R5"] = {strength = 19, adder = false, missiler = false, beamer = true, frigate = true, chaser = false, fighter = false, drone = false, unusual = false, base = false, create = stockTemplate},
["Nirvana R5A"] = {strength = 20, adder = false, missiler = false, beamer = true, frigate = true, chaser = false, fighter = false, drone = false, unusual = false, base = false, create = stockTemplate},
["Adv. Gunship"] = {strength = 20, adder = false, missiler = false, beamer = false, frigate = true, chaser = false, fighter = false, drone = false, unusual = false, base = false, create = stockTemplate},
["Storm"] = {strength = 22, adder = false, missiler = true, beamer = false, frigate = true, chaser = false, fighter = false, drone = false, unusual = false, base = false, create = stockTemplate},
["Ranus U"] = {strength = 25, adder = false, missiler = true, beamer = false, frigate = true, chaser = false, fighter = false, drone = false, unusual = false, base = false, create = stockTemplate},
["Stalker Q7"] = {strength = 25, adder = false, missiler = false, beamer = true, frigate = true, chaser = true, fighter = false, drone = false, unusual = false, base = false, create = stockTemplate},
["Stalker R7"] = {strength = 25, adder = false, missiler = false, beamer = true, frigate = true, chaser = true, fighter = false, drone = false, unusual = false, base = false, create = stockTemplate},
["Adv. Striker"] = {strength = 27, adder = false, missiler = false, beamer = true, frigate = true, chaser = true, fighter = false, drone = false, unusual = false, base = false, create = stockTemplate},
["Strikeship"] = {strength = 30, adder = false, missiler = false, beamer = true, frigate = true, chaser = true, fighter = false, drone = false, unusual = false, base = false, create = stockTemplate},
["Ktlitan Worker"] = {strength = 40, adder = false, missiler = false, beamer = true, frigate = false, chaser = false, fighter = false, drone = false, unusual = false, base = false, create = stockTemplate},
["Ktlitan Breaker"] = {strength = 45, adder = false, missiler = false, beamer = false, frigate = false, chaser = false, fighter = false, drone = false, unusual = false, base = false, create = stockTemplate},
["Ktlitan Feeder"] = {strength = 48, adder = false, missiler = false, beamer = true, frigate = false, chaser = false, fighter = false, drone = false, unusual = false, base = false, create = stockTemplate},
["Atlantis X23"] = {strength = 50, adder = false, missiler = false, beamer = false, frigate = false, chaser = true, fighter = false, drone = false, unusual = false, base = false, create = stockTemplate},
["Ktlitan Destroyer"] = {strength = 50, adder = false, missiler = false, beamer = false, frigate = false, chaser = false, fighter = false, drone = false, unusual = false, base = false, create = stockTemplate},
["Blockade Runner"] = {strength = 65, adder = false, missiler = false, beamer = true, frigate = false, chaser = false, fighter = false, drone = false, unusual = false, base = false, create = stockTemplate},
["Starhammer II"] = {strength = 70, adder = false, missiler = false, beamer = false, frigate = false, chaser = true, fighter = false, drone = false, unusual = false, base = false, create = stockTemplate},
["Dreadnought"] = {strength = 80, adder = false, missiler = false, beamer = true, frigate = false, chaser = false, fighter = false, drone = false, unusual = false, base = false, create = stockTemplate},
["Battlestation"] = {strength = 100,adder = false, missiler = false, beamer = true, frigate = false, chaser = true, fighter = false, drone = false, unusual = false, base = false, create = stockTemplate},
["Odin"] = {strength = 250,adder = false, missiler = false, beamer = false, frigate = false, chaser = true, fighter = false, drone = false, unusual = false, base = false, create = stockTemplate},
}
control_code_stem = { --All control codes must use capital letters or they will not work.
"ALWAYS",
"BLACK",
"BLUE",
"BRIGHT",
"BROWN",
"CHAIN",
"CHURCH",
"DOORWAY",
"DULL",
"ELBOW",
"EMPTY",
"EPSILON",
"FLOWER",
"FLY",
"FROZEN",
"GREEN",
"GLOW",
"HAMMER",
"INK",
"JUMP",
"KEY",
"LETTER",
"LIST",
"MORNING",
"NEXT",
"OPEN",
"ORANGE",
"OUTSIDE",
"PURPLE",
"QUARTER",
"QUIET",
"RED",
"SHINE",
"SIGMA",
"STAR",
"STREET",
"TOKEN",
"THIRSTY",
"UNDER",
"VANISH",
"WHITE",
"WRENCH",
"YELLOW",
}
trainer_player_ship_names = { --predator pirate players
"Ajax",
"Amar",
"Archon",
"Artosk",
"Belak",
"Bortas",
"Buruk",
"Ch'Tang",
"Cortez",
"Decius",
"Desna",
"Devisor",
"Devoras",
"Dividices",
"Drovana",
"Fek'lhr",
"Firebrand",
"Gasko",
"Genorex",
"Gor Korus",
"Gor Nivik",
"Gor Portas",
"Gorkon",
"Guernik",
"Haakona",
"Havana",
"Hegh'ta",
"Hor'Cha",
"Ki'tang",
"Klothos",
"K'mpec",
"Koraga",
"Korinar",
"Makar",
"Malpara",
"Marjat",
"Narada",
"Orantho",
"Par'tok",
"Pell Togah",
"Preceptor",
"Rotarran",
"Scimitar",
"Shaenor",
"Soyuz",
"T'Acog",
"T'Met",
"Talvath",
"Terix",
"Tomal",
"Torzat",
"Ursva",
"Valdore",
"Vor'nak",
}
trainee_player_ship_names = { --newbie players
"Adelphi",
"Ahwahnee",
"Akagi",
"Akira",
"Al-Batani",
"Ambassador",
"Andromeda",
"Antares",
"Apollo",
"Appalachia",
"Arcos",
"Aries",
"Athena",
"Beethoven",
"Bellerophon",
"Biko",
"Bonchune",
"Bozeman",
"Bradbury",
"Brattain",
"Budapest",
"Buran",
"Cairo",
"Calypso",
"Capricorn",
"Carolina",
"Centaur",
"Challenger",
"Charlseton",
-- "Chekov",
"Cheyenne",
"Clement",
"Cochraine",
"Columbia",
"Concorde",
"Constantinople",
"Constellation",
"Constitution",
"Copernicus",
"Cousteau",
"Crazy Horse",
"Crockett",
"Daedalus",
"Danube",
-- "Defiant",
"Deneva",
"Denver",
"Discovery",
"Drake",
"Endeavor",
"Endurance",
"Equinox",
"Essex",
"Excalibur",
"Exeter",
"Farragut",
"Fearless",
"Fleming",
"Fredrickson",
"Freedom",
"Gage",
"Galaxy",
"Galileo",
-- "Ganges",
"Gander",
"Gettysburg",
"Ghandi",
"Goddard",
"Grissom",
"Hathaway",
"Helin",
"Hera",
-- "Heracles",
"Hokule'a",
"Honshu",
"Hood",
"Hope",
"Horatio",
"Horizon",
"Interceptor",
-- "Intrepid",
"Istanbul",
"Jenolen",
"Kearsarge",
"Kongo",
"Korolev",
"Kyushu",
"Lakota",
"Lalo",
"Lancer",
"Lantree",
"LaSalle",
"Leeds",
"Lexington",
"Luna",
-- "Magellan",
"Majestic",
"Malinche",
"Maryland",
"Mediterranean",
"Mekong",
"Melbourne",
"Merced",
"Merrimack",
"Miranda",
"Nash",
"Nebula",
"New Orleans",
-- "Newton",
"Niagra",
"Nobel",
"Norway",
"Nova",
"Oberth",
"Odyssey",
"Orinoco",
"Osiris",
"Pasteur",
"Pegasus",
"Peregrine",
"Poseidon",
"Potempkin",
"Princeton",
"Prokofiev",
"Prometheus",
"Proxima",
"Rabin",
"Raman",
"Relativity",
-- "Reliant",
"Renaissance",
"Renegade",
"Republic",
"Rhode Island",
"Rigel",
"Rubicon",
"Rutledge",
"Sarajevo",
"Saratoga",
"Scimitar",
"Sequoia",
"Shenandoah",
"ShirKahr",
"Sitak",
"Socrates",
"Sovereign",
"Spector",
"Springfield",
"Stargazer",
"Steamrunner",
"Surak",
"Sutherland",
"Sydney",
"T'Kumbra",
"Thomas Paine",
"Thunderchild",
"Tian An Men",
"Titan",
"Tolstoy",
"Trial",
"Trieste",
"Trinculo",
"Tripoli",
"Ulysses",
"Valdemar",
"Valiant",
"Venture",
"Volga",
"Voyager",
"Wambundu",
"Waverider",
"Wellington",
"Wells",
"Wyoming",
"Yamaguchi",
"Yamato",
"Yangtzee Kiang",
"Yeager",
"Yorkshire",
"Yorktown",
"Yosemite",
"Yukon",
"Zapata",
"Zhukov",
"Zodiac",
}
-- these are the global tables for organizing all relevant game entities
game_state = "paused"
human_station_list = {} --number, station, name, killer, killer faction
independent_station_list = {} --number, station, name, killer, killer faction
human_transport_list = {} --number, transport, name, killer, killer faction
exuari_list = {} --number, ship, name, Counts: Human kill, Kraylor kill
enemyList = {}
friendlyList = {}
stationList = {}
transportList = {}
planetList = {}
planetKillRadius = {}
player_restart = {}
player_restart.add = playerRestartAdd
-- these are the global tables/variables for collecting stats during play
friendlyDestroyedCountList = {}
friendlyTalliedKilledList = {}
human_station_destroyed_list = {}
independent_station_destroyed_list = {}
transport_destroyed_list = {}
total_player_ships_crashed_into_planets = 0
total_trainees_crashed_into_planets = 0
total_trainers_crashed_into_planets = 0
total_enemy_ships_spawned = 0
total_enemy_ships_crashed_into_planets = 0
total_enemy_ships_destroyed_by_players = 0
total_transport_ships_spawned = 0
total_transport_ships_crashed_into_planets = 0
total_transport_ships_destroyed_by_enemy_ships = 0
total_exuari_killed = 0
total_exuari_killed_by_exuari = 0
total_exuari_killed_by_kraylor = 0
total_exuari_killed_by_human = 0
-- variables for randomly spawning transports
spawn_delay = 0
-- note that all planetary bodies are globals as well, but they are established as the planets are created in the createEnvironment() function
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"}
vapor_goods = {"gold pressed latinum","unobtanium","eludium","impossibrium"}
research_task_length = 2
pool_selectivity = "full"
posthumous = {}
task_list = {
["dock"] = taskDock,
["completed dock"] = taskCompletedDock,
["scan"] = taskScan,
["completed scan"] = taskCompletedScan,
["destroy freighter"] = taskDestroyFreighter,
["completed destroy freighter"] = taskCompletedDestroyFreighter,
["assist freighter"] = taskAssistFreighter,
["completed assist freighter"] = taskCompletedAssistFreighter,
["research"] = taskResearch,
["completed research"] = taskCompletedResearch,
["research cleanup"] = taskResearchCleanup,
["bonus"] = taskBonus,
}
end
function playerRestartAdd(pidx,name,control_code,start_x,start_y,angle,template,faction,deaths,exuari_deaths,kraylor_deaths,human_deaths,kills,exuari_kills,kraylor_kills,human_kills)
if func_diagnostic then print("player restart add") end
if pidx == nil then
return
end
if player_restart[pidx] ~= nil then
if name == nil then
name = player_restart[pidx].name
end
if control_code == nil then
control_code = player_restart[pidx].control_code
end
if start_x == nil then
start_x = player_restart[pidx].start_x
end
if start_y == nil then
start_y = player_restart[pidx].start_y
end
if angle == nil then
angle = player_restart[pidx].angle
end
if template == nil then
template = player_restart[pidx].template
end
if faction == nil then
faction = player_restart[pidx].faction
end
if deaths == nil then
deaths = player_restart[pidx].deaths
end
if exuari_deaths == nil then
exuari_deaths = player_restart[pidx].exuari_deaths
end
if kraylor_deaths == nil then
kraylor_deaths = player_restart[pidx].kraylor_deaths
end
if human_deaths == nil then
human_deaths = player_restart[pidx].human_deaths