From af13b62c8db016304f15da8ca28df2942f981ae8 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Sat, 20 Jun 2020 12:22:50 +0200 Subject: [PATCH] do not include entrance hint data if entrance is vanilla --- Main.py | 5 ++- Regions.py | 112 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 112 insertions(+), 5 deletions(-) diff --git a/Main.py b/Main.py index 86a3e617..61b7e9b6 100644 --- a/Main.py +++ b/Main.py @@ -10,7 +10,7 @@ import zlib from BaseClasses import World, CollectionState, Item, Region, Location, Shop from Items import ItemFactory -from Regions import create_regions, create_shops, mark_light_world_regions +from Regions import create_regions, create_shops, mark_light_world_regions, lookup_vanilla_location_to_entrance from InvertedRegions import create_inverted_regions, mark_dark_world_regions from EntranceShuffle import link_entrances, link_inverted_entrances from Rom import patch_rom, patch_race_rom, patch_enemizer, apply_rom_settings, LocalRom, get_hash_string @@ -250,7 +250,8 @@ def main(args, seed=None): main_entrance = get_entrance_to_region(region) for location in region.locations: if type(location.address) == int: # skips events and crystals - er_hint_data[region.player][location.address] = main_entrance.name + if lookup_vanilla_location_to_entrance[location.address] != main_entrance.name: + er_hint_data[region.player][location.address] = main_entrance.name multidata = zlib.compress(json.dumps({"names": parsed_names, "roms": rom_names, diff --git a/Regions.py b/Regions.py index d98d84b5..a3ed9fec 100644 --- a/Regions.py +++ b/Regions.py @@ -1,4 +1,5 @@ import collections + from BaseClasses import Region, Location, Entrance, RegionType, Shop, ShopType @@ -629,11 +630,116 @@ location_table = {'Mushroom': (0x180013, 0x186338, False, 'in the woods'), 'Skull Woods - Prize': ( [0x120A3, 0x53F12, 0x53F13, 0x180058, 0x18007B, 0xC704], None, True, 'Skull Woods'), 'Ice Palace - Prize': ( - [0x120A4, 0x53F5A, 0x53F5B, 0x180059, 0x180073, 0xC705], None, True, 'Ice Palace'), + [0x120A4, 0x53F5A, 0x53F5B, 0x180059, 0x180073, 0xC705], None, True, 'Ice Palace'), 'Misery Mire - Prize': ( - [0x120A2, 0x53F48, 0x53F49, 0x180057, 0x180075, 0xC703], None, True, 'Misery Mire'), + [0x120A2, 0x53F48, 0x53F49, 0x180057, 0x180075, 0xC703], None, True, 'Misery Mire'), 'Turtle Rock - Prize': ( - [0x120A7, 0x53F24, 0x53F25, 0x18005C, 0x180079, 0xC708], None, True, 'Turtle Rock')} + [0x120A7, 0x53F24, 0x53F25, 0x18005C, 0x180079, 0xC708], None, True, 'Turtle Rock')} lookup_id_to_name = {data[0]: name for name, data in location_table.items() if type(data[0]) == int} lookup_id_to_name[-1] = "cheat console" + +lookup_vanilla_location_to_entrance = {1572883: 'Kings Grave Inner Rocks', 191256: 'Kings Grave Inner Rocks', + 1573194: 'Kings Grave Inner Rocks', 1573189: 'Kings Grave Inner Rocks', + 212328: 'Kings Grave Inner Rocks', 60175: 'Blinds Hideout', + 60178: 'Blinds Hideout', 60181: 'Blinds Hideout', 60184: 'Blinds Hideout', + 60187: 'Blinds Hideout', 188229: 'Hyrule Castle Secret Entrance Drop', + 59761: 'Hyrule Castle Secret Entrance Drop', 975299: 'Zoras River', + 1573193: 'Zoras River', 59824: 'Waterfall of Wishing', + 59857: 'Waterfall of Wishing', 59770: 'Kings Grave', 59788: 'Dam', + 59836: 'Links House', 59854: 'Tavern North', 59881: 'Chicken House', + 59890: 'Aginahs Cave', 60034: 'Sahasrahlas Hut', 60037: 'Sahasrahlas Hut', + 60040: 'Sahasrahlas Hut', 193020: 'Sahasrahlas Hut', + 60046: 'Kakariko Well Drop', 60049: 'Kakariko Well Drop', + 60052: 'Kakariko Well Drop', 60055: 'Kakariko Well Drop', + 60058: 'Kakariko Well Drop', 1572906: 'Blacksmiths Hut', + 1572885: 'Bat Cave Drop', 211407: 'Sick Kids House', + 212605: 'Hobo Bridge', 1572864: 'Lost Woods Hideout Drop', + 1572865: 'Lumberjack Tree Tree', 1572867: 'Cave 45', + 1572868: 'Graveyard Cave', 1572869: 'Checkerboard Cave', + 60226: 'Mini Moldorm Cave', 60229: 'Mini Moldorm Cave', + 60232: 'Mini Moldorm Cave', 60235: 'Mini Moldorm Cave', + 1572880: 'Mini Moldorm Cave', 60238: 'Ice Rod Cave', + 60223: 'Bonk Rock Cave', 1572882: 'Library', 1572884: 'Potion Shop', + 1573188: 'Lake Hylia Island Mirror Spot', + 1573186: 'Maze Race Mirror Spot', 1573187: 'Desert Ledge Return Rocks', + 59791: 'Desert Palace Entrance (West)', + 1573216: 'Desert Palace Entrance (West)', + 59830: 'Desert Palace Entrance (West)', + 59851: 'Desert Palace Entrance (West)', + 59842: 'Desert Palace Entrance (West)', + 1573201: 'Desert Palace Entrance (North)', 59767: 'Eastern Palace', + 59773: 'Eastern Palace', 59827: 'Eastern Palace', 59833: 'Eastern Palace', + 59893: 'Eastern Palace', 1573200: 'Eastern Palace', + 166320: 'Master Sword Meadow', 59764: 'Hyrule Castle Entrance (South)', + 60172: 'Hyrule Castle Entrance (South)', + 60169: 'Hyrule Castle Entrance (South)', + 59758: 'Hyrule Castle Entrance (South)', + 60253: 'Hyrule Castle Entrance (South)', + 60256: 'Hyrule Castle Entrance (South)', + 60259: 'Hyrule Castle Entrance (South)', 60025: 'Sanctuary S&Q', + 60085: 'Agahnims Tower', 60082: 'Agahnims Tower', + 1010170: 'Old Man Cave (West)', 1572866: 'Spectacle Rock Cave', + 60202: 'Paradox Cave (Bottom)', 60205: 'Paradox Cave (Bottom)', + 60208: 'Paradox Cave (Bottom)', 60211: 'Paradox Cave (Bottom)', + 60214: 'Paradox Cave (Bottom)', 60217: 'Paradox Cave (Bottom)', + 60220: 'Paradox Cave (Bottom)', 59839: 'Spiral Cave', + 1572886: 'Death Mountain (Top)', 1573184: 'Spectacle Rock Mirror Spot', + 1573218: 'Tower of Hera', 59821: 'Tower of Hera', 59878: 'Tower of Hera', + 59899: 'Tower of Hera', 59896: 'Tower of Hera', 1573202: 'Tower of Hera', + 1573191: 'Top of Pyramid', 975237: 'Catfish Entrance Rock', + 209095: 'South Dark World Bridge', 1573192: 'South Dark World Bridge', + 1572887: 'Bombos Tablet Mirror Spot', 60190: 'Hype Cave', + 60193: 'Hype Cave', 60196: 'Hype Cave', 60199: 'Hype Cave', + 1572881: 'Hype Cave', 1572870: 'Dark World Hammer Peg Cave', + 59776: 'Pyramid Fairy', 59779: 'Pyramid Fairy', 59884: 'Brewery', + 59887: 'C-Shaped House', 60840: 'Chest Game', + 1573190: 'Bumper Cave (Bottom)', 60019: 'Mire Shed', 60022: 'Mire Shed', + 60028: 'Superbunny Cave (Top)', 60031: 'Superbunny Cave (Top)', + 60043: 'Spike Cave', 60241: 'Hookshot Cave', 60244: 'Hookshot Cave', + 60250: 'Hookshot Cave', 60247: 'Hookshot Cave', + 1573185: 'Floating Island Mirror Spot', 59845: 'Mimic Cave', + 60061: 'Swamp Palace', 59782: 'Swamp Palace', 59785: 'Swamp Palace', + 60064: 'Swamp Palace', 60070: 'Swamp Palace', 60067: 'Swamp Palace', + 60073: 'Swamp Palace', 60076: 'Swamp Palace', 60079: 'Swamp Palace', + 1573204: 'Swamp Palace', 59908: 'Thieves Town', 59905: 'Thieves Town', + 59911: 'Thieves Town', 59914: 'Thieves Town', 59917: 'Thieves Town', + 59920: 'Thieves Town', 59923: 'Thieves Town', 1573206: 'Thieves Town', + 59803: 'Skull Woods First Section Door', + 59848: 'Skull Woods First Section Hole (East)', + 59794: 'Skull Woods First Section Hole (West)', + 59809: 'Skull Woods First Section Hole (West)', + 59800: 'Skull Woods First Section Hole (North)', + 59806: 'Skull Woods Second Section Door (East)', + 59902: 'Skull Woods Final Section', 1573205: 'Skull Woods Final Section', + 59860: 'Ice Palace', 59797: 'Ice Palace', 59818: 'Ice Palace', + 59875: 'Ice Palace', 59872: 'Ice Palace', 59812: 'Ice Palace', + 59869: 'Ice Palace', 1573207: 'Ice Palace', 60007: 'Misery Mire', + 60010: 'Misery Mire', 59998: 'Misery Mire', 60001: 'Misery Mire', + 59866: 'Misery Mire', 60004: 'Misery Mire', 60013: 'Misery Mire', + 1573208: 'Misery Mire', 59938: 'Turtle Rock', 59932: 'Turtle Rock', + 59935: 'Turtle Rock', 59926: 'Turtle Rock', + 59941: 'Dark Death Mountain Ledge (West)', + 59929: 'Dark Death Mountain Ledge (East)', + 59956: 'Dark Death Mountain Ledge (West)', + 59953: 'Turtle Rock Isolated Ledge Entrance', + 59950: 'Turtle Rock Isolated Ledge Entrance', + 59947: 'Turtle Rock Isolated Ledge Entrance', + 59944: 'Turtle Rock Isolated Ledge Entrance', + 1573209: 'Turtle Rock Isolated Ledge Entrance', + 59995: 'Palace of Darkness', 59965: 'Palace of Darkness', + 59977: 'Palace of Darkness', 59959: 'Palace of Darkness', + 59962: 'Palace of Darkness', 59986: 'Palace of Darkness', + 59971: 'Palace of Darkness', 59980: 'Palace of Darkness', + 59983: 'Palace of Darkness', 59989: 'Palace of Darkness', + 59992: 'Palace of Darkness', 59968: 'Palace of Darkness', + 59974: 'Palace of Darkness', 1573203: 'Palace of Darkness', + 1573217: 'Ganons Tower', 60121: 'Ganons Tower', 60124: 'Ganons Tower', + 60130: 'Ganons Tower', 60133: 'Ganons Tower', 60136: 'Ganons Tower', + 60139: 'Ganons Tower', 60142: 'Ganons Tower', 60088: 'Ganons Tower', + 60091: 'Ganons Tower', 60094: 'Ganons Tower', 60097: 'Ganons Tower', + 60115: 'Ganons Tower', 60112: 'Ganons Tower', 60100: 'Ganons Tower', + 60103: 'Ganons Tower', 60106: 'Ganons Tower', 60109: 'Ganons Tower', + 60127: 'Ganons Tower', 60118: 'Ganons Tower', 60148: 'Ganons Tower', + 60151: 'Ganons Tower', 60145: 'Ganons Tower', 60157: 'Ganons Tower', + 60160: 'Ganons Tower', 60163: 'Ganons Tower', 60166: 'Ganons Tower'}