do not include entrance hint data if entrance is vanilla

This commit is contained in:
Fabian Dill 2020-06-20 12:22:50 +02:00
parent 8d47bc5425
commit af13b62c8d
2 changed files with 112 additions and 5 deletions

View File

@ -10,7 +10,7 @@ import zlib
from BaseClasses import World, CollectionState, Item, Region, Location, Shop from BaseClasses import World, CollectionState, Item, Region, Location, Shop
from Items import ItemFactory 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 InvertedRegions import create_inverted_regions, mark_dark_world_regions
from EntranceShuffle import link_entrances, link_inverted_entrances 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 from Rom import patch_rom, patch_race_rom, patch_enemizer, apply_rom_settings, LocalRom, get_hash_string
@ -250,6 +250,7 @@ def main(args, seed=None):
main_entrance = get_entrance_to_region(region) main_entrance = get_entrance_to_region(region)
for location in region.locations: for location in region.locations:
if type(location.address) == int: # skips events and crystals if type(location.address) == int: # skips events and crystals
if lookup_vanilla_location_to_entrance[location.address] != main_entrance.name:
er_hint_data[region.player][location.address] = main_entrance.name er_hint_data[region.player][location.address] = main_entrance.name
multidata = zlib.compress(json.dumps({"names": parsed_names, multidata = zlib.compress(json.dumps({"names": parsed_names,

View File

@ -1,4 +1,5 @@
import collections import collections
from BaseClasses import Region, Location, Entrance, RegionType, Shop, ShopType from BaseClasses import Region, Location, Entrance, RegionType, Shop, ShopType
@ -637,3 +638,108 @@ location_table = {'Mushroom': (0x180013, 0x186338, False, 'in the woods'),
lookup_id_to_name = {data[0]: name for name, data in location_table.items() if type(data[0]) == int} 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_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'}