/
Randomizer.txt
1728 lines (1679 loc) · 74 KB
/
Randomizer.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
--[[
This is the big script, the one that does everything
It's in every world but A and B messenger
It generates the full random sigil/portal configuration
This is the oldest script in the whole project, there'll be stuff
that looks weird
]]--
--[[
The normal print function doesn't output to console in game,
only in the editor
The con__F() functions don't print a newline, and only accept
one argument, so these are just some nice wrappers
]]--
local function print(...)
local out = ""
for i=1,arg.n do
out = out .. tostring(arg[i]) .. " "
end
out = string.sub(out, 1, -2) .. "\n"
conInfoF(out)
end
local function printWarning(...)
local out = ""
for i=1,arg.n do
out = out .. tostring(arg[i]) .. " "
end
out = string.sub(out, 1, -2) .. "\n"
conWarningF(out)
end
local function printError(...)
local out = ""
for i=1,arg.n do
out = out .. tostring(arg[i]) .. " "
end
out = string.sub(out, 1, -2) .. "\n"
conErrorF(out)
end
-- Make them accessable to other scripts
worldGlobals.print = print
worldGlobals.printWarning = printWarning
worldGlobals.printError = printError
print("Loaded Randomizer v12.0.0")
-- talosProgress : CTalosProgress
local talosProgress = nexGetTalosProgress(worldInfo)
local PROB_BOTH_HUBS = 25
--[[
Debug mode is kind of hidden, you need to use a command to activate it,
but everything tends to work now so it doesn't need a switch
]]--
local DEBUG = talosProgress:IsVarSet("Randomizer_Debug")
-- Where the magic happens
if not talosProgress:IsVarSet("Randomizer_Generated") then
print("Randomizing...")
-- We have to store this as a number, so converted it for readability
local randomization_mode = talosProgress:GetCodeValue("Randomizer_Mode")
if randomization_mode == -1 then
randomization_mode = 1
talosProgress:SetVarValue("Randomizer_Mode", 1)
end
local modes = {"None", "Default", "60fps", "Fully Random", "Intended", "Hardmode", "60FPS Hardmode"}
randomization_mode = modes[randomization_mode + 1]
print("Using randomization mode: ".. randomization_mode)
local seed = talosProgress:GetCodeValue("Randomizer_Seed")
if seed == -1 then
seed = mthRndRangeL(0, 2147483647)
talosProgress:SetCode("Randomizer_Seed", seed)
end
print("Using Seed", seed)
--[[
Linear congruential generator using Microsoft VC++ seeds
Unlike the built-in, we can seed this
Gives intergers from min to max inclusive
Thanks Darkid :)
]]--
local function rand(min, max)
seed = (214013 * seed + 2531011) % 2147483648
if min == max then return min end
return (seed % (max - (min - 1))) + min
end
-- Set the few things that are normally random based on seed
talosProgress:SetVarValue("PaintItemSeed", rand(0, 8909478))
talosProgress:SetVarValue("Code_Floor4", rand(1, 999))
talosProgress:SetVarValue("Code_Floor5", rand(1, 999))
local codeF6 = 0
for i=1,3 do
local digit = rand(4, 9) -- Yes this is right
talosProgress:SetVarValue("Code_Floor6" .. tostring(i), digit)
-- This line means you can guess the code without visiting each world
talosProgress:SetVar("Code_Floor6DigitSeen" .. tostring(i))
codeF6 = codeF6*10 + digit
end
talosProgress:SetVarValue("Code_Floor6", codeF6)
-- Again we can only save numbers, so this is how tetros are ordered
local tetroIndexes = {
["**1"] = 1, ["**2"] = 2, ["**3"] = 3, ["**4"] = 4, ["**5"] = 5,
["**6"] = 6, ["**7"] = 7, ["**8"] = 8, ["**9"] = 9, ["**10"]= 10,
["**11"]= 11, ["**12"]= 12, ["**13"]= 13, ["**14"]= 14, ["**15"]= 15,
["**16"]= 16, ["**17"]= 17, ["**18"]= 18, ["**19"]= 19, ["**20"]= 20,
["**21"]= 21, ["**22"]= 22, ["**23"]= 23, ["**24"]= 24, ["**25"]= 25,
["**26"]= 26, ["**27"]= 27, ["**28"]= 28, ["**29"]= 29, ["**30"]= 30,
["DI1"] = 31, ["DI2"] = 32, ["DJ1"] = 33, ["DJ2"] = 34, ["DJ3"] = 35,
["DJ4"] = 36, ["DJ5"] = 37, ["DL1"] = 38, ["DL2"] = 39, ["DL3"] = 40,
["DT1"] = 41, ["DT2"] = 42, ["DT3"] = 43, ["DT4"] = 44, ["DZ1"] = 45,
["DZ2"] = 46, ["DZ3"] = 47, ["DZ4"] = 48, ["EL1"] = 49, ["EL2"] = 50,
["EL3"] = 51, ["EL4"] = 52, ["EO1"] = 53, ["ES1"] = 54, ["ES2"] = 55,
["ES3"] = 56, ["ES4"] = 57, ["MI1"] = 58, ["MJ1"] = 59, ["ML1"] = 60,
["ML2"] = 61, ["ML3"] = 62, ["ML4"] = 63, ["MO1"] = 64, ["MS1"] = 65,
["MS2"] = 66, ["MT1"] = 67, ["MT2"] = 68, ["MT3"] = 69, ["MT4"] = 70,
["MT5"] = 71, ["MT6"] = 72, ["MT7"] = 73, ["MT8"] = 74, ["MT9"] = 75,
["MT10"]= 76, ["MZ1"] = 77, ["MZ2"] = 78, ["MZ3"] = 79, ["MZ4"] = 80,
["NI1"] = 81, ["NI2"] = 82, ["NI3"] = 83, ["NI4"] = 84, ["NI5"] = 85,
["NI6"] = 86, ["NJ1"] = 87, ["NJ2"] = 88, ["NJ3"] = 89, ["NJ4"] = 90,
["NL1"] = 91, ["NL2"] = 92, ["NL3"] = 93, ["NL4"] = 94, ["NL5"] = 95,
["NL6"] = 96, ["NL7"] = 97, ["NL8"] = 98, ["NL9"] = 99, ["NL10"]=100,
["NO1"] =101, ["NO2"] =102, ["NO3"] =103, ["NO4"] =104, ["NO5"] =105,
["NO6"] =106, ["NO7"] =107, ["NS1"] =108, ["NS2"] =109, ["NS3"] =110,
["NS4"] =111, ["NT1"] =112, ["NT2"] =113, ["NT3"] =114, ["NT4"] =115,
["NT5"] =116, ["NT6"] =117, ["NT7"] =118, ["NT8"] =119, ["NT9"] =120,
["NT10"]=121, ["NT11"]=122, ["NT12"]=123, ["NZ1"] =124, ["NZ2"] =125,
["NZ3"] =126, ["NZ4"] =127, ["NZ5"] =128, ["NZ6"] =129
}
--[[
More readable names than just the marker names we save them as
The sigil names are the same as in MarkerNames.txt, with the
world name as a prefix
"[World] Star" it has been changed to "[World]-Star"
"CM-Star", "F0-Star", and "F3-Star" are the only other exceptions
]]--
local translate = {
["A1-PaSL"] = "005_SPM_000_PM_009", ["A1-Beaten Path"] = "107_SPM_000_PM_007", ["A1-Outnumbered"] = "006_SPM_000_PM_003", ["A1-OtToU"] = "011_SPM_000_PM_009", ["A1-ASooR"] = "007_SPM_000_PM_006", ["A1-Trio"] = "012_SPM_000_PM_004", ["A1-Peephole"] = "001_SPM_000_PM_005", ["A1-Star"] = "Cloud_1_02_SRT_SPM_000_PM_016",
["A2-Guards"] = "008_SPM_000_PM_016", ["A2-Hall of Windows"] = "001a_SPM_000_PM_008", ["A2-Suicide Mission"] = "013_SPM_000_PM_006", ["A2-Star"] = "Cloud_1_02_SRT_SPM_001_PM_003",
["A3-Stashed for Later"] = "108_SPM_000_PM_012", ["A3-ABTU"] = "015_SRT_SPM_000_PM_018", ["A3-ABTU Star"] = "015_SRT_SPM_000_PM_017", ["A3-Swallowed the Key"] = "020_SPM_000_PM_014", ["A3-AEP"] = "017_SPM_000_PM_023", ["A3-Clock Star"] = "Cloud_1_03_SRT_SPM_000_PM_005",
["A4-Branch it Out"] = "202c_SPM_000_PM_003", ["A4-Above All That"] = "202f_SPM_000_PM_003", ["A4-Push it Further"] = "202b_SPM_000_PM_004", ["A4-Star"] = "Cloud_1_04_SRT_SPM_000_PM_007", ["A4-DCtS"] = "202d_SPM_000_PM_002",
["A5-Two Boxes"] = "201_SPM_000_PM_013", ["A5-Two Boxes Star"] = "201_SRT_SPM_000_PM_004", ["A5-YKYMCTS"] = "204_SPM_000_PM_004", ["A5-Over the Fence"] = "202e_SPM_000_PM_004", ["A5-OLB"] = "207_SPM_000_PM_005", ["A5-FC"] = "244_SPM_000_PM_008", ["A5-FC Star"] = "244_SRT_SPM_000_PM_006",
["A6-Mobile Mindfield"] = "111_SPM_000_PM_012", ["A6-Deception"] = "210_SPM_000_PM_015", ["A6-Door too Far"] = "218_SPM_000_PM_016", ["A6-Bichromatic"] = "303_SPM_000_PM_010", ["A6-Star"] = "Cloud_1_06_SRT_SPM_000_PM_007",
["A7-LFI"] = "212_SPM_000_PM_017", ["A7-Trapped Inside"] = "305_SPM_000_PM_004", ["A7-Two Buzzers"] = "209_SPM_000_PM_012", ["A7-Star"] = "Cloud_1_07_SRT_SPM_000_PM_021", ["A7-WiaL"] = "220_SPM_000_PM_032", ["A7-Pinhole"] = "211_SPM_000_PM_008",
["A*-JfW"] = "119_SRT_SPM_000_PM_033", ["A*-Nervewrecker"] = "117_SRT_SPM_000_PM_028", ["A*-DDM"] = "115_SRT_TAM_004_PM_016",
["B1-WtaD"] = "203_SPM_000_PM_011", ["B1-Third Wheel"] = "302_SPM_000_PM_008", ["B1-Over the Fence"] = "316_SPM_000_PM_014", ["B1-RoD"] = "319_SPM_000_PM_008", ["B1-SaaS"] = "205_SPM_000_PM_003", ["B1-Star"] = "Cloud_2_01_SRT_SPM_000_PM_004",
["B2-Tomb"] = "213_SPM_000_PM_010", ["B2-Star"] = "Cloud_2_02_SRT_SPM_000_PM_039", ["B2-MotM"] = "221_SPM_002_PM_001", ["B2-Moonshot"] = "223_SPM_000_PM_009", ["B2-Higher Ground"] = "120_SPM_000_PM_029",
["B3-Blown Away"] = "300a_SPM_000_PM_007", ["B3-Star"] = "Cloud_2_03_SRT_SPM_002_PM_013", ["B3-Sunshot"] = "222_SPM_004_PM_001", ["B3-Eagle's Nest"] = "401_SPM_004_PM_008", ["B3-Woosh"] = "409_SPM_000_PM_024",
["B4-Self Help"] = "322_SPM_000_PM_008", ["B4-Double-Plate"] = "321_SPM_000_PM_005", ["B4-TRA"] = "215_SPM_000_PM_013", ["B4-TRA Star"] = "Cloud_2_04_SRT_SPM_000_PM_017", ["B4-RPS"] = "407_SPM_000_PM_018", ["B4-ABUH"] = "310_SPM_000_PM_024", ["B4-WAtC"] = "414_SPM_000_PM_007", ["B4-Sphinx Star"] = "Cloud_2_04_SRT_SPM_002_PM_002",
["B5-SES"] = "314_SPM_000_PM_012", ["B5-Plates"] = "238_SPM_000_PM_018", ["B5-Two Jammers"] = "239_SPM_000_PM_018", ["B5-Iron Curtain"] = "311_SPM_000_PM_041", ["B5-Chambers"] = "315_TAM_002_PM_001", ["B5-Obelisk Star"] = "Cloud_2_05_SRT_TAM_003_PM_003",
["B6-Crisscross"] = "208_SPM_000_PM_014", ["B6-JDaW"] = "206_SPM_000_PM_021", ["B6-Egyptian Arcade"] = "113_SPM_000_PM_036",
["B7-AFaF"] = "224_SRT_SPM_000_PM_071", ["B7-WLJ"] = "118_SPM_000_PM_062", ["B7-BSbS"] = "301_SPM_000_PM_010", ["B7-BSbS Star"] = "224_SRT_SPM_000_PM_091", ["B7-BLoM"] = "402_SPM_000_PM_020", ["B7-Star"] = "Cloud_2_07_SRT_TAM_001_PM_004",
["B*-Merry Go Round"] = "214_SRT_SPM_000_PM_025", ["B*-Cat's Cradle"] = "306_SRT_SPM_000_PM_016", ["B*-Peekaboo"] = "411_SRT_SPM_000_PM_014",
["C1-Conservatory"] = "219_SPM_000_PM_008", ["C1-MIA"] = "416_SPM_000_PM_026", ["C1-Labyrinth"] = "114_SPM_000_PM_032", ["C1-Blowback"] = "312_SPM_000_PM_032", ["C1-Star"] = "Cloud_3_01_SRT_SPM_000_PM_017",
["C2-ADaaF"] = "403_SPM_000_PM_015", ["C2-Star"] = "Cloud_3_02_SRT_TAM_001", ["C2-Rapunzel"] = "417_SPM_000_PM_029", ["C2-Cemetery"] = "217_SPM_000_PM_040", ["C2-Short Wall"] = "418_SPM_000_PM_014",
["C3-Three Connectors"] = "225_SPM_000_PM_044", ["C3-Jammer Quarantine"] = "317_SPM_000_PM_024", ["C3-BSLS"] = "229_SPM_000_PM_070", ["C3-Weathertop"] = "318_SPM_000_PM_026", ["C3-Star"] = "Cloud_3_03_SRT_SPM_000_PM_069",
["C4-Armory"] = "313_SPM_000_PM_016", ["C4-Oubliette"] = "405_SRT_SPM_000_PM_050", ["C4-Oubliette Star"] = "405_SRT_SPM_000_PM_047", ["C4-Stables"] = "216_SPM_000_PM_015", ["C4-Throne Room"] = "408_SPM_000_PM_033", ["C4-Throne Room Star"] = "408_SRT_SPM_000_PM_034",
["C5-Time Flies"] = "328_SPM_000_PM_016", ["C5-Time Flies Star"] = "Cloud_3_05_SRT_SPM_003_PM_012", ["C5-Time Crawls"] = "232_SPM_000_PM_012", ["C5-Dumbwaiter"] = "309_SPM_000_PM_018", ["C5-Dumbwaiter Star"] = "Cloud_3_05_SRT_SPM_002_PM_016", ["C5-UCaJ"] = "404_SPM_000_PM_022", ["C5-UCAJ Star"] = "Cloud_3_05_SRT_SPM_000_PM_035",
["C6-Seven Doors"] = "234_SPM_000_PM_015", ["C6-Star"] = "Cloud_3_06_SRT_SPM_000_PM_008", ["C6-Circumlocution"] = "226_SPM_000_PM_039", ["C6-Two Way Street"] = "112_SPM_000_PM_034",
["C7-Carrier Pigeons"] = "230_SPM_000_PM_019", ["C7-DMS"] = "308_SPM_000_PM_017", ["C7-Star"] = "Cloud_3_07_SRT_SPM_000_PM_021", ["C7-Prison Break"] = "227_SPM_002_PM_033", ["C7-Crisscross"] = "233_SPM_000_PM_015",
["C*-Unreachable Garden"] = "235_SRT_SPM_000_PM_037", ["C*-Nexus"] = "320_SRT_SPM_000_PM_046", ["C*-Cobweb"] = "504_SRT_SPM_000_PM_021",
["CM-Star"] = "Islands_01_SRT_SPM_000_PM_003", ["F0-Star"] = "Secret_28_SRT_SPM_000_PM_004", ["F3-Star"] = "LeapOfFaith_PM_010"
}
--[[
The sigils are ordered here according to the numbering of sigil
from earlier and the levels those sigils are normally in
The first item in this list corosponds with the sigil with id 1,
"**1" or ABTU Star
]]--
local markers = {
"A3-ABTU Star", "A2-Star", "A3-Clock Star", "A4-Star", "A1-Star",
"A5-FC Star", "A5-Two Boxes Star", "A6-Star", "A7-Star", "B1-Star",
"B2-Star", "B3-Star", "B4-TRA Star", "B5-Obelisk Star", "B7-Star",
"B7-BSbS Star", "C1-Star", "C2-Star", "C3-Star", "C4-Oubliette Star",
"C4-Throne Room Star", "C5-Dumbwaiter Star", "C5-Time Flies Star", "B4-Sphinx Star", "F3-Star",
"CM-Star", "C5-UCAJ Star", "F0-Star", "C6-Star", "C7-Star",
"A1-PaSL", "A5-Two Boxes", "A1-Beaten Path", "A1-Outnumbered", "A1-OtToU",
"B4-Self Help", "B5-SES", "A2-Guards", "A5-YKYMCTS", "A7-LFI",
"A5-Over the Fence", "A5-OLB", "A7-Trapped Inside", "B4-Double-Plate", "A1-ASooR",
"A2-Hall of Windows", "A3-Stashed for Later", "A6-Mobile Mindfield", "A*-JfW", "B*-Merry Go Round",
"B*-Peekaboo", "C*-Unreachable Garden", "C*-Nexus", "A*-Nervewrecker", "B*-Cat's Cradle",
"A*-DDM", "C*-Cobweb", "B7-BSbS", "B3-Blown Away", "A1-Trio",
"A2-Suicide Mission", "B1-WtaD", "B6-Crisscross", "B7-BLoM", "B1-Third Wheel",
"B2-Tomb", "A1-Peephole", "A3-ABTU", "A3-Swallowed the Key", "A4-Branch it Out",
"A4-Above All That", "B1-Over the Fence", "B1-RoD", "B2-MotM", "B3-Sunshot",
"B6-JDaW", "A4-Push it Further", "A4-DCtS", "B1-SaaS", "B2-Moonshot",
"B5-Plates", "B6-Egyptian Arcade", "B7-AFaF", "C1-Conservatory", "C4-Armory",
"C5-Time Flies", "B7-WLJ", "C1-MIA", "C3-Jammer Quarantine", "C6-Circumlocution",
"A3-AEP", "A6-Deception", "A6-Door too Far", "A7-Two Buzzers", "B2-Higher Ground",
"B3-Eagle's Nest", "B4-ABUH", "B4-WAtC", "B5-Two Jammers", "C7-DMS",
"A7-WiaL", "C2-ADaaF", "C3-Three Connectors", "C5-Time Crawls", "C5-Dumbwaiter",
"C6-Seven Doors", "C7-Carrier Pigeons", "B5-Iron Curtain", "C2-Rapunzel", "C4-Oubliette",
"C6-Two Way Street", "A7-Pinhole", "B3-Woosh", "B4-TRA", "B4-RPS",
"C1-Labyrinth", "C2-Cemetery", "C3-BSLS", "C4-Stables", "C4-Throne Room",
"C5-UCaJ", "C7-Prison Break", "C7-Crisscross", "A5-FC", "A6-Bichromatic",
"B5-Chambers", "C1-Blowback", "C2-Short Wall", "C3-Weathertop"
}
--[[
This list has two purposes:
1. Hold the sigils for each arranger
2. Let the marker unlocking that happens later check what's unlocked
#2 is the reason for the weird name
]]--
local locked = {
["A1 Gate"] = {}, -- All the greens get set later, as we need to
["A Gate"] = {}, -- lock parts of them to make sure you can't
["B Gate"] = {}, -- enter the wrong hub and softlock, but which
["C Gate"] = {}, -- parts depends on the starting hub
["A Star"] = {"**1", "**2", "**3", "**4", "**5", "**6", "**7", "**8", "**9", "**10"},
["B Star"] = {"**11", "**12", "**13", "**14", "**15", "**16", "**17", "**18", "**19", "**20"},
["C Star"] = {"**21", "**22", "**23", "**24", "**25", "**26", "**27", "**28", "**29", "**30"},
["Connector"] = {"ML1", "MT1", "MT2"},
["Cube"] = {"ML2", "MT3", "MT4", "MZ1"},
["Fan"] = {"ML3", "MS1", "MT5", "MT6", "MZ2"},
["Recorder"] = {"MJ1", "MS2", "MT7", "MT8", "MZ3"},
["Platform"] = {"MI1", "ML4", "MO1", "MT9", "MT10", "MZ4"},
["F1"] = {"NL1", "NL2", "NZ1", "NZ2"},
["F2"] = {"NL3", "NL4", "NL5", "NL6", "NO1", "NT1", "NT2", "NT3", "NT4"},
["F3"] = {"NI1", "NI2", "NI3", "NI4", "NJ1", "NJ2", "NL7", "NL8", "NS1", "NZ3"},
["F4"] = {"NJ3", "NL9", "NO2", "NO3", "NS2", "NS3", "NT5", "NT6", "NT7", "NT8", "NZ4", "NZ5"},
["F5"] = {"NI5", "NI6", "NJ4", "NL10", "NO4", "NO5", "NO6", "NO7", "NS4", "NT9", "NT10", "NT11", "NT12", "NZ6"},
["F6"] = {"EL1", "EL2", "EL3", "EL4", "EO1", "ES1", "ES2", "ES3", "ES4"}
}
-- Make sure some vars that default to 0 are set, so everything works from a clearTalosProgress()
if not talosProgress:IsVarSet("Randomizer_Loop") then
talosProgress:SetVarValue("Randomizer_Loop", 0)
end
if not talosProgress:IsVarSet("Randomizer_Moody") then
talosProgress:SetVarValue("Randomizer_Moody", 0)
end
-- If scavenger hunt mode is on decide what ending we're doing
local scavenger = talosProgress:GetCodeValue("Randomizer_Scavenger")
local scavengerMode = ""
if scavenger == -1 then
scavenger = 0
talosProgress:SetVarValue("Randomizer_Scavenger", 0)
end
if scavenger then
local sModes = {"Connector Clip", "F2 Clip", "F3 Clip"}
--[[
This one's no fun in short, you either need to hope for multiple
star worlds in first hub or spend forever guessing the code
]]--
if scavenger == 2 then
table.insert(sModes, "F1+F6")
end
scavengerMode = rand(1, #sModes)
-- The only one you can actually do intended
if randomization_mode == "Intended" then
scavengerMode = 4
end
talosProgress:SetVarValue("Randomizer_ScavengerMode", scavengerMode)
scavengerMode = sModes[scavengerMode]
if DEBUG then
print("Using scavenger hunt mode: " .. scavengerMode)
end
end
--[[
Randomize Portals
If the option is off all portals will be put in their normal
spots, but we still need to set everything up so that we unlock
markers properly
]]--
local portalOrder = {
"A1", "A2", "A3", "A4", "A5", "A6", "A7", "A8", "ADevIsland",
"B1", "B2", "B3", "B4", "B5", "B6", "B7", "B8",
"C1", "C2", "C3", "C4", "C5", "C6", "C7", "C8", "CMessenger"
}
-- We need a copy of this list in the right order, hard-coding it is quicker
local portalIndexes = {
"A1", "A2", "A3", "A4", "A5", "A6", "A7", "A8", "ADevIsland",
"B1", "B2", "B3", "B4", "B5", "B6", "B7", "B8",
"C1", "C2", "C3", "C4", "C5", "C6", "C7", "C8", "CMessenger"
}
local startHub = "A"
local loop = talosProgress:GetCodeValue("Randomizer_Loop")
local portals = talosProgress:IsVarSet("Randomizer_Portals")
if loop ~= 0 then
if DEBUG then
print("Möbius mode is on")
end
if portals then
-- TODO: double check Sattolo's algorithm works
for index=2, #portalOrder do
local otherIndex = rand(1, index - 1)
portalOrder[index], portalOrder[otherIndex] = portalOrder[otherIndex], portalOrder[index]
end
else
table.remove(portalOrder)
table.insert(portalOrder, 1, "CMessenger")
end
elseif portals then
if DEBUG then
print("Randomizing portal locations")
end
-- We'll leave A1 alone for now because it has a few extra requirements
for index=#portalOrder, 2, -1 do
local otherIndex = rand(2, index)
portalOrder[index], portalOrder[otherIndex] = portalOrder[otherIndex], portalOrder[index]
end
--[[
A1 can't be Star worlds or C Messenger, you spawn behind a
gate/wodden barrier upon leaving
These are spots 8, 17, 25, and 26
]]--
local index = rand(1, 22)
--[[
Intended kind of breaks if you spawn outside of A, there's
just not enough space to put all the sigils
Short scavenger limits you to one hub so it just kind of
sucks making you walk to another to get items
]]--
if randomization_mode == "Intended" or scavenger == 1 then
index = rand(1, 8)
end
if index < 8 then
startHub = "A"
elseif index == 8 then
index = 9
startHub = "A"
elseif 9 <= index and index < 16 then
index = index + 1
startHub = "B"
elseif 16 <= index then
index = index + 2
startHub = "C"
end
if DEBUG then
print("Starting in " .. startHub)
end
portalOrder[1], portalOrder[index] = portalOrder[index], portalOrder[1]
end
--[[
Based on the portal configuration we need to make some more lists
to help us unlock worlds properly
]]--
local open = {}
local WorldANames = {}
local WorldBNames = {}
local WorldCNames = {}
for index=1, #portalOrder do
local name = portalOrder[index]
if DEBUG and portals then
if loop ~= 0 then
printWarning(string.format("Portal leaving %s is %s", name, portalIndexes[index]))
else
printWarning(string.format("Portal marker %s is %s", portalIndexes[index], name))
end
end
talosProgress:SetVarValue(name, index)
-- These lists help us avoid instantly clogging the marker list
local placedName = portalIndexes[index]
if string.sub(placedName, 1, 1) == "A" then
WorldANames[name] = true
elseif string.sub(placedName, 1, 1) == "B" then
WorldBNames[name] = true
elseif string.sub(placedName, 1, 1) == "C" then
WorldCNames[name] = true
end
end
--[[
Check if a world is accessible
This does not necessarily mean a set of markers will unlock
]]--
local function isWorldOpen(world)
if world == "A1" then return true end
-- An empty list still evaluates to true
if randomization_mode == "Intended" and locked["A1 Gate"] then return false end
if (scavenger + loop) ~= 0 then return true end
local starOverride = true
local num = talosProgress:GetCodeValue(world)
-- Is this a star world?
if num == 8 or num == 17 or num == 25 then
starOverride = not (locked["A Star"] or locked["B Star"] or locked["C Star"])
end
return starOverride and open[world]
end
--[[
These lists create the softlock prevention
Because we use arbitray functions we can add modes with arbitray
restrictions just by making new lists
The list entries are formatted as follows:
{function() [if to unlock], {"list", "of, "markers"}, "world"},
If no world is given OR the world is not recognised it will
always be checked, otherwise we can save some iterations and
add it later, when it's actually unlocked
]]--
if randomization_mode == "Default" then
markers = {
{function() return isWorldOpen("A1") end, {
"A1-Peephole", "A1-PaSL", "A1-Outnumbered", "A1-ASooR",
"A1-OtToU", "A1-Trio", "A1-Beaten Path", "A1-Star"
}},
{function() return isWorldOpen("A2") end, {
"A2-Hall of Windows", "A2-Guards", "A2-Suicide Mission", "A2-Star"
}, "A2"},
{function() return isWorldOpen("A3") end, {
"A3-ABTU Star", "A3-ABTU", "A3-AEP", "A3-Swallowed the Key",
"A3-Stashed for Later", "A3-Clock Star"
}, "A3"},
{function() return isWorldOpen("A4") end, {
"A4-Push it Further", "A4-Branch it Out", "A4-Above All That", "A4-Star"
}, "A4"},
{function() return isWorldOpen("A4") and not locked["Connector"] end, {
"A4-DCtS"
}, "A4"},
{function() return isWorldOpen("A5") end, {
"A5-Two Boxes", "A5-Two Boxes Star", "A5-Over the Fence", "A5-YKYMCTS",
"A5-OLB", "A5-FC", "A5-FC Star",
}, "A5"},
{function() return isWorldOpen("A6") end, {
"A6-Mobile Mindfield", "A6-Deception", "A6-Door too Far", "A6-Bichromatic",
"A6-Star"
}, "A6"},
{function() return isWorldOpen("A7") end, {
"A7-Two Buzzers", "A7-Pinhole", "A7-LFI", "A7-WiaL",
"A7-Trapped Inside", "A7-Star"
}, "A7"},
{function() return isWorldOpen("A8") end, {
"A*-DDM", "A*-Nervewrecker", "A*-JfW"
}, "A8"},
{function() return isWorldOpen("B1") end, {
"B1-SaaS", "B1-WtaD", "B1-Third Wheel", "B1-Over the Fence",
"B1-RoD", "B1-Star"
}, "B1"},
{function() return isWorldOpen("B2") end, {
"B2-Higher Ground", "B2-Tomb", "B2-MotM", "B2-Moonshot",
"B2-Star"
}, "B2"},
{function() return isWorldOpen("B3") end, {
"B3-Sunshot", "B3-Blown Away", "B3-Eagle's Nest", "B3-Woosh",
"B3-Star"
}, "B3"},
{function() return isWorldOpen("B4") end, {
"B4-TRA", "B4-ABUH", "B4-Double-Plate", "B4-Self Help",
"B4-RPS", "B4-WAtC", "B4-TRA Star"
}, "B4"},
{function() return isWorldOpen("B4") and not locked["Connector"] end, {
"B4-Sphinx Star"
}, "B4"},
{function() return isWorldOpen("B5") end, {
"B5-Plates", "B5-Two Jammers", "B5-Iron Curtain", "B5-SES",
"B5-Chambers"
}, "B5"},
{function() return isWorldOpen("B5") and ((not locked["Connector"] and not locked["Fan"]) or not locked["Cube"]) end, {
"B5-Obelisk Star"
}, "B5"},
{function() return isWorldOpen("B6") end, {
"B6-Egyptian Arcade", "B6-JDaW", "B6-Crisscross"
}, "B6"},
{function() return isWorldOpen("B7") end, {
"B7-WLJ", "B7-AFaF", "B7-BSbS Star", "B7-BSbS",
"B7-BLoM"
}, "B7"},
{function() return isWorldOpen("B7") and not locked["Fan"] end, {
"B7-Star"
}, "B7"},
{function() return isWorldOpen("B8") end, {
"B*-Merry Go Round", "B*-Cat's Cradle", "B*-Peekaboo"
}, "B8"},
{function() return isWorldOpen("C1") end, {
"C1-Labyrinth", "C1-Conservatory", "C1-Blowback", "C1-Star"
}, "C1"},
{function() return isWorldOpen("C1") and not locked["Cube"] end, {
"C1-MIA"
}, "C1"},
{function() return isWorldOpen("C2") end, {
"C2-Cemetery", "C2-ADaaF", "C2-Rapunzel", "C2-Short Wall",
"C2-Star"
}, "C2"},
{function() return isWorldOpen("C3") end, {
"C3-Three Connectors", "C3-BSLS", "C3-Jammer Quarantine", "C3-Weathertop",
"C3-Star"
}, "C3"},
{function() return isWorldOpen("C4") end, {
"C4-Stables", "C4-Armory", "C4-Oubliette Star", "C4-Oubliette",
"C4-Throne Room Star"
}, "C4"},
{function() return isWorldOpen("C4") and not locked["Cube"] end, {
"C4-Throne Room"
}, "C4"},
{function() return isWorldOpen("C5") end, {
"C5-Time Crawls", "C5-Dumbwaiter", "C5-Time Flies", "C5-UCaJ",
"C5-Time Flies Star"
}, "C5"},
{function() return isWorldOpen("C5") and not locked["Cube"] end, {
"C5-UCAJ Star", "C5-Dumbwaiter Star"
}, "C5"},
{function() return isWorldOpen("C6") end, {
"C6-Two Way Street", "C6-Circumlocution", "C6-Seven Doors", "C6-Star"
}, "C6"},
{function() return isWorldOpen("C7") end, {
"C7-Prison Break", "C7-Carrier Pigeons", "C7-Crisscross", "C7-DMS",
"C7-Star"
}, "C7"},
{function() return isWorldOpen("C8") end, {
"C*-Nexus"
}, "C8"},
{function() return isWorldOpen("C8") and (not locked["Connector"] or not locked["Cube"]) end, {
"C*-Cobweb", "C*-Unreachable Garden"
}, "C8"},
{function() return isWorldOpen("CMessenger") end, {
"CM-Star"
}, "CMessenger"},
{function() return not locked["F1"] and (not locked["Connector"] or not locked["F3"]) end, {
"F0-Star"
}},
{function() return not locked["F1"] and not locked["F3"] end, {
"F3-Star"
}}
}
elseif randomization_mode == "60fps" then
markers = {
{function() return isWorldOpen("A1") end, {
"A1-Peephole", "A1-PaSL", "A1-Outnumbered", "A1-ASooR",
"A1-OtToU", "A1-Trio", "A1-Beaten Path", "A1-Star"
}},
{function() return isWorldOpen("A2") end, {
"A2-Hall of Windows", "A2-Guards", "A2-Suicide Mission", "A2-Star"
}, "A2"},
{function() return isWorldOpen("A3") end, {
"A3-ABTU Star", "A3-ABTU", "A3-AEP", "A3-Swallowed the Key",
"A3-Stashed for Later", "A3-Clock Star"
}, "A3"},
{function() return isWorldOpen("A4") end, {
"A4-Push it Further", "A4-Branch it Out", "A4-Above All That", "A4-Star"
}, "A4"},
{function() return isWorldOpen("A4") and not locked["Connector"] end, {
"A4-DCtS"
}, "A4"},
{function() return isWorldOpen("A5") end, {
"A5-Two Boxes", "A5-Two Boxes Star", "A5-Over the Fence", "A5-YKYMCTS",
"A5-FC", "A5-FC Star",
}, "A5"},
{function() return isWorldOpen("A5") and (not locked["Connector"] or not locked["Cube"]) end, {
"A5-OLB"
}, "A5"},
{function() return isWorldOpen("A6") end, {
"A6-Mobile Mindfield", "A6-Deception", "A6-Door too Far", "A6-Bichromatic",
"A6-Star"
}, "A6"},
{function() return isWorldOpen("A7") end, {
"A7-Two Buzzers", "A7-Pinhole", "A7-LFI", "A7-WiaL",
"A7-Trapped Inside", "A7-Star"
}, "A7"},
{function() return isWorldOpen("A8") end, {
"A*-DDM", "A*-Nervewrecker", "A*-JfW"
}, "A8"},
{function() return isWorldOpen("B1") end, {
"B1-RoD"
}, "B1"},
{function() return isWorldOpen("B1") and not locked["Cube"] end, {
"B1-Over the Fence"
}, "B1"},
{function() return isWorldOpen("B1") and (not locked["Connector"] or not locked["Cube"]) end, {
"B1-WtaD", "B1-SaaS", "B1-Third Wheel", "B1-Star"
}, "B1"},
{function() return isWorldOpen("B2") end, {
"B2-Higher Ground", "B2-Tomb", "B2-Moonshot", "B2-Star"
}, "B2"},
{function() return isWorldOpen("B2") and not locked["Cube"] end, {
"B2-MotM"
}, "B2"},
{function() return isWorldOpen("B3") and not locked["Cube"] end, {
"B3-Sunshot", "B3-Blown Away", "B3-Star", "B3-Eagle's Nest",
"B3-Woosh"
}, "B3"},
{function() return isWorldOpen("B4") and (not locked["Cube"] or not locked["Recorder"]) end, {
"B4-Self Help"
}, "B4"},
{function() return isWorldOpen("B4") and not locked["Connector"] end, {
"B4-TRA", "B4-WAtC"
}, "B4"},
{function() return isWorldOpen("B4") and ((not locked["Connector"] and not locked["Cube"]) or not locked["Recorder"]) end, {
"B4-Double-Plate", "B4-RPS"
}, "B4"},
{function() return isWorldOpen("B4") and not locked["Connector"] and not locked["Cube"] end, {
"B4-ABUH", "B4-TRA Star"
}, "B4"},
{function() return isWorldOpen("B4") and not locked["Connector"] and (not locked["Cube"] or not locked["Fan"]) end, {
"B4-Sphinx Star"
}, "B4"},
{function() return isWorldOpen("B5") end, {
"B5-Iron Curtain", "B5-Chambers"
}, "B5"},
{function() return isWorldOpen("B5") and not locked["Cube"] end, {
"B5-Plates", "B5-SES", "B5-Obelisk Star"
}, "B5"},
{function() return isWorldOpen("B5") and (not locked["Cube"] or not locked["Recorder"]) end, {
"B5-Two Jammers"
}, "B5"},
{function() return isWorldOpen("B6") end, {
"B6-Egyptian Arcade", "B6-Crisscross"
}, "B6"},
{function() return isWorldOpen("B6") and not locked["Connector"] end, {
"B6-JDaW"
}, "B6"},
{function() return isWorldOpen("B7") end, {
"B7-WLJ", "B7-AFaF"
}, "B7"},
{function() return isWorldOpen("B7") and (not locked["Connector"] or not locked["Cube"]) end, {
"B7-BSbS", "B7-BSbS Star"
}, "B7"},
{function() return isWorldOpen("B7") and not locked["Cube"] end, {
"B7-BLoM"
}, "B7"},
{function() return isWorldOpen("B7") and not locked["Fan"] end, {
"B7-Star"
}, "B7"},
{function() return isWorldOpen("B8") end, {
"B*-Merry Go Round", "B*-Peekaboo"
}, "B8"},
{function() return isWorldOpen("B8") and not locked["Connector"] and not locked["Cube"] end, {
"B*-Cat's Cradle"
}, "B8"},
{function() return isWorldOpen("C1") end, {
"C1-Labyrinth", "C1-Conservatory", "C1-Blowback", "C1-Star"
}, "C1"},
{function() return isWorldOpen("C1") and not locked["Cube"] end, {
"C1-MIA"
}, "C1"},
{function() return isWorldOpen("C2") end, {
"C2-Cemetery", "C2-ADaaF", "C2-Rapunzel", "C2-Short Wall",
"C2-Star"
}, "C2"},
{function() return isWorldOpen("C3") end, {
"C3-BSLS", "C3-Jammer Quarantine", "C3-Weathertop", "C3-Star"
}, "C3"},
{function() return isWorldOpen("C3") and not locked["Cube"] end, {
"C3-Three Connectors"
}, "C3"},
{function() return isWorldOpen("C4") end, {
"C4-Stables"
}, "C4"},
{function() return isWorldOpen("C4") and not locked["Connector"] and (not locked["Cube"] or not locked["Recorder"] or not locked ["Platform"]) end, {
"C4-Oubliette"
}, "C4"},
{function() return isWorldOpen("C4") and not locked["Connector"] end, {
"C4-Armory"
}, "C4"},
{function() return isWorldOpen("C4") and not locked["Cube"] end, {
"C4-Throne Room"
}, "C4"},
{function() return isWorldOpen("C4") and (not locked["Cube"] or not locked["Fan"]) end, {
"C4-Throne Room Star"
}, "C4"},
{function() return isWorldOpen("C4")and ((not locked["Connector"] and not locked["Cube"]) or (not locked["Recorder"] and not locked["Platform"])) end, {
"C4-Oubliette Star"
}, "C4"},
{function() return isWorldOpen("C5") end, {
"C5-Time Crawls", "C5-Time Flies", "C5-Time Flies Star"
}, "C5"},
{function() return isWorldOpen("C5") and not locked["Cube"] end, {
"C5-Dumbwaiter", "C5-UCaJ", "C5-UCAJ Star", "C5-Dumbwaiter Star"
}, "C5"},
{function() return isWorldOpen("C6") end, {
"C6-Two Way Street", "C6-Circumlocution", "C6-Seven Doors", "C6-Star"
}, "C6"},
{function() return isWorldOpen("C7") end, {
"C7-Carrier Pigeons"
}, "C7"},
{function() return isWorldOpen("C7") and not locked["Cube"] end, {
"C7-Prison Break", "C7-Crisscross", "C7-DMS", "C7-Star"
}, "C7"},
{function() return isWorldOpen("C8") end, {
"C*-Nexus"
}, "C8"},
{function() return isWorldOpen("C8") and not locked["Cube"] end, {
"C*-Unreachable Garden", "C*-Cobweb"
}, "C8"},
{function() return isWorldOpen("CMessenger") end, {
"CM-Star"
}, "CMessenger"},
{function() return not locked["F1"] and (not locked["Connector"] or not locked["F3"]) end, {
"F0-Star"
}},
{function() return not locked["F1"] and not locked["F2"] and not locked["F3"] and not locked["Cube"] end, {
"F3-Star"
}}
}
elseif randomization_mode == "Intended" then
markers = {
{function() return isWorldOpen("A1") end, {
"A1-Peephole", "A1-Outnumbered", "A1-ASooR", "A1-OtToU",
"A1-Beaten Path", "A1-Star"
}},
{function() return isWorldOpen("A1") and not locked["A1 Gate"] end, {
"A1-PaSL", "A1-Trio"
}},
{function() return isWorldOpen("A2") end, {
"A2-Hall of Windows", "A2-Guards", "A2-Suicide Mission", "A2-Star"
}, "A2"},
{function() return isWorldOpen("A3") end, {
"A3-ABTU Star", "A3-ABTU", "A3-AEP", "A3-Swallowed the Key",
"A3-Stashed for Later", "A3-Clock Star"
}, "A3"},
{function() return isWorldOpen("A4") and not locked["Connector"] end, {
"A4-Push it Further", "A4-Branch it Out", "A4-Above All That", "A4-Star",
"A4-DCtS"
}, "A4"},
{function() return isWorldOpen("A5") and not locked["Connector"] end, {
"A5-Two Boxes Star"
}, "A5"},
{function() return isWorldOpen("A5") and not locked["Cube"] end, {
"A5-Two Boxes", "A5-FC", "A5-FC Star"
}, "A5"},
{function() return isWorldOpen("A5") and not locked["Connector"] and not locked["Cube"] end, {
"A5-OLB", "A5-Over the Fence", "A5-YKYMCTS"
}, "A5"},
{function() return isWorldOpen("A6") end, {
"A6-Mobile Mindfield"
}, "A6"},
{function() return isWorldOpen("A6") and not locked["Connector"] end, {
"A6-Deception", "A6-Bichromatic"
}, "A6"},
{function() return isWorldOpen("A6") and not locked["Cube"] end, {
"A6-Star"
}, "A6"},
{function() return isWorldOpen("A6") and not locked["Connector"] and not locked["Cube"] end, {
"A6-Door too Far"
}, "A6"},
{function() return isWorldOpen("A7") and not locked["Connector"] end, {
"A7-LFI", "A7-Pinhole", "A7-WiaL", "A7-Trapped Inside",
"A7-Star"
}, "A7"},
{function() return isWorldOpen("A7") and not locked["Connector"] and not locked["Cube"] end, {
"A7-Two Buzzers"
}, "A7"},
{function() return isWorldOpen("A8") end, {
"A*-Nervewrecker", "A*-JfW"
}, "A8"},
{function() return isWorldOpen("A8") and not locked["Fan"] end, {
"A*-DDM"
}, "A8"},
{function() return isWorldOpen("B1") and not locked["Connector"] end, {
"B1-WtaD", "B1-SaaS", "B1-Third Wheel", "B1-Star"
}, "B1"},
{function() return isWorldOpen("B1") and not locked["Cube"] end, {
"B1-Over the Fence", "B1-RoD"
}, "B1"},
{function() return isWorldOpen("B2") end, {
"B2-Higher Ground"
}, "B2"},
{function() return isWorldOpen("B2") and not locked["Connector"] end, {
"B2-Tomb", "B2-Star"
}, "B2"},
{function() return isWorldOpen("B2") and not locked["Cube"] and not locked["Fan"] end, {
"B2-MotM"
}, "B2"},
{function() return isWorldOpen("B2") and not locked["Cube"] and not locked["Fan"] end, {
"B2-Moonshot"
}, "B2"},
{function() return isWorldOpen("B3") and not locked["Cube"] and not locked["Fan"] end, {
"B3-Sunshot"
}, "B3"},
{function() return isWorldOpen("B3") and not locked["Connector"] and not locked["Cube"] and not locked["Fan"] end, {
"B3-Blown Away", "B3-Star", "B3-Eagle's Nest", "B3-Woosh"
}, "B3"},
{function() return isWorldOpen("B4") and not locked["Recorder"] end, {
"B4-Self Help", "B4-Double-Plate"
}, "B4"},
{function() return isWorldOpen("B4") and not locked["Connector"] and not locked["Cube"] end, {
"B4-TRA", "B4-TRA Star"
}, "B4"},
{function() return isWorldOpen("B4") and not locked["Connector"] and not locked["Recorder"] end, {
"B4-WAtC"
}, "B4"},
{function() return isWorldOpen("B4") and not locked["Cube"] and not locked["Recorder"] end, {
"B4-RPS"
}, "B4"},
{function() return isWorldOpen("B4") and not locked["Connector"] and not locked["Cube"] and not locked["Fan"] end, {
"B4-ABUH", "B4-Sphinx Star"
}, "B4"},
{function() return isWorldOpen("B5") and not locked["Recorder"] end, {
"B5-Two Jammers"
}, "B5"},
{function() return isWorldOpen("B5") and not locked["Connector"] and not locked["Cube"] and not locked["Fan"] end, {
"B5-SES", "B5-Obelisk Star", "B5-Iron Curtain", "B5-Chambers"
}, "B5"},
{function() return isWorldOpen("B5") and not locked["Connector"] and not locked["Cube"] and not locked["Fan"] and not locked["Recorder"] end, {
"B5-Plates"
}, "B5"},
{function() return isWorldOpen("B6") end, {
"B6-Egyptian Arcade"
}, "B6"},
{function() return isWorldOpen("B6") and not locked["Connector"] end, {
"B6-JDaW", "B6-Crisscross"
}, "B6"},
{function() return isWorldOpen("B7") end, {
"B7-WLJ",
}, "B7"},
{function() return isWorldOpen("B7") and not locked["Connector"] end, {
"B7-BSbS"
}, "B7"},
{function() return isWorldOpen("B7") and not locked["Cube"] end, {
"B7-BLoM",
}, "B7"},
{function() return isWorldOpen("B7") and not locked["Cube"] and not locked["Fan"] end, {
"B7-Star"
}, "B7"},
{function() return isWorldOpen("B7") and not locked["Connector"] and not locked["Cube"] and not locked["Fan"] end, {
"B7-AFaF", "B7-BSbS Star"
}, "B7"},
{function() return isWorldOpen("B8") and not locked["Connector"] end, {
"B*-Merry Go Round"
}, "B8"},
{function() return isWorldOpen("B8") and not locked["Connector"] and not locked["Cube"] end, {
"B*-Cat's Cradle"
}, "B8"},
{function() return isWorldOpen("B8") and not locked["Connector"] and not locked["Recorder"] end, {
"B*-Peekaboo"
}, "B8"},
{function() return isWorldOpen("C1") end, {
"C1-Labyrinth",
}, "C1"},
{function() return isWorldOpen("C1") and not locked["Connector"] end, {
"C1-Conservatory", "C1-Star"
}, "C1"},
{function() return isWorldOpen("C1") and not locked["Connector"] and not locked["Cube"] and not locked["Fan"] end, {
"C1-Blowback", "C1-MIA"
}, "C1"},
{function() return isWorldOpen("C2") and not locked["Connector"] and not locked["Cube"] end, {
"C2-Cemetery"
}, "C2"},
{function() return isWorldOpen("C2") and not locked["Recorder"] and not locked["Platform"] end, {
"C2-Short Wall"
}, "C2"},
{function() return isWorldOpen("C2") and not locked["Cube"] and not locked["Recorder"] and not locked["Platform"] end, {
"C2-Rapunzel", "C2-Star"
}, "C2"},
{function() return isWorldOpen("C2") and not locked["Connector"] and not locked["Cube"] and not locked["Recorder"] and not locked["Platform"] end, {
"C2-ADaaF"
}, "C2"},
{function() return isWorldOpen("C3") and not locked["Connector"] and not locked["Cube"] and not locked["Fan"] end, {
"C3-BSLS", "C3-Jammer Quarantine", "C3-Weathertop", "C3-Three Connectors",
"C3-Star"
}, "C3"},
{function() return isWorldOpen("C4") and not locked["Connector"] end, {
"C4-Stables"
}, "C4"},
{function() return isWorldOpen("C4") and not locked["Connector"] and not locked["Cube"] end, {
"C4-Armory"
}, "C4"},
{function() return isWorldOpen("C4") and not locked["Connector"] and not locked["Cube"] and not locked["Fan"] end, {
"C4-Throne Room", "C4-Throne Room Star"
}, "C4"},
{function() return isWorldOpen("C4") and not locked["Connector"] and not locked["Cube"] and not locked["Recorder"] and not locked["Platform"] end, {
"C4-Oubliette", "C4-Oubliette Star"
}, "C4"},
{function() return isWorldOpen("C5") and not locked["Cube"] end, {
"C5-UCAJ Star"
}, "C5"},
{function() return isWorldOpen("C5") and not locked["Connector"] and not locked["Cube"] end, {
"C5-UCaJ"
}, "C5"},
{function() return isWorldOpen("C5") and not locked["Connector"] and not locked["Cube"] and not locked["Fan"] end, {
"C5-Dumbwaiter"
}, "C5"},
{function() return isWorldOpen("C5") and not locked["Connector"] and not locked["Cube"] and not locked["Recorder"] end, {
"C5-Time Crawls"
}, "C5"},
{function() return isWorldOpen("C5") and not locked["Connector"] and not locked["Cube"] and not locked["Fan"] and not locked["Recorder"] end, {
"C5-Time Flies", "C5-Time Flies Star", "C5-Dumbwaiter Star"
}, "C5"},
{function() return isWorldOpen("C6") end, {
"C6-Two Way Street"
}, "C6"},
{function() return isWorldOpen("C6") and not locked["Connector"] and not locked["Cube"] end, {
"C6-Circumlocution"
}, "C6"},
{function() return isWorldOpen("C6") and not locked["Connector"] and not locked["Recorder"] end, {
"C6-Seven Doors", "C6-Star"
}, "C6"},
{function() return isWorldOpen("C7") and not locked["Connector"] and not locked["Recorder"] end, {
"C7-Crisscross"
}, "C7"},
{function() return isWorldOpen("C7") and not locked["Connector"] and not locked["Cube"] and not locked["Fan"] end, {
"C7-Prison Break", "C7-Carrier Pigeons", "C7-DMS", "C7-Star"
}, "C7"},
{function() return isWorldOpen("C8") and not locked["Connector"] and not locked["Cube"] end, {
"C*-Nexus", "C*-Cobweb"
}, "C8"},
{function() return isWorldOpen("C8") and not locked["Connector"] and not locked["Cube"] and not locked["Recorder"] and not locked["Platform"] end, {
"C*-Unreachable Garden"
}, "C8"},
{function() return isWorldOpen("CMessenger") end, {
"CM-Star"
}, "CMessenger"},
{function() return not locked["F1"] and not locked["Connector"] end, {
"F0-Star"
}}
-- Yes F3 star is missing, it's explained further down
}
elseif randomization_mode == "Hardmode" then
markers = {
{function() return isWorldOpen("A1") end, {
"A1-Peephole", "A1-PaSL", "A1-Outnumbered", "A1-ASooR",
"A1-OtToU", "A1-Trio", "A1-Beaten Path", "A1-Star"
}},
{function() return isWorldOpen("A2") end, {
"A2-Hall of Windows", "A2-Guards", "A2-Suicide Mission", "A2-Star"
}, "A2"},
{function() return isWorldOpen("A3") end, {
"A3-ABTU Star", "A3-ABTU", "A3-AEP", "A3-Swallowed the Key",
"A3-Stashed for Later", "A3-Clock Star"
}, "A3"},
{function() return isWorldOpen("A4") end, {
"A4-Push it Further", "A4-Branch it Out", "A4-Above All That", "A4-Star",
"A4-DCtS"
}, "A4"},
{function() return isWorldOpen("A5") end, {
"A5-Two Boxes", "A5-Two Boxes Star", "A5-Over the Fence", "A5-YKYMCTS",
"A5-OLB", "A5-FC", "A5-FC Star",
}, "A5"},
{function() return isWorldOpen("A6") end, {
"A6-Mobile Mindfield", "A6-Deception", "A6-Door too Far", "A6-Bichromatic",
"A6-Star"
}, "A6"},
{function() return isWorldOpen("A7") end, {
"A7-Two Buzzers", "A7-Pinhole", "A7-LFI", "A7-WiaL",
"A7-Trapped Inside", "A7-Star"
}, "A7"},
{function() return isWorldOpen("A8") end, {
"A*-DDM", "A*-Nervewrecker", "A*-JfW"
}, "A8"},
{function() return isWorldOpen("B1") end, {
"B1-SaaS", "B1-WtaD", "B1-Third Wheel", "B1-Over the Fence",
"B1-RoD", "B1-Star"
}, "B1"},
{function() return isWorldOpen("B2") end, {
"B2-Higher Ground", "B2-Tomb", "B2-MotM", "B2-Moonshot",
"B2-Star"
}, "B2"},
{function() return isWorldOpen("B3") end, {
"B3-Sunshot", "B3-Blown Away", "B3-Eagle's Nest", "B3-Woosh",
"B3-Star"
}, "B3"},
{function() return isWorldOpen("B4") end, {
"B4-TRA", "B4-ABUH", "B4-Double-Plate", "B4-Self Help",
"B4-RPS", "B4-WAtC", "B4-TRA Star"
}, "B4"},
{function() return isWorldOpen("B4") and (not locked["Connector"] or not locked["Cube"]) end, {
"B4-Sphinx Star"
}, "B4"},
{function() return isWorldOpen("B5") end, {
"B5-Plates", "B5-Two Jammers", "B5-Iron Curtain", "B5-SES",
"B5-Chambers"
}, "B5"},
{function() return isWorldOpen("B5") and ((not locked["Connector"] and not locked["Fan"]) or not locked["Cube"]) end, {
"B5-Obelisk Star"
}, "B5"},
{function() return isWorldOpen("B6") end, {
"B6-Egyptian Arcade", "B6-JDaW", "B6-Crisscross"
}, "B6"},
{function() return isWorldOpen("B7") end, {
"B7-WLJ", "B7-AFaF", "B7-BSbS Star", "B7-BSbS",
"B7-BLoM"
}, "B7"},
{function() return isWorldOpen("B7") and (not locked["Cube"] or not locked["Fan"]) end, {
"B7-Star"
}, "B7"},
{function() return isWorldOpen("B8") end, {
"B*-Merry Go Round", "B*-Cat's Cradle", "B*-Peekaboo"
}, "B8"},
{function() return isWorldOpen("C1") end, {
"C1-Labyrinth", "C1-Conservatory", "C1-Blowback", "C1-MIA",
"C1-Star"
}, "C1"},
{function() return isWorldOpen("C2") end, {
"C2-Cemetery", "C2-ADaaF", "C2-Rapunzel", "C2-Short Wall",
"C2-Star"
}, "C2"},
{function() return isWorldOpen("C3") end, {
"C3-Three Connectors", "C3-BSLS", "C3-Jammer Quarantine", "C3-Weathertop",
"C3-Star"
}, "C3"},
{function() return isWorldOpen("C4") end, {
"C4-Stables", "C4-Armory", "C4-Oubliette Star", "C4-Oubliette",
"C4-Throne Room", "C4-Throne Room Star"
}, "C4"},
{function() return isWorldOpen("C5") end, {
"C5-Time Crawls", "C5-Dumbwaiter", "C5-Time Flies", "C5-UCaJ",
"C5-Time Flies Star", "C5-UCAJ Star", "C5-Dumbwaiter Star"
}, "C5"},