Refactored Locations, added heart beep setting.

This commit is contained in:
LLCoolDave 2017-05-25 17:47:15 +02:00
parent bbd52c780d
commit e4e0304b40
6 changed files with 289 additions and 293 deletions

View File

@ -350,6 +350,7 @@ class Region(object):
self.exits = [] self.exits = []
self.locations = [] self.locations = []
self.spot_type = 'Region' self.spot_type = 'Region'
self.hint_text = 'Hyrule'
def can_reach(self, state): def can_reach(self, state):
for entrance in self.entrances: for entrance in self.entrances:
@ -357,14 +358,6 @@ class Region(object):
return True return True
return False return False
def add_locations(self, *locations):
for location in locations:
self.locations.append(Location(location, self))
def add_exits(self, *exits):
for exit in exits:
self.exits.append(Entrance(exit, self))
def __str__(self): def __str__(self):
return str(self.__unicode__()) return str(self.__unicode__())
@ -404,15 +397,14 @@ class Entrance(object):
class Location(object): class Location(object):
def __init__(self, name='', parent=None, access=None, item_rule=None): def __init__(self, name='', address=None, crystal=False, hint_text=None, parent=None):
self.name = name self.name = name
self.parent_region = parent self.parent_region = parent
self.item = None self.item = None
self.crystal = crystal
self.address = address
self.spot_type = 'Location' self.spot_type = 'Location'
if access is not None: self.hint_text = hint_text if hint_text is not None else 'Hyrule'
self.access_rule = access
if item_rule is not None:
self.item_rule = item_rule
def access_rule(self, state): def access_rule(self, state):
return True return True

View File

@ -67,3 +67,15 @@ def fill_dungeons(world):
world.push_item(di_location, dungeon_item, False) world.push_item(di_location, dungeon_item, False)
world.state._clear_cache() world.state._clear_cache()
dungeon_music_addresses = {'Armos - Pendant': [0x1559A],
'Lanmolas - Pendant': [0x1559B, 0x1559C, 0x1559D, 0x1559E],
'Moldorm - Pendant': [0x155C5, 0x1107A, 0x10B8C],
'Helmasaur - Crystal': [0x155B8],
'Arrghus - Crystal': [0x155B7],
'Blind - Crystal': [0x155C6],
'Mothula - Crystal': [0x155BA, 0x155BB, 0x155BC, 0x155BD, 0x15608, 0x15609, 0x1560A, 0x1560B],
'Kholdstare - Crystal': [0x155BF],
'Vitreous - Crystal': [0x155B9],
'Trinexx - Crystal': [0x155C7, 0x155A7, 0x155AA, 0x155AB]}

View File

@ -62,7 +62,7 @@ def main(args, seed=None):
logger.info('Patching ROM.') logger.info('Patching ROM.')
rom = bytearray(open(args.rom, 'rb').read()) rom = bytearray(open(args.rom, 'rb').read())
patched_rom = patch_rom(world, rom, args.quickswap) patched_rom = patch_rom(world, rom, args.quickswap, args.heartbeep)
outfilebase = 'ER_%s_%s_%s_%s' % (world.mode, world.goal, world.shuffle, world.seed) outfilebase = 'ER_%s_%s_%s_%s' % (world.mode, world.goal, world.shuffle, world.seed)
@ -369,6 +369,8 @@ if __name__ == '__main__':
parser.add_argument('--count', 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) parser.add_argument('--count', 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)
parser.add_argument('--quickswap', help='Enable quick item swapping with L and R.', action='store_true') parser.add_argument('--quickswap', help='Enable quick item swapping with L and R.', action='store_true')
parser.add_argument('--nodungeonitems', help='Remove Maps and Compasses from Itempool, replacing them by empty slots.', action='store_true') parser.add_argument('--nodungeonitems', help='Remove Maps and Compasses from Itempool, replacing them by empty slots.', action='store_true')
parser.add_argument('--heartbeep', default='normal', const='normal', nargs='?', choices=['normal', 'half', 'quarter', 'off'],
help='Select the rate at which the heart beep sound is played at low health.')
args = parser.parse_args() args = parser.parse_args()
if not os.path.isfile(args.rom): if not os.path.isfile(args.rom):

View File

@ -1,10 +1,19 @@
from BaseClasses import Region from BaseClasses import Region, Location, Entrance
def create_regions(world): def create_regions(world):
world.regions = [ world.regions = [
LightWorld(), create_region('Light World', ['Mushroom', 'Bottle Vendor', 'Haunted Grove', 'Piece of Heart (Dam)', 'Purple Chest'],
["Thiefs Hut", "Hyrule Castle Secret Entrance Drop", "Hyrule Castle Secret Entrance Stairs", 'Zoras River', 'Kings Grave', 'Dam',
'Links House', 'Tavern North', 'Chicken House', 'Aginahs Cave', 'Sahasrahlas Hut', 'Kakariko Well Drop', 'Kakariko Well Cave',
'Blacksmiths Hut', 'Bat Cave Drop Ledge', 'Bat Cave Cave', 'Sick Kids House', 'Hobo Bridge', 'Thieves Forest Hideout Drop', 'Thieves Forest Hideout Stump',
'Lumberjack Tree Tree', 'Lumberjack Tree Cave', 'Lake Hylia Cave', 'Ice Cave',
'Bonk Rock Cave', 'Library', 'Witch Hut', 'Two Brothers House (East)', 'Desert Palace Stairs', 'Eastern Palace', 'Master Sword Meadow', 'Hyrule Castle Entrance (South)',
'Sanctuary', 'Sanctuary Grave', 'Old Man Cave (West)', 'Flute Spot 1', 'Ice Palace', 'Dark Desert Teleporter', 'East Hyrule Teleporter', 'South Hyrule Teleporter', 'Kakariko Teleporter',
'Elder House (East)', 'Elder House (West)', 'North Fairy Cave', 'North Fairy Cave Drop', 'Lost Woods Gamble', 'Snitch Lady (East)', 'Snitch Lady (West)', 'Tavern (Front)',
'Bush Covered House', 'Light World Bomb Hut', 'Kakariko Shop', 'Long Fairy Cave', 'Good Bee Cave', '20 Rupee Cave', 'Cave Shop (Lake Hylia)', 'Waterfall of Wishing',
'Capacity Upgrade', 'Bonk Fairy (Light)', '50 Rupee Cave', 'Fortune Teller (Light)', 'Lake Hylia Fairy', 'Swamp Fairy', 'Desert Fairy', 'Lumberjack House', 'Lake Hylia Fortune Teller', 'Kakariko Gamble Game']),
create_region('Thiefs Hut', ["[cave-022-B1] Thiefs hut [top chest]", create_region('Thiefs Hut', ["[cave-022-B1] Thiefs hut [top chest]",
"[cave-022-B1] Thiefs hut [top left chest]", "[cave-022-B1] Thiefs hut [top left chest]",
"[cave-022-B1] Thiefs hut [top right chest]", "[cave-022-B1] Thiefs hut [top right chest]",
@ -262,262 +271,237 @@ def create_region(name, locations=None, exits=None):
locations = [] locations = []
if exits is None: if exits is None:
exits = [] exits = []
ret.add_exits(*exits)
ret.add_locations(*locations) for exit in exits:
ret.exits.append(Entrance(exit, ret))
for location in locations:
address, crystal, hint_text = location_table[location]
ret.locations.append(Location(location, address, crystal, hint_text, ret))
return ret return ret
class LightWorld(Region): location_table = {'Mushroom': (0x180013, False, 'Light World'),
'Bottle Vendor': (0x2EB18, False, 'Light World'),
def __init__(self): 'Haunted Grove': (0x18014A, False, 'Light World'),
super(LightWorld, self).__init__('Light World') 'Piece of Heart (Dam)': (0x180145, False, 'Light World'),
self.add_exits("Thiefs Hut", "Hyrule Castle Secret Entrance Drop", "Hyrule Castle Secret Entrance Stairs", 'Zoras River', 'Kings Grave', 'Dam', 'Purple Chest': (0x33D68, False, 'Light World'),
'Links House', 'Tavern North', 'Chicken House', 'Aginahs Cave', 'Sahasrahlas Hut', 'Kakariko Well Drop', 'Kakariko Well Cave', '[cave-022-B1] Thiefs hut [top chest]': (0xEB0F, False, None),
'Blacksmiths Hut', 'Bat Cave Drop Ledge', 'Bat Cave Cave', 'Sick Kids House', 'Hobo Bridge', 'Thieves Forest Hideout Drop', 'Thieves Forest Hideout Stump', '[cave-022-B1] Thiefs hut [top left chest]': (0xEB12, False, None),
'Lumberjack Tree Tree', 'Lumberjack Tree Cave', 'Lake Hylia Cave', 'Ice Cave', '[cave-022-B1] Thiefs hut [top right chest]': (0xEB15, False, None),
'Bonk Rock Cave', 'Library', 'Witch Hut', 'Two Brothers House (East)', 'Desert Palace Stairs', 'Eastern Palace', 'Master Sword Meadow', 'Hyrule Castle Entrance (South)', '[cave-022-B1] Thiefs hut [bottom left chest]': (0xEB18, False, None),
'Sanctuary', 'Sanctuary Grave', 'Old Man Cave (West)', 'Flute Spot 1', 'Ice Palace', 'Dark Desert Teleporter', 'East Hyrule Teleporter', 'South Hyrule Teleporter', 'Kakariko Teleporter', '[cave-022-B1] Thiefs hut [bottom right chest]': (0xEB1B, False, None),
'Elder House (East)', 'Elder House (West)', 'North Fairy Cave', 'North Fairy Cave Drop', 'Lost Woods Gamble', 'Snitch Lady (East)', 'Snitch Lady (West)', 'Tavern (Front)', 'Uncle': (0x2DF45, False, None),
'Bush Covered House', 'Light World Bomb Hut', 'Kakariko Shop', 'Long Fairy Cave', 'Good Bee Cave', '20 Rupee Cave', 'Cave Shop (Lake Hylia)', 'Waterfall of Wishing', '[cave-034] Hyrule Castle Secret Entrance': (0xE971, False, None),
'Capacity Upgrade', 'Bonk Fairy (Light)', '50 Rupee Cave', 'Fortune Teller (Light)', 'Lake Hylia Fairy', 'Swamp Fairy', 'Desert Fairy', 'Lumberjack House', 'Lake Hylia Fortune Teller', 'Kakariko Gamble Game') 'King Zora': (0xEE1C3, False, 'Light World'),
self.add_locations('Mushroom', 'Bottle Vendor', 'Haunted Grove', 'Piece of Heart (Dam)', 'Purple Chest') 'Piece of Heart (Zoras River)': (0x180149, False, 'Light World'),
'[cave-018] Graveyard - top right grave': (0xE97A, False, None),
'[cave-047] Dam': (0xE98C, False, None),
location_addresses = {'Mushroom': 0x180013, '[cave-040] Links House': (0xE9BC, False, 'Light World'),
'Bottle Vendor': 0x2EB18, '[cave-031] Tavern': (0xE9CE, False, None),
'Haunted Grove': 0x18014A, '[cave-026] Chicken House': (0xE9E9, False, None),
'Piece of Heart (Dam)': 0x180145, '[cave-044] Aginahs Cave': (0xE9F2, False, None),
'Purple Chest': 0x33D68, '[cave-035] Sahasrahlas Hut [left chest]': (0xEA82, False, None),
'[cave-022-B1] Thiefs hut [top chest]': 0xEB0F, '[cave-035] Sahasrahlas Hut [center chest]': (0xEA85, False, None),
'[cave-022-B1] Thiefs hut [top left chest]': 0xEB12, '[cave-035] Sahasrahlas Hut [right chest]': (0xEA88, False, None),
'[cave-022-B1] Thiefs hut [top right chest]': 0xEB15, 'Sahasrahla': (0x2F1FC, False, None),
'[cave-022-B1] Thiefs hut [bottom left chest]': 0xEB18, '[cave-021] Kakariko Well [top chest]': (0xEA8E, False, None),
'[cave-022-B1] Thiefs hut [bottom right chest]': 0xEB1B, '[cave-021] Kakariko Well [left chest row of 3]': (0xEA91, False, None),
'Uncle': 0x2DF45, '[cave-021] Kakariko Well [center chest row of 3]': (0xEA94, False, None),
'[cave-034] Hyrule Castle Secret Entrance': 0xE971, '[cave-021] Kakariko Well [right chest row of 3]': (0xEA97, False, None),
'King Zora': 0xEE1C3, '[cave-021] Kakariko Well [bottom chest]': (0xEA9A, False, None),
'Piece of Heart (Zoras River)': 0x180149, 'Blacksmiths': (0x18002A, False, None),
'[cave-018] Graveyard - top right grave': 0xE97A, 'Magic Bat': (0x180015, False, None),
'[cave-047] Dam': 0xE98C, 'Sick Kid': (0x339CF, False, None),
'[cave-040] Links House': 0xE9BC, 'Hobo': (0x33E7D, False, 'Light World'),
'[cave-031] Tavern': 0xE9CE, 'Piece of Heart (Thieves Forest Hideout)': (0x180000, False, None),
'[cave-026] Chicken House': 0xE9E9, 'Piece of Heart (Lumberjack Tree)': (0x180001, False, None),
'[cave-044] Aginahs Cave': 0xE9F2, 'Piece of Heart (Cave South of Haunted Grove)': (0x180003, False, None),
'[cave-035] Sahasrahlas Hut [left chest]': 0xEA82, 'Piece of Heart (Graveyard Cave)': (0x180004, False, None),
'[cave-035] Sahasrahlas Hut [center chest]': 0xEA85, 'Piece of Heart (Desert Cave)': (0x180005, False, None),
'[cave-035] Sahasrahlas Hut [right chest]': 0xEA88, '[cave-050] Lake Hylia Cave [bottom left chest]': (0xEB42, False, None),
'Sahasrahla': 0x2F1FC, '[cave-050] Lake Hylia Cave [top left chest]': (0xEB45, False, None),
'[cave-021] Kakariko Well [top chest]': 0xEA8E, '[cave-050] Lake Hylia Cave [top right chest]': (0xEB48, False, None),
'[cave-021] Kakariko Well [left chest row of 3]': 0xEA91, '[cave-050] Lake Hylia Cave [bottom right chest]': (0xEB4B, False, None),
'[cave-021] Kakariko Well [center chest row of 3]': 0xEA94, '[cave-050] Lake Hylia Cave [generous guy]': (0x180010, False, None),
'[cave-021] Kakariko Well [right chest row of 3]': 0xEA97, '[cave-051] Ice Cave': (0xEB4E, False, None),
'[cave-021] Kakariko Well [bottom chest]': 0xEA9A, '[cave-016] Bonk Rock Cave': (0xEB3F, False, None),
'Blacksmiths': 0x18002A, 'Library': (0x180012, False, None),
'Magic Bat': 0x180015, 'Witch': (0x180014, False, None),
'Sick Kid': 0x339CF, 'Piece of Heart (Lake Hylia)': (0x180144, False, 'Light World'),
'Hobo': 0x33E7D, 'Piece of Heart (Maze Race)': (0x180142, False, 'Light World'),
'Piece of Heart (Thieves Forest Hideout)': 0x180000, 'Piece of Heart (Desert - west side)': (0x180143, False, 'Light World'),
'Piece of Heart (Lumberjack Tree)': 0x180001, '[dungeon-L2-B1] Desert Palace - Big Chest': (0xE98F, False, 'Desert Palace'),
'Piece of Heart (Cave South of Haunted Grove)': 0x180003, '[dungeon-L2-B1] Desert Palace - Torch': (0x180160, False, 'Desert Palace'),
'Piece of Heart (Graveyard Cave)': 0x180004, '[dungeon-L2-B1] Desert Palace - Map Room': (0xE9B6, False, 'Desert Palace'),
'Piece of Heart (Desert Cave)': 0x180005, '[dungeon-L2-B1] Desert Palace - Compass Room': (0xE9CB, False, 'Desert Palace'),
'[cave-050] Lake Hylia Cave [bottom left chest]': 0xEB42, '[dungeon-L2-B1] Desert Palace - Big Key Room': (0xE9C2, False, 'Desert Palace'),
'[cave-050] Lake Hylia Cave [top left chest]': 0xEB45, 'Lanmolas - Heart Container': (0x180151, False, 'Desert Palace'),
'[cave-050] Lake Hylia Cave [top right chest]': 0xEB48, '[dungeon-L1-1F] Eastern Palace - Compass Room': (0xE977, False, 'Eastern Palace'),
'[cave-050] Lake Hylia Cave [bottom right chest]': 0xEB4B, '[dungeon-L1-1F] Eastern Palace - Big Chest': (0xE97D, False, 'Eastern Palace'),
'[cave-050] Lake Hylia Cave [generous guy]': 0x180010, '[dungeon-L1-1F] Eastern Palace - Big Ball Room': (0xE9B3, False, 'Eastern Palace'),
'[cave-051] Ice Cave': 0xEB4E, '[dungeon-L1-1F] Eastern Palace - Big Key Room': (0xE9B9, False, 'Eastern Palace'),
'[cave-016] Bonk Rock Cave': 0xEB3F, '[dungeon-L1-1F] Eastern Palace - Map Room': (0xE9F5, False, 'Eastern Palace'),
'Library': 0x180012, 'Armos - Heart Container': (0x180150, False, 'Eastern Palace'),
'Witch': 0x180014, 'Altar': (0x289B0, False, 'Light World'),
'Piece of Heart (Lake Hylia)': 0x180144, '[dungeon-C-B1] Hyrule Castle - Boomerang Room': (0xE974, False, 'Hyrule Castle'),
'Piece of Heart (Maze Race)': 0x180142, '[dungeon-C-B1] Hyrule Castle - Map Room': (0xEB0C, False, 'Hyrule Castle'),
'Piece of Heart (Desert - west side)': 0x180143, '[dungeon-C-B1] Hyrule Castle - Next To Zelda': (0xEB09, False, 'Hyrule Castle'),
'[dungeon-L2-B1] Desert Palace - Big Chest': 0xE98F, '[dungeon-C-B1] Escape - First B1 Room': (0xE96E, False, 'Hyrule Castle'),
'[dungeon-L2-B1] Desert Palace - Torch': 0x180160, '[dungeon-C-B1] Escape - Final Basement Room [left chest]': (0xEB5D, False, 'Hyrule Castle'),
'[dungeon-L2-B1] Desert Palace - Map Room': 0xE9B6, '[dungeon-C-B1] Escape - Final Basement Room [middle chest]': (0xEB60, False, 'Hyrule Castle'),
'[dungeon-L2-B1] Desert Palace - Compass Room': 0xE9CB, '[dungeon-C-B1] Escape - Final Basement Room [right chest]': (0xEB63, False, 'Hyrule Castle'),
'[dungeon-L2-B1] Desert Palace - Big Key Room': 0xE9C2, '[dungeon-C-1F] Sanctuary': (0xEA79, False, 'Hyrule Castle'),
'Lanmolas - Heart Container': 0x180151, '[dungeon-A1-2F] Hyrule Castle Tower - 2 Knife Guys Room': (0xEAB5, False, 'Hyrule Castle'),
'[dungeon-L1-1F] Eastern Palace - Compass Room': 0xE977, '[dungeon-A1-3F] Hyrule Castle Tower - Maze Room': (0xEAB2, False, 'Hyrule Castle'),
'[dungeon-L1-1F] Eastern Palace - Big Chest': 0xE97D, 'Old Mountain Man': (0xF69FA, False, 'Light World'),
'[dungeon-L1-1F] Eastern Palace - Big Ball Room': 0xE9B3, 'Piece of Heart (Spectacle Rock Cave)': (0x180002, False, None),
'[dungeon-L1-1F] Eastern Palace - Big Key Room': 0xE9B9, '[cave-009-1F] Death Mountain - right cave [top left chest]': (0xEB2A, False, None),
'[dungeon-L1-1F] Eastern Palace - Map Room': 0xE9F5, '[cave-009-1F] Death Mountain - right cave [top left middle chest]': (0xEB2D, False, None),
'Armos - Heart Container': 0x180150, '[cave-009-1F] Death Mountain - right cave [top right middle chest]': (0xEB30, False, None),
'Altar': 0x289B0, '[cave-009-1F] Death Mountain - right cave [top right chest]': (0xEB33, False, None),
'[dungeon-C-B1] Hyrule Castle - Boomerang Room': 0xE974, '[cave-009-1F] Death Mountain - right cave [bottom chest]': (0xEB36, False, None),
'[dungeon-C-B1] Hyrule Castle - Map Room': 0xEB0C, '[cave-009-B1] Death Mountain - right cave [left chest]': (0xEB39, False, None),
'[dungeon-C-B1] Hyrule Castle - Next To Zelda': 0xEB09, '[cave-009-B1] Death Mountain - right cave [right chest]': (0xEB3C, False, None),
'[dungeon-C-B1] Escape - First B1 Room': 0xE96E, '[cave-012-1F] Death Mountain - left cave]': (0xE9BF, False, None),
'[dungeon-C-B1] Escape - Final Basement Room [left chest]': 0xEB5D, 'Ether Tablet': (0x180016, False, 'Light World'),
'[dungeon-C-B1] Escape - Final Basement Room [middle chest]': 0xEB60, 'Piece of Heart (Spectacle Rock)': (0x180140, False, 'Light World'),
'[dungeon-C-B1] Escape - Final Basement Room [right chest]': 0xEB63, '[dungeon-L3-1F] Tower of Hera - Freestanding Key': (0x180162, False, 'Tower of Hera'),
'[dungeon-C-1F] Sanctuary': 0xEA79, '[dungeon-L3-1F] Tower of Hera - Entrance': (0xE9AD, False, 'Tower of Hera'),
'[dungeon-A1-2F] Hyrule Castle Tower - 2 Knife Guys Room': 0xEAB5, '[dungeon-L3-1F] Tower of Hera - Basement': (0xE9E6, False, 'Tower of Hera'),
'[dungeon-A1-3F] Hyrule Castle Tower - Maze Room': 0xEAB2, '[dungeon-L3-1F] Tower of Hera - 4F [small chest]': (0xE9FB, False, 'Tower of Hera'),
'Old Mountain Man': 0xF69FA, '[dungeon-L3-1F] Tower of Hera - Big Chest': (0xE9F8, False, 'Tower of Hera'),
'Piece of Heart (Spectacle Rock Cave)': 0x180002, 'Moldorm - Heart Container': (0x180152, False, 'Tower of Hera'),
'[cave-009-1F] Death Mountain - right cave [top left chest]': 0xEB2A, 'Piece of Heart (Pyramid)': (0x180147, False, 'Dark World'),
'[cave-009-1F] Death Mountain - right cave [top left middle chest]': 0xEB2D, 'Catfish': (0xEE185, False, 'Dark World'),
'[cave-009-1F] Death Mountain - right cave [top right middle chest]': 0xEB30, 'Flute Boy': (0x330C7, False, 'Dark World'),
'[cave-009-1F] Death Mountain - right cave [top right chest]': 0xEB33, 'Piece of Heart (Digging Game)': (0x180148, False, 'Dark World'),
'[cave-009-1F] Death Mountain - right cave [bottom chest]': 0xEB36, 'Bombos Tablet': (0x180017, False, 'Light World'),
'[cave-009-B1] Death Mountain - right cave [left chest]': 0xEB39, '[cave-073] Cave Northeast of Swamp Palace [top chest]': (0xEB1E, False, None),
'[cave-009-B1] Death Mountain - right cave [right chest]': 0xEB3C, '[cave-073] Cave Northeast of Swamp Palace [top middle chest]': (0xEB21, False, None),
'[cave-012-1F] Death Mountain - left cave]': 0xE9BF, '[cave-073] Cave Northeast of Swamp Palace [bottom middle chest]': (0xEB24, False, None),
'Ether Tablet': 0x180016, '[cave-073] Cave Northeast of Swamp Palace [bottom chest]': (0xEB27, False, None),
'Piece of Heart (Spectacle Rock)': 0x180140, '[cave-073] Cave Northeast of Swamp Palace [generous guy]': (0x180011, False, None),
'[dungeon-L3-1F] Tower of Hera - Freestanding Key': 0x180162, 'Piece of Heart (Dark World Blacksmith Pegs)': (0x180006, False, None),
'[dungeon-L3-1F] Tower of Hera - Entrance': 0xE9AD, 'Pyramid Fairy [left chest]': (0xE980, False, None),
'[dungeon-L3-1F] Tower of Hera - Basement': 0xE9E6, 'Pyramid Fairy [right chest]': (0xE983, False, None),
'[dungeon-L3-1F] Tower of Hera - 4F [small chest]': 0xE9FB, '[cave-063] Doorless Hut': (0xE9EC, False, None),
'[dungeon-L3-1F] Tower of Hera - Big Chest': 0xE9F8, '[cave-062] C-Shaped House': (0xE9EF, False, None),
'Moldorm - Heart Container': 0x180152, 'Piece of Heart (Treasure Chest Game)': (0xEDA8, False, None),
'Piece of Heart (Pyramid)': 0x180147, 'Piece of Heart (Bumper Cave)': (0x180146, False, 'Dark World'),
'Catfish': 0xEE185, '[cave-071] Misery Mire West Area [left chest]': (0xEA73, False, None),
'Flute Boy': 0x330C7, '[cave-071] Misery Mire West Area [right chest]': (0xEA76, False, None),
'Piece of Heart (Digging Game)': 0x180148, '[cave-057-1F] Dark World Death Mountain Climb [top chest]': (0xEA7C, False, None),
'Bombos Tablet': 0x180017, '[cave-057-1F] Dark World Death Mountain Climb [bottom chest]': (0xEA7F, False, None),
'[cave-073] Cave Northeast of Swamp Palace [top chest]': 0xEB1E, '[cave-055] Spike Cave': (0xEA8B, False, None),
'[cave-073] Cave Northeast of Swamp Palace [top middle chest]': 0xEB21, '[cave-056] Hookshot Cave [top right chest]': (0xEB51, False, None),
'[cave-073] Cave Northeast of Swamp Palace [bottom middle chest]': 0xEB24, '[cave-056] Hookshot Cave [top left chest]': (0xEB54, False, None),
'[cave-073] Cave Northeast of Swamp Palace [bottom chest]': 0xEB27, '[cave-056] Hookshot Cave [bottom right chest]': (0xEB5A, False, None),
'[cave-073] Cave Northeast of Swamp Palace [generous guy]': 0x180011, '[cave-056] Hookshot Cave [bottom left chest]': (0xEB57, False, None),
'Piece of Heart (Dark World Blacksmith Pegs)': 0x180006, 'Piece of Heart (Death Mountain - Floating Island)': (0x180141, False, 'Light World'),
'Pyramid Fairy [left chest]': 0xE980, '[cave-013] Mimic Cave': (0xE9C5, False, None),
'Pyramid Fairy [right chest]': 0xE983, '[dungeon-D2-1F] Swamp Palace - First Room': (0xEA9D, False, 'Swamp Palace'),
'[cave-063] Doorless Hut': 0xE9EC, '[dungeon-D2-1F] Swamp Palace - Map Room': (0xE986, False, 'Swamp Palace'),
'[cave-062] C-Shaped House': 0xE9EF, '[dungeon-D2-B1] Swamp Palace - Big Chest': (0xE989, False, 'Swamp Palace'),
'Piece of Heart (Treasure Chest Game)': 0xEDA8, '[dungeon-D2-B1] Swamp Palace - South of Hookshot Room': (0xEAA0, False, 'Swamp Palace'),
'Piece of Heart (Bumper Cave)': 0x180146, '[dungeon-D2-B1] Swamp Palace - Big Key Chest': (0xEAA6, False, 'Swamp Palace'),
'[cave-071] Misery Mire West Area [left chest]': 0xEA73, '[dungeon-D2-B1] Swamp Palace - Compass Chest': (0xEAA3, False, 'Swamp Palace'),
'[cave-071] Misery Mire West Area [right chest]': 0xEA76, '[dungeon-D2-B2] Swamp Palace - Flooded Room [left chest]': (0xEAA9, False, 'Swamp Palace'),
'[cave-057-1F] Dark World Death Mountain Climb [top chest]': 0xEA7C, '[dungeon-D2-B2] Swamp Palace - Flooded Room [right chest]': (0xEAAC, False, 'Swamp Palace'),
'[cave-057-1F] Dark World Death Mountain Climb [bottom chest]': 0xEA7F, '[dungeon-D2-B2] Swamp Palace - Waterfall Room': (0xEAAF, False, 'Swamp Palace'),
'[cave-055] Spike Cave': 0xEA8B, 'Arrghus - Heart Container': (0x180154, False, 'Swamp Palace'),
'[cave-056] Hookshot Cave [top right chest]': 0xEB51, '[dungeon-D4-B1] Thieves Town - Bottom Left of Huge Room [bottom right chest]': (0xEA04, False, 'Thieves\' Town'),
'[cave-056] Hookshot Cave [top left chest]': 0xEB54, '[dungeon-D4-B1] Thieves Town - Bottom Left of Huge Room [top left chest]': (0xEA01, False, 'Thieves\' Town'),
'[cave-056] Hookshot Cave [bottom right chest]': 0xEB5A, '[dungeon-D4-B1] Thieves Town - Bottom Right of Huge Room': (0xEA07, False, 'Thieves\' Town'),
'[cave-056] Hookshot Cave [bottom left chest]': 0xEB57, '[dungeon-D4-B1] Thieves Town - Top Left of Huge Room': (0xEA0A, False, 'Thieves\' Town'),
'Piece of Heart (Death Mountain - Floating Island)': 0x180141, '[dungeon-D4-1F] Thieves Town - Room above Boss': (0xEA0D, False, 'Thieves\' Town'),
'[cave-013] Mimic Cave': 0xE9C5, '[dungeon-D4-B2] Thieves Town - Big Chest': (0xEA10, False, 'Thieves\' Town'),
'[dungeon-D2-1F] Swamp Palace - First Room': 0xEA9D, '[dungeon-D4-B2] Thieves Town - Chest next to Blind': (0xEA13, False, 'Thieves\' Town'),
'[dungeon-D2-1F] Swamp Palace - Map Room': 0xE986, 'Blind - Heart Container': (0x180156, False, 'Thieves\' Town'),
'[dungeon-D2-B1] Swamp Palace - Big Chest': 0xE989, '[dungeon-D3-B1] Skull Woods - Compass Room': (0xE992, False, 'Skull Woods'),
'[dungeon-D2-B1] Swamp Palace - South of Hookshot Room': 0xEAA0, '[dungeon-D3-B1] Skull Woods - East of Big Chest': (0xE99B, False, 'Skull Woods'),
'[dungeon-D2-B1] Swamp Palace - Big Key Chest': 0xEAA6, '[dungeon-D3-B1] Skull Woods - Big Chest': (0xE998, False, 'Skull Woods'),
'[dungeon-D2-B1] Swamp Palace - Compass Chest': 0xEAA3, '[dungeon-D3-B1] Skull Woods - Map Room': (0xE9A1, False, 'Skull Woods'),
'[dungeon-D2-B2] Swamp Palace - Flooded Room [left chest]': 0xEAA9, '[dungeon - D3 - B1] Skull Woods - South of Big Chest': (0xE9C8, False, 'Skull Woods'),
'[dungeon-D2-B2] Swamp Palace - Flooded Room [right chest]': 0xEAAC, '[dungeon-D3-B1] Skull Woods - Big Key Room': (0xE99E, False, 'Skull Woods'),
'[dungeon-D2-B2] Swamp Palace - Waterfall Room': 0xEAAF, '[dungeon-D3-B1] Skull Woods - Final Section Entrance': (0xE9FE, False, 'Skull Woods'),
'Arrghus - Heart Container': 0x180154, 'Mothula - Heart Container': (0x180155, False, 'Skull Woods'),
'[dungeon-D4-B1] Thieves Town - Bottom Left of Huge Room [bottom right chest]': 0xEA04, '[dungeon-D5-B1] Ice Palace - Compass Room': (0xE9D4, False, 'Ice Palace'),
'[dungeon-D4-B1] Thieves Town - Bottom Left of Huge Room [top left chest]': 0xEA01, '[dungeon-D5-B4] Ice Palace - Above Big Chest': (0xE995, False, 'Ice Palace'),
'[dungeon-D4-B1] Thieves Town - Bottom Right of Huge Room': 0xEA07, '[dungeon-D5-B5] Ice Palace - Big Chest': (0xE9AA, False, 'Ice Palace'),
'[dungeon-D4-B1] Thieves Town - Top Left of Huge Room': 0xEA0A, '[dungeon-D5-B5] Ice Palace - Jellyfish Room': (0xE9E3, False, 'Ice Palace'),
'[dungeon-D4-1F] Thieves Town - Room above Boss': 0xEA0D, '[dungeon-D5-B3] Ice Palace - Spike Room': (0xE9E0, False, 'Ice Palace'),
'[dungeon-D4-B2] Thieves Town - Big Chest': 0xEA10, '[dungeon-D5-B1] Ice Palace - Big Key Room': (0xE9A4, False, 'Ice Palace'),
'[dungeon-D4-B2] Thieves Town - Chest next to Blind': 0xEA13, '[dungeon-D5-B2] Ice Palace - Map Room': (0xE9DD, False, 'Ice Palace'),
'Blind - Heart Container': 0x180156, 'Kholdstare - Heart Container': (0x180157, False, 'Ice Palace'),
'[dungeon-D3-B1] Skull Woods - Compass Room': 0xE992, '[dungeon-D6-B1] Misery Mire - Big Chest': (0xEA67, False, 'Misery Mire'),
'[dungeon-D3-B1] Skull Woods - East of Big Chest': 0xE99B, '[dungeon-D6-B1] Misery Mire - Map Room': (0xEA6A, False, 'Misery Mire'),
'[dungeon-D3-B1] Skull Woods - Big Chest': 0xE998, '[dungeon-D6-B1] Misery Mire - Hub Room': (0xEA5E, False, 'Misery Mire'),
'[dungeon-D3-B1] Skull Woods - Map Room': 0xE9A1, '[dungeon-D6-B1] Misery Mire - End of Bridge': (0xEA61, False, 'Misery Mire'),
'[dungeon - D3 - B1] Skull Woods - South of Big Chest': 0xE9C8, '[dungeon-D6-B1] Misery Mire - Spike Room': (0xE9DA, False, 'Misery Mire'),
'[dungeon-D3-B1] Skull Woods - Big Key Room': 0xE99E, '[dungeon-D6-B1] Misery Mire - Compass Room': (0xEA64, False, 'Misery Mire'),
'[dungeon-D3-B1] Skull Woods - Final Section Entrance': 0xE9FE, '[dungeon-D6-B1] Misery Mire - Big Key Room': (0xEA6D, False, 'Misery Mire'),
'Mothula - Heart Container': 0x180155, 'Vitreous - Heart Container': (0x180158, False, 'Misery Mire'),
'[dungeon-D5-B1] Ice Palace - Compass Room': 0xE9D4, '[dungeon-D7-1F] Turtle Rock - Compass Room': (0xEA22, False, 'Turtle Rock'),
'[dungeon-D5-B4] Ice Palace - Above Big Chest': 0xE995, '[dungeon-D7-1F] Turtle Rock - Map Room [left chest]': (0xEA1C, False, 'Turtle Rock'),
'[dungeon-D5-B5] Ice Palace - Big Chest': 0xE9AA, '[dungeon-D7-1F] Turtle Rock - Map Room [right chest]': (0xEA1F, False, 'Turtle Rock'),
'[dungeon-D5-B5] Ice Palace - Jellyfish Room': 0xE9E3, '[dungeon-D7-1F] Turtle Rock - Chain Chomp Room': (0xEA16, False, 'Turtle Rock'),
'[dungeon-D5-B3] Ice Palace - Spike Room': 0xE9E0, '[dungeon-D7-B1] Turtle Rock - Big Key Room': (0xEA25, False, 'Turtle Rock'),
'[dungeon-D5-B1] Ice Palace - Big Key Room': 0xE9A4, '[dungeon-D7-B1] Turtle Rock - Big Chest': (0xEA19, False, 'Turtle Rock'),
'[dungeon-D5-B2] Ice Palace - Map Room': 0xE9DD, '[dungeon-D7-B1] Turtle Rock - Roller Switch Room': (0xEA34, False, 'Turtle Rock'),
'Kholdstare - Heart Container': 0x180157, '[dungeon-D7-B2] Turtle Rock - Eye Bridge Room [bottom left chest]': (0xEA31, False, 'Turtle Rock'),
'[dungeon-D6-B1] Misery Mire - Big Chest': 0xEA67, '[dungeon-D7-B2] Turtle Rock - Eye Bridge Room [bottom right chest]': (0xEA2E, False, 'Turtle Rock'),
'[dungeon-D6-B1] Misery Mire - Map Room': 0xEA6A, '[dungeon-D7-B2] Turtle Rock - Eye Bridge Room [top left chest]': (0xEA2B, False, 'Turtle Rock'),
'[dungeon-D6-B1] Misery Mire - Hub Room': 0xEA5E, '[dungeon-D7-B2] Turtle Rock - Eye Bridge Room [top right chest]': (0xEA28, False, 'Turtle Rock'),
'[dungeon-D6-B1] Misery Mire - End of Bridge': 0xEA61, 'Trinexx - Heart Container': (0x180159, False, 'Turtle Rock'),
'[dungeon-D6-B1] Misery Mire - Spike Room': 0xE9DA, '[dungeon-D1-B1] Dark Palace - Shooter Room': (0xEA5B, False, 'Palace of Darkness'),
'[dungeon-D6-B1] Misery Mire - Compass Room': 0xEA64, '[dungeon-D1-1F] Dark Palace - Jump Room [left chest]': (0xEA3A, False, 'Palace of Darkness'),
'[dungeon-D6-B1] Misery Mire - Big Key Room':0xEA6D , '[dungeon-D1-B1] Dark Palace - Turtle Stalfos Room': (0xEA49, False, 'Palace of Darkness'),
'Vitreous - Heart Container': 0x180158, '[dungeon-D1-1F] Dark Palace - Big Key Room': (0xEA37, False, 'Palace of Darkness'),
'[dungeon-D7-1F] Turtle Rock - Compass Room': 0xEA22, '[dungeon-D1-1F] Dark Palace - Jump Room [right chest]': (0xEA3D, False, 'Palace of Darkness'),
'[dungeon-D7-1F] Turtle Rock - Map Room [left chest]': 0xEA1C, '[dungeon-D1-1F] Dark Palace - Statue Push Room': (0xEA52, False, 'Palace of Darkness'),
'[dungeon-D7-1F] Turtle Rock - Map Room [right chest]': 0xEA1F, '[dungeon-D1-1F] Dark Palace - Compass Room': (0xEA43, False, 'Palace of Darkness'),
'[dungeon-D7-1F] Turtle Rock - Chain Chomp Room': 0xEA16, '[dungeon-D1-B1] Dark Palace - Dark Room [left chest]': (0xEA4C, False, 'Palace of Darkness'),
'[dungeon-D7-B1] Turtle Rock - Big Key Room': 0xEA25, '[dungeon-D1-B1] Dark Palace - Dark Room [right chest]': (0xEA4F, False, 'Palace of Darkness'),
'[dungeon-D7-B1] Turtle Rock - Big Chest': 0xEA19, '[dungeon-D1-1F] Dark Palace - Maze Room [top chest]': (0xEA55, False, 'Palace of Darkness'),
'[dungeon-D7-B1] Turtle Rock - Roller Switch Room': 0xEA34, '[dungeon-D1-1F] Dark Palace - Maze Room [bottom chest]': (0xEA58, False, 'Palace of Darkness'),
'[dungeon-D7-B2] Turtle Rock - Eye Bridge Room [bottom left chest]': 0xEA31, '[dungeon-D1-1F] Dark Palace - Big Chest': (0xEA40, False, 'Palace of Darkness'),
'[dungeon-D7-B2] Turtle Rock - Eye Bridge Room [bottom right chest]': 0xEA2E, '[dungeon-D1-1F] Dark Palace - Spike Statue Room': (0xEA46, False, 'Palace of Darkness'),
'[dungeon-D7-B2] Turtle Rock - Eye Bridge Room [top left chest]': 0xEA2B, 'Helmasaur - Heart Container': (0x180153, False, 'Palace of Darkness'),
'[dungeon-D7-B2] Turtle Rock - Eye Bridge Room [top right chest]': 0xEA28, '[dungeon-A2-1F] Ganons Tower - Torch': (0x180161, False, 'My Tower'),
'Trinexx - Heart Container': 0x180159, '[dungeon-A2-1F] Ganons Tower - Right Staircase [left chest]': (0xEAD9, False, 'My Tower'),
'[dungeon-D1-B1] Dark Palace - Shooter Room': 0xEA5B, '[dungeon-A2-1F] Ganons Tower - Right Staircase [right chest]': (0xEADC, False, 'My Tower'),
'[dungeon-D1-1F] Dark Palace - Jump Room [left chest]': 0xEA3A, '[dungeon-A2-1F] Ganons Tower - Tile Room': (0xEAE2, False, 'My Tower'),
'[dungeon-D1-B1] Dark Palace - Turtle Stalfos Room': 0xEA49, '[dungeon-A2-1F] Ganons Tower - Compass Room [top left chest]': (0xEAE5, False, 'My Tower'),
'[dungeon-D1-1F] Dark Palace - Big Key Room': 0xEA37, '[dungeon-A2-1F] Ganons Tower - Compass Room [top right chest]': (0xEAE8, False, 'My Tower'),
'[dungeon-D1-1F] Dark Palace - Jump Room [right chest]': 0xEA3D, '[dungeon-A2-1F] Ganons Tower - Compass Room [bottom left chest]': (0xEAEB, False, 'My Tower'),
'[dungeon-D1-1F] Dark Palace - Statue Push Room': 0xEA52, '[dungeon-A2-1F] Ganons Tower - Compass Room [bottom right chest]': (0xEAEE, False, 'My Tower'),
'[dungeon-D1-1F] Dark Palace - Compass Room': 0xEA43, '[dungeon-A2-1F] Ganons Tower - North of Hookshot Room [top left chest]': (0xEAB8, False, 'My Tower'),
'[dungeon-D1-B1] Dark Palace - Dark Room [left chest]': 0xEA4C, '[dungeon-A2-1F] Ganons Tower - North of Hookshot Room [top right chest]': (0xEABB, False, 'My Tower'),
'[dungeon-D1-B1] Dark Palace - Dark Room [right chest]': 0xEA4F, '[dungeon-A2-1F] Ganons Tower - North of Hookshot Room [bottom left chest]': (0xEABE, False, 'My Tower'),
'[dungeon-D1-1F] Dark Palace - Maze Room [top chest]': 0xEA55, '[dungeon-A2-1F] Ganons Tower - North of Hookshot Room [bottom right chest]': (0xEAC1, False, 'My Tower'),
'[dungeon-D1-1F] Dark Palace - Maze Room [bottom chest]': 0xEA58, '[dungeon-A2-1F] Ganons Tower - Map Room': (0xEAD3, False, 'My Tower'),
'[dungeon-D1-1F] Dark Palace - Big Chest': 0xEA40, '[dungeon-A2-1F] Ganons Tower - Firesnake Room': (0xEAD0, False, 'My Tower'),
'[dungeon-D1-1F] Dark Palace - Spike Statue Room': 0xEA46, '[dungeon-A2-1F] Ganons Tower - Teleport Room [top left chest]': (0xEAC4, False, 'My Tower'),
'Helmasaur - Heart Container': 0x180153, '[dungeon-A2-1F] Ganons Tower - Teleport Room [top right chest]': (0xEAC7, False, 'My Tower'),
'[dungeon-A2-1F] Ganons Tower - Torch': 0x180161, '[dungeon-A2-1F] Ganons Tower - Teleport Room [bottom left chest]': (0xEACA, False, 'My Tower'),
'[dungeon-A2-1F] Ganons Tower - Right Staircase [left chest]': 0xEAD9, '[dungeon-A2-1F] Ganons Tower - Teleport Room [bottom right chest]': (0xEACD, False, 'My Tower'),
'[dungeon-A2-1F] Ganons Tower - Right Staircase [right chest]': 0xEADC, '[dungeon-A2-1F] Ganons Tower - above Armos': (0xEADF, False, 'My Tower'),
'[dungeon-A2-1F] Ganons Tower - Tile Room': 0xEAE2, '[dungeon-A2-1F] Ganons Tower - Big Chest': (0xEAD6, False, 'My Tower'),
'[dungeon-A2-1F] Ganons Tower - Compass Room [top left chest]': 0xEAE5, '[dungeon-A2-B1] Ganons Tower - Armos Room [left chest]': (0xEAF4, False, 'My Tower'),
'[dungeon-A2-1F] Ganons Tower - Compass Room [top right chest]': 0xEAE8, '[dungeon-A2-B1] Ganons Tower - Armos Room [right chest]': (0xEAF7, False, 'My Tower'),
'[dungeon-A2-1F] Ganons Tower - Compass Room [bottom left chest]': 0xEAEB, '[dungeon-A2-B1] Ganons Tower - Armos Room [bottom chest]': (0xEAF1, False, 'My Tower'),
'[dungeon-A2-1F] Ganons Tower - Compass Room [bottom right chest]': 0xEAEE, '[dungeon-A2-6F] Ganons Tower - Mini Helmasaur Room [left chest]': (0xEAFD, False, 'My Tower'),
'[dungeon-A2-1F] Ganons Tower - North of Hookshot Room [top left chest]': 0xEAB8, '[dungeon-A2-6F] Ganons Tower - Mini Helmasaur Room [right chest]': (0xEB00, False, 'My Tower'),
'[dungeon-A2-1F] Ganons Tower - North of Hookshot Room [top right chest]': 0xEABB, '[dungeon-A2-6F] Ganons Tower - Room before Moldorm': (0xEB03, False, 'My Tower'),
'[dungeon-A2-1F] Ganons Tower - North of Hookshot Room [bottom left chest]': 0xEABE, '[dungeon-A2-6F] Ganons Tower - Moldorm Room': (0xEB06, False, 'My Tower'),
'[dungeon-A2-1F] Ganons Tower - North of Hookshot Room [bottom right chest]': 0xEAC1, 'Ganon': (None, False, None),
'[dungeon-A2-1F] Ganons Tower - Map Room': 0xEAD3, 'Armos - Pendant': ([0x1209D, 0x53EF8, 0x53EF9, 0x180052, 0x18007C, 0xC6FE], True, 'Eastern Palace'),
'[dungeon-A2-1F] Ganons Tower - Firesnake Room': 0xEAD0, 'Lanmolas - Pendant': ([0x1209E, 0x53F1C, 0x53F1D, 0x180053, 0x180078, 0xC6FF], True, 'Desert Palace'),
'[dungeon-A2-1F] Ganons Tower - Teleport Room [top left chest]': 0xEAC4, 'Moldorm - Pendant': ([0x120A5, 0x53F0A, 0x53F0B, 0x18005A, 0x18007A, 0xC706], True, 'Tower of Hera'),
'[dungeon-A2-1F] Ganons Tower - Teleport Room [top right chest]': 0xEAC7, 'Helmasaur - Crystal': ([0x120A1, 0x53F00, 0x53F01, 0x180056, 0x18007D, 0xC702], True, 'Palace of Darkness'),
'[dungeon-A2-1F] Ganons Tower - Teleport Room [bottom left chest]': 0xEACA, 'Arrghus - Crystal': ([0x120A0, 0x53F6C, 0x53F6D, 0x180055, 0x180071, 0xC701], True, 'Swamp Palace'),
'[dungeon-A2-1F] Ganons Tower - Teleport Room [bottom right chest]': 0xEACD, 'Blind - Crystal': ([0x120A6, 0x53F36, 0x53F37, 0x18005B, 0x180077, 0xC707], True, 'Thieves\' Town'),
'[dungeon-A2-1F] Ganons Tower - above Armos': 0xEADF, 'Mothula - Crystal': ([0x120A3, 0x53F12, 0x53F13, 0x180058, 0x18007B, 0xC704], True, 'Skull Woods'),
'[dungeon-A2-1F] Ganons Tower - Big Chest': 0xEAD6, 'Kholdstare - Crystal': ([0x120A4, 0x53F5A, 0x53F5B, 0x180059, 0x180073, 0xC705], True, 'Ice Palace'),
'[dungeon-A2-B1] Ganons Tower - Armos Room [left chest]': 0xEAF4, 'Vitreous - Crystal': ([0x120A2, 0x53F48, 0x53F49, 0x180057, 0x180075, 0xC703], True, 'Misery Mire'),
'[dungeon-A2-B1] Ganons Tower - Armos Room [right chest]': 0xEAF7, 'Trinexx - Crystal': ([0x120A7, 0x53F24, 0x53F25, 0x18005C, 0x180079, 0xC708], True, 'Turtle Rock')}
'[dungeon-A2-B1] Ganons Tower - Armos Room [bottom chest]': 0xEAF1,
'[dungeon-A2-6F] Ganons Tower - Mini Helmasaur Room [left chest]': 0xEAFD,
'[dungeon-A2-6F] Ganons Tower - Mini Helmasaur Room [right chest]': 0xEB00,
'[dungeon-A2-6F] Ganons Tower - Room before Moldorm': 0xEB03,
'[dungeon-A2-6F] Ganons Tower - Moldorm Room': 0xEB06}
crystal_locations = {'Armos - Pendant': [0x1209D, 0x53EF8, 0x53EF9, 0x180052, 0x18007C, 0xC6FE],
'Lanmolas - Pendant': [0x1209E, 0x53F1C, 0x53F1D, 0x180053, 0x180078, 0xC6FF],
'Moldorm - Pendant': [0x120A5, 0x53F0A, 0x53F0B, 0x18005A, 0x18007A, 0xC706],
'Helmasaur - Crystal': [0x120A1, 0x53F00, 0x53F01, 0x180056, 0x18007D, 0xC702],
'Arrghus - Crystal': [0x120A0, 0x53F6C, 0x53F6D, 0x180055, 0x180071, 0xC701],
'Blind - Crystal': [0x120A6, 0x53F36, 0x53F37, 0x18005B, 0x180077, 0xC707],
'Mothula - Crystal': [0x120A3, 0x53F12, 0x53F13, 0x180058, 0x18007B, 0xC704],
'Kholdstare - Crystal': [0x120A4, 0x53F5A, 0x53F5B, 0x180059, 0x180073, 0xC705],
'Vitreous - Crystal': [0x120A2, 0x53F48, 0x53F49, 0x180057, 0x180075, 0xC703],
'Trinexx - Crystal': [0x120A7, 0x53F24, 0x53F25, 0x18005C, 0x180079, 0xC708]}
dungeon_music_addresses = {'Armos - Pendant': [0x1559A],
'Lanmolas - Pendant': [0x1559B, 0x1559C, 0x1559D, 0x1559E],
'Moldorm - Pendant': [0x155C5, 0x1107A, 0x10B8C],
'Helmasaur - Crystal': [0x155B8],
'Arrghus - Crystal': [0x155B7],
'Blind - Crystal': [0x155C6],
'Mothula - Crystal': [0x155BA, 0x155BB, 0x155BC, 0x155BD, 0x15608, 0x15609, 0x1560A, 0x1560B],
'Kholdstare - Crystal': [0x155BF],
'Vitreous - Crystal': [0x155B9],
'Trinexx - Crystal': [0x155C7, 0x155A7, 0x155AA, 0x155AB]}

31
Rom.py
View File

@ -1,4 +1,4 @@
from Regions import location_addresses, crystal_locations, dungeon_music_addresses from Dungeons import dungeon_music_addresses
from EntranceShuffle import door_addresses, single_doors from EntranceShuffle import door_addresses, single_doors
from Text import string_to_alttp_text, text_addresses, credits_addresses, string_to_credits from Text import string_to_alttp_text, text_addresses, credits_addresses, string_to_credits
from Text import Uncle_texts, Ganon1_texts, PyramidFairy_texts, TavernMan_texts, Sahasrahla2_texts, Triforce_texts, Blind_texts, BombShop2_texts from Text import Uncle_texts, Ganon1_texts, PyramidFairy_texts, TavernMan_texts, Sahasrahla2_texts, Triforce_texts, Blind_texts, BombShop2_texts
@ -6,7 +6,7 @@ from Text import KingsReturn_texts, Sanctuary_texts, Kakariko_texts, Blacksmiths
import random import random
def patch_rom(world, rom, quickswap=False): def patch_rom(world, rom, quickswap=False, beep='normal'):
# patch items # patch items
for location in world.get_locations(): for location in world.get_locations():
if location.name == 'Ganon': if location.name == 'Ganon':
@ -15,13 +15,12 @@ def patch_rom(world, rom, quickswap=False):
itemid = location.item.code if location.item is not None else 0x5A itemid = location.item.code if location.item is not None else 0x5A
try: locationaddress = location.address
if not location.crystal:
# regular items # regular items
locationaddress = location_addresses[location.name]
write_byte(rom, locationaddress, itemid) write_byte(rom, locationaddress, itemid)
except KeyError: else:
# crystals # crystals
locationaddress = crystal_locations[location.name]
for address, value in zip(locationaddress, itemid): for address, value in zip(locationaddress, itemid):
write_byte(rom, address, value) write_byte(rom, address, value)
@ -221,6 +220,12 @@ def patch_rom(world, rom, quickswap=False):
write_strings(rom, world) write_strings(rom, world)
# set rom name
write_bytes(rom, 0x7FC0, [0x45, 0x6E, 0x74, 0x72, 0x61, 0x6E, 0x63, 0x65, 0x52, 0x61, 0x6E, 0x64, 0x6F, 0x6D, 0x69, 0x7A, 0x65, 0x72, 0x00, 0x00, 0x00])
# set heart beep rate
write_byte(rom, 0x180033, {'off': 0x00, 'half': 0x40, 'quarter': 0x80, 'normal': 0x20}[beep])
return rom return rom
@ -244,10 +249,16 @@ def write_credits_string_to_rom(rom, target, string):
def write_strings(rom, world): def write_strings(rom, world):
# ToDo should read location of items and give hint silverarrows = world.find_items('Silver Arrows')
write_string_to_rom(rom, 'Ganon2', 'Did you find the silver arrows in Hyrule?') silverarrow_hint = ('in %s?' % silverarrows[0].hint_text) if silverarrows else '?\nI think not!'
write_string_to_rom(rom, 'BombShop1', 'Big Bomb?\nI Uh … Never heard of that. Move along.') write_string_to_rom(rom, 'Ganon2', 'Did you find the silver arrows %s' % silverarrow_hint)
write_string_to_rom(rom, 'Sahasrahla1', 'How Did you Find me?')
crystal5 = world.find_items('Crystal 5')[0]
crystal6 = world.find_items('Crystal 6')[0]
write_string_to_rom(rom, 'BombShop1', 'Big Bomb?\nMy supply is blocked until you clear %s and %s.' % (crystal5.hint_text, crystal6.hint_text))
greenpendant = world.find_items('Green Pendant')[0]
write_string_to_rom(rom, 'Sahasrahla1', 'I lost my family heirloom in %s' % greenpendant.hint_text)
write_string_to_rom(rom, 'Uncle', Uncle_texts[random.randint(0, len(Uncle_texts) - 1)]) write_string_to_rom(rom, 'Uncle', Uncle_texts[random.randint(0, len(Uncle_texts) - 1)])
write_string_to_rom(rom, 'Triforce', Triforce_texts[random.randint(0, len(Triforce_texts) - 1)]) write_string_to_rom(rom, 'Triforce', Triforce_texts[random.randint(0, len(Triforce_texts) - 1)])

17
Text.py
View File

@ -28,13 +28,16 @@ credits_addresses = {'KingsReturn': (0x76928, 22),
'LostWoods': (0x76C51, 16), 'LostWoods': (0x76C51, 16),
'Altar': (0x76C81, 20)} 'Altar': (0x76C81, 20)}
Uncle_texts = ['Good Luck!\nYou will need it.'] Uncle_texts = ['Good Luck!\nYou will need it.',
Triforce_texts = ['Product has Hole in center. Bad seller, 0 out of 5.'] '10\n9\n8\n7\n6\n5\n4\n3\n2\n1\nGo!']
Triforce_texts = ['Product has Hole in center. Bad seller, 0 out of 5.',
'\n Well Done!']
BombShop2_texts = ['Bombs!\nBombs!\nBiggest!\nBestest!\nGreatest!\nBoomest!'] BombShop2_texts = ['Bombs!\nBombs!\nBiggest!\nBestest!\nGreatest!\nBoomest!']
PyramidFairy_texts = ['May I talk to you about our lord and savior, Ganon?'] PyramidFairy_texts = ['May I talk to you about our lord and savior, Ganon?']
Sahasrahla2_texts = ['You already got my item, idiot.'] Sahasrahla2_texts = ['You already got my item, idiot.']
Blind_texts = ['I bet you expected a vision related pun?\n\nNot Today.\n Didn\'t see that coming, did you?'] Blind_texts = ['I bet you expected a vision related pun?\n\nNot Today.\n Didn\'t see that coming, did you?']
Ganon1_texts = ['\n\n\n\n\n\n\n\n\nWhy are you reading an empty textbox?'] Ganon1_texts = ['\n\n\n\n\n\n\n\n\nWhy are you reading an empty textbox?',
'Hi']
TavernMan_texts = ['Did you know that talking to random NPCs wastes time in a race? I hope this information may be of use to you in the future.'] TavernMan_texts = ['Did you know that talking to random NPCs wastes time in a race? I hope this information may be of use to you in the future.']
KingsReturn_texts = ['Who is this even'] KingsReturn_texts = ['Who is this even']
@ -54,14 +57,6 @@ MagicShop_texts = ['Drug deal']
FluteBoy_texts = ['Stumped'] FluteBoy_texts = ['Stumped']
def write_texts_to_rom(rom, world):
pass
def write_credits_to_rom(rom, world):
pass
def string_to_credits(s, length): def string_to_credits(s, length):
buf = bytearray() buf = bytearray()