diff --git a/README.md b/README.md index 2c0c164b53c4..18b1651bb039 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,7 @@ Currently, the following games are supported: * Celeste 64 * Zork Grand Inquisitor * Castlevania 64 +* A Short Hike For setup and instructions check out our [tutorials page](https://archipelago.gg/tutorial/). Downloads can be found at [Releases](https://github.com/ArchipelagoMW/Archipelago/releases), including compiled diff --git a/docs/CODEOWNERS b/docs/CODEOWNERS index 9c801f04af04..64407356625b 100644 --- a/docs/CODEOWNERS +++ b/docs/CODEOWNERS @@ -134,6 +134,9 @@ # Shivers /worlds/shivers/ @GodlFire +# A Short Hike +/worlds/shorthike/ @chandler05 + # Sonic Adventure 2 Battle /worlds/sa2b/ @PoryGone @RaspberrySpace diff --git a/worlds/shorthike/Items.py b/worlds/shorthike/Items.py new file mode 100644 index 000000000000..a240dcbc6a1f --- /dev/null +++ b/worlds/shorthike/Items.py @@ -0,0 +1,62 @@ +from BaseClasses import ItemClassification +from typing import TypedDict, Dict, List, Set + +class ItemDict(TypedDict): + name: str + id: int + count: int + classification: ItemClassification + +base_id = 82000 + +item_table: List[ItemDict] = [ + {"name": "Stick", "id": base_id + 1, "count": 8, "classification": ItemClassification.progression_skip_balancing}, + {"name": "Seashell", "id": base_id + 2, "count": 23, "classification": ItemClassification.progression_skip_balancing}, + {"name": "Golden Feather", "id": base_id + 3, "count": 0, "classification": ItemClassification.progression}, + {"name": "Silver Feather", "id": base_id + 4, "count": 0, "classification": ItemClassification.useful}, + {"name": "Bucket", "id": base_id + 5, "count": 0, "classification": ItemClassification.progression}, + {"name": "Bait", "id": base_id + 6, "count": 2, "classification": ItemClassification.filler}, + {"name": "Fishing Rod", "id": base_id + 7, "count": 2, "classification": ItemClassification.progression}, + {"name": "Shovel", "id": base_id + 8, "count": 1, "classification": ItemClassification.progression}, + {"name": "Toy Shovel", "id": base_id + 9, "count": 5, "classification": ItemClassification.progression_skip_balancing}, + {"name": "Compass", "id": base_id + 10, "count": 1, "classification": ItemClassification.useful}, + {"name": "Medal", "id": base_id + 11, "count": 3, "classification": ItemClassification.filler}, + {"name": "Shell Necklace", "id": base_id + 12, "count": 1, "classification": ItemClassification.progression}, + {"name": "Wristwatch", "id": base_id + 13, "count": 1, "classification": ItemClassification.progression}, + {"name": "Motorboat Key", "id": base_id + 14, "count": 1, "classification": ItemClassification.progression}, + {"name": "Pickaxe", "id": base_id + 15, "count": 3, "classification": ItemClassification.useful}, + {"name": "Fishing Journal", "id": base_id + 16, "count": 1, "classification": ItemClassification.useful}, + {"name": "A Stormy View Map", "id": base_id + 17, "count": 1, "classification": ItemClassification.filler}, + {"name": "The King Map", "id": base_id + 18, "count": 1, "classification": ItemClassification.filler}, + {"name": "The Treasure of Sid Beach Map", "id": base_id + 19, "count": 1, "classification": ItemClassification.filler}, + {"name": "In Her Shadow Map", "id": base_id + 20, "count": 1, "classification": ItemClassification.filler}, + {"name": "Sunhat", "id": base_id + 21, "count": 1, "classification": ItemClassification.filler}, + {"name": "Baseball Cap", "id": base_id + 22, "count": 1, "classification": ItemClassification.filler}, + {"name": "Provincial Park Hat", "id": base_id + 23, "count": 1, "classification": ItemClassification.filler}, + {"name": "Headband", "id": base_id + 24, "count": 1, "classification": ItemClassification.progression}, + {"name": "Running Shoes", "id": base_id + 25, "count": 1, "classification": ItemClassification.useful}, + {"name": "Camping Permit", "id": base_id + 26, "count": 1, "classification": ItemClassification.progression}, + {"name": "Walkie Talkie", "id": base_id + 27, "count": 1, "classification": ItemClassification.useful}, + + # Not in the item pool for now + #{"name": "Boating Manual", "id": base_id + ~, "count": 1, "classification": ItemClassification.filler}, + + # Different Coin Amounts (Fillers) + {"name": "7 Coins", "id": base_id + 28, "count": 3, "classification": ItemClassification.filler}, + {"name": "15 Coins", "id": base_id + 29, "count": 1, "classification": ItemClassification.filler}, + {"name": "18 Coins", "id": base_id + 30, "count": 1, "classification": ItemClassification.filler}, + {"name": "21 Coins", "id": base_id + 31, "count": 2, "classification": ItemClassification.filler}, + {"name": "25 Coins", "id": base_id + 32, "count": 7, "classification": ItemClassification.filler}, + {"name": "27 Coins", "id": base_id + 33, "count": 1, "classification": ItemClassification.filler}, + {"name": "32 Coins", "id": base_id + 34, "count": 1, "classification": ItemClassification.filler}, + {"name": "33 Coins", "id": base_id + 35, "count": 6, "classification": ItemClassification.filler}, + {"name": "50 Coins", "id": base_id + 36, "count": 1, "classification": ItemClassification.filler}, + + # Filler item determined by settings + {"name": "13 Coins", "id": base_id + 37, "count": 0, "classification": ItemClassification.filler}, +] + +group_table: Dict[str, Set[str]] = { + "Coins": {"7 Coins", "13 Coins", "15 Coins", "18 Coins", "21 Coins", "25 Coins", "27 Coins", "32 Coins", "33 Coins", "50 Coins"}, + "Maps": {"A Stormy View Map", "The King Map", "The Treasure of Sid Beach Map", "In Her Shadow Map"}, +} diff --git a/worlds/shorthike/Locations.py b/worlds/shorthike/Locations.py new file mode 100644 index 000000000000..c2d316c68675 --- /dev/null +++ b/worlds/shorthike/Locations.py @@ -0,0 +1,709 @@ +from typing import List, TypedDict + +class LocationInfo(TypedDict): + name: str + id: int + inGameId: str + needsShovel: bool + purchase: bool + minGoldenFeathers: int + minGoldenFeathersEasy: int + minGoldenFeathersBucket: int + +base_id = 83000 + +location_table: List[LocationInfo] = [ + # Original Seashell Locations + {"name": "Start Beach Seashell", + "id": base_id + 1, + "inGameId": "PickUps.3", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Beach Hut Seashell", + "id": base_id + 2, + "inGameId": "PickUps.2", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Beach Umbrella Seashell", + "id": base_id + 3, + "inGameId": "PickUps.8", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Sid Beach Mound Seashell", + "id": base_id + 4, + "inGameId": "PickUps.12", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Sid Beach Seashell", + "id": base_id + 5, + "inGameId": "PickUps.11", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Shirley's Point Beach Seashell", + "id": base_id + 6, + "inGameId": "PickUps.18", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Shirley's Point Rock Seashell", + "id": base_id + 7, + "inGameId": "PickUps.17", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Visitor's Center Beach Seashell", + "id": base_id + 8, + "inGameId": "PickUps.19", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "West River Seashell", + "id": base_id + 9, + "inGameId": "PickUps.10", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "West Riverbank Seashell", + "id": base_id + 10, + "inGameId": "PickUps.4", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "Stone Tower Riverbank Seashell", + "id": base_id + 11, + "inGameId": "PickUps.23", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "North Beach Seashell", + "id": base_id + 12, + "inGameId": "PickUps.6", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "North Coast Seashell", + "id": base_id + 13, + "inGameId": "PickUps.7", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Boat Cliff Seashell", + "id": base_id + 14, + "inGameId": "PickUps.14", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Boat Isle Mound Seashell", + "id": base_id + 15, + "inGameId": "PickUps.22", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "East Coast Seashell", + "id": base_id + 16, + "inGameId": "PickUps.21", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "House North Beach Seashell", + "id": base_id + 17, + "inGameId": "PickUps.16", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Airstream Island North Seashell", + "id": base_id + 18, + "inGameId": "PickUps.13", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Airstream Island South Seashell", + "id": base_id + 19, + "inGameId": "PickUps.15", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Secret Island Beach Seashell", + "id": base_id + 20, + "inGameId": "PickUps.1", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Meteor Lake Seashell", + "id": base_id + 126, + "inGameId": "PickUps.20", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "Good Creek Path Seashell", + "id": base_id + 127, + "inGameId": "PickUps.9", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + + # Visitor's Center Shop + {"name": "Visitor's Center Shop Golden Feather 1", + "id": base_id + 21, + "inGameId": "CampRangerNPC[0]", + "needsShovel": False, "purchase": True, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Visitor's Center Shop Golden Feather 2", + "id": base_id + 22, + "inGameId": "CampRangerNPC[1]", + "needsShovel": False, "purchase": True, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Visitor's Center Shop Hat", + "id": base_id + 23, + "inGameId": "CampRangerNPC[9]", + "needsShovel": False, "purchase": True, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + + # Tough Bird Salesman + {"name": "Tough Bird Salesman Golden Feather 1", + "id": base_id + 24, + "inGameId": "ToughBirdNPC (1)[0]", + "needsShovel": False, "purchase": True, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "Tough Bird Salesman Golden Feather 2", + "id": base_id + 25, + "inGameId": "ToughBirdNPC (1)[1]", + "needsShovel": False, "purchase": True, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "Tough Bird Salesman Golden Feather 3", + "id": base_id + 26, + "inGameId": "ToughBirdNPC (1)[2]", + "needsShovel": False, "purchase": True, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "Tough Bird Salesman Golden Feather 4", + "id": base_id + 27, + "inGameId": "ToughBirdNPC (1)[3]", + "needsShovel": False, "purchase": True, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "Tough Bird Salesman (400 Coins)", + "id": base_id + 28, + "inGameId": "ToughBirdNPC (1)[9]", + "needsShovel": False, "purchase": True, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + + # Beachstickball + {"name": "Beachstickball (10 Hits)", + "id": base_id + 29, + "inGameId": "VolleyballOpponent[0]", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Beachstickball (20 Hits)", + "id": base_id + 30, + "inGameId": "VolleyballOpponent[1]", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Beachstickball (30 Hits)", + "id": base_id + 31, + "inGameId": "VolleyballOpponent[2]", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + + # Misc Item Locations + {"name": "Shovel Kid Trade", + "id": base_id + 32, + "inGameId": "Frog_StandingNPC[0]", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Compass Guy", + "id": base_id + 33, + "inGameId": "Fox_WalkingNPC[0]", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Hawk Peak Bucket Rock", + "id": base_id + 34, + "inGameId": "Tools.23", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "Orange Islands Bucket Rock", + "id": base_id + 35, + "inGameId": "Tools.42", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Bill the Walrus Fisherman", + "id": base_id + 36, + "inGameId": "SittingNPC (1)[0]", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "Catch 3 Fish Reward", + "id": base_id + 37, + "inGameId": "FishBuyer[0]", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Catch All Fish Reward", + "id": base_id + 38, + "inGameId": "FishBuyer[1]", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 7, "minGoldenFeathersEasy": 9, "minGoldenFeathersBucket": 7}, + {"name": "Permit Guy Bribe", + "id": base_id + 39, + "inGameId": "CamperNPC[0]", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "Catch Fish with Permit", + "id": base_id + 129, + "inGameId": "Player[0]", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "Return Camping Permit", + "id": base_id + 130, + "inGameId": "CamperNPC[1]", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + + # Original Pickaxe Locations + {"name": "Blocked Mine Pickaxe 1", + "id": base_id + 40, + "inGameId": "Tools.31", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Blocked Mine Pickaxe 2", + "id": base_id + 41, + "inGameId": "Tools.32", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Blocked Mine Pickaxe 3", + "id": base_id + 42, + "inGameId": "Tools.33", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + + # Original Toy Shovel Locations + {"name": "Blackwood Trail Lookout Toy Shovel", + "id": base_id + 43, + "inGameId": "PickUps.27", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "Shirley's Point Beach Toy Shovel", + "id": base_id + 44, + "inGameId": "PickUps.30", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Visitor's Center Beach Toy Shovel", + "id": base_id + 45, + "inGameId": "PickUps.29", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Blackwood Trail Rock Toy Shovel", + "id": base_id + 46, + "inGameId": "PickUps.26", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "Beach Hut Cliff Toy Shovel", + "id": base_id + 128, + "inGameId": "PickUps.28", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + + # Original Stick Locations + {"name": "Secret Island Beach Trail Stick", + "id": base_id + 47, + "inGameId": "PickUps.25", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Below Lighthouse Walkway Stick", + "id": base_id + 48, + "inGameId": "Tools.3", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "Beach Hut Rocky Pool Sand Stick", + "id": base_id + 49, + "inGameId": "Tools.0", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Cliff Overlooking West River Waterfall Stick", + "id": base_id + 50, + "inGameId": "Tools.2", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 2, "minGoldenFeathersBucket": 0}, + {"name": "Trail to Tough Bird Salesman Stick", + "id": base_id + 51, + "inGameId": "Tools.8", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "North Beach Stick", + "id": base_id + 52, + "inGameId": "Tools.4", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Beachstickball Court Stick", + "id": base_id + 53, + "inGameId": "VolleyballMinigame.4", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Stick Under Sid Beach Umbrella", + "id": base_id + 54, + "inGameId": "Tools.1", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + + # Boating + {"name": "Boat Rental", + "id": base_id + 55, + "inGameId": "DadDeer[0]", + "needsShovel": False, "purchase": True, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Boat Challenge Reward", + "id": base_id + 56, + "inGameId": "DeerKidBoat[0]", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + + # Not a location for now, corresponding with the Boating Manual + # {"name": "Receive Boating Manual", + # "id": base_id + 133, + # "inGameId": "DadDeer[1]", + # "needsShovel": False, "purchase": False, + # "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + + # Original Map Locations + {"name": "Outlook Point Dog Gift", + "id": base_id + 57, + "inGameId": "Dog_WalkingNPC_BlueEyed[0]", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + + # Original Clothes Locations + {"name": "Collect 15 Seashells", + "id": base_id + 58, + "inGameId": "LittleKidNPCVariant (1)[0]", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Return to Shell Kid", + "id": base_id + 132, + "inGameId": "LittleKidNPCVariant (1)[1]", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Taylor the Turtle Headband Gift", + "id": base_id + 59, + "inGameId": "Turtle_WalkingNPC[0]", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "Sue the Rabbit Shoes Reward", + "id": base_id + 60, + "inGameId": "Bunny_WalkingNPC (1)[0]", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "Purchase Sunhat", + "id": base_id + 61, + "inGameId": "SittingNPC[0]", + "needsShovel": False, "purchase": True, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + + # Original Golden Feather Locations + {"name": "Blackwood Forest Golden Feather", + "id": base_id + 62, + "inGameId": "Feathers.3", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "Ranger May Shell Necklace Golden Feather", + "id": base_id + 63, + "inGameId": "AuntMayNPC[0]", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Sand Castle Golden Feather", + "id": base_id + 64, + "inGameId": "SandProvince.3", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Artist Golden Feather", + "id": base_id + 65, + "inGameId": "StandingNPC[0]", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "Visitor Camp Rock Golden Feather", + "id": base_id + 66, + "inGameId": "Feathers.8", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "Outlook Cliff Golden Feather", + "id": base_id + 67, + "inGameId": "Feathers.2", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "Meteor Lake Cliff Golden Feather", + "id": base_id + 68, + "inGameId": "Feathers.7", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 5, "minGoldenFeathersBucket": 0}, + + # Original Silver Feather Locations + {"name": "Secret Island Peak", + "id": base_id + 69, + "inGameId": "PickUps.24", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 5, "minGoldenFeathersEasy": 7, "minGoldenFeathersBucket": 7}, + {"name": "Wristwatch Trade", + "id": base_id + 70, + "inGameId": "Goat_StandingNPC[0]", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + + # Golden Chests + {"name": "Lighthouse Golden Chest", + "id": base_id + 71, + "inGameId": "Feathers.0", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 2, "minGoldenFeathersEasy": 3, "minGoldenFeathersBucket": 0}, + {"name": "Outlook Golden Chest", + "id": base_id + 72, + "inGameId": "Feathers.6", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "Stone Tower Golden Chest", + "id": base_id + 73, + "inGameId": "Feathers.5", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "North Cliff Golden Chest", + "id": base_id + 74, + "inGameId": "Feathers.4", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 3, "minGoldenFeathersEasy": 10, "minGoldenFeathersBucket": 10}, + + # Chests + {"name": "Blackwood Cliff Chest", + "id": base_id + 75, + "inGameId": "Coins.22", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "White Coast Trail Chest", + "id": base_id + 76, + "inGameId": "Coins.6", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Sid Beach Chest", + "id": base_id + 77, + "inGameId": "Coins.7", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Sid Beach Buried Treasure Chest", + "id": base_id + 78, + "inGameId": "Coins.46", + "needsShovel": True, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Sid Beach Cliff Chest", + "id": base_id + 79, + "inGameId": "Coins.9", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Visitor's Center Buried Chest", + "id": base_id + 80, + "inGameId": "Coins.94", + "needsShovel": True, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Visitor's Center Hidden Chest", + "id": base_id + 81, + "inGameId": "Coins.42", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Shirley's Point Chest", + "id": base_id + 82, + "inGameId": "Coins.10", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 1, "minGoldenFeathersEasy": 2, "minGoldenFeathersBucket": 2}, + {"name": "Caravan Cliff Chest", + "id": base_id + 83, + "inGameId": "Coins.12", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Caravan Arch Chest", + "id": base_id + 84, + "inGameId": "Coins.11", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "King Buried Treasure Chest", + "id": base_id + 85, + "inGameId": "Coins.41", + "needsShovel": True, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "Good Creek Path Buried Chest", + "id": base_id + 86, + "inGameId": "Coins.48", + "needsShovel": True, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "Good Creek Path West Chest", + "id": base_id + 87, + "inGameId": "Coins.33", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "Good Creek Path East Chest", + "id": base_id + 88, + "inGameId": "Coins.62", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "West Waterfall Chest", + "id": base_id + 89, + "inGameId": "Coins.20", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Stone Tower West Cliff Chest", + "id": base_id + 90, + "inGameId": "PickUps.0", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "Bucket Path Chest", + "id": base_id + 91, + "inGameId": "Coins.50", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "Bucket Cliff Chest", + "id": base_id + 92, + "inGameId": "Coins.49", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 3, "minGoldenFeathersEasy": 5, "minGoldenFeathersBucket": 5}, + {"name": "In Her Shadow Buried Treasure Chest", + "id": base_id + 93, + "inGameId": "Feathers.9", + "needsShovel": True, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "Meteor Lake Buried Chest", + "id": base_id + 94, + "inGameId": "Coins.86", + "needsShovel": True, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "Meteor Lake Chest", + "id": base_id + 95, + "inGameId": "Coins.64", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "House North Beach Chest", + "id": base_id + 96, + "inGameId": "Coins.65", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "East Coast Chest", + "id": base_id + 97, + "inGameId": "Coins.98", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Fisherman's Boat Chest 1", + "id": base_id + 99, + "inGameId": "Boat.0", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Fisherman's Boat Chest 2", + "id": base_id + 100, + "inGameId": "Boat.7", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Airstream Island Chest", + "id": base_id + 101, + "inGameId": "Coins.31", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "West River Waterfall Head Chest", + "id": base_id + 102, + "inGameId": "Coins.34", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "Old Building Chest", + "id": base_id + 103, + "inGameId": "Coins.104", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "Old Building West Chest", + "id": base_id + 104, + "inGameId": "Coins.109", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "Old Building East Chest", + "id": base_id + 105, + "inGameId": "Coins.8", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "Hawk Peak West Chest", + "id": base_id + 106, + "inGameId": "Coins.21", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 3, "minGoldenFeathersEasy": 5, "minGoldenFeathersBucket": 5}, + {"name": "Hawk Peak East Buried Chest", + "id": base_id + 107, + "inGameId": "Coins.76", + "needsShovel": True, "purchase": False, + "minGoldenFeathers": 3, "minGoldenFeathersEasy": 5, "minGoldenFeathersBucket": 5}, + {"name": "Hawk Peak Northeast Chest", + "id": base_id + 108, + "inGameId": "Coins.79", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 3, "minGoldenFeathersEasy": 5, "minGoldenFeathersBucket": 5}, + {"name": "Northern East Coast Chest", + "id": base_id + 109, + "inGameId": "Coins.45", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 2, "minGoldenFeathersBucket": 0}, + {"name": "North Coast Chest", + "id": base_id + 110, + "inGameId": "Coins.28", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "North Coast Buried Chest", + "id": base_id + 111, + "inGameId": "Coins.47", + "needsShovel": True, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Small South Island Buried Chest", + "id": base_id + 112, + "inGameId": "Coins.87", + "needsShovel": True, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Secret Island Bottom Chest", + "id": base_id + 113, + "inGameId": "Coins.88", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Secret Island Treehouse Chest", + "id": base_id + 114, + "inGameId": "Coins.89", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 1, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 1}, + {"name": "Sunhat Island Buried Chest", + "id": base_id + 115, + "inGameId": "Coins.112", + "needsShovel": True, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Orange Islands South Buried Chest", + "id": base_id + 116, + "inGameId": "Coins.119", + "needsShovel": True, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Orange Islands West Chest", + "id": base_id + 117, + "inGameId": "Coins.121", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Orange Islands North Buried Chest", + "id": base_id + 118, + "inGameId": "Coins.117", + "needsShovel": True, "purchase": False, + "minGoldenFeathers": 1, "minGoldenFeathersEasy": 1, "minGoldenFeathersBucket": 0}, + {"name": "Orange Islands East Chest", + "id": base_id + 119, + "inGameId": "Coins.120", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Orange Islands South Hidden Chest", + "id": base_id + 120, + "inGameId": "Coins.124", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "A Stormy View Buried Treasure Chest", + "id": base_id + 121, + "inGameId": "Coins.113", + "needsShovel": True, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, + {"name": "Orange Islands Ruins Buried Chest", + "id": base_id + 122, + "inGameId": "Coins.118", + "needsShovel": True, "purchase": False, + "minGoldenFeathers": 2, "minGoldenFeathersEasy": 4, "minGoldenFeathersBucket": 0}, + + # Race Rewards + {"name": "Lighthouse Race Reward", + "id": base_id + 123, + "inGameId": "RaceOpponent[0]", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 2, "minGoldenFeathersEasy": 3, "minGoldenFeathersBucket": 1}, + {"name": "Old Building Race Reward", + "id": base_id + 124, + "inGameId": "RaceOpponent[1]", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 1, "minGoldenFeathersEasy": 5, "minGoldenFeathersBucket": 0}, + {"name": "Hawk Peak Race Reward", + "id": base_id + 125, + "inGameId": "RaceOpponent[2]", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 7, "minGoldenFeathersEasy": 9, "minGoldenFeathersBucket": 7}, + {"name": "Lose Race Gift", + "id": base_id + 131, + "inGameId": "RaceOpponent[9]", + "needsShovel": False, "purchase": False, + "minGoldenFeathers": 0, "minGoldenFeathersEasy": 0, "minGoldenFeathersBucket": 0}, +] diff --git a/worlds/shorthike/Options.py b/worlds/shorthike/Options.py new file mode 100644 index 000000000000..2f378f18ff6e --- /dev/null +++ b/worlds/shorthike/Options.py @@ -0,0 +1,73 @@ +from dataclasses import dataclass +from Options import Choice, PerGameCommonOptions, Range, StartInventoryPool, Toggle + +class Goal(Choice): + """Choose the end goal. + Nap: Complete the climb to the top of Hawk Peak and take a nap + Photo: Get your picture taken at the top of Hawk Peak + Races: Complete all three races with Avery + Help Everyone: Travel around Hawk Peak and help every character with their troubles + Fishmonger: Catch one of every fish from around Hawk Peak""" + display_name = "Goal" + option_nap = 0 + option_photo = 1 + option_races = 2 + option_help_everyone = 3 + option_fishmonger = 4 + default = 3 + +class CoinsInShops(Toggle): + """When enabled, the randomizer can place coins into locations that are purchased, such as shops.""" + display_name = "Coins in Purchaseable Locations" + default = False + +class GoldenFeathers(Range): + """Number of Golden Feathers in the item pool. + (Note that for the Photo and Help Everyone goals, a minimum of 12 Golden Feathers is enforced)""" + display_name = "Golden Feathers" + range_start = 0 + range_end = 20 + default = 20 + +class SilverFeathers(Range): + """Number of Silver Feathers in the item pool.""" + display_name = "Silver Feathers" + range_start = 0 + range_end = 20 + default = 2 + +class Buckets(Range): + """Number of Buckets in the item pool.""" + display_name = "Buckets" + range_start = 0 + range_end = 2 + default = 2 + +class GoldenFeatherProgression(Choice): + """Determines which locations are considered in logic based on the required amount of golden feathers to reach them. + Easy: Locations will be considered inaccessible until the player has enough golden feathers to easily reach them. A minimum of 10 golden feathers is recommended for this setting. + Normal: Locations will be considered inaccessible until the player has the minimum possible number of golden feathers to reach them. A minimum of 7 golden feathers is recommended for this setting. + Hard: Removes the requirement of golden feathers for progression entirely and glitches may need to be used to progress""" + display_name = "Golden Feather Progression" + option_easy = 0 + option_normal = 1 + option_hard = 2 + default = 1 + +class CostMultiplier(Range): + """The percentage that all item shop costs will be of the vanilla values.""" + display_name = "Shop Cost Multiplier" + range_start = 25 + range_end = 200 + default = 100 + +@dataclass +class ShortHikeOptions(PerGameCommonOptions): + start_inventory_from_pool: StartInventoryPool + goal: Goal + coins_in_shops: CoinsInShops + golden_feathers: GoldenFeathers + silver_feathers: SilverFeathers + buckets: Buckets + golden_feather_progression: GoldenFeatherProgression + cost_multiplier: CostMultiplier diff --git a/worlds/shorthike/Rules.py b/worlds/shorthike/Rules.py new file mode 100644 index 000000000000..73a16434219e --- /dev/null +++ b/worlds/shorthike/Rules.py @@ -0,0 +1,73 @@ +from worlds.generic.Rules import forbid_items_for_player, add_rule + +def create_rules(self, location_table): + multiworld = self.multiworld + player = self.player + options = self.options + + # Shovel Rules + for loc in location_table: + if loc["needsShovel"]: + forbid_items_for_player(multiworld.get_location(loc["name"], player), self.item_name_groups['Maps'], player) + add_rule(multiworld.get_location(loc["name"], player), + lambda state: state.has("Shovel", player)) + if loc["purchase"] and not options.coins_in_shops: + forbid_items_for_player(multiworld.get_location(loc["name"], player), self.item_name_groups['Coins'], player) + + # Minimum Feather Rules + if options.golden_feather_progression != 2: + min_feathers = get_min_feathers(self, loc["minGoldenFeathers"], loc["minGoldenFeathersEasy"]) + + if options.buckets > 0 and loc["minGoldenFeathersBucket"] < min_feathers: + add_rule(multiworld.get_location(loc["name"], player), + lambda state, loc=loc, min_feathers=min_feathers: state.has("Golden Feather", player, min_feathers) + or (state.has("Bucket", player) and state.has("Golden Feather", player, loc["minGoldenFeathersBucket"]))) + elif min_feathers > 0: + add_rule(multiworld.get_location(loc["name"], player), + lambda state, min_feathers=min_feathers: state.has("Golden Feather", player, min_feathers)) + add_rule(multiworld.get_location("Shovel Kid Trade", player), + lambda state: state.has("Toy Shovel", player)) + add_rule(multiworld.get_location("Sand Castle Golden Feather", player), + lambda state: state.has("Toy Shovel", player)) + + # Fishing Rules + add_rule(multiworld.get_location("Catch 3 Fish Reward", player), + lambda state: state.has("Fishing Rod", player)) + add_rule(multiworld.get_location("Catch Fish with Permit", player), + lambda state: state.has("Fishing Rod", player)) + add_rule(multiworld.get_location("Catch All Fish Reward", player), + lambda state: state.has("Fishing Rod", player)) + + # Misc Rules + add_rule(multiworld.get_location("Return Camping Permit", player), + lambda state: state.has("Camping Permit", player)) + add_rule(multiworld.get_location("Boat Challenge Reward", player), + lambda state: state.has("Motorboat Key", player)) + add_rule(multiworld.get_location("Collect 15 Seashells", player), + lambda state: state.has("Seashell", player, 15)) + add_rule(multiworld.get_location("Wristwatch Trade", player), + lambda state: state.has("Wristwatch", player)) + add_rule(multiworld.get_location("Sue the Rabbit Shoes Reward", player), + lambda state: state.has("Headband", player)) + add_rule(multiworld.get_location("Return to Shell Kid", player), + lambda state: state.has("Shell Necklace", player) and state.has("Seashell", player, 15)) + add_rule(multiworld.get_location("Ranger May Shell Necklace Golden Feather", player), + lambda state: state.has("Shell Necklace", player)) + add_rule(multiworld.get_location("Beachstickball (10 Hits)", player), + lambda state: state.has("Stick", player)) + add_rule(multiworld.get_location("Beachstickball (20 Hits)", player), + lambda state: state.has("Stick", player)) + add_rule(multiworld.get_location("Beachstickball (30 Hits)", player), + lambda state: state.has("Stick", player)) + +def get_min_feathers(self, min_golden_feathers, min_golden_feathers_easy): + options = self.options + + min_feathers = min_golden_feathers + if options.golden_feather_progression == 0: + min_feathers = min_golden_feathers_easy + if min_feathers > options.golden_feathers: + if options.goal != 1 and options.goal != 3: + min_feathers = options.golden_feathers + + return min_feathers diff --git a/worlds/shorthike/__init__.py b/worlds/shorthike/__init__.py new file mode 100644 index 000000000000..8a4ef932336d --- /dev/null +++ b/worlds/shorthike/__init__.py @@ -0,0 +1,136 @@ +from collections import Counter +from typing import ClassVar, Dict, Any, Type +from BaseClasses import Region, Location, Item, Tutorial +from Options import PerGameCommonOptions +from worlds.AutoWorld import World, WebWorld +from .Items import item_table, group_table, base_id +from .Locations import location_table +from .Rules import create_rules, get_min_feathers +from .Options import ShortHikeOptions + +class ShortHikeWeb(WebWorld): + theme = "ocean" + tutorials = [Tutorial( + "Multiworld Setup Guide", + "A guide to setting up the A Short Hike randomizer connected to an Archipelago Multiworld", + "English", + "setup_en.md", + "setup/en", + ["Chandler"] + )] + +class ShortHikeWorld(World): + """ + A Short Hike is a relaxing adventure set on the islands of Hawk Peak. Fly and climb using Claire's wings and Golden Feathers + to make your way up to the summit. Along the way you'll meet other hikers, discover hidden treasures, + and take in the beautiful world around you. + """ + + game = "A Short Hike" + web = ShortHikeWeb() + data_version = 2 + + item_name_to_id = {item["name"]: item["id"] for item in item_table} + location_name_to_id = {loc["name"]: loc["id"] for loc in location_table} + location_name_to_game_id = {loc["name"]: loc["inGameId"] for loc in location_table} + + item_name_groups = group_table + + options_dataclass: ClassVar[Type[PerGameCommonOptions]] = ShortHikeOptions + options: ShortHikeOptions + + required_client_version = (0, 4, 4) + + def __init__(self, multiworld, player): + super(ShortHikeWorld, self).__init__(multiworld, player) + + def get_filler_item_name(self) -> str: + return "13 Coins" + + def create_item(self, name: str) -> "ShortHikeItem": + item_id: int = self.item_name_to_id[name] + id = item_id - base_id - 1 + + return ShortHikeItem(name, item_table[id]["classification"], item_id, player=self.player) + + def create_items(self) -> None: + for item in item_table: + count = item["count"] + + if count <= 0: + continue + else: + for i in range(count): + self.multiworld.itempool.append(self.create_item(item["name"])) + + feather_count = self.options.golden_feathers + if self.options.goal == 1 or self.options.goal == 3: + if feather_count < 12: + feather_count = 12 + + junk = 45 - self.options.silver_feathers - feather_count - self.options.buckets + self.multiworld.itempool += [self.create_item(self.get_filler_item_name()) for _ in range(junk)] + self.multiworld.itempool += [self.create_item("Golden Feather") for _ in range(feather_count)] + self.multiworld.itempool += [self.create_item("Silver Feather") for _ in range(self.options.silver_feathers)] + self.multiworld.itempool += [self.create_item("Bucket") for _ in range(self.options.buckets)] + + def create_regions(self) -> None: + menu_region = Region("Menu", self.player, self.multiworld) + self.multiworld.regions.append(menu_region) + + main_region = Region("Hawk Peak", self.player, self.multiworld) + + for loc in self.location_name_to_id.keys(): + main_region.locations.append(ShortHikeLocation(self.player, loc, self.location_name_to_id[loc], main_region)) + + self.multiworld.regions.append(main_region) + + menu_region.connect(main_region) + + if self.options.goal == "nap": + # Nap + self.multiworld.completion_condition[self.player] = lambda state: (state.has("Golden Feather", self.player, get_min_feathers(self, 7, 9)) + or (state.has("Bucket", self.player) and state.has("Golden Feather", self.player, 7))) + elif self.options.goal == "photo": + # Photo + self.multiworld.completion_condition[self.player] = lambda state: state.has("Golden Feather", self.player, 12) + elif self.options.goal == "races": + # Races + self.multiworld.completion_condition[self.player] = lambda state: (state.has("Golden Feather", self.player, get_min_feathers(self, 7, 9)) + or (state.has("Bucket", self.player) and state.has("Golden Feather", self.player, 7))) + elif self.options.goal == "help_everyone": + # Help Everyone + self.multiworld.completion_condition[self.player] = lambda state: (state.has("Golden Feather", self.player, 12) + and state.has("Toy Shovel", self.player) and state.has("Camping Permit", self.player) + and state.has("Motorboat Key", self.player) and state.has("Headband", self.player) + and state.has("Wristwatch", self.player) and state.has("Seashell", self.player, 15) + and state.has("Shell Necklace", self.player)) + elif self.options.goal == "fishmonger": + # Fishmonger + self.multiworld.completion_condition[self.player] = lambda state: (state.has("Golden Feather", self.player, get_min_feathers(self, 7, 9)) + or (state.has("Bucket", self.player) and state.has("Golden Feather", self.player, 7)) + and state.has("Fishing Rod", self.player)) + + def set_rules(self): + create_rules(self, location_table) + + def fill_slot_data(self) -> Dict[str, Any]: + options = self.options + + settings = { + "goal": int(options.goal), + "logicLevel": int(options.golden_feather_progression), + "costMultiplier": int(options.cost_multiplier), + } + + slot_data = { + "settings": settings, + } + + return slot_data + +class ShortHikeItem(Item): + game: str = "A Short Hike" + +class ShortHikeLocation(Location): + game: str = "A Short Hike" diff --git a/worlds/shorthike/docs/en_A Short Hike.md b/worlds/shorthike/docs/en_A Short Hike.md new file mode 100644 index 000000000000..516bf28e47fc --- /dev/null +++ b/worlds/shorthike/docs/en_A Short Hike.md @@ -0,0 +1,30 @@ +# A Short Hike + +## What does randomization do to this game? + +All items that can be obtained from chests, the ground, and NPCs are randomized. + +## What does another world's item look like in A Short Hike? + +All items are replaced with chests that can contain items from other worlds. +Items will appear with the Archipelago logo next to them when obtained. + +## Which characters need to be helped for the Help Everyone goal? + +To achieve the Help Everyone goal, the following characters will need to be helped: +- Pay Tough Bird Salesman's Tuition Fee +- Give Frog a Toy Shovel +- Return the Camper's Camping Permit +- Complete the Deer Kid's Boating Challenge +- Find Sue's Headband +- Clean Up and Purchase the Sunhat from the Deer +- Return the Camper's Wristwatch +- Cheer Up the Artist +- Collect 15 Shells for the Kid +- Give the Shell Necklace to Aunt May +- Help the Fox Climb the Mountain + +## Can I have more than one save at a time? + +No, unfortunately only one save slot is available for use in A Short Hike. +Starting a new save will erase the old one _permanently_. \ No newline at end of file diff --git a/worlds/shorthike/docs/setup_en.md b/worlds/shorthike/docs/setup_en.md new file mode 100644 index 000000000000..e327d8bed93c --- /dev/null +++ b/worlds/shorthike/docs/setup_en.md @@ -0,0 +1,32 @@ +# A Short Hike Multiworld Setup Guide + +## Required Software + +- A Short Hike: [Steam](https://store.steampowered.com/app/1055540/A_Short_Hike/) + - The Epic Games Store or itch.io version of A Short Hike will also work. +- A Short Hike Modding Tools: [GitHub](https://github.com/BrandenEK/AShortHike.ModdingTools) +- A Short Hike Randomizer: [GitHub](https://github.com/BrandenEK/AShortHike.Randomizer) + +## Optional Software + +- [PopTracker](https://github.com/black-sliver/PopTracker/) + - [Chandler's A Short Hike PopTracker Pack](https://github.com/chandler05/shorthike-archipelago-poptracker/releases) + +## Installation + +1. Download the [Modding Tools](https://github.com/BrandenEK/AShortHike.ModdingTools/releases), and follow +the [installation instructions](https://github.com/BrandenEK/AShortHike.ModdingTools#a-short-hike-modding-tools) on the GitHub page. + +2. After the Modding Tools have been installed, download the +[Randomizer](https://github.com/BrandenEK/AShortHike.Randomizer/releases) and extract the contents of it +into the `Modding` folder. + +## Connecting + +A Short Hike will prompt you with the server details when a new game is started or a previous one is continued. +Enter in the Server Port, Name, and Password (optional) in the popup menu that appears and hit connect. + +## Tracking + +Install PopTracker from the link above and place the PopTracker pack into the packs folder. +Connect to Archipelago via the AP button in the top left. \ No newline at end of file