-
Notifications
You must be signed in to change notification settings - Fork 365
/
Settings.py
2130 lines (2053 loc) · 84.8 KB
/
Settings.py
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
import argparse
import textwrap
import string
import re
import random
import hashlib
from Patches import get_tunic_color_options, get_navi_color_options, get_NaviSFX_options, get_HealthSFX_options
from version import __version__
from Utils import random_choices
class ArgumentDefaultsHelpFormatter(argparse.RawTextHelpFormatter):
def _get_help_string(self, action):
return textwrap.dedent(action.help)
# 32 characters
letters = "ABCDEFGHJKLMNPQRSTUVWXYZ23456789"
index_to_letter = { i: letters[i] for i in range(32) }
letter_to_index = { v: k for k, v in index_to_letter.items() }
def bit_string_to_text(bits):
# pad the bits array to be multiple of 5
if len(bits) % 5 > 0:
bits += [0] * (5 - len(bits) % 5)
# convert to characters
result = ""
for i in range(0, len(bits), 5):
chunk = bits[i:i + 5]
value = 0
for b in range(5):
value |= chunk[b] << b
result += index_to_letter[value]
return result
def text_to_bit_string(text):
bits = []
for c in text:
index = letter_to_index[c]
for b in range(5):
bits += [ (index >> b) & 1 ]
return bits
# holds the info for a single setting
class Setting_Info():
def __init__(self, name, type, bitwidth=0, shared=False, args_params={}, gui_params=None):
self.name = name # name of the setting, used as a key to retrieve the setting's value everywhere
self.type = type # type of the setting's value, used to properly convert types in GUI code
self.bitwidth = bitwidth # number of bits needed to store the setting, used in converting settings to a string
self.shared = shared # whether or not the setting is one that should be shared, used in converting settings to a string
self.args_params = args_params # parameters that should be pased to the command line argument parser's add_argument() function
self.gui_params = gui_params # parameters that the gui uses to build the widget components
# create the choices parameters from the gui options if applicable
if gui_params and 'options' in gui_params and 'choices' not in args_params \
and not ('type' in args_params and callable(args_params['type'])):
if isinstance(gui_params['options'], list):
self.args_params['choices'] = list(gui_params['options'])
elif isinstance(gui_params['options'], dict):
self.args_params['choices'] = list(gui_params['options'].values())
# holds the particular choices for a run's settings
class Settings():
def get_settings_display(self):
padding = 0
for setting in filter(lambda s: s.shared, setting_infos):
padding = max( len(setting.name), padding )
padding += 2
output = ''
for setting in filter(lambda s: s.shared, setting_infos):
name = setting.name + ': ' + ' ' * (padding - len(setting.name))
val = str(self.__dict__[setting.name])
output += name + val + '\n'
return output
def get_settings_string(self):
bits = []
for setting in filter(lambda s: s.shared and s.bitwidth > 0, setting_infos):
value = self.__dict__[setting.name]
i_bits = []
if setting.type == bool:
i_bits = [ 1 if value else 0 ]
if setting.type == str:
index = setting.args_params['choices'].index(value)
# https://stackoverflow.com/questions/10321978/integer-to-bitfield-as-a-list
i_bits = [1 if digit=='1' else 0 for digit in bin(index)[2:]]
i_bits.reverse()
if setting.type == int:
value = value - ('min' in setting.gui_params and setting.gui_params['min'] or 0)
value = int(value / ('step' in setting.gui_params and setting.gui_params['step'] or 1))
value = min(value, ('max' in setting.gui_params and setting.gui_params['max'] or value))
# https://stackoverflow.com/questions/10321978/integer-to-bitfield-as-a-list
i_bits = [1 if digit=='1' else 0 for digit in bin(value)[2:]]
i_bits.reverse()
# pad it
i_bits += [0] * ( setting.bitwidth - len(i_bits) )
bits += i_bits
return bit_string_to_text(bits)
def update_with_settings_string(self, text):
bits = text_to_bit_string(text)
for setting in filter(lambda s: s.shared and s.bitwidth > 0, setting_infos):
cur_bits = bits[:setting.bitwidth]
bits = bits[setting.bitwidth:]
value = None
if setting.type == bool:
value = True if cur_bits[0] == 1 else False
if setting.type == str:
index = 0
for b in range(setting.bitwidth):
index |= cur_bits[b] << b
value = setting.args_params['choices'][index]
if setting.type == int:
value = 0
for b in range(setting.bitwidth):
value |= cur_bits[b] << b
value = value * ('step' in setting.gui_params and setting.gui_params['step'] or 1)
value = value + ('min' in setting.gui_params and setting.gui_params['min'] or 0)
self.__dict__[setting.name] = value
self.settings_string = self.get_settings_string()
self.numeric_seed = self.get_numeric_seed()
def get_numeric_seed(self):
# salt seed with the settings, and hash to get a numeric seed
full_string = self.settings_string + __version__ + self.seed
return int(hashlib.sha256(full_string.encode('utf-8')).hexdigest(), 16)
def sanatize_seed(self):
# leave only alphanumeric and some punctuation
self.seed = re.sub(r'[^a-zA-Z0-9_-]', '', self.seed, re.UNICODE)
def update_seed(self, seed):
self.seed = seed
self.sanatize_seed()
self.numeric_seed = self.get_numeric_seed()
def update(self):
self.settings_string = self.get_settings_string()
self.numeric_seed = self.get_numeric_seed()
# add the settings as fields, and calculate information based on them
def __init__(self, settings_dict):
self.__dict__.update(settings_dict)
for info in setting_infos:
if info.name not in self.__dict__:
if info.type == bool:
self.__dict__[info.name] = True if info.gui_params['default'] == 'checked' else False
if info.type == str:
if 'default' in info.args_params:
self.__dict__[info.name] = info.gui_params['default'] or info.args_params['default']
else:
self.__dict__[info.name] = ""
if info.type == int:
self.__dict__[info.name] = info.gui_params['default'] or 1
self.settings_string = self.get_settings_string()
if(self.seed is None):
# https://stackoverflow.com/questions/2257441/random-string-generation-with-upper-case-letters-and-digits-in-python
self.seed = ''.join(random_choices(string.ascii_uppercase + string.digits, k=10))
self.sanatize_seed()
self.numeric_seed = self.get_numeric_seed()
def parse_custom_tunic_color(s):
if s == 'Custom Color':
raise argparse.ArgumentTypeError('Specify custom color by using \'Custom (#xxxxxx)\'')
elif re.match(r'^Custom \(#[A-Fa-f0-9]{6}\)$', s):
return re.findall(r'[A-Fa-f0-9]{6}', s)[0]
elif s in get_tunic_color_options():
return s
else:
raise argparse.ArgumentTypeError('Invalid color specified')
def parse_custom_navi_color(s):
if s == 'Custom Color':
raise argparse.ArgumentTypeError('Specify custom color by using \'Custom (#xxxxxx)\'')
elif re.match(r'^Custom \(#[A-Fa-f0-9]{6}\)$', s):
return re.findall(r'[A-Fa-f0-9]{6}', s)[0]
elif s in get_navi_color_options():
return s
else:
raise argparse.ArgumentTypeError('Invalid color specified')
# a list of the possible settings
setting_infos = [
Setting_Info('check_version', bool, 0, False,
{
'help': '''\
Checks if you are on the latest version
''',
'action': 'store_true'
}),
Setting_Info('checked_version', str, 0, False, {
'default': '',
'help': 'Supress version warnings if checked_version is less than __version__.'}),
Setting_Info('rom', str, 0, False, {
'default': 'ZOOTDEC.z64',
'help': 'Path to an OoT 1.0 rom to use as a base.'}),
Setting_Info('output_dir', str, 0, False, {
'default': '',
'help': 'Path to output directory for rom generation.'}),
Setting_Info('seed', str, 0, False, {
'help': 'Define seed number to generate.'}),
Setting_Info('count', int, 0, False, {
'help': '''\
Use to batch generate multiple seeds with same settings.
If --seed is provided, it will be used for the first seed, then
used to derive the next seed (i.e. generating 10 seeds with
--seed given will produce the same 10 (different) roms each
time).
''',
'type': int}),
Setting_Info('world_count', int, 0, False, {
'default': 1,
'help': '''\
Use to create a multi-world generation for co-op seeds.
World count is the number of players. Warning: Increasing
the world count will drastically increase generation time.
''',
'type': int}),
Setting_Info('player_num', int, 0, False, {
'default': 1,
'help': '''\
Use to select world to generate when there are multiple worlds.
''',
'type': int}),
Setting_Info('create_spoiler', bool, 1, True,
{
'help': 'Output a Spoiler File',
'action': 'store_true'
},
{
'text': 'Create Spoiler Log',
'group': 'rom_tab',
'widget': 'Checkbutton',
'default': 'checked',
'dependency': lambda guivar: guivar['compress_rom'].get() != 'No ROM Output',
'tooltip':'''\
Enabling this will change the seed.
'''
}),
Setting_Info('compress_rom', str, 2, False,
{
'default': 'True',
'const': 'True',
'nargs': '?',
'help': '''\
Create a compressed version of the output ROM file.
True: Compresses. Improves stability. Will take longer to generate
False: Uncompressed. Unstable. Faster generation
None: No ROM Output. Creates spoiler log only
''',
},
{
'text': 'Compress ROM',
'group': 'rom_tab',
'widget': 'Radiobutton',
'default': 'Compressed [Stable]',
'horizontal': True,
'options': {
'Compressed [Stable]': 'True',
'Uncompressed [Crashes]': 'False',
'No ROM Output': 'None',
},
'tooltip':'''\
The first time compressed generation will take a while,
but subsequent generations will be quick. It is highly
recommended to compress or the game will crash
frequently except on real N64 hardware.
'''
}),
Setting_Info('open_forest', bool, 1, True,
{
'help': '''\
Mido no longer blocks the path to the Deku Tree, and
the Kokiri boy no longer blocks the path out of the forest.
''',
'action': 'store_true'
},
{
'text': 'Open Forest',
'group': 'open',
'widget': 'Checkbutton',
'default': 'checked',
'tooltip':'''\
Mido no longer blocks the path to the Deku Tree,
and the Kokiri boy no longer blocks the path out
of the forest.
When this option is off, the Kokiri Sword and
Slingshot are always available somewhere
in the forest.
'''
}),
Setting_Info('open_kakariko', bool, 1, True,
{
'help': '''\
The gate in Kakariko Village to Death Mountain Trail
is always open instead of needing Zelda's Letter.
''',
'action': 'store_true'
},
{
'text': 'Open Kakariko Gate',
'group': 'open',
'widget': 'Checkbutton',
'default': 'unchecked',
'tooltip':'''\
The gate in Kakariko Village to Death Mountain Trail
is always open instead of needing Zelda's Letter.
Either way, the gate is always open as an adult.
'''
}),
Setting_Info('open_door_of_time', bool, 1, True,
{
'help': '''
The Door of Time is open from the beginning of the game.
''',
'action': 'store_true'
},
{
'text': 'Open Door of Time',
'group': 'open',
'widget': 'Checkbutton',
'default': 'unchecked',
'tooltip':'''\
The Door of Time starts opened instead of needing to
play the Song of Time. If this is not set, only
an Ocarina and Song of Time must be found to open
the Door of Time.
'''
}),
Setting_Info('gerudo_fortress', str, 2, True,
{
'default': 'normal',
'const': 'normal',
'nargs': '?',
'help': '''Select how much of Gerudo Fortress is required. (default: %(default)s)
Normal: Free all four carpenters to get the Gerudo Card.
Fast: Free only the carpenter closest to Link's prison to get the Gerudo Card.
Open: Start with the Gerudo Card and all its benefits.
'''
},
{
'text': 'Gerudo Fortress',
'group': 'open',
'widget': 'Combobox',
'default': 'Default Behavior',
'options': {
'Default Behavior': 'normal',
'Rescue One Carpenter': 'fast',
'Start with Gerudo Card': 'open',
},
'tooltip':'''\
'Rescue One Carpenter': Only the bottom left
carpenter must be rescued.
'Start with Gerudo Card': The carpenters are rescued from
the start of the game, and the player starts with the Gerudo
Card in the inventory allowing access to Gerudo Training Grounds.
'''
}),
Setting_Info('bridge', str, 2, True,
{
'default': 'medallions',
'const': 'medallions',
'nargs': '?',
'help': '''\
Select requirement to spawn the Rainbow Bridge to reach Ganon's Castle. (default: %(default)s)
Medallions: Collect all six medallions to create the bridge.
Vanilla: Collect only the Shadow and Spirit Medallions and possess the Light Arrows.
All Dungeons: Collect all spiritual stones and all medallions to create the bridge.
Open: The bridge will spawn without an item requirement.
'''
},
{
'text': 'Rainbow Bridge Requirement',
'group': 'open',
'widget': 'Combobox',
'default': 'All Medallions',
'options': {
'All Dungeons': 'dungeons',
'All Medallions': 'medallions',
'Vanilla Requirements': 'vanilla',
'Always Open': 'open',
},
'tooltip':'''\
'All Dungeons': All Medallions and Stones
'All Medallions': All 6 Medallions only
'Vanilla Requirements': Spirit and Shadow
Medallions and the Light Arrows
'Always Open': Rainbow Bridge is always present
'''
}),
Setting_Info('all_reachable', bool, 1, True,
{
'help': '''\
When disabled, only check if the game is beatable with
placement. Do not ensure all locations are reachable.
''',
'action': 'store_true'
},
{
'text': 'All Locations Reachable',
'group': 'world',
'widget': 'Checkbutton',
'default': 'checked',
'tooltip':'''\
When this option is enabled, the randomizer will
guarantee that every item is obtainable and every
location is reachable.
When disabled, only required items and locations
to beat the game will be guaranteed reachable.
Even when enabled, some locations may still be able
to hold the keys needed to reach them.
'''
}),
Setting_Info('bombchus_in_logic', bool, 1, True,
{
'help': '''\
Bombchus will be considered in logic. This has a few effects:
-Back Alley shop will open once you've found Bombchus.
-It will sell an affordable pack (5 for 60) and never sell out.
-Bombchus refills cannot be bought until Bombchus have been obtained.
''',
'action': 'store_true'
},
{
'text': 'Bombchus Are Considered in Logic',
'group': 'world',
'widget': 'Checkbutton',
'default': 'checked',
'tooltip':'''\
Bombchus are properly considered in logic.
The first Bombchu pack will always be 20.
Subsequent packs will be 5 or 10 based on
how many you have.
Bombchus can be purchased for 60/99/180
rupees once they are been found.
Bombchu Bowling opens with Bombchus.
Bombchus are available at Kokiri Shop
and the Bazaar. Bombchu refills cannot
be bought until Bombchus have been
obtained.
''',
}),
Setting_Info('one_item_per_dungeon', bool, 1, True,
{
'help': '''\
Each dungeon will have exactly one major item.
Does not include dungeon items or GS Tokens.
''',
'action': 'store_true'
},
{
'text': 'Dungeons Have One Major Item',
'group': 'world',
'widget': 'Checkbutton',
'default': 'unchecked',
'tooltip':'''\
Dungeons have exactly one major
item. This naturally makes each
dungeon similar in value instaed
of valued based on chest count.
Spirit Temple Colossus hands count
as part of the dungeon. Spirit
Temple has TWO items to match
vanilla distribution.
Dungeon items and GS Tokens do
not count as major items.
''',
}),
Setting_Info('trials_random', bool, 1, True,
{
'help': '''\
Sets the number of trials must be cleared to enter
Ganon's Tower to a random value.
''',
'action': 'store_true'
},
{
'text': 'Random Number of Ganon\'s Trials',
'group': 'open',
'widget': 'Checkbutton',
'default': 'unchecked',
'tooltip':'''\
Sets a random number of trials to
enter Ganon's Tower.
'''
}),
Setting_Info('trials', int, 3, True,
{
'default': 6,
'const': 6,
'nargs': '?',
'choices': [0, 1, 2, 3, 4, 5, 6],
'help': '''\
Select how many trials must be cleared to enter Ganon's Tower.
The trials you must complete will be selected randomly.
''',
'type': int
},
{
'group': 'open',
'widget': 'Scale',
'default': 6,
'min': 0,
'max': 6,
'random': True,
'tooltip':'''\
Trials are randomly selected. If hints are
enabled, then there will be hints for which
trials need to be completed.
''',
'dependency': lambda guivar: not guivar['trials_random'].get(),
}),
Setting_Info('no_escape_sequence', bool, 1, True,
{
'help': '''\
The tower collapse escape sequence between Ganondorf and Ganon will be skipped.
''',
'action': 'store_true'
},
{
'text': 'Skip Tower Collapse Escape Sequence',
'group': 'convenience',
'widget': 'Checkbutton',
'default': 'unchecked',
'tooltip':'''\
The tower collapse escape sequence between
Ganondorf and Ganon will be skipped.
'''
}),
Setting_Info('no_guard_stealth', bool, 1, True,
{
'help': '''\
The crawlspace into Hyrule Castle will take you straight to Zelda.
''',
'action': 'store_true'
},
{
'text': 'Skip Interior Castle Guard Stealth Sequence',
'group': 'convenience',
'widget': 'Checkbutton',
'default': 'unchecked',
'tooltip':'''\
The crawlspace into Hyrule Castle goes
straight to Zelda, skipping the guards.
'''
}),
Setting_Info('no_epona_race', bool, 1, True,
{
'help': '''\
Having Epona's Song will allow you to summon Epona without racing Ingo.
''',
'action': 'store_true'
},
{
'text': 'Skip Epona Race',
'group': 'convenience',
'widget': 'Checkbutton',
'default': 'unchecked',
'tooltip':'''\
Epona can be summoned with Epona's Song
without needing to race Ingo.
'''
}),
Setting_Info('fast_chests', bool, 1, True,
{
'help': '''\
Makes all chests open without the large chest opening cutscene.
''',
'action': 'store_true'
},
{
'text': 'Fast Chest Cutscenes',
'group': 'convenience',
'widget': 'Checkbutton',
'default': 'checked',
'tooltip':'''\
All chest animations are fast. If disabled,
the animation time is slow for major items.
'''
}),
Setting_Info('big_poe_count_random', bool, 1, True,
{
'help': '''\
Sets a random number of Big Poes to receive an item from the buyer.
''',
'action': 'store_true'
},
{
'text': 'Random Big Poe Target Count',
'group': 'convenience',
'widget': 'Checkbutton',
'default': 'unchecked',
'tooltip':'''\
The Poe buyer will give a reward for turning
in a random number of Big Poes.
'''
}),
Setting_Info('big_poe_count', int, 4, True,
{
'default': 10,
'const': 10,
'nargs': '?',
'choices': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
'help': '''\
Select the number of Big Poes to receive an item from the buyer.
''',
'type': int,
},
{
'group': 'convenience',
'widget': 'Scale',
'default': 10,
'min': 1,
'max': 10,
'tooltip':'''\
The Poe buyer will give a reward for turning
in the chosen number of Big Poes.
''',
'dependency': lambda guivar: not guivar['big_poe_count_random'].get(),
}),
Setting_Info('free_scarecrow', bool, 1, True,
{
'help': '''\
Start with Scarecrow's Song. You do not need
to play it as child or adult at the scarecrow
patch to be able to summon Pierre.
''',
'action': 'store_true'
},
{
'text': 'Start with Scarecrow\'s Song',
'group': 'convenience',
'widget': 'Checkbutton',
'default': 'unchecked',
'tooltip':'''\
Skips needing to go to Lake Hylia as both
child and adult to learn Scarecrow's Song.
'''
}),
Setting_Info('scarecrow_song', str, 0, False,
{
'default': 'DAAAAAAA',
'const': 'DAAAAAAA',
'nargs': '?',
'help': '''\
The song started with if 'free_scarecrow' is True
Valid notes: A, U, L, R, D
''',
},
{
'group': 'convenience',
'widget': 'Entry',
'default': 'DAAAAAAA',
'dependency': lambda guivar: guivar['free_scarecrow'].get(),
'tooltip':'''\
The song must be 8 notes long and have
at least two different notes.
Valid notes are:
'A': A Button
'D': C-Down
'U': C-Up
'L': C-Left
'R': C-Right
'''
}),
Setting_Info('shuffle_kokiri_sword', bool, 1, True,
{
'help': '''\
Shuffles the Kokiri Sword into the pool.
''',
'action': 'store_true'
},
{
'text': 'Shuffle Kokiri Sword',
'group': 'logic',
'widget': 'Checkbutton',
'default': 'checked',
'tooltip':'''\
Disabling this will make the Kokiri Sword
always available at the start.
'''
}),
Setting_Info('shuffle_weird_egg', bool, 1, True,
{
'help': '''\
Shuffles the Weird Egg item from Malon into the pool.
This means that you need to find the egg before going Zelda.
''',
'action': 'store_true'
},
{
'text': 'Shuffle Weird Egg',
'group': 'logic',
'widget': 'Checkbutton',
'default': 'checked',
'tooltip':'''\
You need to find the egg before going Zelda.
This means the Weird Egg locks the rewards from
Impa, Saria, Malon, and Talon as well as the
Happy Mask sidequest.
'''
}),
Setting_Info('shuffle_ocarinas', bool, 1, True,
{
'help': '''\
Shuffles the Fairy Ocarina and the Ocarina of Time into the pool.
This means that you need to find an ocarina before playing songs.
''',
'action': 'store_true'
},
{
'text': 'Shuffle Ocarinas',
'group': 'logic',
'widget': 'Checkbutton',
'default': 'checked',
'tooltip':'''\
The Fairy Ocarina and Ocarina of Time are
randomized. One will be required before
songs can be played.
'''
}),
Setting_Info('shuffle_song_items', bool, 1, True,
{
'help': '''\
Shuffles the songs with with rest of the item pool so that
songs can appear at other locations and items can appear at
the song locations.
''',
'action': 'store_true'
},
{
'text': 'Shuffle Songs with Items',
'group': 'logic',
'widget': 'Checkbutton',
'default': 'checked',
'tooltip':'''\
Songs can appear anywhere as normal items.
If this option is not set, songs will still
be shuffled but will be limited to the
locations that has songs in the original game.
'''
}),
Setting_Info('shuffle_gerudo_card', bool, 1, True,
{
'help': '''\
Shuffles the Gerudo Card into the item pool.
The Gerudo Card does not stop guards from throwing you in jail.
It only grants access to Gerudo Training Grounds after all carpenters
have been rescued. This option does nothing if "gerudo_fortress" is "open".
''',
'action': 'store_true'
},
{
'text': 'Shuffle Gerudo Card',
'group': 'logic',
'widget': 'Checkbutton',
'default': 'unchecked',
'dependency': lambda guivar: guivar['gerudo_fortress'].get() != 'Start with Gerudo Card',
'tooltip':'''\
Gerudo Card is required to enter
Gerudo Training Grounds.
'''
}),
Setting_Info('shuffle_scrubs', str, 3, True,
{
'default': 'off',
'const': 'off',
'nargs': '?',
'help': '''\
Deku Scrub Salesmen are randomized:
off: Only the 3 Scrubs that give one-time items
in the vanilla game will have random items.
low: All Scrubs will have random items and their
prices will be reduced to 10 rupees each.
regular: All Scrubs will have random items and each
of them will demand their vanilla prices.
random: All Scrubs will have random items and their
price will also be random between 10-99 rupees.
'''
},
{
'text': 'Scrub Shuffle',
'group': 'logic',
'widget': 'Combobox',
'default': 'Off',
'options': {
'Off': 'off',
'On (Affordable)': 'low',
'On (Expensive)': 'regular',
'On (Random Prices)': 'random',
},
'tooltip':'''\
'Off': Only the 3 Scrubs that give one-time
items in the vanilla game (PoH, Deku Nut
capacity, and Deku Stick capacity) will
have random items.
'Affordable': All Scrub prices will be
reduced to 10 rupees each.
'Expensive': All Scrub prices will be
their vanilla prices. This will require
spending over 1000 rupees on Scrubs.
'Random Prices': All Scrub prices will be
between 0-99 rupees. This will on average
be very, very expensive overall.
The texts of the Scrubs are not updated.
'''
}),
Setting_Info('shopsanity', str, 3, True,
{
'default': 'off',
'const': 'off',
'nargs': '?',
'help': '''\
Shop contents are randomized. Non-shop items
are one time purchases. This setting also
changes the item pool to introduce a new Wallet
upgrade and more money.
off: Normal Shops*
0-4: Shop contents are shuffled and N non-shop
items are added to every shop. So more
possible item locations.
random: Shop contents are shuffles and each shop
will have a random number of non-shop items
'''
},
{
'text': 'Shopsanity',
'group': 'logic',
'widget': 'Combobox',
'default': 'Off',
'options': {
'Off': 'off',
'Shuffled Shops (0 Items)': '0',
'Shuffled Shops (1 Items)': '1',
'Shuffled Shops (2 Items)': '2',
'Shuffled Shops (3 Items)': '3',
'Shuffled Shops (4 Items)': '4',
'Shuffled Shops (Random)': 'random',
},
'tooltip':'''\
Shop contents are randomized.
(X Items): Shops have X random non-shop (Special
Deal!) items. They will always be on the left
side, and some of the lower value shop items
will be replaced to make room for these.
(Random): Each shop will have a random number
of non-shop items up to a maximum of 4.
The non-shop items have no requirements except
money, while the normal shop items (such as
200/300 rupee tunics) have normal vanilla
requirements. This means that, for example,
as a child you cannot buy 200/300 rupee
tunics, but you can buy non-shop tunics.
Non-shop Bombchus will unlock the chu slot
in your inventory, which, if Bombchus are in
logic, is needed to buy Bombchu refills.
Otherwise, the Bomb Bag is required.
'''
}),
Setting_Info('shuffle_mapcompass', str, 2, True,
{
'default': 'dungeon',
'const': 'dungeon',
'nargs': '?',
'help': '''\
Sets the Map and Compass placement rules
remove: Maps and Compasses are removed from the world.
startwith: Start with all Maps and Compasses.
dungeon: Maps and Compasses are put in their dungeon.
keysanity: Maps and Compasses can appear anywhere.
'''
},
{
'text': 'Shuffle Dungeon Items',
'group': 'logic',
'widget': 'Combobox',
'default': 'Maps/Compasses: Dungeon Only',
'options': {
'Maps/Compasses: Remove': 'remove',
'Maps/Compasses: Start With': 'startwith',
'Maps/Compasses: Dungeon Only': 'dungeon',
'Maps/Compasses: Anywhere': 'keysanity'
},
'tooltip':'''\
'Remove': Maps and Compasses are removed.
This will add a small amount of money and
refill items to the pool.
'Start With': Maps and Compasses are given to
you from the start. This will add a small
amount of money and refill items to the pool.
'Dungeon': Maps and Compasses can only appear
in their respective dungeon.
'Anywhere': Maps and Compasses can appear
anywhere in the world.
Setting 'Remove', 'Start With, or 'Anywhere' will
add 2 more possible locations to each Dungeons.
This makes dungeons more profitable, especially
Ice Cavern, Water Temple, and Jabu Jabu's Belly.
'''
}),
Setting_Info('shuffle_smallkeys', str, 2, True,
{
'default': 'dungeon',
'const': 'dungeon',
'nargs': '?',
'help': '''\
Sets the Small Keys placement rules
remove: Small Keys are removed from the world.
dungeon: Small Keys are put in their dungeon.
keysanity: Small Keys can appear anywhere.
'''
},
{
'group': 'logic',
'widget': 'Combobox',
'default': 'Small Keys: Dungeon Only',
'options': {
'Small Keys: Remove (Keysy)': 'remove',
'Small Keys: Dungeon Only': 'dungeon',
'Small Keys: Anywhere (Keysanity)': 'keysanity'
},
'tooltip':'''\
'Remove': Small Keys are removed. All locked
doors in dungeons will be unlocked. An easier
mode.
'Dungeon': Small Keys can only appear in their
respective dungeon. If Fire Temple is not a
Master Quest dungeon, the door to the Boss Key
chest will be unlocked
'Anywhere': Small Keys can appear
anywhere in the world. A difficult mode since
it is more likely to need to enter a dungeon
multiple times.
Try different combination out, such as:
'Small Keys: Dungeon' + 'Boss Keys: Anywhere'
for a milder Keysanity experience.
'''
}),
Setting_Info('shuffle_bosskeys', str, 2, True,
{
'default': 'dungeon',
'const': 'dungeon',
'nargs': '?',
'help': '''\
Sets the Boss Keys placement rules
remove: Boss Keys are removed from the world.
dungeon: Boss Keys are put in their dungeon.
keysanity: Boss Keys can appear anywhere.
'''
},
{
'group': 'logic',
'widget': 'Combobox',
'default': 'Boss Keys: Dungeon Only',
'options': {
'Boss Keys: Remove (Keysy)': 'remove',
'Boss Keys: Dungeon Only': 'dungeon',
'Boss Keys: Anywhere (Keysanity)': 'keysanity'
},
'tooltip':'''\
'Remove': Boss Keys are removed. All locked
doors in dungeons will be unlocked. An easier
mode.
'Dungeon': Boss Keys can only appear in their
respective dungeon.