diff --git a/Adjuster.py b/Adjuster.py index a6e964a8..9e003b3f 100755 --- a/Adjuster.py +++ b/Adjuster.py @@ -37,6 +37,7 @@ def main(): parser.add_argument('--uw_palettes', default='default', choices=['default', 'random', 'blackout']) parser.add_argument('--reduce_flashing', help='Reduce some in-game flashing.', action='store_true') parser.add_argument('--shuffle_sfx', help='Shuffles sound sfx', action='store_true') + parser.add_argument('--msu_resume', help='Enable MSU resume', action='store_true') parser.add_argument('--sprite', help='''\ Path to a sprite sheet to use for Link. Needs to be in binary format and have a length of 0x7000 (28672) bytes, diff --git a/AdjusterMain.py b/AdjusterMain.py index 8af5b7c7..c6f19680 100644 --- a/AdjusterMain.py +++ b/AdjusterMain.py @@ -32,7 +32,8 @@ def adjust(args): args.sprite = None apply_rom_settings(rom, args.heartbeep, args.heartcolor, args.quickswap, args.fastmenu, args.disablemusic, - args.sprite, args.ow_palettes, args.uw_palettes, args.reduce_flashing, args.shuffle_sfx) + args.sprite, args.ow_palettes, args.uw_palettes, args.reduce_flashing, args.shuffle_sfx, + args.msu_resume) output_path.cached_path = args.outputpath rom.write_to_file(output_path('%s.sfc' % outfilebase)) @@ -66,7 +67,8 @@ def patch(args): args.sprite = None apply_rom_settings(rom, args.heartbeep, args.heartcolor, args.quickswap, args.fastmenu, args.disablemusic, - args.sprite, args.ow_palettes, args.uw_palettes, args.reduce_flashing, args.shuffle_sfx) + args.sprite, args.ow_palettes, args.uw_palettes, args.reduce_flashing, args.shuffle_sfx, + args.msu_resume) output_path.cached_path = args.outputpath rom.write_to_file(output_path('%s.sfc' % outfile_base)) diff --git a/BaseClasses.py b/BaseClasses.py index 90b929fa..e997054c 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -138,6 +138,7 @@ class World(object): set_player_attr('potshuffle', False) set_player_attr('pot_contents', None) set_player_attr('pseudoboots', False) + set_player_attr('collection_rate', False) set_player_attr('shopsanity', False) set_player_attr('mixed_travel', 'prevent') diff --git a/CLI.py b/CLI.py index 888a13f3..a6a88d23 100644 --- a/CLI.py +++ b/CLI.py @@ -107,7 +107,8 @@ def parse_cli(argv, no_defaults=False): 'shufflebosses', 'shuffleenemies', 'enemy_health', 'enemy_damage', 'shufflepots', 'ow_palettes', 'uw_palettes', 'sprite', 'disablemusic', 'quickswap', 'fastmenu', 'heartcolor', 'heartbeep', 'remote_items', 'shopsanity', 'dropshuffle', 'pottery', 'keydropshuffle', - 'mixed_travel', 'standardize_palettes', 'code', 'reduce_flashing', 'shuffle_sfx']: + 'mixed_travel', 'standardize_palettes', 'code', 'reduce_flashing', 'shuffle_sfx', + 'msu_resume', 'collection_rate']: value = getattr(defaults, name) if getattr(playerargs, name) is None else getattr(playerargs, name) if player == 1: setattr(ret, name, {1: value}) @@ -201,6 +202,8 @@ def parse_settings(): "uw_palettes": "default", "reduce_flashing": False, "shuffle_sfx": False, + 'msu_resume': False, + 'collection_rate': False, # Spoiler defaults to TRUE # Playthrough defaults to TRUE diff --git a/EntranceShuffle.py b/EntranceShuffle.py index 835f56a4..7ed9ac44 100644 --- a/EntranceShuffle.py +++ b/EntranceShuffle.py @@ -3185,7 +3185,8 @@ mandatory_connections = [('Links House S&Q', 'Links House'), ('Bombos Tablet Mirror Spot', 'Bombos Tablet Ledge'), ('Graveyard Ledge Mirror Spot', 'Graveyard Ledge'), ('Ganon Drop', 'Bottom of Pyramid'), - ('Pyramid Drop', 'East Dark World') + ('Pyramid Drop', 'East Dark World'), + ('Maze Race Ledge Drop', 'Light World') ] inverted_mandatory_connections = [('Links House S&Q', 'Inverted Links House'), @@ -3358,7 +3359,8 @@ inverted_mandatory_connections = [('Links House S&Q', 'Inverted Links House'), ('Bush Covered Lawn Mirror Spot', 'Dark Grassy Lawn'), ('Bomb Hut Inner Bushes', 'Light World'), ('Bomb Hut Outer Bushes', 'Bomb Hut Area'), - ('Bomb Hut Mirror Spot', 'West Dark World')] + ('Bomb Hut Mirror Spot', 'West Dark World'), + ('Maze Race Ledge Drop', 'Light World')] # non-shuffled entrance links default_connections = [('Links House', 'Links House'), ('Links House Exit', 'Light World'), diff --git a/InvertedRegions.py b/InvertedRegions.py index 1b3560cf..e22b4787 100644 --- a/InvertedRegions.py +++ b/InvertedRegions.py @@ -100,7 +100,7 @@ def create_inverted_regions(world, player): create_lw_region(player, 'Lake Hylia Island', ['Lake Hylia Island']), create_cave_region(player, 'Capacity Upgrade', 'the queen of fairies', ['Capacity Upgrade - Left', 'Capacity Upgrade - Right']), create_cave_region(player, 'Two Brothers House', 'a connector', None, ['Two Brothers House Exit (East)', 'Two Brothers House Exit (West)']), - create_lw_region(player, 'Maze Race Ledge', ['Maze Race'], ['Two Brothers House (West)', 'Maze Race Mirror Spot']), + create_lw_region(player, 'Maze Race Ledge', ['Maze Race', 'Maze Race Ledge Drop'], ['Two Brothers House (West)', 'Maze Race Mirror Spot']), create_cave_region(player, '50 Rupee Cave', 'a cave with some cash'), create_lw_region(player, 'Desert Ledge', ['Desert Ledge'], ['Desert Palace Entrance (North) Rocks', 'Desert Palace Entrance (West)', 'Desert Ledge Drop']), create_lw_region(player, 'Desert Palace Stairs', None, ['Desert Palace Entrance (South)', 'Desert Palace Stairs Mirror Spot']), diff --git a/Main.py b/Main.py index 7cd51ff9..cf860862 100644 --- a/Main.py +++ b/Main.py @@ -31,7 +31,7 @@ from Utils import output_path, parse_player_names from source.item.FillUtil import create_item_pool_config, massage_item_pool, district_item_pool_config from source.tools.BPS import create_bps_from_data -__version__ = '1.0.1.10v' +__version__ = '1.0.1.11v' from source.classes.BabelFish import BabelFish @@ -298,7 +298,7 @@ def main(args, seed=None, fish=None): apply_rom_settings(rom, args.heartbeep[player], args.heartcolor[player], args.quickswap[player], args.fastmenu[player], args.disablemusic[player], args.sprite[player], args.ow_palettes[player], args.uw_palettes[player], args.reduce_flashing[player], - args.shuffle_sfx[player]) + args.shuffle_sfx[player], args.msu_resume[player]) if args.jsonout: jsonout[f'patch_t{team}_p{player}'] = rom.patches diff --git a/Mystery.py b/Mystery.py index e047aa1e..c8d4da4a 100644 --- a/Mystery.py +++ b/Mystery.py @@ -169,6 +169,7 @@ def roll_settings(weights): ret.door_shuffle = door_shuffle if door_shuffle != 'none' else 'vanilla' ret.intensity = get_choice('intensity') ret.experimental = get_choice('experimental') == 'on' + ret.collection_rate = get_choice('collection_rate') == 'on' ret.dungeon_counters = get_choice('dungeon_counters') if 'dungeon_counters' in weights else 'default' if ret.dungeon_counters == 'default': @@ -266,6 +267,7 @@ def roll_settings(weights): ret.disablemusic = get_choice('disablemusic', romweights) == 'on' ret.quickswap = get_choice('quickswap', romweights) == 'on' ret.reduce_flashing = get_choice('reduce_flashing', romweights) == 'on' + ret.msu_resume = get_choice('msu_resume', romweights) == 'on' ret.fastmenu = get_choice('menuspeed', romweights) ret.heartcolor = get_choice('heartcolor', romweights) ret.heartbeep = get_choice('heartbeep', romweights) diff --git a/README.md b/README.md index 6cb67700..f419292f 100644 --- a/README.md +++ b/README.md @@ -269,7 +269,7 @@ Shuffles a large portion of the sounds effects. Can be used with the adjuster. ## Experimental Features -The treasure check counter is turned on. Also, you will start as a bunny if your spawn point is in the dark world. +You will start as a bunny if your spawn point is in the dark world. ## Triforce Hunt Settings @@ -369,5 +369,17 @@ Reduces amount of flashing in some animations Shuffles a bunch of the sounds effects +``` +--msu_resume +``` + +Enable MSU resume feature + +``` +--collection_rate +``` + +Total collection rate is displayed unless Triforce Hunt is on. If the game was designed as a mystery, then the total count is not displayed. + diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 4caa9c55..ac17480c 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -147,6 +147,11 @@ Same as above but both small keys and bigs keys of the dungeon are not allowed o #### Volatile +* 1.0.1.11 + * Separated Collection Rate counter from experimental + * Added MSU Resume option + * Ensured pots in TR Dark Ride need lamp + * Fix for Links House being at Maze Race (did not generate) * 1.0.1.10 * More location count fixes * Add major_only algorithm to code diff --git a/Regions.py b/Regions.py index 7667b080..30075c66 100644 --- a/Regions.py +++ b/Regions.py @@ -94,7 +94,7 @@ def create_regions(world, player): create_lw_region(player, 'Lake Hylia Island', ['Lake Hylia Island']), create_cave_region(player, 'Capacity Upgrade', 'the queen of fairies', ['Capacity Upgrade - Left', 'Capacity Upgrade - Right']), create_cave_region(player, 'Two Brothers House', 'a connector', None, ['Two Brothers House Exit (East)', 'Two Brothers House Exit (West)']), - create_lw_region(player, 'Maze Race Ledge', ['Maze Race'], ['Two Brothers House (West)'], 'a race against time'), + create_lw_region(player, 'Maze Race Ledge', ['Maze Race'], ['Two Brothers House (West)', 'Maze Race Ledge Drop'], 'a race against time'), create_cave_region(player, '50 Rupee Cave', 'a cave with some cash'), create_lw_region(player, 'Desert Ledge', ['Desert Ledge'], ['Desert Palace Entrance (North) Rocks', 'Desert Palace Entrance (West)'], 'the desert ledge'), create_lw_region(player, 'Desert Ledge (Northeast)', None, ['Checkerboard Cave']), diff --git a/Rom.py b/Rom.py index ffeef339..2b376e56 100644 --- a/Rom.py +++ b/Rom.py @@ -719,7 +719,7 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False): dr_flags = DROptions.Eternal_Mini_Bosses if world.doorShuffle[player] == 'vanilla' else DROptions.Town_Portal if world.doorShuffle[player] == 'crossed': dr_flags |= DROptions.Map_Info - if world.experimental[player] and world.goal[player] != 'triforcehunt': + if world.collection_rate[player] and world.goal[player] != 'triforcehunt': dr_flags |= DROptions.Debug if world.doorShuffle[player] == 'crossed' and world.logic[player] != 'nologic'\ and world.mixed_travel[player] == 'prevent': @@ -1782,14 +1782,16 @@ def hud_format_text(text): def apply_rom_settings(rom, beep, color, quickswap, fastmenu, disable_music, sprite, - ow_palettes, uw_palettes, reduce_flashing, shuffle_sfx): + ow_palettes, uw_palettes, reduce_flashing, shuffle_sfx, msu_resume): if not os.path.exists("data/sprites/official/001.link.1.zspr") and rom.orig_buffer: dump_zspr(rom.orig_buffer[0x80000:0x87000], rom.orig_buffer[0xdd308:0xdd380], rom.orig_buffer[0xdedf5:0xdedf9], "data/sprites/official/001.link.1.zspr", "Nintendo", "Link") - # todo: implement a flag for msu resume delay - rom.write_bytes(0x18021D, [0, 0]) # default to off for now + if msu_resume: + rom.write_bytes(0x18021D, [0x8, 0x7]) + else: + rom.write_bytes(0x18021D, [0, 0]) # default to off for now if sprite and not isinstance(sprite, Sprite): sprite = Sprite(sprite) if os.path.isfile(sprite) else get_sprite_from_name(sprite) diff --git a/Rules.py b/Rules.py index 3375a238..05f05f70 100644 --- a/Rules.py +++ b/Rules.py @@ -1105,7 +1105,8 @@ def add_conditional_lamps(world, player): add_lamp_requirement(spot, player) dark_rooms = { - 'TR Dark Ride': {'sewer': False, 'entrances': ['TR Dark Ride Up Stairs', 'TR Dark Ride SW'], 'locations': []}, + 'TR Dark Ride': {'sewer': False, 'entrances': ['TR Dark Ride Up Stairs', 'TR Dark Ride SW', 'TR Dark Ride Path'], 'locations': []}, + 'TR Dark Ride Ledges': {'sewer': False, 'entrances': ['TR Dark Ride Ledges Path'], 'locations': []}, 'Mire Dark Shooters': {'sewer': False, 'entrances': ['Mire Dark Shooters Up Stairs', 'Mire Dark Shooters SW', 'Mire Dark Shooters SE'], 'locations': []}, 'Mire Key Rupees': {'sewer': False, 'entrances': ['Mire Key Rupees NE'], 'locations': []}, 'Mire Block X': {'sewer': False, 'entrances': ['Mire Block X NW', 'Mire Block X WS'], 'locations': []}, diff --git a/resources/app/cli/args.json b/resources/app/cli/args.json index 7c31b263..70bf5ab0 100644 --- a/resources/app/cli/args.json +++ b/resources/app/cli/args.json @@ -218,6 +218,14 @@ "action": "store_true", "type": "bool" }, + "msu_resume": { + "action": "store_true", + "type": "bool" + }, + "collection_rate": { + "action": "store_true", + "type": "bool" + }, "mapshuffle": { "action": "store_true", "type": "bool" diff --git a/resources/app/cli/lang/en.json b/resources/app/cli/lang/en.json index 52a89198..6ae45ea5 100644 --- a/resources/app/cli/lang/en.json +++ b/resources/app/cli/lang/en.json @@ -322,6 +322,8 @@ ], "reduce_flashing": [ "Reduce some in-game flashing (default: %(default)s)" ], "shuffle_sfx": [ "Shuffle sounds effects (default: %(default)s)" ], + "msu_resume": [ "Enable MSU Resume (default: %(default)s)" ], + "collection_rate": [ "Display collection rate (default: %(default)s)" ], "create_rom": [ "Create an output rom file. (default: %(default)s)" ], "gui": [ "Launch the GUI. (default: %(default)s)" ], "jsonout": [ diff --git a/resources/app/gui/adjust/overview/widgets.json b/resources/app/gui/adjust/overview/widgets.json index 85efcf1f..4960b295 100644 --- a/resources/app/gui/adjust/overview/widgets.json +++ b/resources/app/gui/adjust/overview/widgets.json @@ -1,6 +1,7 @@ { "checkboxes": { "nobgm": { "type": "checkbox" }, + "msu_resume": { "type": "checkbox" }, "quickswap": { "type": "checkbox" }, "reduce_flashing": {"type": "checkbox"}, "shuffle_sfx": {"type": "checkbox"} diff --git a/resources/app/gui/lang/en.json b/resources/app/gui/lang/en.json index 916d8475..e18f7304 100644 --- a/resources/app/gui/lang/en.json +++ b/resources/app/gui/lang/en.json @@ -4,6 +4,7 @@ "adjust.quickswap": "L/R Quickswapping", "adjust.reduce_flashing": "Reduce Flashing", "adjust.shuffle_sfx": "Shuffle Sound Effects", + "adjust.msu_resume": "MSU Resume", "adjust.heartcolor": "Heart Color", "adjust.heartcolor.red": "Red", @@ -148,6 +149,8 @@ "randomizer.gameoptions.quickswap": "L/R Quickswapping", "randomizer.gameoptions.reduce_flashing": "Reduce Flashing", "randomizer.gameoptions.shuffle_sfx": "Shuffle Sound Effects", + "randomizer.gameoptions.msu_resume": "MSU Resume", + "randomizer.gameoptions.collection_rate": "Display Collection Rate", "randomizer.gameoptions.heartcolor": "Heart Color", "randomizer.gameoptions.heartcolor.red": "Red", diff --git a/resources/app/gui/randomize/gameoptions/widgets.json b/resources/app/gui/randomize/gameoptions/widgets.json index 6efe32c8..4e3aab2d 100644 --- a/resources/app/gui/randomize/gameoptions/widgets.json +++ b/resources/app/gui/randomize/gameoptions/widgets.json @@ -1,6 +1,8 @@ { "checkboxes": { "nobgm": { "type": "checkbox" }, + "msu_resume": { "type": "checkbox" }, + "collection_rate": {"type": "checkbox"}, "quickswap": { "type": "checkbox" }, "reduce_flashing": {"type": "checkbox"}, "shuffle_sfx": {"type": "checkbox"} diff --git a/source/classes/constants.py b/source/classes/constants.py index 36b3e308..9199b47a 100644 --- a/source/classes/constants.py +++ b/source/classes/constants.py @@ -114,6 +114,8 @@ SETTINGSTOPROCESS = { "uwpalettes": "uw_palettes", "reduce_flashing": "reduce_flashing", "shuffle_sfx": "shuffle_sfx", + 'msu_resume': 'msu_resume', + 'collection_rate': 'collection_rate', }, "generation": { "bps": "bps", diff --git a/source/gui/adjust/overview.py b/source/gui/adjust/overview.py index a5e596e7..7ab7f474 100644 --- a/source/gui/adjust/overview.py +++ b/source/gui/adjust/overview.py @@ -105,6 +105,7 @@ def adjust_page(top, parent, settings): "quickswap": "quickswap", "nobgm": "disablemusic", "reduce_flashing": "reduce_flashing", + 'msu_resume': 'msu_resume', "shuffle_sfx": "shuffle_sfx", } guiargs = Namespace() diff --git a/source/gui/loadcliargs.py b/source/gui/loadcliargs.py index 31658549..0130f8ad 100644 --- a/source/gui/loadcliargs.py +++ b/source/gui/loadcliargs.py @@ -52,7 +52,7 @@ def loadcliargs(gui, args, settings=None): gui.pages[mainpage].pages[subpage].widgets[widget].label.configure(text=label) gui.pages[mainpage].pages[subpage].widgets[widget].storageVar.set(args[arg]) # If we're on the Game Options page and it's not about Hints - if subpage == "gameoptions" and not widget == "hints": + if subpage == "gameoptions" and widget not in ["hints", "collection_rate"]: # Check if we've got settings # Check if we've got the widget in Adjust settings hasSettings = settings is not None