Changes (#64)
* Fix bug where collected maps show on item menu if compass shuffle is on, (and collected compasses if map shuffle is on.) * Add Dungeon Counter Options
This commit is contained in:
parent
1f8dc8d317
commit
34df144f8c
|
@ -111,6 +111,20 @@ def parse_arguments(argv, no_defaults=False):
|
||||||
Timed mode. If time runs out, you lose (but can
|
Timed mode. If time runs out, you lose (but can
|
||||||
still keep playing).
|
still keep playing).
|
||||||
''')
|
''')
|
||||||
|
parser.add_argument('--dungeon_counters', default=defval('default'), const='default', nargs='?', choices=['default', 'on', 'pickup', 'off'],
|
||||||
|
help='''\
|
||||||
|
Select dungeon counter display settings. (default: %(default)s)
|
||||||
|
(Note, since timer takes up the same space on the hud as dungeon
|
||||||
|
counters, timer settings override dungeon counter settings.)
|
||||||
|
Default: Dungeon counters only show when the compass is
|
||||||
|
picked up, or otherwise sent, only when compass
|
||||||
|
shuffle is turned on.
|
||||||
|
On: Dungeon counters are always displayed.
|
||||||
|
Pickup: Dungeon counters are shown when the compass is
|
||||||
|
picked up, even when compass shuffle is turned
|
||||||
|
off.
|
||||||
|
Off: Dungeon counters are never shown.
|
||||||
|
''')
|
||||||
parser.add_argument('--progressive', default=defval('on'), const='normal', nargs='?', choices=['on', 'off', 'random'],
|
parser.add_argument('--progressive', default=defval('on'), const='normal', nargs='?', choices=['on', 'off', 'random'],
|
||||||
help='''\
|
help='''\
|
||||||
Select progressive equipment setting. Affects available itempool. (default: %(default)s)
|
Select progressive equipment setting. Affects available itempool. (default: %(default)s)
|
||||||
|
@ -285,6 +299,10 @@ def parse_arguments(argv, no_defaults=False):
|
||||||
ret = parser.parse_args(argv)
|
ret = parser.parse_args(argv)
|
||||||
if ret.timer == "none":
|
if ret.timer == "none":
|
||||||
ret.timer = False
|
ret.timer = False
|
||||||
|
if ret.dungeon_counters == 'on':
|
||||||
|
ret.dungeon_counters = True
|
||||||
|
elif ret.dungeon_counters == 'off':
|
||||||
|
ret.dungeon_counters = False
|
||||||
if ret.keysanity:
|
if ret.keysanity:
|
||||||
ret.mapshuffle, ret.compassshuffle, ret.keyshuffle, ret.bigkeyshuffle = [True] * 4
|
ret.mapshuffle, ret.compassshuffle, ret.keyshuffle, ret.bigkeyshuffle = [True] * 4
|
||||||
|
|
||||||
|
@ -300,7 +318,7 @@ def parse_arguments(argv, no_defaults=False):
|
||||||
'shufflebosses', 'shuffleenemies', 'enemy_health', 'enemy_damage', 'shufflepots',
|
'shufflebosses', 'shuffleenemies', 'enemy_health', 'enemy_damage', 'shufflepots',
|
||||||
'ow_palettes', 'uw_palettes', 'sprite', 'disablemusic', 'quickswap', 'fastmenu', 'heartcolor',
|
'ow_palettes', 'uw_palettes', 'sprite', 'disablemusic', 'quickswap', 'fastmenu', 'heartcolor',
|
||||||
'heartbeep',
|
'heartbeep',
|
||||||
'remote_items', 'progressive', 'extendedmsu']:
|
'remote_items', 'progressive', 'extendedmsu', 'dungeon_counters']:
|
||||||
value = getattr(defaults, name) if getattr(playerargs, name) is None else getattr(playerargs, name)
|
value = getattr(defaults, name) if getattr(playerargs, name) is None else getattr(playerargs, name)
|
||||||
if player == 1:
|
if player == 1:
|
||||||
setattr(ret, name, {1: value})
|
setattr(ret, name, {1: value})
|
||||||
|
|
16
Gui.py
16
Gui.py
|
@ -289,6 +289,14 @@ def guiMain(args=None):
|
||||||
timerLabel = Label(timerFrame, text='Timer setting')
|
timerLabel = Label(timerFrame, text='Timer setting')
|
||||||
timerLabel.pack(side=LEFT)
|
timerLabel.pack(side=LEFT)
|
||||||
|
|
||||||
|
dungeonCounterFrame = Frame(drowDownFrame)
|
||||||
|
dungeonCounterVar = StringVar()
|
||||||
|
dungeonCounterVar.set('auto')
|
||||||
|
dungeonCounterOptionMenu = OptionMenu(dungeonCounterFrame, dungeonCounterVar, 'auto', 'off', 'on', 'on_compass_pickup')
|
||||||
|
dungeonCounterOptionMenu.pack(side=RIGHT)
|
||||||
|
dungeonCounterLabel = Label(dungeonCounterFrame, text='Dungeon Chest Counters')
|
||||||
|
dungeonCounterLabel.pack(side=LEFT)
|
||||||
|
|
||||||
progressiveFrame = Frame(drowDownFrame)
|
progressiveFrame = Frame(drowDownFrame)
|
||||||
progressiveVar = StringVar()
|
progressiveVar = StringVar()
|
||||||
progressiveVar.set('on')
|
progressiveVar.set('on')
|
||||||
|
@ -330,6 +338,7 @@ def guiMain(args=None):
|
||||||
difficultyFrame.pack(expand=True, anchor=E)
|
difficultyFrame.pack(expand=True, anchor=E)
|
||||||
itemfunctionFrame.pack(expand=True, anchor=E)
|
itemfunctionFrame.pack(expand=True, anchor=E)
|
||||||
timerFrame.pack(expand=True, anchor=E)
|
timerFrame.pack(expand=True, anchor=E)
|
||||||
|
dungeonCounterFrame.pack(expand=True, anchor=E)
|
||||||
progressiveFrame.pack(expand=True, anchor=E)
|
progressiveFrame.pack(expand=True, anchor=E)
|
||||||
accessibilityFrame.pack(expand=True, anchor=E)
|
accessibilityFrame.pack(expand=True, anchor=E)
|
||||||
algorithmFrame.pack(expand=True, anchor=E)
|
algorithmFrame.pack(expand=True, anchor=E)
|
||||||
|
@ -427,6 +436,13 @@ def guiMain(args=None):
|
||||||
guiargs.timer = timerVar.get()
|
guiargs.timer = timerVar.get()
|
||||||
if guiargs.timer == "none":
|
if guiargs.timer == "none":
|
||||||
guiargs.timer = False
|
guiargs.timer = False
|
||||||
|
guiargs.dungeon_counters = dungeonCounterVar.get()
|
||||||
|
if guiargs.dungeon_counters == "on_compass_pickup":
|
||||||
|
guiargs.dungeon_counters = "pickup"
|
||||||
|
elif guiargs.dungeon_counters == "on":
|
||||||
|
guiargs.dungeon_counters = True
|
||||||
|
elif guiargs.dungeon_counters == "off":
|
||||||
|
guiargs.dungeon_counters = False
|
||||||
guiargs.progressive = progressiveVar.get()
|
guiargs.progressive = progressiveVar.get()
|
||||||
guiargs.accessibility = accessibilityVar.get()
|
guiargs.accessibility = accessibilityVar.get()
|
||||||
guiargs.algorithm = algorithmVar.get()
|
guiargs.algorithm = algorithmVar.get()
|
||||||
|
|
1
Main.py
1
Main.py
|
@ -57,6 +57,7 @@ def main(args, seed=None):
|
||||||
world.timer = args.timer.copy()
|
world.timer = args.timer.copy()
|
||||||
world.shufflepots = args.shufflepots.copy()
|
world.shufflepots = args.shufflepots.copy()
|
||||||
world.progressive = args.progressive.copy()
|
world.progressive = args.progressive.copy()
|
||||||
|
world.dungeon_counters = args.dungeon_counters.copy()
|
||||||
world.extendedmsu = args.extendedmsu.copy()
|
world.extendedmsu = args.extendedmsu.copy()
|
||||||
|
|
||||||
world.rom_seeds = {player: random.randint(0, 999999999) for player in range(1, world.players + 1)}
|
world.rom_seeds = {player: random.randint(0, 999999999) for player in range(1, world.players + 1)}
|
||||||
|
|
|
@ -268,6 +268,8 @@ def roll_settings(weights):
|
||||||
'timed_countdown': 'timed-countdown',
|
'timed_countdown': 'timed-countdown',
|
||||||
'display': 'display'}[get_choice('timer', weights)] if 'timer' in weights.keys() else False
|
'display': 'display'}[get_choice('timer', weights)] if 'timer' in weights.keys() else False
|
||||||
|
|
||||||
|
ret.dungeon_counters = get_choice('dungeon_counters', weights) if 'dungeon_counters' in weights else 'default'
|
||||||
|
|
||||||
ret.progressive = convert_to_on_off(get_choice('progressive', weights)) if "progressive" in weights else 'on'
|
ret.progressive = convert_to_on_off(get_choice('progressive', weights)) if "progressive" in weights else 'on'
|
||||||
inventoryweights = weights.get('startinventory', {})
|
inventoryweights = weights.get('startinventory', {})
|
||||||
startitems = []
|
startitems = []
|
||||||
|
|
10
Rom.py
10
Rom.py
|
@ -1126,9 +1126,11 @@ def patch_rom(world, rom, player, team, enemized):
|
||||||
rom.write_byte(0x18003B, 0x01 if world.mapshuffle[player] else 0x00) # maps showing crystals on overworld
|
rom.write_byte(0x18003B, 0x01 if world.mapshuffle[player] else 0x00) # maps showing crystals on overworld
|
||||||
|
|
||||||
# compasses showing dungeon count
|
# compasses showing dungeon count
|
||||||
if world.clock_mode[player]:
|
if world.clock_mode[player] or not world.dungeon_counters[player]:
|
||||||
rom.write_byte(0x18003C, 0x00) # Currently must be off if timer is on, because they use same HUD location
|
rom.write_byte(0x18003C, 0x00) # Currently must be off if timer is on, because they use same HUD location
|
||||||
elif world.compassshuffle[player]:
|
elif world.dungeon_counters[player] == True:
|
||||||
|
rom.write_byte(0x18003C, 0x02) # always on
|
||||||
|
elif world.compassshuffle[player] or world.dungeon_counters[player] == 'pickup':
|
||||||
rom.write_byte(0x18003C, 0x01) # show on pickup
|
rom.write_byte(0x18003C, 0x01) # show on pickup
|
||||||
else:
|
else:
|
||||||
rom.write_byte(0x18003C, 0x00)
|
rom.write_byte(0x18003C, 0x00)
|
||||||
|
@ -1143,8 +1145,8 @@ def patch_rom(world, rom, player, team, enemized):
|
||||||
#
|
#
|
||||||
rom.write_byte(0x180045, ((0x01 if world.keyshuffle[player] else 0x00)
|
rom.write_byte(0x180045, ((0x01 if world.keyshuffle[player] else 0x00)
|
||||||
| (0x02 if world.bigkeyshuffle[player] else 0x00)
|
| (0x02 if world.bigkeyshuffle[player] else 0x00)
|
||||||
| (0x04 if world.compassshuffle[player] else 0x00)
|
| (0x04 if world.mapshuffle[player] else 0x00)
|
||||||
| (0x08 if world.mapshuffle[player] else 0x00))) # free roaming items in menu
|
| (0x08 if world.compassshuffle[player] else 0x00))) # free roaming items in menu
|
||||||
|
|
||||||
# Map reveals
|
# Map reveals
|
||||||
reveal_bytes = {
|
reveal_bytes = {
|
||||||
|
|
|
@ -46,6 +46,11 @@ dungeon_items: # alternative to the 4 shuffles above this, does nothing until th
|
||||||
mc: 0 # shuffle Maps and Compass
|
mc: 0 # shuffle Maps and Compass
|
||||||
none: 1 # shuffle none of the 4
|
none: 1 # shuffle none of the 4
|
||||||
mcsb: 0 # shuffle all of the 4, any combination of m, c, s and b will shuffle the respective item, or not if it's missing, so you can add more options here
|
mcsb: 0 # shuffle all of the 4, any combination of m, c, s and b will shuffle the respective item, or not if it's missing, so you can add more options here
|
||||||
|
dungeon_counters:
|
||||||
|
on: 0 # always display amount of items checked in a dungeon
|
||||||
|
pickup: 0 # show when compass is picked up
|
||||||
|
default: 1 # show when compass is picked up if the compass itself is shuffled
|
||||||
|
off: 0 # never show item count in dungeons
|
||||||
accessibility:
|
accessibility:
|
||||||
items: 0 # Guarantees you will be able to acquire all items, but you may not be able to access all locations
|
items: 0 # Guarantees you will be able to acquire all items, but you may not be able to access all locations
|
||||||
locations: 1 # Guarantees you will be able to access all locations, and therefore all items
|
locations: 1 # Guarantees you will be able to access all locations, and therefore all items
|
||||||
|
|
Loading…
Reference in New Issue