-
Notifications
You must be signed in to change notification settings - Fork 6
/
scenario_60_captureFlag.lua
8030 lines (7929 loc) · 333 KB
/
scenario_60_captureFlag.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: Capture the Flag
-- Description: Capture opposing team's "flag" before they capture yours
---
--- The region consists of two halves divided by a line of nebulae and/or markers. The first 5 minutes (configurable) each side decides where to place their flag. The ships closest to the referee station determine the team's flag location during the initial phase. Crossing to the other side during this phase will result in ship destruction. The weapons officer will mark the flag coordinates when the ship reaches the flag location. After the flag hide timer expires, an artifact will be placed at the location representing the team's flag. If no place has been marked, the ship's current location will be used. If the location is outside the game boundaries, the flag will be placed at the nearest in bounds location
---
--- Once the flags are placed, the hunt is on. Ships may cross the border in search of the other team's flag, but while they are in the other team's territory they may be tagged by an opponent ship within 0.75U. Being tagged sends you back to your own region with damage to your warp/jump drive. Each flag must be scanned before it can be retrived. Retrieval occurs by getting within 1U of the flag. Being tagged while in posession of the flag drops the flag at the location of the tag event. Cross back to your side with the flag to claim victory
---
--- Version 2
-- Author: Xansta & Kilted-Klingon
-- Category: PvP
-- Setting[Terrain]: Selects the type of terrain for the game
-- Terrain[Asymmetric|Default]: No effort made to make the two sides of the arena equivalent
-- Terrain[Empty]: No terrain. Used primarily for testing
-- Terrain[Passing]: Just passing by. Symmetric, black holes on each side
-- Terrain[Symmetric]: Randomly symmetric
-- Terrain[Rabbit]: Down the rabbit hole. Largely symmetric. Wormholes connect each side.
-- Setting[Enemies]: Configures strength and/or number of external enemies in this scenario
-- Enemies[None|Default]: No external enemies
-- Enemies[Easy]: Fewer or weaker enemies
-- Enemies[Normal]: Normal number or strength of enemies
-- Enemies[Hard]: More or stronger enemies
-- Enemies[Extreme]: Much stronger, many more enemies
-- Enemies[Quixotic]: Insanely strong and/or inordinately large numbers of enemies
-- Setting[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[Arena]: Configures the size of the playing arena. Default is normal or 100 units
-- Arena[Normal|Default]: Normal 100 unit sized arena
-- Arena[Small]: Small 50 unit sized arena
-- Arena[Large]: Large 200 unit sized arena
-- Setting[Flag Scan]: Configures the depth and complexity required to scan a flag. Default is normal: depth is 2 or 3, complexity is 2
-- Flag Scan[Normal|Default]: Depth is 2 or 3, complexity is 2
-- Flag Scan[Easy]: Depth is 1, complexity is 1 or 2
-- Flag Scan[Hard]: Depth is 1, 2 or 3, complexity is 3 or 4
-- Setting[Tracking]: Configures information given about flag.
-- Tracking[Normal|Default]: Drop: Kraylor or Human Navy flag dropped (main screen). Grab: The Kraylor or Human Navy picked up your flag (main screen and ship log)
-- Tracking[Easy]: Drop: ShipName dropped Kraylor or Human Navy flag (main screen). Grab: Kraylor or Human Navy ship ShipName picked up your flag (main screen and ship log)
-- Tracking[Hard]: Drop: Flag dropped (main screen). Grab: Flag obtained (main screen). Flag must be rescanned after drop
-- Tracking[Secret]: Neither dropping nor grabbing the flag will produce a message. Flag must be rescanned after drop
require("utils.lua")
require("place_station_scenario_utility.lua")
require("generate_call_sign_scenario_utility.lua")
function init()
scenario_version = "2.0.1"
print(string.format(" ----- Scenario: Capture the Flag ----- Version %s -----",scenario_version))
print(_VERSION)
presetOptionVariables() --set up any preset team data
setConstants() --things that don't change
setGlobals() --things that don't change often
setVariations() --configuration items based on game set up screen. Many can also be set via GM button while paused
diagnostic = false -- See GM button. A boolean for printing debug data to the console during development; turn to "false" during game play
-- Initialization checklist by function
initializeDroneButtonFunctionTables()
setGMButtons()
setupTailoredShipAttributes() -- player ship names: lists of names to be selected from at random if ship names were not predetermined in presetOptionalVariables
setupBarteringGoods() -- part of Xansta's larger overall bartering/crafting setup
terrainType() -- sets up the environment terrain according to the choice above
plotTeamDemarcationLine()
plotFlagPlacementBoundaries()
-- Print initialization items to console
wfv = "end of init" --diagnostic tool: wolf fence value
print(" Initial Configuration:")
print(" Flag hiding time limit: " .. hideFlagTime/60 .. " minutes")
print(" Game Time Limit: " .. gameTimeLimit/60 .. " minutes")
print(" Scan probes allocated per ship: " .. revisedPlayerShipProbeCount)
print(" Are drones allowed? " .. tostring(dronesAreAllowed))
print(" (Uniform) Drone carrying capacity for player ships: " .. uniform_drone_carrying_capacity)
print(" Drone scanning range for flags/decoys: " .. drone_scan_range_for_flags)
print(" ")
print("----- All of the above initial configuration settings may be adjusted by GM button. ")
print("----- So don't count on these values to remain accurate as shown here in the console.")
end
function presetOptionVariables()
--[[
--If you insert a custom ship_name here, be sure to remove it from the pool of random names
preset_players = {}
--1st ship spawned: Maverick
table.insert(preset_players,
{
xo = "Starry", --1st choice
ship_name = "Phoenix",
faction = "Human Navy",
ship_pref_1 = "Maverick", --pref 2
ship_pref_2 = "Nautilus", --pref 1
ship_pref_3 = "Player Cruiser",
}
)
table.insert(preset_players,
{
xo = "Aldric", --3rd choice
faction = "Kraylor",
ship_name = "Durance",
ship_pref_1 = "Maverick", --pref 2
ship_pref_2 = "Atlantis", --pref 1
ship_pref_3 = "Crucible",
ship_pref_4 = "Piranha",
ship_pref_5 = "Player Cruiser",
ship_pref_6 = "Player Missile Cr.",
}
)
--2nd ship spawned: Atlantis
table.insert(preset_players,
{
xo = "Larry",
ship_name = "Mondo",
faction = "Human Navy",
}
)
table.insert(preset_players,
{
xo = "Epeac", --2nd choice
faction = "Kraylor",
ship_name = "Dauntless",
ship_pref_1 = "Atlantis",
ship_pref_2 = "Maverick",
ship_pref_3 = "Crucible",
}
)
--3rd ship spawned: Phobos M3P
table.insert(preset_players,
{
xo = "Lupus", --5th choice
faction = "Human Navy",
ship_name = "Harbinger",
ship_pref_1 = "PhobosM3P", --Lupus prefers warp
ship_pref_4 = "Atlantis", --Theta pref 1
ship_pref_2 = "Crucible",
ship_pref_3 = "Maverick",
}
)
table.insert(preset_players,
{
xo = "Daid",
faction = "Kraylor",
ship_name = "UltiShiptastic",
}
)
--4th ship spawned: Crucible
table.insert(preset_players,
{
xo = "Mo",
ship_name = "Shotgun",
faction = "Human Navy",
}
)
table.insert(preset_players,
{
xo = "Theta", --4th choice
faction = "Kraylor",
ship_name = "Prokop",
ship_pref_1 = "Crucible", --pref 2
ship_pref_2 = "Atlantis", --pref 1
ship_pref_3 = "Maverick",
ship_pref_4 = "Phobos M3P",
}
)
--5th ship spawned: Flavia P.Falcon
table.insert(preset_players,
{
xo = "Curly",
ship_name = "Jayhawk",
faction = "Human Navy",
}
)
table.insert(preset_players,
{
xo = "AJ",
ship_name = "Roc",
faction = "Kraylor",
}
)
--6th ship spawned: Repulse
table.insert(preset_players,
{
xo = "Shemp",
ship_name = "Lizard",
faction = "Human Navy",
}
)
table.insert(preset_players,
{
xo = "Hemmond",
faction = "Kraylor",
ship_name = "Sentinel",
}
)
--7th ship spawned: Player Missile Cr.
table.insert(preset_players,
{
xo = "Ted",
ship_name = "Cremator",
faction = "Human Navy",
}
)
table.insert(preset_players,
{
xo = "Hermann",
ship_name = "Charger",
faction = "Kraylor",
}
)
--]]
end
function setConstants()
player_wing_names = {
[2] = {
"Alpha","Red",
},
[4] = {
"Alpha", "Red",
"Bravo", "Blue",
},
[6] = {
"Alpha", "Red",
"Bravo", "Blue",
"Charlie", "Green",
},
[8] = {
"Alpha 1", "Red 1",
"Alpha 2", "Red 2",
"Bravo 1", "Blue 1",
"Bravo 2", "Blue 2",
},
[10] = {
"Alpha 1", "Red 1",
"Alpha 2", "Red 2",
"Bravo 1", "Blue 1",
"Bravo 2", "Blue 2",
"Charlie", "Green",
},
[12] = {
"Alpha 1", "Red 1",
"Alpha 2", "Red 2",
"Bravo 1", "Blue 1",
"Bravo 2", "Blue 2",
"Charlie 1", "Green 1",
"Charlie 2", "Green 2",
},
[14] = {
"Alpha 1", "Red 1",
"Alpha 2", "Red 2",
"Alpha 3", "Red 3",
"Bravo 1", "Blue 1",
"Bravo 2", "Blue 2",
"Charlie 1", "Green 1",
"Charlie 2", "Green 2",
},
[16] = {
"Alpha 1", "Red 1",
"Alpha 2", "Red 2",
"Alpha 3", "Red 3",
"Bravo 1", "Blue 1",
"Bravo 2", "Blue 2",
"Bravo 3", "Blue 3",
"Charlie 1", "Green 1",
"Charlie 2", "Green 2",
},
[18] = {
"Alpha 1", "Red 1",
"Alpha 2", "Red 2",
"Alpha 3", "Red 3",
"Bravo 1", "Blue 1",
"Bravo 2", "Blue 2",
"Bravo 3", "Blue 3",
"Charlie 1", "Green 1",
"Charlie 2", "Green 2",
"Charlie 3", "Green 3",
},
[20] = {
"Alpha 1", "Red 1",
"Alpha 2", "Red 2",
"Alpha 3", "Red 3",
"Bravo 1", "Blue 1",
"Bravo 2", "Blue 2",
"Bravo 3", "Blue 3",
"Charlie 1", "Green 1",
"Charlie 2", "Green 2",
"Delta 1", "Yellow 1",
"Delta 2", "Yellow 2",
},
[22] = {
"Alpha 1", "Red 1",
"Alpha 2", "Red 2",
"Alpha 3", "Red 3",
"Bravo 1", "Blue 1",
"Bravo 2", "Blue 2",
"Bravo 3", "Blue 3",
"Charlie 1", "Green 1",
"Charlie 2", "Green 2",
"Charlie 3", "Green 3",
"Delta 1", "Yellow 1",
"Delta 2", "Yellow 2",
},
[24] = {
"Alpha 1", "Red 1",
"Alpha 2", "Red 2",
"Alpha 3", "Red 3",
"Bravo 1", "Blue 1",
"Bravo 2", "Blue 2",
"Bravo 3", "Blue 3",
"Charlie 1", "Green 1",
"Charlie 2", "Green 2",
"Charlie 3", "Green 3",
"Delta 1", "Yellow 1",
"Delta 2", "Yellow 2",
"Delta 3", "Yellow 3",
},
[26] = {
"Alpha 1", "Red 1",
"Alpha 2", "Red 2",
"Alpha 3", "Red 3",
"Alpha 4", "Red 4",
"Bravo 1", "Blue 1",
"Bravo 2", "Blue 2",
"Bravo 3", "Blue 3",
"Charlie 1", "Green 1",
"Charlie 2", "Green 2",
"Charlie 3", "Green 3",
"Delta 1", "Yellow 1",
"Delta 2", "Yellow 2",
"Delta 3", "Yellow 3",
},
[28] = {
"Alpha 1", "Red 1",
"Alpha 2", "Red 2",
"Alpha 3", "Red 3",
"Alpha 4", "Red 4",
"Bravo 1", "Blue 1",
"Bravo 2", "Blue 2",
"Bravo 3", "Blue 3",
"Bravo 4", "Blue 4",
"Charlie 1", "Green 1",
"Charlie 2", "Green 2",
"Charlie 3", "Green 3",
"Delta 1", "Yellow 1",
"Delta 2", "Yellow 2",
"Delta 3", "Yellow 3",
},
[30] = {
"Alpha 1", "Red 1",
"Alpha 2", "Red 2",
"Alpha 3", "Red 3",
"Alpha 4", "Red 4",
"Bravo 1", "Blue 1",
"Bravo 2", "Blue 2",
"Bravo 3", "Blue 3",
"Bravo 4", "Blue 4",
"Charlie 1", "Green 1",
"Charlie 2", "Green 2",
"Charlie 3", "Green 3",
"Charlie 4", "Green 4",
"Delta 1", "Yellow 1",
"Delta 2", "Yellow 2",
"Delta 3", "Yellow 3",
},
[32] = {
"Alpha 1", "Red 1",
"Alpha 2", "Red 2",
"Alpha 3", "Red 3",
"Alpha 4", "Red 4",
"Bravo 1", "Blue 1",
"Bravo 2", "Blue 2",
"Bravo 3", "Blue 3",
"Bravo 4", "Blue 4",
"Charlie 1", "Green 1",
"Charlie 2", "Green 2",
"Charlie 3", "Green 3",
"Charlie 4", "Green 4",
"Delta 1", "Yellow 1",
"Delta 2", "Yellow 2",
"Delta 3", "Yellow 3",
"Delta 4", "Yellow 4",
},
}
player_ship_stats = {
["MP52 Hornet"] = { strength = 7, cargo = 3, distance = 100, long_range_radar = 18000, short_range_radar = 4000, probes = 10, },
["Piranha"] = { strength = 16, cargo = 8, distance = 200, long_range_radar = 25000, short_range_radar = 6000, probes = 15, },
["Flavia P.Falcon"] = { strength = 13, cargo = 15, distance = 200, long_range_radar = 40000, short_range_radar = 5000, probes = 27 , },
["Phobos M3P"] = { strength = 19, cargo = 10, distance = 200, long_range_radar = 25000, short_range_radar = 5000, probes = 15, },
["Atlantis"] = { strength = 52, cargo = 6, distance = 400, long_range_radar = 30000, short_range_radar = 5000, probes = 25, },
["Player Cruiser"] = { strength = 40, cargo = 6, distance = 400, long_range_radar = 30000, short_range_radar = 5000, probes = 22, },
["Player Missile Cr."] = { strength = 45, cargo = 8, distance = 200, long_range_radar = 35000, short_range_radar = 6000, probes = 26, },
["Player Fighter"] = { strength = 7, cargo = 3, distance = 100, long_range_radar = 15000, short_range_radar = 4500, probes = 11, },
["Benedict"] = { strength = 10, cargo = 9, distance = 400, long_range_radar = 30000, short_range_radar = 5000, probes = 20, },
["Kiriya"] = { strength = 10, cargo = 9, distance = 400, long_range_radar = 35000, short_range_radar = 5000, probes = 20, },
["Striker"] = { strength = 8, cargo = 4, distance = 200, long_range_radar = 35000, short_range_radar = 5000, probes = 17, },
["ZX-Lindworm"] = { strength = 8, cargo = 3, distance = 100, long_range_radar = 18000, short_range_radar = 5500, probes = 12, },
["Repulse"] = { strength = 14, cargo = 12, distance = 200, long_range_radar = 38000, short_range_radar = 5000, probes = 35, },
["Ender"] = { strength = 100, cargo = 20, distance = 2000,long_range_radar = 45000, short_range_radar = 7000, probes = 24, },
["Nautilus"] = { strength = 12, cargo = 7, distance = 200, long_range_radar = 22000, short_range_radar = 4000, probes = 23, },
["Hathcock"] = { strength = 30, cargo = 6, distance = 200, long_range_radar = 35000, short_range_radar = 6000, probes = 20, },
["Maverick"] = { strength = 45, cargo = 5, distance = 200, long_range_radar = 20000, short_range_radar = 4000, probes = 18, },
["Crucible"] = { strength = 45, cargo = 5, distance = 200, long_range_radar = 20000, short_range_radar = 6000, probes = 20, },
}
ship_template = { --ordered by relative strength
["Ktlitan Drone"] = {strength = 4, create = stockTemplate},
["MT52 Hornet"] = {strength = 5, create = stockTemplate},
["MU52 Hornet"] = {strength = 5, create = stockTemplate},
["Adder MK3"] = {strength = 5, create = stockTemplate},
["Adder MK4"] = {strength = 6, create = stockTemplate},
["Fighter"] = {strength = 6, create = stockTemplate},
["Ktlitan Fighter"] = {strength = 6, create = stockTemplate},
["Adder MK5"] = {strength = 7, create = stockTemplate},
["WX-Lindworm"] = {strength = 7, create = stockTemplate},
["Adder MK6"] = {strength = 8, create = stockTemplate},
["Ktlitan Scout"] = {strength = 8, create = stockTemplate},
["Adder MK7"] = {strength = 9, create = stockTemplate},
["Adder MK8"] = {strength = 10, create = stockTemplate},
["Adder MK9"] = {strength = 11, create = stockTemplate},
["Nirvana R3"] = {strength = 12, create = stockTemplate},
["Missile Cruiser"] = {strength = 14, create = stockTemplate},
["Phobos T3"] = {strength = 15, create = stockTemplate},
["Piranha F8"] = {strength = 15, create = stockTemplate},
["Piranha F12"] = {strength = 15, create = stockTemplate},
["Piranha F12.M"] = {strength = 16, create = stockTemplate},
["Phobos M3"] = {strength = 16, create = stockTemplate},
["Karnack"] = {strength = 17, create = stockTemplate},
["Gunship"] = {strength = 17, create = stockTemplate},
["Cruiser"] = {strength = 18, create = stockTemplate},
["Nirvana R5"] = {strength = 19, create = stockTemplate},
["Nirvana R5A"] = {strength = 20, create = stockTemplate},
["Adv. Gunship"] = {strength = 20, create = stockTemplate},
["Ktlitan Worker"] = {strength = 21, create = stockTemplate},
["Storm"] = {strength = 22, create = stockTemplate},
["Stalker R5"] = {strength = 22, create = stockTemplate},
["Stalker Q5"] = {strength = 22, create = stockTemplate},
["Ranus U"] = {strength = 25, create = stockTemplate},
["Stalker Q7"] = {strength = 25, create = stockTemplate},
["Stalker R7"] = {strength = 25, create = stockTemplate},
["Adv. Striker"] = {strength = 27, create = stockTemplate},
["Elara P2"] = {strength = 28, create = stockTemplate},
["Strikeship"] = {strength = 30, create = stockTemplate},
["Fiend G3"] = {strength = 33, create = stockTemplate},
["Fiend G4"] = {strength = 35, create = stockTemplate},
["Fiend G5"] = {strength = 37, create = stockTemplate},
["Fiend G6"] = {strength = 39, create = stockTemplate},
["Ktlitan Breaker"] = {strength = 45, create = stockTemplate},
["Ktlitan Feeder"] = {strength = 48, create = stockTemplate},
["Atlantis X23"] = {strength = 50, create = stockTemplate},
["Ktlitan Destroyer"] = {strength = 50, create = stockTemplate},
["Blockade Runner"] = {strength = 65, create = stockTemplate},
["Starhammer II"] = {strength = 70, create = stockTemplate},
["Dreadnought"] = {strength = 80, create = stockTemplate},
}
boundary_beam_string = {
"texture/beam_blue.png",
"texture/beam_purple.png",
"texture/beam_green.png"
}
health_check_time_interval = 5
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
missile_types = {'Homing', 'Nuke', 'Mine', 'EMP', 'HVLI'} -- am not sure why this has to be set but it was included so keeping it for now
end
function setGlobals()
timeDivision = "paused"
gameTimeLimit = 45*60 -- See GM button. Time limit for game; this is measured in real time seconds (example: 45*60 = 45 minutes)
hideFlagTime = 300 -- See GM button. Time given to hide flag; this is measured in real time seconds; (300 secs or 5 mins is the normal setting; 60 for certain tests)
maxGameTime = gameTimeLimit -- See GM Button.
-- intial player placement locations; note that these locations are intended to be generally consistent and independent of the environment option chosen
--player side Hum Kra Hum Kra Hum Kra Hum Kra Hum Kra Hum Kra Hum Kra Hum Kra Hum Kra Hum Kra Hum Kra Hum Kra Hum Kra Hum Kra Hum Kra Hum Kra
--player index 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
playerStartX = {-1000, 1000, -1000, 1000, -1000, 1000, -2000, 2000, -2000, 2000, -2000, 2000, -3000, 3000, -1000, 1000, -1000, 1000, -2000, 2000, -2000, 2000, -3000, 3000, -3000, 3000, -3000, 3000, -3000, 3000, -4000, 4000}
playerStartY = { 0, 0, -1000, 1000, 1000, -1000, 0, 0, 1000, -1000, -1000, 1000, 0, 0, -2000, 2000, 2000, -2000, -2000, 2000, 2000, -2000, -1000, 1000, 1000, -1000, -2000, 2000, 2000, -2000, 0, 0}
player_tag_relocate_x = {-1000, 1000, -1000, 1000, -1000, 1000, -2000, 2000, -2000, 2000, -2000, 2000, -3000, 3000, -1000, 1000, -1000, 1000, -2000, 2000, -2000, 2000, -3000, 3000, -3000, 3000, -3000, 3000, -3000, 3000, -4000, 4000} --may override in terrain section
player_tag_relocate_y = { 0, 0, -1000, 1000, 1000, -1000, 0, 0, 1000, -1000, -1000, 1000, 0, 0, -2000, 2000, 2000, -2000, -2000, 2000, 2000, -2000, -1000, 1000, 1000, -1000, -2000, 2000, 2000, -2000, 0, 0}
player_start_heading = { 270, 90, 270, 90, 270, 90, 270, 90, 270, 90, 270, 90, 270, 90, 270, 90, 270, 90, 270, 90, 270, 90, 270, 90, 270, 90, 270, 90, 270, 90, 270, 90} --set both heading and rotation to avoid initial rotation upon game start
player_start_rotation = { 180, 0, 180, 0, 180, 0, 180, 0, 180, 0, 180, 0, 180, 0, 180, 0, 180, 0, 180, 0, 180, 0, 180, 0, 180, 0, 180, 0, 180, 0, 180, 0} --rotation points 90 degrees counter-clockwise of heading
wingSquadronNames = false -- See GM button. Set to true to name ships alpha/bravo/charlie vs. red/blue/green etc.; set to false to use randomized names from a list
tagDamage = 1.25 -- See GM button. Amount to subtract from jump/warp drive when tagged. Full health = 1
tag_distance = 750 -- See GM button. How far away to be considered tagged and returned to other side
hard_flag_reveal = true -- See GM button. On hard difficulty, will a flag pick up be revealed on main screen or not
side_destroyed_ends_game = true -- See GM button. If one side completely destroyed, will game end immediately or not (if not, set game time remaining to 60 seconds)
autoEnemies = false -- See GM button. Boolean default value for whether or not marauders spawn
inter_wave = 600 -- See GM button. Number of seconds between marauding enemy spawn waves, if that option is chosen
wave_time = getScenarioTime() + inter_wave
dynamicTerrain = nil -- this is a placeholder variable that needs to be set to a function call in the terrain setup function; see below
-- Choose the environment terrain! Uncomment the terrain type you wish to use and comment out the other(s).
-- !! Be sure the setup function sets the value of 'dynamicTerrain' to the function that takes terrain action
--terrainType = emptyTerrain -- for easy/testing purposes
--terrainType = defaultTerrain
--terrainType = justPassingBy
terrainType = randomSymmetric
terrain_type_name = "Symmetric"
-- Drone related global variables
dronesAreAllowed = true -- See GM button. The base boolean to turn on/off drone usage within the scenarios
uniform_drone_carrying_capacity = 50 -- See GM button. This is the max number of drones that can be carried by a playership; for the initial implementations, all player ships will have equal capacity
drone_name_type = "squad-num of size" -- See GM button. Valid values are "default" (use EE), "squad-num/size" (K), "short" (X preferred), "squad-num of size" (X alternate)
drone_modified_from_template = true -- See GM button. Boolean governing whether drone properties will be modified from their original template values
drone_hull_strength = 25 -- See GM button. Original: 30 drones do not have shields and only have their hull strength for defense; reasonable values should be from 25-75; obviously the higher the stronger
drone_impulse_speed = 120 -- See GM button. Original: 120 drones only have impulse engines, and usually tend to be faster because they are lighter and no living pilots required; reasonable values should be from 100-150
drone_beam_range = 700 -- See Gm button. Original: 600 the distance at which the drone can hit its target; reasonable values should be from 500-1000
drone_beam_damage = 8 -- See Gm button. Original: 6 drones have a single forward facing beam weapon; this sets the damage done by the beam; reasonable values should be from 5-10
drone_beam_cycle_time = 5 -- See Gm button. Original: 4 this is the number of seconds it takes for the beam weapon to recharge and to be able to fire again; reasonable values should be from 3-8
drone_flag_check_interval = 5 -- See GM button. How many seconds between each drone flag detection cycle
drone_message_reset_count = 8 -- See GM button. How many flag check intervals to wait before sending another message about a possible flag being detected
drone_formation_spacing = 5000 -- See GM button. How far apart drones travel when in formation (1000 = 1 unit)
drone_scan_range_for_flags = 7500 -- See GM button. How far away drones can "see" potential flags. Standard sensor range (aka sensor bubble) is 5 units (5000)
revisedPlayerShipProbeCount = 20 -- See GM button. The standard count of 8 just is not quite enough for this game, so we need to have an easy way to modify; all player ships will have this amount at game start
control_code_stem = { --All control codes must use capital letters or they will not work.
"ALWAYS",
"ASTRO",
"BLACK",
"BLANK",
"BLUE",
"BRIGHT",
"BROWN",
"CHAIN",
"CHURCH",
"CORNER",
"DARK",
"DOORWAY",
"DOUBLE",
"DULL",
"ELBOW",
"EMPTY",
"EPSILON",
"FAST",
"FLOWER",
"FLY",
"FROZEN",
"GIG",
"GREEN",
"GLOW",
"HAND",
"HAMMER",
"INK",
"INTEL",
"JOUST",
"JUMP",
"KEY",
"KINDLE",
"LAP",
"LETTER",
"LIST",
"MORNING",
"NEXT",
"OPEN",
"ORANGE",
"OUTSIDE",
"PURPLE",
"QUARTER",
"QUIET",
"RED",
"SHINE",
"SIGMA",
"STAR",
"STREET",
"TOKEN",
"THIRSTY",
"UNDER",
"VANISH",
"WHITE",
"WRENCH",
"YELLOW",
}
p1FlagDrop = false
p2FlagDrop = false
health_check_time = getScenarioTime() + health_check_time_interval
terrain_objects = {}
humanStationList = {}
kraylorStationList = {}
neutralStationList = {}
stationList = {}
human_player_names = {}
kraylor_player_names = {}
all_squad_count = 0
human_flags = {}
kraylor_flags = {}
-- 'stationZebra' is placed at position 0,0 and is present for all environment setups
stationZebra = SpaceStation():setTemplate("Small Station"):setFaction("Independent"):setCommsScript(""):setCommsFunction(commsStation):setPosition(0,0):setCallSign("Zebra"):setDescription(_("scienceDescription-station", "Referee"))
table.insert(stationList,stationZebra)
-- the following are part of Xansta's larger overall bartering/crafting setup
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;
droneFleets = {}
boundary_marker = "buoys"
station_pool = nil
storage = getScriptStorage()
storage.gatherStats = gatherStats
end
function setVariations()
enemy_config = {
{name = "None", number = .5, auto = false, text = _("buttonGM","None")},
{name = "Easy", number = .5, auto = true, text = _("buttonGM","Easy")},
{name = "Normal", number = 1, auto = true, text = _("buttonGM","Normal")},
{name = "Hard", number = 2, auto = true, text = _("buttonGM","Hard")},
{name = "Extreme", number = 3, auto = true, text = _("buttonGM","Extreme")},
{name = "Quixotic", number = 5, auto = true, text = _("buttonGM","Quixotic")},
}
for i,config in ipairs(enemy_config) do
if config.name == getScenarioSetting("Enemies") then
enemy_config_selection = config
enemy_config_index = i
break
end
end
enemy_power = enemy_config_selection.number
enemy_power_text = enemy_config_selection.text
autoEnemies = enemy_config_selection.auto
local murphy_config = {
["Easy"] = {number = .5, adverse = .999, lose_coolant = .99999, gain_coolant = .005, text = _("buttonGM","easy"), },
["Normal"] = {number = 1, adverse = .995, lose_coolant = .99995, gain_coolant = .001, text = _("buttonGM","normal"), },
["Hard"] = {number = 2, adverse = .99, lose_coolant = .9999, gain_coolant = .0001, text = _("buttonGM","hard"), },
}
difficulty = murphy_config[getScenarioSetting("Murphy")].number
difficulty_text = murphy_config[getScenarioSetting("Murphy")].text
adverseEffect = murphy_config[getScenarioSetting("Murphy")].adverse --not used
coolant_loss = murphy_config[getScenarioSetting("Murphy")].lose_coolant --not used
coolant_gain = murphy_config[getScenarioSetting("Murphy")].gain_coolant --not used
-- difficulty impacts:
-- placing decoys (easy: no decoys)
-- enemy danger value
-- Easy: starts at .5, increments by .1
-- Normal: starts at .8, increments by .2
-- Hard: starts at 1, increments by .5
-- missile type availability
-- repair crew availability
-- flag is pre-scanned on easy difficulty
-- shape of radar signature on science edge (identical between flag and decoy on hard)
-- messages to Science from drones:
-- Easy: messages from all drones
-- Normal: messages from friendly drones
-- Hard: messages from drones launched from a player's ship
-- Note: these might be divided out in a future release
arena_config = {
{name = "Normal", boundary = 100000, text = _("buttonGM","medium")},
{name = "Small", boundary = 50000, text = _("buttonGM","small")},
{name = "Large", boundary = 200000, text = _("buttonGM","large")},
}
for i,config in ipairs(arena_config) do
if config.name == getScenarioSetting("Arena") then
arena_config_selection = config
arena_config_index = i
break
end
end
terrain_size = arena_config_selection.text
boundary = arena_config_selection.boundary
flag_scan_config = {
{name = "Normal", depth = math.random(2,3), complexity = 2, text = _("buttonGM","normal"), },
{name = "Easy", depth = 1, complexity = math.random(1,2), text = _("buttonGM","easy"), },
{name = "Hard", depth = math.random(1,3), complexity = math.random(3,4), text = _("buttonGM","hard"), },
}
for i,config in ipairs(flag_scan_config) do
if config.name == getScenarioSetting("Flag Scan") then
flag_scan_config_selection = config
flag_scan_config_index = i
break
end
end
flag_scan_config_text = flag_scan_config_selection.text
flagScanDepth = flag_scan_config_selection.depth
flagScanComplexity = flag_scan_config_selection.complexity
flag_tracking_config = {
{name = "Normal", drop = 1, grab = 1, rescan = false, reveal = true, text = _("buttonGM","normal"), },
{name = "Easy", drop = .5, grab = .5, rescan = false, reveal = true, text = _("buttonGM","easy"), },
{name = "Hard", drop = 2, grab = 2, rescan = true, reveal = true, text = _("buttonGM","hard"), },
{name = "Secret", drop = 2, grab = 2, rescan = true, reveal = false, text = _("buttonGM","secret"), },
}
for i,config in ipairs(flag_tracking_config) do
if config.name == getScenarioSetting("Tracking") then
tracking_config_selection = config
tracking_config_index = i
break
end
end
tracking_config_text = tracking_config_selection.text
flag_drop = tracking_config_selection.drop
flag_grab = tracking_config_selection.grab
flag_rescan = tracking_config_selection.rescan
flag_reveal = tracking_config_selection.reveal
terrain_choices = {
{name = "Empty", func = emptyTerrain, text = _("buttonGM","empty"), },
{name = "Asymmetric", func = defaultTerrain, text = _("buttonGM","default"), },
{name = "Passing", func = justPassingBy, text = _("buttonGM","passing"), },
{name = "Symmetric", func = randomSymmetric, text = _("buttonGM","symmetric"), },
{name = "Rabbit", func = downTheRabbitHole, text = _("buttonGM","rabbit"), },
}
for i,config in ipairs(terrain_choices) do
if config.name == getScenarioSetting("Terrain") then
terrain_selection = config
terrain_index = i
break
end
end
terrainType = terrain_selection.func
terrain_text = terrain_selection.text
end
------------------
-- GM Buttons --
------------------
function setGMButtons()
mainGMButtons = mainGMButtonsDuringPause
mainGMButtons()
end
function mainGMButtonsDuringPause()
clearGMFunctions()
addGMFunction(string.format(_("buttonGM", "Version %s"),scenario_version),function()
local version_message = string.format(_("msgGM", "Scenario version %s\n LUA version %s"),scenario_version,_VERSION)
addGMMessage(version_message)
print(version_message)
end)
local button_label = _("buttonGM", "Turn on Diagnostic")
if diagnostic then
button_label = _("buttonGM", "Turn off Diagnostic")
end
addGMFunction(button_label,function()
if diagnostic then
diagnostic = false
else
diagnostic = true
end
mainGMButtons()
end)
addGMFunction(string.format(_("buttonGM", "+Terrain: %s"),terrain_type_name),setTerrain)
addGMFunction(_("buttonGM", "+Player Config"),playerConfig)
if autoEnemies then
addGMFunction(string.format(_("buttonGM", "+Times G%i H%i E%i"),gameTimeLimit/60,hideFlagTime/60,inter_wave/60),setGameTimeLimit)
else
addGMFunction(string.format(_("buttonGM", "+Times G%i H%i"),gameTimeLimit/60,hideFlagTime/60),setGameTimeLimit)
end
addGMFunction(string.format(_("buttonGM","Enemies: %s ->Next"),enemy_power_text),function()
enemy_config_index = enemy_config_index + 1
if enemy_config_index > #enemy_config then
enemy_config_index = 1
end
enemy_config_selection = enemy_config[enemy_config_index]
enemy_power = enemy_config_selection.number
enemy_power_text = enemy_config_selection.text
autoEnemies = enemy_config_selection.auto
mainGMButtons()
end)
addGMFunction(string.format(_("buttonGM","Flag scan: %s ->Next"),flag_scan_config_text),function()
flag_scan_config_index = flag_scan_config_index + 1
if flag_scan_config_index > #flag_scan_config then
flag_scan_config_index = 1
end
flag_scan_config_selection = flag_scan_config[flag_scan_config_index]
flag_scan_config_text = flag_scan_config_selection.text
flagScanDepth = flag_scan_config_selection.depth
flagScanComplexity = flag_scan_config_selection.complexity
mainGMButtons()
end)
addGMFunction(string.format(_("buttonGM","Flag track: %s ->Next"),tracking_config_text),function()
tracking_config_index = tracking_config_index + 1
if tracking_config_index > #flag_tracking_config then
tracking_config_index = 1
end
tracking_config_selection = flag_tracking_config[tracking_config_index]
tracking_config_text = tracking_config_selection.text
flag_drop = tracking_config_selection.drop
flag_grab = tracking_config_selection.grab
flag_rescan = tracking_config_selection.rescan
flag_reveal = tracking_config_selection.reveal
mainGMButtons()
end)
button_label = _("buttonGM", "Destroy = end off")
if side_destroyed_ends_game then
button_label = _("buttonGM", "Destroy = end on")
end
addGMFunction(button_label,function()
if side_destroyed_ends_game then
side_destroyed_ends_game = false
else
side_destroyed_ends_game = true
end
mainGMButtons()
end)
addGMFunction(string.format(_("buttonGM", "Marker: %s ->Next"),boundary_marker),function()
if boundary_marker == "stars" then
boundary_marker = "buoys"
elseif boundary_marker == "buoys" then
boundary_marker = "none"
elseif boundary_marker == "none" then
boundary_marker = "stars"
end
plotTeamDemarcationLine()
plotFlagPlacementBoundaries()
mainGMButtons()
end)
if preset_players ~= nil and #preset_players > 0 then
addGMFunction(_("buttonGM", "Player Prefs"),function()
local out_message = _("msgGM", "Remaining player preferences:")
print(out_message)
for i=1,#preset_players do
local item = preset_players[i]
local out = string.format(_("msgGM", "XO:%s"),item.xo)
print(out)
out_message = out_message .. _("msgGM", "\n") .. out
if item.faction ~= nil then
out = string.format(_("msgGM", " Faction:%s"),item.faction)
print(out)
out_message = out_message .. _("msgGM", "\n") .. out
end
if item.ship_name ~= nil then
out = string.format(_("msgGM", " Ship name:%s"),item.ship_name)
print(out)
out_message = out_message .. _("msgGM", "\n") .. out
end
if item.ship_pref_1 ~= nil then
out = string.format(_("msgGM", " Ship preference 1:%s"),item.ship_pref_1)
print(out)
out_message = out_message .. _("msgGM", "\n") .. out
end
if item.ship_pref_2 ~= nil then
out = string.format(_("msgGM", " Ship preference 2:%s"),item.ship_pref_2)
print(out)
out_message = out_message .. _("msgGM", "\n") .. out
end
if item.ship_pref_3 ~= nil then
out = string.format(_("msgGM", " Ship preference 3:%s"),item.ship_pref_3)
print(out)
out_message = out_message .. _("msgGM", "\n") .. out
end
if item.ship_pref_4 ~= nil then
out = string.format(_("msgGM", " Ship preference 4:%s"),item.ship_pref_4)
print(out)
out_message = out_message .. _("msgGM", "\n") .. out
end
if item.ship_pref_5 ~= nil then
out = string.format(_("msgGM", " Ship preference 5:%s"),item.ship_pref_5)
print(out)
out_message = out_message .. _("msgGM", "\n") .. out
end
if item.ship_pref_6 ~= nil then
out = string.format(_("msgGM", " Ship preference 6:%s"),item.ship_pref_6)
print(out)
out_message = out_message .. _("msgGM", "\n") .. out
end
end
addGMMessage(out_message)
end)
end