diff --git a/CLI.py b/CLI.py index 1b836b8b..7cc7790f 100644 --- a/CLI.py +++ b/CLI.py @@ -187,6 +187,7 @@ def parse_arguments(argv, no_defaults=False): base game. ''') parser.add_argument('--experimental', default=defval(False), help='Enable experimental features', action='store_true') + parser.add_argument('--dungeon_counters', default=defval('off'), help='Enable dungeon chest counters', action='store_true') parser.add_argument('--crystals_ganon', default=defval('7'), const='7', nargs='?', choices=['random', '0', '1', '2', '3', '4', '5', '6', '7'], help='''\ How many crystals are needed to defeat ganon. Any other @@ -306,7 +307,7 @@ def parse_arguments(argv, no_defaults=False): for name in ['logic', 'mode', 'swords', 'goal', 'difficulty', 'item_functionality', 'shuffle', 'door_shuffle', 'crystals_ganon', 'crystals_gt', 'openpyramid', 'mapshuffle', 'compassshuffle', 'keyshuffle', 'bigkeyshuffle', 'startinventory', - 'retro', 'accessibility', 'hints', 'beemizer', 'experimental', + 'retro', 'accessibility', 'hints', 'beemizer', 'experimental', 'dungeon_counters', 'shufflebosses', 'shuffleenemies', 'enemy_health', 'enemy_damage', 'shufflepots', 'ow_palettes', 'uw_palettes', 'sprite', 'disablemusic', 'quickswap', 'fastmenu', 'heartcolor', 'heartbeep', 'remote_items']: @@ -340,6 +341,7 @@ def get_settings(): "shuffle": "vanilla", "door_shuffle": "basic", "experimental": 0, + "dungeon_counters": "off", "heartbeep": "normal", "heartcolor": "red", "fastmenu": "normal", diff --git a/Main.py b/Main.py index 2d96507d..598a52eb 100644 --- a/Main.py +++ b/Main.py @@ -57,6 +57,7 @@ def main(args, seed=None): world.enemy_damage = args.enemy_damage.copy() world.beemizer = args.beemizer.copy() world.experimental = args.experimental.copy() + world.dungeon_counters = args.dungeon_counters.copy() world.rom_seeds = {player: random.randint(0, 999999999) for player in range(1, world.players + 1)} diff --git a/Rom.py b/Rom.py index 2968d9d7..af008223 100644 --- a/Rom.py +++ b/Rom.py @@ -1155,9 +1155,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 # compasses showing dungeon count - if world.clock_mode != 'off': + if world.clock_mode != 'off' or world.dungeon_counters[player] == 'off': rom.write_byte(0x18003C, 0x00) # Currently must be off if timer is on, because they use same HUD location - elif world.compassshuffle[player] or world.doorShuffle[player] != 'vanilla': + elif world.dungeon_counters[player] == 'on': + rom.write_byte(0x18003C, 0x02) # always on + elif world.compassshuffle[player] or world.doorShuffle[player] != 'vanilla' or world.dungeon_counters[player] == 'pickup': rom.write_byte(0x18003C, 0x01) # show on pickup else: rom.write_byte(0x18003C, 0x00) diff --git a/gui/bottom.py b/gui/bottom.py index 503cb193..7385b559 100644 --- a/gui/bottom.py +++ b/gui/bottom.py @@ -126,7 +126,8 @@ def create_guiargs(parent): "smallkeyshuffle": "keyshuffle", "bigkeyshuffle": "bigkeyshuffle", "dungeondoorshuffle": "door_shuffle", - "experimental": "experimental" + "experimental": "experimental", + "dungeon_counters": "dungeon_counters" }, "multiworld": { "names": "names" diff --git a/resources/app/gui/randomize/dungeon/widgets.json b/resources/app/gui/randomize/dungeon/widgets.json index 023eadda..e58aa1ea 100644 --- a/resources/app/gui/randomize/dungeon/widgets.json +++ b/resources/app/gui/randomize/dungeon/widgets.json @@ -24,5 +24,25 @@ "label": { "text": "Enable Experimental Features" } + }, + "dungeon_counters": { + "type": "selectbox", + "label": { + "text": "Dungeon Chest Counters" + }, + "packAttrs": { + "label": { + "side": "left" + }, + "selectbox": { + "side": "right" + }, + "default": "Off" + }, + "options": { + "Off": "off", + "On": "on", + "On Compass Pickup": "pickup" + } } }