from typing import Dict, NamedTuple, Optional, Set
import typing


from BaseClasses import Location


class KH1Location(Location):
    game: str = "Kingdom Hearts"


class KH1LocationData(NamedTuple):
    category: str
    code: int


def get_locations_by_category(category: str) -> Dict[str, KH1LocationData]:
    location_dict: Dict[str, KH1LocationData] = {}
    for name, data in location_table.items():
        if data.category == category:
            location_dict.setdefault(name, data)

    return location_dict


location_table: Dict[str, KH1LocationData] = {
    #"Destiny Islands Chest":                                                           KH1LocationData("Destiny Islands",  265_0011), missable
    "Traverse Town 1st District Candle Puzzle Chest":                                   KH1LocationData("Traverse Town",    265_0211),
    "Traverse Town 1st District Accessory Shop Roof Chest":                             KH1LocationData("Traverse Town",    265_0212),
    "Traverse Town 2nd District Boots and Shoes Awning Chest":                          KH1LocationData("Traverse Town",    265_0213),
    "Traverse Town 2nd District Rooftop Chest":                                         KH1LocationData("Traverse Town",    265_0214),
    "Traverse Town 2nd District Gizmo Shop Facade Chest":                               KH1LocationData("Traverse Town",    265_0251),
    "Traverse Town Alleyway Balcony Chest":                                             KH1LocationData("Traverse Town",    265_0252),
    "Traverse Town Alleyway Blue Room Awning Chest":                                    KH1LocationData("Traverse Town",    265_0253),
    "Traverse Town Alleyway Corner Chest":                                              KH1LocationData("Traverse Town",    265_0254),
    "Traverse Town Green Room Clock Puzzle Chest":                                      KH1LocationData("Traverse Town",    265_0292),
    "Traverse Town Green Room Table Chest":                                             KH1LocationData("Traverse Town",    265_0293),
    "Traverse Town Red Room Chest":                                                     KH1LocationData("Traverse Town",    265_0294),
    "Traverse Town Mystical House Yellow Trinity Chest":                                KH1LocationData("Traverse Town",    265_0331),
    "Traverse Town Accessory Shop Chest":                                               KH1LocationData("Traverse Town",    265_0332),
    "Traverse Town Secret Waterway White Trinity Chest":                                KH1LocationData("Traverse Town",    265_0333),
    "Traverse Town Geppetto's House Chest":                                             KH1LocationData("Traverse Town",    265_0334),
    "Traverse Town Item Workshop Right Chest":                                          KH1LocationData("Traverse Town",    265_0371),
    "Traverse Town 1st District Blue Trinity Balcony Chest":                            KH1LocationData("Traverse Town",    265_0411),
    "Traverse Town Mystical House Glide Chest":                                         KH1LocationData("Traverse Town",    265_0891),
    "Traverse Town Alleyway Behind Crates Chest":                                       KH1LocationData("Traverse Town",    265_0892),
    "Traverse Town Item Workshop Left Chest":                                           KH1LocationData("Traverse Town",    265_0893),
    "Traverse Town Secret Waterway Near Stairs Chest":                                  KH1LocationData("Traverse Town",    265_0894),
    "Wonderland Rabbit Hole Green Trinity Chest":                                       KH1LocationData("Wonderland",       265_0931),
    "Wonderland Rabbit Hole Defeat Heartless 1 Chest":                                  KH1LocationData("Wonderland",       265_0932),
    "Wonderland Rabbit Hole Defeat Heartless 2 Chest":                                  KH1LocationData("Wonderland",       265_0933),
    "Wonderland Rabbit Hole Defeat Heartless 3 Chest":                                  KH1LocationData("Wonderland",       265_0934),
    "Wonderland Bizarre Room Green Trinity Chest":                                      KH1LocationData("Wonderland",       265_0971),
    "Wonderland Queen's Castle Hedge Left Red Chest":                                   KH1LocationData("Wonderland",       265_1011),
    "Wonderland Queen's Castle Hedge Right Blue Chest":                                 KH1LocationData("Wonderland",       265_1012),
    "Wonderland Queen's Castle Hedge Right Red Chest":                                  KH1LocationData("Wonderland",       265_1013),
    "Wonderland Lotus Forest Thunder Plant Chest":                                      KH1LocationData("Wonderland",       265_1014),
    "Wonderland Lotus Forest Through the Painting Thunder Plant Chest":                 KH1LocationData("Wonderland",       265_1051),
    "Wonderland Lotus Forest Glide Chest":                                              KH1LocationData("Wonderland",       265_1052),
    "Wonderland Lotus Forest Nut Chest":                                                KH1LocationData("Wonderland",       265_1053),
    "Wonderland Lotus Forest Corner Chest":                                             KH1LocationData("Wonderland",       265_1054),
    "Wonderland Bizarre Room Lamp Chest":                                               KH1LocationData("Wonderland",       265_1091),
    "Wonderland Tea Party Garden Above Lotus Forest Entrance 2nd Chest":                KH1LocationData("Wonderland",       265_1093),
    "Wonderland Tea Party Garden Above Lotus Forest Entrance 1st Chest":                KH1LocationData("Wonderland",       265_1094),
    "Wonderland Tea Party Garden Bear and Clock Puzzle Chest":                          KH1LocationData("Wonderland",       265_1131),
    "Wonderland Tea Party Garden Across From Bizarre Room Entrance Chest":              KH1LocationData("Wonderland",       265_1132),
    "Wonderland Lotus Forest Through the Painting White Trinity Chest":                 KH1LocationData("Wonderland",       265_1133),
    "Deep Jungle Tree House Beneath Tree House Chest":                                  KH1LocationData("Deep Jungle",      265_1213),
    "Deep Jungle Tree House Rooftop Chest":                                             KH1LocationData("Deep Jungle",      265_1214),
    "Deep Jungle Hippo's Lagoon Center Chest":                                          KH1LocationData("Deep Jungle",      265_1251),
    "Deep Jungle Hippo's Lagoon Left Chest":                                            KH1LocationData("Deep Jungle",      265_1252),
    "Deep Jungle Hippo's Lagoon Right Chest":                                           KH1LocationData("Deep Jungle",      265_1253),
    "Deep Jungle Vines Chest":                                                          KH1LocationData("Deep Jungle",      265_1291),
    "Deep Jungle Vines 2 Chest":                                                        KH1LocationData("Deep Jungle",      265_1292),
    "Deep Jungle Climbing Trees Blue Trinity Chest":                                    KH1LocationData("Deep Jungle",      265_1293),
    "Deep Jungle Tunnel Chest":                                                         KH1LocationData("Deep Jungle",      265_1331),
    "Deep Jungle Cavern of Hearts White Trinity Chest":                                 KH1LocationData("Deep Jungle",      265_1332),
    "Deep Jungle Camp Blue Trinity Chest":                                              KH1LocationData("Deep Jungle",      265_1333),
    "Deep Jungle Tent Chest":                                                           KH1LocationData("Deep Jungle",      265_1334),
    "Deep Jungle Waterfall Cavern Low Chest":                                           KH1LocationData("Deep Jungle",      265_1371),
    "Deep Jungle Waterfall Cavern Middle Chest":                                        KH1LocationData("Deep Jungle",      265_1372),
    "Deep Jungle Waterfall Cavern High Wall Chest":                                     KH1LocationData("Deep Jungle",      265_1373),
    "Deep Jungle Waterfall Cavern High Middle Chest":                                   KH1LocationData("Deep Jungle",      265_1374),
    "Deep Jungle Cliff Right Cliff Left Chest":                                         KH1LocationData("Deep Jungle",      265_1411),
    "Deep Jungle Cliff Right Cliff Right Chest":                                        KH1LocationData("Deep Jungle",      265_1412),
    "Deep Jungle Tree House Suspended Boat Chest":                                      KH1LocationData("Deep Jungle",      265_1413),
    "100 Acre Wood Meadow Inside Log Chest":                                            KH1LocationData("100 Acre Wood",    265_1654),
    "100 Acre Wood Bouncing Spot Left Cliff Chest":                                     KH1LocationData("100 Acre Wood",    265_1691),
    "100 Acre Wood Bouncing Spot Right Tree Alcove Chest":                              KH1LocationData("100 Acre Wood",    265_1692),
    "100 Acre Wood Bouncing Spot Under Giant Pot Chest":                                KH1LocationData("100 Acre Wood",    265_1693),
    "Agrabah Plaza By Storage Chest":                                                   KH1LocationData("Agrabah",          265_1972),
    "Agrabah Plaza Raised Terrace Chest":                                               KH1LocationData("Agrabah",          265_1973),
    "Agrabah Plaza Top Corner Chest":                                                   KH1LocationData("Agrabah",          265_1974),
    "Agrabah Alley Chest":                                                              KH1LocationData("Agrabah",          265_2011),
    "Agrabah Bazaar Across Windows Chest":                                              KH1LocationData("Agrabah",          265_2012),
    "Agrabah Bazaar High Corner Chest":                                                 KH1LocationData("Agrabah",          265_2013),
    "Agrabah Main Street Right Palace Entrance Chest":                                  KH1LocationData("Agrabah",          265_2014),
    "Agrabah Main Street High Above Alley Entrance Chest":                              KH1LocationData("Agrabah",          265_2051),
    "Agrabah Main Street High Above Palace Gates Entrance Chest":                       KH1LocationData("Agrabah",          265_2052),
    "Agrabah Palace Gates Low Chest":                                                   KH1LocationData("Agrabah",          265_2053),
    "Agrabah Palace Gates High Opposite Palace Chest":                                  KH1LocationData("Agrabah",          265_2054),
    "Agrabah Palace Gates High Close to Palace Chest":                                  KH1LocationData("Agrabah",          265_2091),
    "Agrabah Storage Green Trinity Chest":                                              KH1LocationData("Agrabah",          265_2092),
    "Agrabah Storage Behind Barrel Chest":                                              KH1LocationData("Agrabah",          265_2093),
    "Agrabah Cave of Wonders Entrance Left Chest":                                      KH1LocationData("Agrabah",          265_2094),
    "Agrabah Cave of Wonders Entrance Tall Tower Chest":                                KH1LocationData("Agrabah",          265_2131),
    "Agrabah Cave of Wonders Hall High Left Chest":                                     KH1LocationData("Agrabah",          265_2132),
    "Agrabah Cave of Wonders Hall Near Bottomless Hall Chest":                          KH1LocationData("Agrabah",          265_2133),
    "Agrabah Cave of Wonders Bottomless Hall Raised Platform Chest":                    KH1LocationData("Agrabah",          265_2134),
    "Agrabah Cave of Wonders Bottomless Hall Pillar Chest":                             KH1LocationData("Agrabah",          265_2171),
    "Agrabah Cave of Wonders Bottomless Hall Across Chasm Chest":                       KH1LocationData("Agrabah",          265_2172),
    "Agrabah Cave of Wonders Treasure Room Across Platforms Chest":                     KH1LocationData("Agrabah",          265_2173),
    "Agrabah Cave of Wonders Treasure Room Small Treasure Pile Chest":                  KH1LocationData("Agrabah",          265_2174),
    "Agrabah Cave of Wonders Treasure Room Large Treasure Pile Chest":                  KH1LocationData("Agrabah",          265_2211),
    "Agrabah Cave of Wonders Treasure Room Above Fire Chest":                           KH1LocationData("Agrabah",          265_2212),
    "Agrabah Cave of Wonders Relic Chamber Jump from Stairs Chest":                     KH1LocationData("Agrabah",          265_2213),
    "Agrabah Cave of Wonders Relic Chamber Stairs Chest":                               KH1LocationData("Agrabah",          265_2214),
    "Agrabah Cave of Wonders Dark Chamber Abu Gem Chest":                               KH1LocationData("Agrabah",          265_2251),
    "Agrabah Cave of Wonders Dark Chamber Across from Relic Chamber Entrance Chest":    KH1LocationData("Agrabah",          265_2252),
    "Agrabah Cave of Wonders Dark Chamber Bridge Chest":                                KH1LocationData("Agrabah",          265_2253),
    "Agrabah Cave of Wonders Dark Chamber Near Save Chest":                             KH1LocationData("Agrabah",          265_2254),
    "Agrabah Cave of Wonders Silent Chamber Blue Trinity Chest":                        KH1LocationData("Agrabah",          265_2291),
    "Agrabah Cave of Wonders Hidden Room Right Chest":                                  KH1LocationData("Agrabah",          265_2292),
    "Agrabah Cave of Wonders Hidden Room Left Chest":                                   KH1LocationData("Agrabah",          265_2293),
    "Agrabah Aladdin's House Main Street Entrance Chest":                               KH1LocationData("Agrabah",          265_2294),
    "Agrabah Aladdin's House Plaza Entrance Chest":                                     KH1LocationData("Agrabah",          265_2331),
    "Agrabah Cave of Wonders Entrance White Trinity Chest":                             KH1LocationData("Agrabah",          265_2332),
    "Monstro Chamber 6 Other Platform Chest":                                           KH1LocationData("Monstro",          265_2413),
    "Monstro Chamber 6 Platform Near Chamber 5 Entrance Chest":                         KH1LocationData("Monstro",          265_2414),
    "Monstro Chamber 6 Raised Area Near Chamber 1 Entrance Chest":                      KH1LocationData("Monstro",          265_2451),
    "Monstro Chamber 6 Low Chest":                                                      KH1LocationData("Monstro",          265_2452),
    "Atlantica Sunken Ship In Flipped Boat Chest":                                      KH1LocationData("Atlantica",        265_2531),
    "Atlantica Sunken Ship Seabed Chest":                                               KH1LocationData("Atlantica",        265_2532),
    "Atlantica Sunken Ship Inside Ship Chest":                                          KH1LocationData("Atlantica",        265_2533),
    "Atlantica Ariel's Grotto High Chest":                                              KH1LocationData("Atlantica",        265_2534),
    "Atlantica Ariel's Grotto Middle Chest":                                            KH1LocationData("Atlantica",        265_2571),
    "Atlantica Ariel's Grotto Low Chest":                                               KH1LocationData("Atlantica",        265_2572),
    "Atlantica Ursula's Lair Use Fire on Urchin Chest":                                 KH1LocationData("Atlantica",        265_2573),
    "Atlantica Undersea Gorge Jammed by Ariel's Grotto Chest":                          KH1LocationData("Atlantica",        265_2574),
    "Atlantica Triton's Palace White Trinity Chest":                                    KH1LocationData("Atlantica",        265_2611),
    "Halloween Town Moonlight Hill White Trinity Chest":                                KH1LocationData("Halloween Town",   265_3014),
    "Halloween Town Bridge Under Bridge":                                               KH1LocationData("Halloween Town",   265_3051),
    "Halloween Town Boneyard Tombstone Puzzle Chest":                                   KH1LocationData("Halloween Town",   265_3052),
    "Halloween Town Bridge Right of Gate Chest":                                        KH1LocationData("Halloween Town",   265_3053),
    "Halloween Town Cemetery Behind Grave Chest":                                       KH1LocationData("Halloween Town",   265_3054),
    "Halloween Town Cemetery By Cat Shape Chest":                                       KH1LocationData("Halloween Town",   265_3091),
    "Halloween Town Cemetery Between Graves Chest":                                     KH1LocationData("Halloween Town",   265_3092),
    "Halloween Town Oogie's Manor Lower Iron Cage Chest":                               KH1LocationData("Halloween Town",   265_3093),
    "Halloween Town Oogie's Manor Upper Iron Cage Chest":                               KH1LocationData("Halloween Town",   265_3094),
    "Halloween Town Oogie's Manor Hollow Chest":                                        KH1LocationData("Halloween Town",   265_3131),
    "Halloween Town Oogie's Manor Grounds Red Trinity Chest":                           KH1LocationData("Halloween Town",   265_3132),
    "Halloween Town Guillotine Square High Tower Chest":                                KH1LocationData("Halloween Town",   265_3133),
    "Halloween Town Guillotine Square Pumpkin Structure Left Chest":                    KH1LocationData("Halloween Town",   265_3134),
    "Halloween Town Oogie's Manor Entrance Steps Chest":                                KH1LocationData("Halloween Town",   265_3171),
    "Halloween Town Oogie's Manor Inside Entrance Chest":                               KH1LocationData("Halloween Town",   265_3172),
    "Halloween Town Bridge Left of Gate Chest":                                         KH1LocationData("Halloween Town",   265_3291),
    "Halloween Town Cemetery By Striped Grave Chest":                                   KH1LocationData("Halloween Town",   265_3292),
    "Halloween Town Guillotine Square Under Jack's House Stairs Chest":                 KH1LocationData("Halloween Town",   265_3293),
    "Halloween Town Guillotine Square Pumpkin Structure Right Chest":                   KH1LocationData("Halloween Town",   265_3294),
    "Olympus Coliseum Coliseum Gates Left Behind Columns Chest":                        KH1LocationData("Olympus Coliseum", 265_3332),
    "Olympus Coliseum Coliseum Gates Right Blue Trinity Chest":                         KH1LocationData("Olympus Coliseum", 265_3333),
    "Olympus Coliseum Coliseum Gates Left Blue Trinity Chest":                          KH1LocationData("Olympus Coliseum", 265_3334),
    "Olympus Coliseum Coliseum Gates White Trinity Chest":                              KH1LocationData("Olympus Coliseum", 265_3371),
    "Olympus Coliseum Coliseum Gates Blizzara Chest":                                   KH1LocationData("Olympus Coliseum", 265_3372),
    "Olympus Coliseum Coliseum Gates Blizzaga Chest":                                   KH1LocationData("Olympus Coliseum", 265_3373),
    "Monstro Mouth Boat Deck Chest":                                                    KH1LocationData("Monstro",          265_3454),
    "Monstro Mouth High Platform Boat Side Chest":                                      KH1LocationData("Monstro",          265_3491),
    "Monstro Mouth High Platform Across from Boat Chest":                               KH1LocationData("Monstro",          265_3492),
    "Monstro Mouth Near Ship Chest":                                                    KH1LocationData("Monstro",          265_3493),
    "Monstro Mouth Green Trinity Top of Boat Chest":                                    KH1LocationData("Monstro",          265_3494),
    "Monstro Chamber 2 Ground Chest":                                                   KH1LocationData("Monstro",          265_3534),
    "Monstro Chamber 2 Platform Chest":                                                 KH1LocationData("Monstro",          265_3571),
    "Monstro Chamber 5 Platform Chest":                                                 KH1LocationData("Monstro",          265_3613),
    "Monstro Chamber 3 Ground Chest":                                                   KH1LocationData("Monstro",          265_3614),
    "Monstro Chamber 3 Platform Above Chamber 2 Entrance Chest":                        KH1LocationData("Monstro",          265_3651),
    "Monstro Chamber 3 Near Chamber 6 Entrance Chest":                                  KH1LocationData("Monstro",          265_3652),
    "Monstro Chamber 3 Platform Near Chamber 6 Entrance Chest":                         KH1LocationData("Monstro",          265_3653),
    "Monstro Mouth High Platform Near Teeth Chest":                                     KH1LocationData("Monstro",          265_3732),
    "Monstro Chamber 5 Atop Barrel Chest":                                              KH1LocationData("Monstro",          265_3733),
    "Monstro Chamber 5 Low 2nd Chest":                                                  KH1LocationData("Monstro",          265_3734),
    "Monstro Chamber 5 Low 1st Chest":                                                  KH1LocationData("Monstro",          265_3771),
    "Neverland Pirate Ship Deck White Trinity Chest":                                   KH1LocationData("Neverland",        265_3772),
    "Neverland Pirate Ship Crows Nest Chest":                                           KH1LocationData("Neverland",        265_3773),
    "Neverland Hold Yellow Trinity Right Blue Chest":                                   KH1LocationData("Neverland",        265_3774),
    "Neverland Hold Yellow Trinity Left Blue Chest":                                    KH1LocationData("Neverland",        265_3811),
    "Neverland Galley Chest":                                                           KH1LocationData("Neverland",        265_3812),
    "Neverland Cabin Chest":                                                            KH1LocationData("Neverland",        265_3813),
    "Neverland Hold Flight 1st Chest":                                                  KH1LocationData("Neverland",        265_3814),
    "Neverland Clock Tower Chest":                                                      KH1LocationData("Neverland",        265_4014),
    "Neverland Hold Flight 2nd Chest":                                                  KH1LocationData("Neverland",        265_4051),
    "Neverland Hold Yellow Trinity Green Chest":                                        KH1LocationData("Neverland",        265_4052),
    "Neverland Captain's Cabin Chest":                                                  KH1LocationData("Neverland",        265_4053),
    "Hollow Bastion Rising Falls Water's Surface Chest":                                KH1LocationData("Hollow Bastion",   265_4054),
    "Hollow Bastion Rising Falls Under Water 1st Chest":                                KH1LocationData("Hollow Bastion",   265_4091),
    "Hollow Bastion Rising Falls Under Water 2nd Chest":                                KH1LocationData("Hollow Bastion",   265_4092),
    "Hollow Bastion Rising Falls Floating Platform Near Save Chest":                    KH1LocationData("Hollow Bastion",   265_4093),
    "Hollow Bastion Rising Falls Floating Platform Near Bubble Chest":                  KH1LocationData("Hollow Bastion",   265_4094),
    "Hollow Bastion Rising Falls High Platform Chest":                                  KH1LocationData("Hollow Bastion",   265_4131),
    "Hollow Bastion Castle Gates Gravity Chest":                                        KH1LocationData("Hollow Bastion",   265_4132),
    "Hollow Bastion Castle Gates Freestanding Pillar Chest":                            KH1LocationData("Hollow Bastion",   265_4133),
    "Hollow Bastion Castle Gates High Pillar Chest":                                    KH1LocationData("Hollow Bastion",   265_4134),
    "Hollow Bastion Great Crest Lower Chest":                                           KH1LocationData("Hollow Bastion",   265_4171),
    "Hollow Bastion Great Crest After Battle Platform Chest":                           KH1LocationData("Hollow Bastion",   265_4172),
    "Hollow Bastion High Tower 2nd Gravity Chest":                                      KH1LocationData("Hollow Bastion",   265_4173),
    "Hollow Bastion High Tower 1st Gravity Chest":                                      KH1LocationData("Hollow Bastion",   265_4174),
    "Hollow Bastion High Tower Above Sliding Blocks Chest":                             KH1LocationData("Hollow Bastion",   265_4211),
    "Hollow Bastion Library Top of Bookshelf Chest":                                    KH1LocationData("Hollow Bastion",   265_4213),
    "Hollow Bastion Library 1st Floor Turn the Carousel Chest":                         KH1LocationData("Hollow Bastion",   265_4214),
    "Hollow Bastion Library Top of Bookshelf Turn the Carousel Chest":                  KH1LocationData("Hollow Bastion",   265_4251),
    "Hollow Bastion Library 2nd Floor Turn the Carousel 1st Chest":                     KH1LocationData("Hollow Bastion",   265_4252),
    "Hollow Bastion Library 2nd Floor Turn the Carousel 2nd Chest":                     KH1LocationData("Hollow Bastion",   265_4253),
    "Hollow Bastion Lift Stop Library Node After High Tower Switch Gravity Chest":      KH1LocationData("Hollow Bastion",   265_4254),
    "Hollow Bastion Lift Stop Library Node Gravity Chest":                              KH1LocationData("Hollow Bastion",   265_4291),
    "Hollow Bastion Lift Stop Under High Tower Sliding Blocks Chest":                   KH1LocationData("Hollow Bastion",   265_4292),
    "Hollow Bastion Lift Stop Outside Library Gravity Chest":                           KH1LocationData("Hollow Bastion",   265_4293),
    "Hollow Bastion Lift Stop Heartless Sigil Door Gravity Chest":                      KH1LocationData("Hollow Bastion",   265_4294),
    "Hollow Bastion Base Level Bubble Under the Wall Platform Chest":                   KH1LocationData("Hollow Bastion",   265_4331),
    "Hollow Bastion Base Level Platform Near Entrance Chest":                           KH1LocationData("Hollow Bastion",   265_4332),
    "Hollow Bastion Base Level Near Crystal Switch Chest":                              KH1LocationData("Hollow Bastion",   265_4333),
    "Hollow Bastion Waterway Near Save Chest":                                          KH1LocationData("Hollow Bastion",   265_4334),
    "Hollow Bastion Waterway Blizzard on Bubble Chest":                                 KH1LocationData("Hollow Bastion",   265_4371),
    "Hollow Bastion Waterway Unlock Passage from Base Level Chest":                     KH1LocationData("Hollow Bastion",   265_4372),
    "Hollow Bastion Dungeon By Candles Chest":                                          KH1LocationData("Hollow Bastion",   265_4373),
    "Hollow Bastion Dungeon Corner Chest":                                              KH1LocationData("Hollow Bastion",   265_4374),
    "Hollow Bastion Grand Hall Steps Right Side Chest":                                 KH1LocationData("Hollow Bastion",   265_4454),
    "Hollow Bastion Grand Hall Oblivion Chest":                                         KH1LocationData("Hollow Bastion",   265_4491),
    "Hollow Bastion Grand Hall Left of Gate Chest":                                     KH1LocationData("Hollow Bastion",   265_4492),
    #"Hollow Bastion Entrance Hall Push the Statue Chest":                              KH1LocationData("Hollow Bastion",   265_4493), --handled later
    "Hollow Bastion Entrance Hall Left of Emblem Door Chest":                           KH1LocationData("Hollow Bastion",   265_4212),
    "Hollow Bastion Rising Falls White Trinity Chest":                                  KH1LocationData("Hollow Bastion",   265_4494),
    "End of the World Final Dimension 1st Chest":                                       KH1LocationData("End of the World", 265_4531),
    "End of the World Final Dimension 2nd Chest":                                       KH1LocationData("End of the World", 265_4532),
    "End of the World Final Dimension 3rd Chest":                                       KH1LocationData("End of the World", 265_4533),
    "End of the World Final Dimension 4th Chest":                                       KH1LocationData("End of the World", 265_4534),
    "End of the World Final Dimension 5th Chest":                                       KH1LocationData("End of the World", 265_4571),
    "End of the World Final Dimension 6th Chest":                                       KH1LocationData("End of the World", 265_4572),
    "End of the World Final Dimension 10th Chest":                                      KH1LocationData("End of the World", 265_4573),
    "End of the World Final Dimension 9th Chest":                                       KH1LocationData("End of the World", 265_4574),
    "End of the World Final Dimension 8th Chest":                                       KH1LocationData("End of the World", 265_4611),
    "End of the World Final Dimension 7th Chest":                                       KH1LocationData("End of the World", 265_4612),
    "End of the World Giant Crevasse 3rd Chest":                                        KH1LocationData("End of the World", 265_4613),
    "End of the World Giant Crevasse 5th Chest":                                        KH1LocationData("End of the World", 265_4614),
    "End of the World Giant Crevasse 1st Chest":                                        KH1LocationData("End of the World", 265_4651),
    "End of the World Giant Crevasse 4th Chest":                                        KH1LocationData("End of the World", 265_4652),
    "End of the World Giant Crevasse 2nd Chest":                                        KH1LocationData("End of the World", 265_4653),
    "End of the World World Terminus Traverse Town Chest":                              KH1LocationData("End of the World", 265_4654),
    "End of the World World Terminus Wonderland Chest":                                 KH1LocationData("End of the World", 265_4691),
    "End of the World World Terminus Olympus Coliseum Chest":                           KH1LocationData("End of the World", 265_4692),
    "End of the World World Terminus Deep Jungle Chest":                                KH1LocationData("End of the World", 265_4693),
    "End of the World World Terminus Agrabah Chest":                                    KH1LocationData("End of the World", 265_4694),
    "End of the World World Terminus Atlantica Chest":                                  KH1LocationData("End of the World", 265_4731),
    "End of the World World Terminus Halloween Town Chest":                             KH1LocationData("End of the World", 265_4732),
    "End of the World World Terminus Neverland Chest":                                  KH1LocationData("End of the World", 265_4733),
    "End of the World World Terminus 100 Acre Wood Chest":                              KH1LocationData("End of the World", 265_4734),
    #"End of the World World Terminus Hollow Bastion Chest":                            KH1LocationData("End of the World", 265_4771),
    "End of the World Final Rest Chest":                                                KH1LocationData("End of the World", 265_4772),
    "Monstro Chamber 6 White Trinity Chest":                                            KH1LocationData("End of the World", 265_5092),
    #"Awakening Chest":                                                                 KH1LocationData("Awakening",        265_5093), missable
   
    "Traverse Town Defeat Guard Armor Dodge Roll Event":                                KH1LocationData("Traverse Town",    265_6011),
    "Traverse Town Defeat Guard Armor Fire Event":                                      KH1LocationData("Traverse Town",    265_6012),
    "Traverse Town Defeat Guard Armor Blue Trinity Event":                              KH1LocationData("Traverse Town",    265_6013),
    "Traverse Town Leon Secret Waterway Earthshine Event":                              KH1LocationData("Traverse Town",    265_6014),
    "Traverse Town Kairi Secret Waterway Oathkeeper Event":                             KH1LocationData("Traverse Town",    265_6015),
    "Traverse Town Defeat Guard Armor Brave Warrior Event":                             KH1LocationData("Traverse Town",    265_6016),
    "Deep Jungle Defeat Sabor White Fang Event":                                        KH1LocationData("Deep Jungle",      265_6021),
    "Deep Jungle Defeat Clayton Cure Event":                                            KH1LocationData("Deep Jungle",      265_6022),
    "Deep Jungle Seal Keyhole Jungle King Event":                                       KH1LocationData("Deep Jungle",      265_6023),
    "Deep Jungle Seal Keyhole Red Trinity Event":                                       KH1LocationData("Deep Jungle",      265_6024),
    "Olympus Coliseum Clear Phil's Training Thunder Event":                             KH1LocationData("Olympus Coliseum", 265_6031),
    "Olympus Coliseum Defeat Cerberus Inferno Band Event":                              KH1LocationData("Olympus Coliseum", 265_6033),
    "Wonderland Defeat Trickmaster Blizzard Event":                                     KH1LocationData("Wonderland",       265_6041),
    "Wonderland Defeat Trickmaster Ifrit's Horn Event":                                 KH1LocationData("Wonderland",       265_6042),
    "Agrabah Defeat Pot Centipede Ray of Light Event":                                  KH1LocationData("Agrabah",          265_6051),
    "Agrabah Defeat Jafar Blizzard Event":                                              KH1LocationData("Agrabah",          265_6052),
    "Agrabah Defeat Jafar Genie Fire Event":                                            KH1LocationData("Agrabah",          265_6053),
    "Agrabah Seal Keyhole Genie Event":                                                 KH1LocationData("Agrabah",          265_6054),
    "Agrabah Seal Keyhole Three Wishes Event":                                          KH1LocationData("Agrabah",          265_6055),
    "Agrabah Seal Keyhole Green Trinity Event":                                         KH1LocationData("Agrabah",          265_6056),
    "Monstro Defeat Parasite Cage I Goofy Cheer Event":                                 KH1LocationData("Monstro",          265_6061),
    "Monstro Defeat Parasite Cage II Stop Event":                                       KH1LocationData("Monstro",          265_6062),
    "Atlantica Defeat Ursula I Mermaid Kick Event":                                     KH1LocationData("Atlantica",        265_6071),
    "Atlantica Defeat Ursula II Thunder Event":                                         KH1LocationData("Atlantica",        265_6072),
    "Atlantica Seal Keyhole Crabclaw Event":                                            KH1LocationData("Atlantica",        265_6073),
    "Halloween Town Defeat Oogie Boogie Holy Circlet Event":                            KH1LocationData("Halloween Town",   265_6081),
    "Halloween Town Defeat Oogie's Manor Gravity Event":                                KH1LocationData("Halloween Town",   265_6082),
    "Halloween Town Seal Keyhole Pumpkinhead Event":                                    KH1LocationData("Halloween Town",   265_6083),
    "Neverland Defeat Anti Sora Raven's Claw Event":                                    KH1LocationData("Neverland",        265_6091),
    "Neverland Encounter Hook Cure Event":                                              KH1LocationData("Neverland",        265_6092),
    "Neverland Seal Keyhole Fairy Harp Event":                                          KH1LocationData("Neverland",        265_6093),
    "Neverland Seal Keyhole Tinker Bell Event":                                         KH1LocationData("Neverland",        265_6094),
    "Neverland Seal Keyhole Glide Event":                                               KH1LocationData("Neverland",        265_6095),
    "Neverland Defeat Phantom Stop Event":                                              KH1LocationData("Neverland",        265_6096),
    "Neverland Defeat Captain Hook Ars Arcanum Event":                                  KH1LocationData("Neverland",        265_6097),
    "Hollow Bastion Defeat Riku I White Trinity Event":                                 KH1LocationData("Hollow Bastion",   265_6101),
    "Hollow Bastion Defeat Maleficent Donald Cheer Event":                              KH1LocationData("Hollow Bastion",   265_6102),
    "Hollow Bastion Defeat Dragon Maleficent Fireglow Event":                           KH1LocationData("Hollow Bastion",   265_6103),
    "Hollow Bastion Defeat Riku II Ragnarok Event":                                     KH1LocationData("Hollow Bastion",   265_6104),
    "Hollow Bastion Defeat Behemoth Omega Arts Event":                                  KH1LocationData("Hollow Bastion",   265_6105),
    "Hollow Bastion Speak to Princesses Fire Event":                                    KH1LocationData("Hollow Bastion",   265_6106),
    "End of the World Defeat Chernabog Superglide Event":                               KH1LocationData("End of the World", 265_6111),
    
    "Traverse Town Mail Postcard 01 Event":                                             KH1LocationData("Traverse Town",    265_6120),
    "Traverse Town Mail Postcard 02 Event":                                             KH1LocationData("Traverse Town",    265_6121),
    "Traverse Town Mail Postcard 03 Event":                                             KH1LocationData("Traverse Town",    265_6122),
    "Traverse Town Mail Postcard 04 Event":                                             KH1LocationData("Traverse Town",    265_6123),
    "Traverse Town Mail Postcard 05 Event":                                             KH1LocationData("Traverse Town",    265_6124),
    "Traverse Town Mail Postcard 06 Event":                                             KH1LocationData("Traverse Town",    265_6125),
    "Traverse Town Mail Postcard 07 Event":                                             KH1LocationData("Traverse Town",    265_6126),
    "Traverse Town Mail Postcard 08 Event":                                             KH1LocationData("Traverse Town",    265_6127),
    "Traverse Town Mail Postcard 09 Event":                                             KH1LocationData("Traverse Town",    265_6128),
    "Traverse Town Mail Postcard 10 Event":                                             KH1LocationData("Traverse Town",    265_6129),
    
    "Traverse Town Defeat Opposite Armor Aero Event":                                   KH1LocationData("Traverse Town",    265_6131),
    
    "Atlantica Undersea Gorge Blizzard Clam":                                           KH1LocationData("Atlantica",        265_6201),
    "Atlantica Undersea Gorge Ocean Floor Clam":                                        KH1LocationData("Atlantica",        265_6202),
    "Atlantica Undersea Valley Higher Cave Clam":                                       KH1LocationData("Atlantica",        265_6203),
    "Atlantica Undersea Valley Lower Cave Clam":                                        KH1LocationData("Atlantica",        265_6204),
    "Atlantica Undersea Valley Fire Clam":                                              KH1LocationData("Atlantica",        265_6205),
    "Atlantica Undersea Valley Wall Clam":                                              KH1LocationData("Atlantica",        265_6206),
    "Atlantica Undersea Valley Pillar Clam":                                            KH1LocationData("Atlantica",        265_6207),
    "Atlantica Undersea Valley Ocean Floor Clam":                                       KH1LocationData("Atlantica",        265_6208),
    "Atlantica Triton's Palace Thunder Clam":                                           KH1LocationData("Atlantica",        265_6209),
    "Atlantica Triton's Palace Wall Right Clam":                                        KH1LocationData("Atlantica",        265_6210),
    "Atlantica Triton's Palace Near Path Clam":                                         KH1LocationData("Atlantica",        265_6211),
    "Atlantica Triton's Palace Wall Left Clam":                                         KH1LocationData("Atlantica",        265_6212),
    "Atlantica Cavern Nook Clam":                                                       KH1LocationData("Atlantica",        265_6213),
    "Atlantica Below Deck Clam":                                                        KH1LocationData("Atlantica",        265_6214),
    "Atlantica Undersea Garden Clam":                                                   KH1LocationData("Atlantica",        265_6215),
    "Atlantica Undersea Cave Clam":                                                     KH1LocationData("Atlantica",        265_6216),
    
    #"Traverse Town Magician's Study Turn in Naturespark":                              KH1LocationData("Traverse Town",    265_6300),
    #"Traverse Town Magician's Study Turn in Watergleam":                               KH1LocationData("Traverse Town",    265_6301),
    #"Traverse Town Magician's Study Turn in Fireglow":                                 KH1LocationData("Traverse Town",    265_6302),
    #"Traverse Town Magician's Study Turn in all Summon Gems":                          KH1LocationData("Traverse Town",    265_6303),
    "Traverse Town Geppetto's House Geppetto Reward 1":                                 KH1LocationData("Traverse Town",    265_6304),
    "Traverse Town Geppetto's House Geppetto Reward 2":                                 KH1LocationData("Traverse Town",    265_6305),
    "Traverse Town Geppetto's House Geppetto Reward 3":                                 KH1LocationData("Traverse Town",    265_6306),
    "Traverse Town Geppetto's House Geppetto Reward 4":                                 KH1LocationData("Traverse Town",    265_6307),
    "Traverse Town Geppetto's House Geppetto Reward 5":                                 KH1LocationData("Traverse Town",    265_6308),
    "Traverse Town Geppetto's House Geppetto All Summons Reward":                       KH1LocationData("Traverse Town",    265_6309),
    "Traverse Town Geppetto's House Talk to Pinocchio":                                 KH1LocationData("Traverse Town",    265_6310),
    "Traverse Town Magician's Study Obtained All Arts Items":                           KH1LocationData("Traverse Town",    265_6311),
    "Traverse Town Magician's Study Obtained All LV1 Magic":                            KH1LocationData("Traverse Town",    265_6312),
    "Traverse Town Magician's Study Obtained All LV3 Magic":                            KH1LocationData("Traverse Town",    265_6313),
    "Traverse Town Piano Room Return 10 Puppies":                                       KH1LocationData("Traverse Town",    265_6314),
    "Traverse Town Piano Room Return 20 Puppies":                                       KH1LocationData("Traverse Town",    265_6315),
    "Traverse Town Piano Room Return 30 Puppies":                                       KH1LocationData("Traverse Town",    265_6316),
    "Traverse Town Piano Room Return 40 Puppies":                                       KH1LocationData("Traverse Town",    265_6317),
    "Traverse Town Piano Room Return 50 Puppies Reward 1":                              KH1LocationData("Traverse Town",    265_6318),
    "Traverse Town Piano Room Return 50 Puppies Reward 2":                              KH1LocationData("Traverse Town",    265_6319),
    "Traverse Town Piano Room Return 60 Puppies":                                       KH1LocationData("Traverse Town",    265_6320),
    "Traverse Town Piano Room Return 70 Puppies":                                       KH1LocationData("Traverse Town",    265_6321),
    "Traverse Town Piano Room Return 80 Puppies":                                       KH1LocationData("Traverse Town",    265_6322),
    "Traverse Town Piano Room Return 90 Puppies":                                       KH1LocationData("Traverse Town",    265_6324),
    "Traverse Town Piano Room Return 99 Puppies Reward 1":                              KH1LocationData("Traverse Town",    265_6326),
    "Traverse Town Piano Room Return 99 Puppies Reward 2":                              KH1LocationData("Traverse Town",    265_6327),
    "Olympus Coliseum Cloud Sonic Blade Event":                                         KH1LocationData("Olympus Coliseum", 265_6032), #Had to change the way we send this check, not changing location_id
    "Olympus Coliseum Defeat Sephiroth One-Winged Angel Event":                         KH1LocationData("Olympus Coliseum", 265_6328),
    "Olympus Coliseum Defeat Ice Titan Diamond Dust Event":                             KH1LocationData("Olympus Coliseum", 265_6329),
    "Olympus Coliseum Gates Purple Jar After Defeating Hades":                          KH1LocationData("Olympus Coliseum", 265_6330),
    "Halloween Town Guillotine Square Ring Jack's Doorbell 3 Times":                    KH1LocationData("Halloween Town",   265_6331),
    #"Neverland Clock Tower 01:00 Door":                                                KH1LocationData("Neverland",        265_6332),
    #"Neverland Clock Tower 02:00 Door":                                                KH1LocationData("Neverland",        265_6333),
    #"Neverland Clock Tower 03:00 Door":                                                KH1LocationData("Neverland",        265_6334),
    #"Neverland Clock Tower 04:00 Door":                                                KH1LocationData("Neverland",        265_6335),
    #"Neverland Clock Tower 05:00 Door":                                                KH1LocationData("Neverland",        265_6336),
    #"Neverland Clock Tower 06:00 Door":                                                KH1LocationData("Neverland",        265_6337),
    #"Neverland Clock Tower 07:00 Door":                                                KH1LocationData("Neverland",        265_6338),
    #"Neverland Clock Tower 08:00 Door":                                                KH1LocationData("Neverland",        265_6339),
    #"Neverland Clock Tower 09:00 Door":                                                KH1LocationData("Neverland",        265_6340),
    #"Neverland Clock Tower 10:00 Door":                                                KH1LocationData("Neverland",        265_6341),
    #"Neverland Clock Tower 11:00 Door":                                                KH1LocationData("Neverland",        265_6342),
    #"Neverland Clock Tower 12:00 Door":                                                KH1LocationData("Neverland",        265_6343),
    "Neverland Hold Aero Chest":                                                        KH1LocationData("Neverland",        265_6344),
    "100 Acre Wood Bouncing Spot Turn in Rare Nut 1":                                   KH1LocationData("100 Acre Wood",    265_6345),
    "100 Acre Wood Bouncing Spot Turn in Rare Nut 2":                                   KH1LocationData("100 Acre Wood",    265_6346),
    "100 Acre Wood Bouncing Spot Turn in Rare Nut 3":                                   KH1LocationData("100 Acre Wood",    265_6347),
    "100 Acre Wood Bouncing Spot Turn in Rare Nut 4":                                   KH1LocationData("100 Acre Wood",    265_6348),
    "100 Acre Wood Bouncing Spot Turn in Rare Nut 5":                                   KH1LocationData("100 Acre Wood",    265_6349),
    "100 Acre Wood Pooh's House Owl Cheer":                                             KH1LocationData("100 Acre Wood",    265_6350),
    "100 Acre Wood Convert Torn Page 1":                                                KH1LocationData("100 Acre Wood",    265_6351),
    "100 Acre Wood Convert Torn Page 2":                                                KH1LocationData("100 Acre Wood",    265_6352),
    "100 Acre Wood Convert Torn Page 3":                                                KH1LocationData("100 Acre Wood",    265_6353),
    "100 Acre Wood Convert Torn Page 4":                                                KH1LocationData("100 Acre Wood",    265_6354),
    "100 Acre Wood Convert Torn Page 5":                                                KH1LocationData("100 Acre Wood",    265_6355),
    "100 Acre Wood Pooh's House Start Fire":                                            KH1LocationData("100 Acre Wood",    265_6356),
    "100 Acre Wood Pooh's Room Cabinet":                                                KH1LocationData("100 Acre Wood",    265_6357),
    "100 Acre Wood Pooh's Room Chimney":                                                KH1LocationData("100 Acre Wood",    265_6358),
    "100 Acre Wood Bouncing Spot Break Log":                                            KH1LocationData("100 Acre Wood",    265_6359),
    "100 Acre Wood Bouncing Spot Fall Through Top of Tree Next to Pooh":                KH1LocationData("100 Acre Wood",    265_6360),
    "Deep Jungle Camp Hi-Potion Experiment":                                            KH1LocationData("Deep Jungle",      265_6361),
    "Deep Jungle Camp Ether Experiment":                                                KH1LocationData("Deep Jungle",      265_6362),
    "Deep Jungle Camp Replication Experiment":                                          KH1LocationData("Deep Jungle",      265_6363),
    "Deep Jungle Cliff Save Gorillas":                                                  KH1LocationData("Deep Jungle",      265_6364),
    "Deep Jungle Tree House Save Gorillas":                                             KH1LocationData("Deep Jungle",      265_6365),
    "Deep Jungle Camp Save Gorillas":                                                   KH1LocationData("Deep Jungle",      265_6366),
    "Deep Jungle Bamboo Thicket Save Gorillas":                                         KH1LocationData("Deep Jungle",      265_6367),
    "Deep Jungle Climbing Trees Save Gorillas":                                         KH1LocationData("Deep Jungle",      265_6368),
    "Olympus Coliseum Olympia Chest":                                                   KH1LocationData("Olympus Coliseum", 265_6369),
    "Deep Jungle Jungle Slider 10 Fruits":                                              KH1LocationData("Deep Jungle",      265_6370),
    "Deep Jungle Jungle Slider 20 Fruits":                                              KH1LocationData("Deep Jungle",      265_6371),
    "Deep Jungle Jungle Slider 30 Fruits":                                              KH1LocationData("Deep Jungle",      265_6372),
    "Deep Jungle Jungle Slider 40 Fruits":                                              KH1LocationData("Deep Jungle",      265_6373),
    "Deep Jungle Jungle Slider 50 Fruits":                                              KH1LocationData("Deep Jungle",      265_6374),
    "Traverse Town 1st District Speak with Cid Event":                                  KH1LocationData("Traverse Town",    265_6375),
    "Wonderland Bizarre Room Read Book":                                                KH1LocationData("Wonderland",       265_6376),
    "Olympus Coliseum Coliseum Gates Green Trinity":                                    KH1LocationData("Olympus Coliseum", 265_6377),
    "Agrabah Defeat Kurt Zisa Zantetsuken Event":                                       KH1LocationData("Agrabah",          265_6378),
    "Hollow Bastion Defeat Unknown EXP Necklace Event":                                 KH1LocationData("Hollow Bastion",   265_6379),
    "Olympus Coliseum Coliseum Gates Hero's License Event":                             KH1LocationData("Olympus Coliseum", 265_6380),
    "Atlantica Sunken Ship Crystal Trident Event":                                      KH1LocationData("Atlantica",        265_6381),
    "Halloween Town Graveyard Forget-Me-Not Event":                                     KH1LocationData("Halloween Town",   265_6382),
    "Deep Jungle Tent Protect-G Event":                                                 KH1LocationData("Deep Jungle",      265_6383),
    "Deep Jungle Cavern of Hearts Navi-G Piece Event":                                  KH1LocationData("Deep Jungle",      265_6384),
    "Wonderland Bizarre Room Navi-G Piece Event":                                       KH1LocationData("Wonderland",       265_6385),
    "Olympus Coliseum Coliseum Gates Entry Pass Event":                                 KH1LocationData("Olympus Coliseum", 265_6386),
    
    "Traverse Town Synth Log":                                                          KH1LocationData("Traverse Town",    265_6401),
    "Traverse Town Synth Cloth":                                                        KH1LocationData("Traverse Town",    265_6402),
    "Traverse Town Synth Rope":                                                         KH1LocationData("Traverse Town",    265_6403),
    "Traverse Town Synth Seagull Egg":                                                  KH1LocationData("Traverse Town",    265_6404),
    "Traverse Town Synth Fish":                                                         KH1LocationData("Traverse Town",    265_6405),
    "Traverse Town Synth Mushroom":                                                     KH1LocationData("Traverse Town",    265_6406),
    
    "Traverse Town Item Shop Postcard":                                                 KH1LocationData("Traverse Town",    265_6500),
    "Traverse Town 1st District Safe Postcard":                                         KH1LocationData("Traverse Town",    265_6501),
    "Traverse Town Gizmo Shop Postcard 1":                                              KH1LocationData("Traverse Town",    265_6502),
    "Traverse Town Gizmo Shop Postcard 2":                                              KH1LocationData("Traverse Town",    265_6503),
    "Traverse Town Item Workshop Postcard":                                             KH1LocationData("Traverse Town",    265_6504),
    "Traverse Town 3rd District Balcony Postcard":                                      KH1LocationData("Traverse Town",    265_6505),
    "Traverse Town Geppetto's House Postcard":                                          KH1LocationData("Traverse Town",    265_6506),
    "Halloween Town Lab Torn Page":                                                     KH1LocationData("Halloween Town",   265_6508),
    "Hollow Bastion Entrance Hall Emblem Piece (Flame)":                                KH1LocationData("Hollow Bastion",   265_6516),
    "Hollow Bastion Entrance Hall Emblem Piece (Chest)":                                KH1LocationData("Hollow Bastion",   265_6517),
    "Hollow Bastion Entrance Hall Emblem Piece (Statue)":                               KH1LocationData("Hollow Bastion",   265_6518),
    "Hollow Bastion Entrance Hall Emblem Piece (Fountain)":                             KH1LocationData("Hollow Bastion",   265_6519),
    #"Traverse Town 1st District Leon Gift":                                            KH1LocationData("Traverse Town",    265_6520),
    #"Traverse Town 1st District Aerith Gift":                                          KH1LocationData("Traverse Town",    265_6521),
    "Hollow Bastion Library Speak to Belle Divine Rose":                                KH1LocationData("Hollow Bastion",   265_6522),
    "Hollow Bastion Library Speak to Aerith Cure":                                      KH1LocationData("Hollow Bastion",   265_6523),
    
    "Agrabah Defeat Jafar Genie Ansem's Report 1":                                      KH1LocationData("Agrabah",          265_7018),
    "Hollow Bastion Speak with Aerith Ansem's Report 2":                                KH1LocationData("Hollow Bastion",   265_7017),
    "Atlantica Defeat Ursula II Ansem's Report 3":                                      KH1LocationData("Atlantica",        265_7016),
    "Hollow Bastion Speak with Aerith Ansem's Report 4":                                KH1LocationData("Hollow Bastion",   265_7015),
    "Hollow Bastion Defeat Maleficent Ansem's Report 5":                                KH1LocationData("Hollow Bastion",   265_7014),
    "Hollow Bastion Speak with Aerith Ansem's Report 6":                                KH1LocationData("Hollow Bastion",   265_7013),
    "Halloween Town Defeat Oogie Boogie Ansem's Report 7":                              KH1LocationData("Halloween Town",   265_7012),
    "Olympus Coliseum Defeat Hades Ansem's Report 8":                                   KH1LocationData("Olympus Coliseum", 265_7011),
    "Neverland Defeat Hook Ansem's Report 9":                                           KH1LocationData("Neverland",        265_7028),
    "Hollow Bastion Speak with Aerith Ansem's Report 10":                               KH1LocationData("Hollow Bastion",   265_7027),
    "Agrabah Defeat Kurt Zisa Ansem's Report 11":                                       KH1LocationData("Agrabah",          265_7026),
    "Olympus Coliseum Defeat Sephiroth Ansem's Report 12":                              KH1LocationData("Olympus Coliseum", 265_7025),
    "Hollow Bastion Defeat Unknown Ansem's Report 13":                                  KH1LocationData("Hollow Bastion",   265_7024),
    "Level 001":                                                                        KH1LocationData("Levels",           265_8001),
    "Level 002":                                                                        KH1LocationData("Levels",           265_8002),
    "Level 003":                                                                        KH1LocationData("Levels",           265_8003),
    "Level 004":                                                                        KH1LocationData("Levels",           265_8004),
    "Level 005":                                                                        KH1LocationData("Levels",           265_8005),
    "Level 006":                                                                        KH1LocationData("Levels",           265_8006),
    "Level 007":                                                                        KH1LocationData("Levels",           265_8007),
    "Level 008":                                                                        KH1LocationData("Levels",           265_8008),
    "Level 009":                                                                        KH1LocationData("Levels",           265_8009),
    "Level 010":                                                                        KH1LocationData("Levels",           265_8010),
    "Level 011":                                                                        KH1LocationData("Levels",           265_8011),
    "Level 012":                                                                        KH1LocationData("Levels",           265_8012),
    "Level 013":                                                                        KH1LocationData("Levels",           265_8013),
    "Level 014":                                                                        KH1LocationData("Levels",           265_8014),
    "Level 015":                                                                        KH1LocationData("Levels",           265_8015),
    "Level 016":                                                                        KH1LocationData("Levels",           265_8016),
    "Level 017":                                                                        KH1LocationData("Levels",           265_8017),
    "Level 018":                                                                        KH1LocationData("Levels",           265_8018),
    "Level 019":                                                                        KH1LocationData("Levels",           265_8019),
    "Level 020":                                                                        KH1LocationData("Levels",           265_8020),
    "Level 021":                                                                        KH1LocationData("Levels",           265_8021),
    "Level 022":                                                                        KH1LocationData("Levels",           265_8022),
    "Level 023":                                                                        KH1LocationData("Levels",           265_8023),
    "Level 024":                                                                        KH1LocationData("Levels",           265_8024),
    "Level 025":                                                                        KH1LocationData("Levels",           265_8025),
    "Level 026":                                                                        KH1LocationData("Levels",           265_8026),
    "Level 027":                                                                        KH1LocationData("Levels",           265_8027),
    "Level 028":                                                                        KH1LocationData("Levels",           265_8028),
    "Level 029":                                                                        KH1LocationData("Levels",           265_8029),
    "Level 030":                                                                        KH1LocationData("Levels",           265_8030),
    "Level 031":                                                                        KH1LocationData("Levels",           265_8031),
    "Level 032":                                                                        KH1LocationData("Levels",           265_8032),
    "Level 033":                                                                        KH1LocationData("Levels",           265_8033),
    "Level 034":                                                                        KH1LocationData("Levels",           265_8034),
    "Level 035":                                                                        KH1LocationData("Levels",           265_8035),
    "Level 036":                                                                        KH1LocationData("Levels",           265_8036),
    "Level 037":                                                                        KH1LocationData("Levels",           265_8037),
    "Level 038":                                                                        KH1LocationData("Levels",           265_8038),
    "Level 039":                                                                        KH1LocationData("Levels",           265_8039),
    "Level 040":                                                                        KH1LocationData("Levels",           265_8040),
    "Level 041":                                                                        KH1LocationData("Levels",           265_8041),
    "Level 042":                                                                        KH1LocationData("Levels",           265_8042),
    "Level 043":                                                                        KH1LocationData("Levels",           265_8043),
    "Level 044":                                                                        KH1LocationData("Levels",           265_8044),
    "Level 045":                                                                        KH1LocationData("Levels",           265_8045),
    "Level 046":                                                                        KH1LocationData("Levels",           265_8046),
    "Level 047":                                                                        KH1LocationData("Levels",           265_8047),
    "Level 048":                                                                        KH1LocationData("Levels",           265_8048),
    "Level 049":                                                                        KH1LocationData("Levels",           265_8049),
    "Level 050":                                                                        KH1LocationData("Levels",           265_8050),
    "Level 051":                                                                        KH1LocationData("Levels",           265_8051),
    "Level 052":                                                                        KH1LocationData("Levels",           265_8052),
    "Level 053":                                                                        KH1LocationData("Levels",           265_8053),
    "Level 054":                                                                        KH1LocationData("Levels",           265_8054),
    "Level 055":                                                                        KH1LocationData("Levels",           265_8055),
    "Level 056":                                                                        KH1LocationData("Levels",           265_8056),
    "Level 057":                                                                        KH1LocationData("Levels",           265_8057),
    "Level 058":                                                                        KH1LocationData("Levels",           265_8058),
    "Level 059":                                                                        KH1LocationData("Levels",           265_8059),
    "Level 060":                                                                        KH1LocationData("Levels",           265_8060),
    "Level 061":                                                                        KH1LocationData("Levels",           265_8061),
    "Level 062":                                                                        KH1LocationData("Levels",           265_8062),
    "Level 063":                                                                        KH1LocationData("Levels",           265_8063),
    "Level 064":                                                                        KH1LocationData("Levels",           265_8064),
    "Level 065":                                                                        KH1LocationData("Levels",           265_8065),
    "Level 066":                                                                        KH1LocationData("Levels",           265_8066),
    "Level 067":                                                                        KH1LocationData("Levels",           265_8067),
    "Level 068":                                                                        KH1LocationData("Levels",           265_8068),
    "Level 069":                                                                        KH1LocationData("Levels",           265_8069),
    "Level 070":                                                                        KH1LocationData("Levels",           265_8070),
    "Level 071":                                                                        KH1LocationData("Levels",           265_8071),
    "Level 072":                                                                        KH1LocationData("Levels",           265_8072),
    "Level 073":                                                                        KH1LocationData("Levels",           265_8073),
    "Level 074":                                                                        KH1LocationData("Levels",           265_8074),
    "Level 075":                                                                        KH1LocationData("Levels",           265_8075),
    "Level 076":                                                                        KH1LocationData("Levels",           265_8076),
    "Level 077":                                                                        KH1LocationData("Levels",           265_8077),
    "Level 078":                                                                        KH1LocationData("Levels",           265_8078),
    "Level 079":                                                                        KH1LocationData("Levels",           265_8079),
    "Level 080":                                                                        KH1LocationData("Levels",           265_8080),
    "Level 081":                                                                        KH1LocationData("Levels",           265_8081),
    "Level 082":                                                                        KH1LocationData("Levels",           265_8082),
    "Level 083":                                                                        KH1LocationData("Levels",           265_8083),
    "Level 084":                                                                        KH1LocationData("Levels",           265_8084),
    "Level 085":                                                                        KH1LocationData("Levels",           265_8085),
    "Level 086":                                                                        KH1LocationData("Levels",           265_8086),
    "Level 087":                                                                        KH1LocationData("Levels",           265_8087),
    "Level 088":                                                                        KH1LocationData("Levels",           265_8088),
    "Level 089":                                                                        KH1LocationData("Levels",           265_8089),
    "Level 090":                                                                        KH1LocationData("Levels",           265_8090),
    "Level 091":                                                                        KH1LocationData("Levels",           265_8091),
    "Level 092":                                                                        KH1LocationData("Levels",           265_8092),
    "Level 093":                                                                        KH1LocationData("Levels",           265_8093),
    "Level 094":                                                                        KH1LocationData("Levels",           265_8094),
    "Level 095":                                                                        KH1LocationData("Levels",           265_8095),
    "Level 096":                                                                        KH1LocationData("Levels",           265_8096),
    "Level 097":                                                                        KH1LocationData("Levels",           265_8097),
    "Level 098":                                                                        KH1LocationData("Levels",           265_8098),
    "Level 099":                                                                        KH1LocationData("Levels",           265_8099),
    "Level 100":                                                                        KH1LocationData("Levels",           265_8100),
    "Complete Phil Cup":                                                                KH1LocationData("Olympus Coliseum", 265_9001),
    "Complete Phil Cup Solo":                                                           KH1LocationData("Olympus Coliseum", 265_9002),
    "Complete Phil Cup Time Trial":                                                     KH1LocationData("Olympus Coliseum", 265_9003),
    "Complete Pegasus Cup":                                                             KH1LocationData("Olympus Coliseum", 265_9004),
    "Complete Pegasus Cup Solo":                                                        KH1LocationData("Olympus Coliseum", 265_9005),
    "Complete Pegasus Cup Time Trial":                                                  KH1LocationData("Olympus Coliseum", 265_9006),
    "Complete Hercules Cup":                                                            KH1LocationData("Olympus Coliseum", 265_9007),
    "Complete Hercules Cup Solo":                                                       KH1LocationData("Olympus Coliseum", 265_9008),
    "Complete Hercules Cup Time Trial":                                                 KH1LocationData("Olympus Coliseum", 265_9009),
    "Complete Hades Cup":                                                               KH1LocationData("Olympus Coliseum", 265_9010),
    "Complete Hades Cup Solo":                                                          KH1LocationData("Olympus Coliseum", 265_9011),
    "Complete Hades Cup Time Trial":                                                    KH1LocationData("Olympus Coliseum", 265_9012),
    "Hades Cup Defeat Cloud and Leon Event":                                            KH1LocationData("Olympus Coliseum", 265_9013),
    "Hades Cup Defeat Yuffie Event":                                                    KH1LocationData("Olympus Coliseum", 265_9014),
    "Hades Cup Defeat Cerberus Event":                                                  KH1LocationData("Olympus Coliseum", 265_9015),
    "Hades Cup Defeat Behemoth Event":                                                  KH1LocationData("Olympus Coliseum", 265_9016),
    "Hades Cup Defeat Hades Event":                                                     KH1LocationData("Olympus Coliseum", 265_9017),
    "Hercules Cup Defeat Cloud Event":                                                  KH1LocationData("Olympus Coliseum", 265_9018),
    "Hercules Cup Yellow Trinity Event":                                                KH1LocationData("Olympus Coliseum", 265_9019),
    "Final Ansem":                                                                      KH1LocationData("Final",            265_9999)
}

event_location_table: Dict[str, KH1LocationData] = {}

lookup_id_to_name: typing.Dict[int, str] = {data.code: item_name for item_name, data in location_table.items() if data.code}


#Make location categories
location_name_groups: Dict[str, Set[str]] = {}
for location in location_table.keys():
    category = location_table[location].category
    if category not in location_name_groups.keys():
        location_name_groups[category] = set()
    location_name_groups[category].add(location)
