-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathSettings.py
1322 lines (1242 loc) · 47.7 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
import math
from Patches import get_tunic_color_options, get_navi_color_options, get_sword_color_options
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
class Setting_Widget(Setting_Info):
def __init__(self, name, type, choices, default, args_params={},
gui_params=None, shared=False):
assert 'default' not in args_params and 'default' not in gui_params, \
'Setting {}: default shouldn\'t be defined in '\
'args_params or in gui_params'.format(name)
assert 'choices' not in args_params, \
'Setting {}: choices shouldn\'t be defined in '\
'args_params'.format(name)
assert 'options' not in gui_params, \
'Setting {}: options shouldn\'t be defined in '\
'gui_params'.format(name)
if 'type' not in args_params: args_params['type'] = type
if 'type' not in gui_params: gui_params['type'] = type
self.choices = choices
self.default = default
args_params['choices'] = list(choices.keys())
args_params['default'] = default
gui_params['options'] = {v: k for k, v in choices.items()}
gui_params['default'] = choices[default]
super().__init__(name, type, self.calc_bitwidth(choices), shared, args_params, gui_params)
def calc_bitwidth(self, choices):
count = len(choices)
if count > 0:
return math.ceil(math.log(count, 2))
return 0
class Combobox(Setting_Widget):
def __init__(self, name, choices, default, args_help, gui_text=None,
gui_group=None, gui_tooltip=None, gui_dependency=None,
shared=False):
type = str
gui_params = {
'widget': 'Combobox',
}
if gui_text is not None: gui_params['text'] = gui_text
if gui_group is not None: gui_params['group'] = gui_group
if gui_tooltip is not None: gui_params['tooltip'] = gui_tooltip
if gui_dependency is not None: gui_params['dependency'] = gui_dependency
args_params = {
'help': args_help,
}
super().__init__(name, type, choices, default, args_params, gui_params,
shared)
# 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 + 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):
return parse_color(s, get_tunic_color_options())
def parse_custom_sword_color(s):
return parse_color(s, get_sword_color_options())
def parse_custom_navi_color(s):
return parse_color(s, get_navi_color_options())
def parse_color(s, color_choices):
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 color_choices:
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('create_wad', str, 2, False,
{
'default': 'False',
'const': 'False',
'nargs': '?',
'choices': ['True', 'False'],
'help': '''\
Choose the ouput file type.
True: Creates a WAD for use on VC
False: Creates a ROM for use on N64 or Emu
''',
},
{
'text': 'Output File Type',
'group': 'rom_tab',
'widget': 'Radiobutton',
'default': ' ROM ',
'horizontal': True,
'options': {
' ROM ': 'False',
' WAD ': 'True',
},
'tooltip':'''\
Choose the output file type.
ROM: For use on N64 or Emulator
WAD: For use on Wii Virtual Console
'''
}),
Setting_Info('rom', str, 0, False, {
'default': 'ZOOTDEC.z64',
'help': 'Path to an OoT 1.0 rom to use as a base.'}),
Setting_Info('wad', str, 0, False, {
'default': '',
'help': 'Path to a 1.2 WAD to use as a base for VC inject.'}),
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': 'unchecked',
'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': '?',
'choices': ['True', 'False', 'None'],
'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_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 adult.
'''
}),
Setting_Info('shuffle_song_items', bool, 1, True,
{
'help': '''\
Shuffles the songs with with rest of the item pool so that
song 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': 'unchecked',
'tooltip':'''\
Songs can appear anywhere as normal items,
not just at vanilla song locations.
'''
}),
Setting_Info('background_music', str, 2, False,
{
'default': 'normal',
'const': 'normal',
'nargs': '?',
'choices': ['normal', 'off', 'random'],
'help': '''\
Sets the background music behavior
normal: Areas play their normal background music
off: No background music
random: Areas play random background music
'''
},
{
'text': 'Background Music',
'group': 'cosmetics',
'widget': 'Combobox',
'default': 'Normal',
'options': {
'Normal': 'normal',
'No Music': 'off',
'Random': 'random',
},
'tooltip': '''\
'No Music': No background music.
is played.
'Random': Area background music is
randomized.
'''
}),
Setting_Info('kokiricolor', str, 0, False,
{
'default': 'Kokiri Green',
'const': 'Kokiri Green',
'nargs': '?',
'type': parse_custom_tunic_color,
'help': '''\
Choose the color for Link's Kokiri Tunic. (default: %(default)s)
Color: Make the Kokiri Tunic this color.
Random Choice: Choose a random color from this list of colors.
Completely Random: Choose a random color from any color the N64 can draw.
'''
},
{
'text': 'Kokiri Tunic Color',
'group': 'tuniccolor',
'widget': 'Combobox',
'default': 'Kokiri Green',
'options': get_tunic_color_options(),
'tooltip':'''\
'Random Choice': Choose a random
color from this list of colors.
'Completely Random': Choose a random
color from any color the N64 can draw.
'''
}),
Setting_Info('goroncolor', str, 0, False,
{
'default': 'Goron Red',
'const': 'Goron Red',
'nargs': '?',
'type': parse_custom_tunic_color,
'help': '''\
Choose the color for Link's Goron Tunic. (default: %(default)s)
Color: Make the Goron Tunic this color.
Random Choice: Choose a random color from this list of colors.
Completely Random: Choose a random color from any color the N64 can draw.
'''
},
{
'text': 'Goron Tunic Color',
'group': 'tuniccolor',
'widget': 'Combobox',
'default': 'Goron Red',
'options': get_tunic_color_options(),
'tooltip':'''\
'Random Choice': Choose a random
color from this list of colors.
'Completely Random': Choose a random
color from any color the N64 can draw.
'''
}),
Setting_Info('zoracolor', str, 0, False,
{
'default': 'Zora Blue',
'const': 'Zora Blue',
'nargs': '?',
'type': parse_custom_tunic_color,
'help': '''\
Choose the color for Link's Zora Tunic. (default: %(default)s)
Color: Make the Zora Tunic this color.
Random Choice: Choose a random color from this list of colors.
Completely Random: Choose a random color from any color the N64 can draw.
'''
},
{
'text': 'Zora Tunic Color',
'group': 'tuniccolor',
'widget': 'Combobox',
'default': 'Zora Blue',
'options': get_tunic_color_options(),
'tooltip':'''\
'Random Choice': Choose a random
color from this list of colors.
'Completely Random': Choose a random
color from any color the N64 can draw.
'''
}),
Combobox(
name = 'sword_trail_duration',
default = 4,
choices = {
4: 'Default',
10: 'Long',
15: 'Very Long',
20: 'Lightsaber',
},
args_help = '''\
Select the duration of the sword trail
''',
gui_text = 'Sword Trail Duration',
gui_group = 'swordcolor',
gui_tooltip = '''\
Select the duration for sword trails.
''',
),
Setting_Info('sword_trail_color_inner', str, 0, False,
{
'default': 'White',
'type': parse_custom_sword_color,
'help': '''\
Choose the color for your sword trail when you swing. This controls the inner color. (default: %(default)s)
Color: Make your sword trail this color.
Random Choice: Choose a random color from this list of colors.
Completely Random: Choose a random color from any color the N64 can draw.
Rainbow: Rainbow sword trails.
'''
},
{
'text': 'Inner Color',
'group': 'swordcolor',
'widget': 'Combobox',
'default': 'White',
'options': get_sword_color_options(),
'tooltip':'''\
'Random Choice': Choose a random
color from this list of colors.
'Completely Random': Choose a random
color from any color the N64 can draw.
'Rainbow': Rainbow sword trails.
'''
}),
Setting_Info('sword_trail_color_outer', str, 0, False,
{
'default': 'White',
'type': parse_custom_sword_color,
'help': '''\
Choose the color for your sword trail when you swing. This controls the outer color. (default: %(default)s)
Color: Make your sword trail this color.
Random Choice: Choose a random color from this list of colors.
Completely Random: Choose a random color from any color the N64 can draw.
Rainbow: Rainbow sword trails.
'''
},
{
'text': 'Outer Color',
'group': 'swordcolor',
'widget': 'Combobox',
'default': 'White',
'options': get_sword_color_options(),
'tooltip':'''\
'Random Choice': Choose a random
color from this list of colors.
'Completely Random': Choose a random
color from any color the N64 can draw.
'Rainbow': Rainbow sword trails.
'''
}),
Setting_Info('navicolordefault', str, 0, False,
{
'default': 'White',
'const': 'White',
'nargs': '?',
'type': parse_custom_navi_color,
'help': '''\
Choose the color for Navi when she is idle. (default: %(default)s)
Color: Make the Navi this color.
Random Choice: Choose a random color from this list of colors.
Completely Random: Choose a random color from any color the N64 can draw.
'''
},
{
'text': 'Navi Idle',
'group': 'navicolor',
'widget': 'Combobox',
'default': 'White',
'options': get_navi_color_options(),
'tooltip':'''\
'Random Choice': Choose a random
color from this list of colors.
'Comepletely Random': Choose a random
color from any color the N64 can draw.
'''
}),
Setting_Info('navicolorenemy', str, 0, False,
{
'default': 'Yellow',
'const': 'Yellow',
'nargs': '?',
'type': parse_custom_navi_color,
'help': '''\
Choose the color for Navi when she is targeting an enemy. (default: %(default)s)
Color: Make the Navi this color.
Random Choice: Choose a random color from this list of colors.
Completely Random: Choose a random color from any color the N64 can draw.
'''
},
{
'text': 'Navi Targeting Enemy',
'group': 'navicolor',
'widget': 'Combobox',
'default': 'Yellow',
'options': get_navi_color_options(),
'tooltip':'''\
'Random Choice': Choose a random
color from this list of colors.
'Comepletely Random': Choose a random
color from any color the N64 can draw.
'''
}),
Setting_Info('navicolornpc', str, 0, False,
{
'default': 'Light Blue',
'const': 'Light Blue',
'nargs': '?',
'type': parse_custom_navi_color,
'help': '''\
Choose the color for Navi when she is targeting an NPC. (default: %(default)s)
Color: Make the Navi this color.
Random Choice: Choose a random color from this list of colors.
Completely Random: Choose a random color from any color the N64 can draw.
'''
},
{
'text': 'Navi Targeting NPC',
'group': 'navicolor',
'widget': 'Combobox',
'default': 'Light Blue',
'options': get_navi_color_options(),
'tooltip':'''\
'Random Choice': Choose a random
color from this list of colors.
'Comepletely Random': Choose a random
color from any color the N64 can draw.
'''
}),
Setting_Info('navicolorprop', str, 0, False,
{
'default': 'Green',
'const': 'Green',
'nargs': '?',
'type': parse_custom_navi_color,
'help': '''\
Choose the color for Navi when she is targeting a prop. (default: %(default)s)
Color: Make the Navi this color.
Random Choice: Choose a random color from this list of colors.
Completely Random: Choose a random color from any color the N64 can draw.
'''
},
{
'text': 'Navi Targeting Prop',
'group': 'navicolor',
'widget': 'Combobox',
'default': 'Green',
'options': get_navi_color_options(),
'tooltip':'''\
'Random Choice': Choose a random
color from this list of colors.
'Comepletely Random': Choose a random
color from any color the N64 can draw.
'''
}),
Setting_Info('navisfxoverworld', str, 0, False,
{
'default': 'Default',
'const': 'Default',
'nargs': '?',
'choices': ['Default', 'Notification', 'Rupee', 'Timer', 'Tamborine', 'Recovery Heart', 'Carrot Refill', 'Navi - Hey!', 'Navi - Random', 'Zelda - Gasp', 'Cluck', 'Mweep!', 'Random', 'None'],
'help': '''\
Select the sound effect that plays when Navi has a hint. (default: %(default)s)
Sound: Replace the sound effect with the chosen sound.
Random Choice: Replace the sound effect with a random sound from this list.
None: Eliminate Navi hint sounds.
'''
},
{
'text': 'Navi Hint',
'group': 'navihint',
'widget': 'Combobox',
'default': 'Default',
'options': [
'Random Choice',
'Default',
'Notification',
'Rupee',
'Timer',
'Tamborine',
'Recovery Heart',
'Carrot Refill',
'Navi - Hey!',
'Navi - Random',
'Zelda - Gasp',
'Cluck',
'Mweep!',
'None',
]
}),
Setting_Info('navisfxenemytarget', str, 0, False,
{
'default': 'Default',
'const': 'Default',
'nargs': '?',
'choices': ['Default', 'Notification', 'Rupee', 'Timer', 'Tamborine', 'Recovery Heart', 'Carrot Refill', 'Navi - Hey!', 'Navi - Random', 'Zelda - Gasp', 'Cluck', 'Mweep!', 'Random', 'None'],
'help': '''\
Select the sound effect that plays when targeting an enemy. (default: %(default)s)
Sound: Replace the sound effect with the chosen sound.
Random Choice: Replace the sound effect with a random sound from this list.
None: Eliminate Navi hint sounds.
'''
},
{
'text': 'Navi Enemy Target',
'group': 'navihint',
'widget': 'Combobox',
'default': 'Default',
'options': [
'Random Choice',
'Default',
'Notification',
'Rupee',
'Timer',
'Tamborine',
'Recovery Heart',
'Carrot Refill',
'Navi - Hey!',
'Navi - Random',
'Zelda - Gasp',
'Cluck',
'Mweep!',
'None',
]
}),
Setting_Info('healthSFX', str, 0, False,
{
'default': 'Default',
'const': 'Default',
'nargs': '?',
'choices': ['Default', 'Softer Beep', 'Rupee', 'Timer', 'Tamborine', 'Recovery Heart', 'Carrot Refill', 'Navi - Hey!', 'Zelda - Gasp', 'Cluck', 'Mweep!', 'Random', 'None'],
'help': '''\
Select the sound effect that loops at low health. (default: %(default)s)
Sound: Replace the sound effect with the chosen sound.
Random Choice: Replace the sound effect with a random sound from this list.
None: Eliminate heart beeps.
'''
},
{
'text': 'Low Health SFX',
'group': 'lowhp',
'widget': 'Combobox',
'default': 'Default',
'options': [
'Random Choice',
'Default',
'Softer Beep',
'Rupee',
'Timer',
'Tamborine',
'Recovery Heart',
'Carrot Refill',
'Navi - Hey!',
'Zelda - Gasp',
'Cluck',
'Mweep!',
'None',
],
'tooltip':'''\
'Random Choice': Choose a random
sound from this list.
'Default': Beep. Beep. Beep.
'''
}),
########################################################################
#Better OoT Settings
########################################################################
Setting_Info('skip_intro', bool, 1, True,
{
'help': '''\
Toggle the intro cutscene
''',
'action': 'store_true'
},
{
'text': 'Skip Intro Cutscene',
'group': 'other',
'widget': 'Checkbutton',
'default': 'checked',
'tooltip':'''\
Skip the intro cutscene
'''
}),
Setting_Info('forest_elevator', bool, 1, True,
{
'help': '''\
Toggle if the Poe Sisters cutscene is present in Forest Temple.
''',
'action': 'store_true'
},
{
'text': 'Skip Forest Elevator Cutscene',
'group': 'other',
'widget': 'Checkbutton',
'default': 'checked',
'tooltip':'''\
Toggle if the Poe Sisters cutscene is
present in Forest Temple.
'''
}),
Setting_Info('knuckle_cs', bool, 1, True,
{
'help': '''\
Toggle if the cutscene plays after defeating Nabooru Knuckle
''',
'action': 'store_true'
},
{
'text': 'Skip Nabooru Defeat Cutscene',
'group': 'other',
'widget': 'Checkbutton',
'default': 'checked',
'tooltip':'''\
Toggle if the cutscene plays after
defeating Nabooru Knuckle
'''
}),
Setting_Info('dungeon_speedup', bool, 1, True,
{
'help': '''\
Shorten blue warp cutscenes.
''',
'action': 'store_true'
},
{
'text': 'Fast Blue Warp Cutscenes',
'group': 'other',
'widget': 'Checkbutton',
'default': 'checked',
'tooltip':'''\
Shorten blue warp cutscenes
'''
}),
Setting_Info('song_speedup', bool, 1, True,
{
'help': '''\
Shorten the cutscenes for songs that can be skipped with glitches
''',
'action': 'store_true'
},
{
'text': 'Fast Song Cutscenes',
'group': 'other',
'widget': 'Checkbutton',
'default': 'checked',
'tooltip':'''\
Shorten the cutscenes for songs that can be skipped with glitches
'''
}),
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': 'other',
'widget': 'Checkbutton',
'default': 'checked',
'tooltip':'''\
All chest animations are fast
'''
}),
Setting_Info('fast_elevator', bool, 1, True,
{
'help': '''\
The elvator in Jabu will start at the bottom
''',
'action': 'store_true'
},
{
'text': 'Fast Jabu Elevator',
'group': 'other',
'widget': 'Checkbutton',
'default': 'checked',
'tooltip':'''\
The elvator in Jabu will start at the bottom
'''
}),
Setting_Info('no_owls', bool, 1, True,
{
'help': '''\
Toggle Owls in the overworld.
''',
'action': 'store_true'
},
{
'text': 'Remove Owls',
'group': 'other',
'widget': 'Checkbutton',
'default': 'checked',
'tooltip':'''\
Remove owl triggers in the overworld.
'''
}),
Setting_Info('quickboots', bool, 1, True,
{
'help': '''\
Toggle Owls in the overworld.
''',
'action': 'store_true'
},
{
'text': 'Quick Boots',
'group': 'other',
'widget': 'Checkbutton',
'default': 'unchecked',
'tooltip':'''\
Toggle boots with the d-pad
'''
}),
Setting_Info('difficulty', str, 2, True,
{
'default': 'normal',
'const': 'normal',
'nargs': '?',
'choices': ['normal', 'ohko'],
'help': '''\
Change the item pool for an added challenge.
normal: Default items
hard: Double defense, double magic, and all 8 heart containers are removed
very_hard: Double defense, double magic, Nayru's Love, and all health upgrades are removed
ohko: Same as very hard, and Link will die in one hit.
'''
},
{
'text': 'Damage',
'group': 'other',
'widget': 'Combobox',
'default': 'Normal',
'options': {
'Normal': 'normal',
'One Hit KO': 'ohko'
},
'tooltip':'''\
'Normal': Vanilla behavior
'One Hit KO': Link dies in one hit.
'''
}),
Setting_Info('quest', str, 2, True,
{
'default': 'vanilla',
'const': 'vanilla',
'nargs': '?',
'choices': ['vanilla', 'master'],
'help': '''\
Vanilla: Dungeons will be the original Ocarina of Time dungeons.
Master: Dungeons will be in the form of the Master Quest.
'''
},
{
'text': 'Dungeon Quest',
'group': 'other',
'widget': 'Combobox',
'default': 'Vanilla',
'options': {
'Vanilla': 'vanilla',
'Master Quest': 'master',
},
'tooltip':'''\
'Vanilla': Dungeons will be vanilla.
'Master Quest': Dungeons will be Master Quest.
''',
}),
Setting_Info('default_targeting', str, 1, False,