From ce2f9312ca18106168870c8cf836dfd545b7488b Mon Sep 17 00:00:00 2001 From: Bryce Wilson Date: Tue, 28 Nov 2023 13:50:12 -0800 Subject: [PATCH 1/7] BizHawkClient: Change `open_connection` to use 127.0.0.1 instead of localhost (#2525) When using localhost on mac, both ipv4 and ipv6 are tried and raise separate errors which are combined by asyncio and difficult/inelegant to handle. Python 3.12 adds the argument all_errors, which would make this easier. --- worlds/_bizhawk/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worlds/_bizhawk/__init__.py b/worlds/_bizhawk/__init__.py index cddfde4ff3..94a9ce1ddf 100644 --- a/worlds/_bizhawk/__init__.py +++ b/worlds/_bizhawk/__init__.py @@ -97,7 +97,7 @@ async def connect(ctx: BizHawkContext) -> bool: for port in ports: try: - ctx.streams = await asyncio.open_connection("localhost", port) + ctx.streams = await asyncio.open_connection("127.0.0.1", port) ctx.connection_status = ConnectionStatus.TENTATIVE ctx._port = port return True From 737686a88d54f8ace38f8b577d54d55f5b6c4250 Mon Sep 17 00:00:00 2001 From: Bryce Wilson Date: Tue, 28 Nov 2023 13:56:27 -0800 Subject: [PATCH 2/7] BizHawkClient: Use `local_path` when autolaunching BizHawk with lua script (#2526) * BizHawkClient: Change autolaunch path to lua script to use local_path * BizHawkClient: Remove unnecessary call to os.path.join and linting --- worlds/_bizhawk/context.py | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/worlds/_bizhawk/context.py b/worlds/_bizhawk/context.py index 2699b0f5f1..4ee6e24f59 100644 --- a/worlds/_bizhawk/context.py +++ b/worlds/_bizhawk/context.py @@ -208,19 +208,30 @@ async def _run_game(rom: str): if auto_start is True: emuhawk_path = Utils.get_settings().bizhawkclient_options.emuhawk_path - subprocess.Popen([emuhawk_path, "--lua=data/lua/connector_bizhawk_generic.lua", os.path.realpath(rom)], - cwd=Utils.local_path("."), - stdin=subprocess.DEVNULL, - stdout=subprocess.DEVNULL, - stderr=subprocess.DEVNULL) + subprocess.Popen( + [ + emuhawk_path, + f"--lua={Utils.local_path('data', 'lua', 'connector_bizhawk_generic.lua')}", + os.path.realpath(rom), + ], + cwd=Utils.local_path("."), + stdin=subprocess.DEVNULL, + stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL, + ) elif isinstance(auto_start, str): import shlex - subprocess.Popen([*shlex.split(auto_start), os.path.realpath(rom)], - cwd=Utils.local_path("."), - stdin=subprocess.DEVNULL, - stdout=subprocess.DEVNULL, - stderr=subprocess.DEVNULL) + subprocess.Popen( + [ + *shlex.split(auto_start), + os.path.realpath(rom) + ], + cwd=Utils.local_path("."), + stdin=subprocess.DEVNULL, + stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL + ) async def _patch_and_run_game(patch_file: str): From 39969abd6ad6aa715d979ef6eece1f242e58e575 Mon Sep 17 00:00:00 2001 From: el-u <109771707+el-u@users.noreply.github.com> Date: Wed, 29 Nov 2023 00:11:17 +0100 Subject: [PATCH 3/7] WebHostLib: fix NamedRange in options presets (#2528) --- WebHostLib/static/assets/player-options.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebHostLib/static/assets/player-options.js b/WebHostLib/static/assets/player-options.js index 37ba7f98ff..92cd6c43f3 100644 --- a/WebHostLib/static/assets/player-options.js +++ b/WebHostLib/static/assets/player-options.js @@ -369,7 +369,7 @@ const setPresets = (optionsData, presetName) => { break; } - case 'special_range': { + case 'named_range': { const selectElement = document.querySelector(`select[data-key='${option}']`); const rangeElement = document.querySelector(`input[data-key='${option}']`); const randomElement = document.querySelector(`.randomize-button[data-key='${option}']`); From 6c5f8250fba413dd9188041c58a132b3aa7981bd Mon Sep 17 00:00:00 2001 From: t3hf1gm3nt <59876300+t3hf1gm3nt@users.noreply.github.com> Date: Wed, 29 Nov 2023 01:19:42 -0500 Subject: [PATCH 4/7] TLOZ: Use the proper location name lookup (#2529) --- Zelda1Client.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Zelda1Client.py b/Zelda1Client.py index db3d3519aa..cd76a0a5ca 100644 --- a/Zelda1Client.py +++ b/Zelda1Client.py @@ -13,7 +13,6 @@ from typing import List import Utils from Utils import async_start -from worlds import lookup_any_location_id_to_name from CommonClient import CommonContext, server_loop, gui_enabled, console_loop, ClientCommandProcessor, logger, \ get_base_parser @@ -153,7 +152,7 @@ def get_payload(ctx: ZeldaContext): def reconcile_shops(ctx: ZeldaContext): - checked_location_names = [lookup_any_location_id_to_name[location] for location in ctx.checked_locations] + checked_location_names = [ctx.location_names[location] for location in ctx.checked_locations] shops = [location for location in checked_location_names if "Shop" in location] left_slots = [shop for shop in shops if "Left" in shop] middle_slots = [shop for shop in shops if "Middle" in shop] @@ -191,7 +190,7 @@ async def parse_locations(locations_array, ctx: ZeldaContext, force: bool, zone= locations_checked = [] location = None for location in ctx.missing_locations: - location_name = lookup_any_location_id_to_name[location] + location_name = ctx.location_names[location] if location_name in Locations.overworld_locations and zone == "overworld": status = locations_array[Locations.major_location_offsets[location_name]] From a83501a2a077fabd1c7cfe9fa4a66b9db1ce33ba Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 29 Nov 2023 22:57:40 -0500 Subject: [PATCH 5/7] Fix a bug in weighted-settings causing accepted range values to be exclusive of outer range (#2535) --- WebHostLib/static/assets/weighted-options.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebHostLib/static/assets/weighted-options.js b/WebHostLib/static/assets/weighted-options.js index a2fedb5383..80f8efd1d7 100644 --- a/WebHostLib/static/assets/weighted-options.js +++ b/WebHostLib/static/assets/weighted-options.js @@ -576,7 +576,7 @@ class GameSettings { option = parseInt(option, 10); let optionAcceptable = false; - if ((option > setting.min) && (option < setting.max)) { + if ((option >= setting.min) && (option <= setting.max)) { optionAcceptable = true; } if (setting.hasOwnProperty('value_names') && Object.values(setting.value_names).includes(option)){ From b9ce2052c5dfeb72d421f3052f9b8c6b23986fe8 Mon Sep 17 00:00:00 2001 From: Brooty Johnson <83629348+Br00ty@users.noreply.github.com> Date: Thu, 30 Nov 2023 03:29:55 -0500 Subject: [PATCH 6/7] DS3: update setup guide to preserve downpatching instructions (#2531) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * update DS3 setup guide to preserve downpatching instructions we want to preserve this on the AP site as the future of the speedsouls wiki is unknown and may disappear at any time. * Update worlds/dark_souls_3/docs/setup_en.md Co-authored-by: Danaël V. <104455676+ReverM@users.noreply.github.com> * Update setup_en.md --------- Co-authored-by: Danaël V. <104455676+ReverM@users.noreply.github.com> --- worlds/dark_souls_3/docs/setup_en.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/worlds/dark_souls_3/docs/setup_en.md b/worlds/dark_souls_3/docs/setup_en.md index d9dbb2e547..7a3ca4e9bd 100644 --- a/worlds/dark_souls_3/docs/setup_en.md +++ b/worlds/dark_souls_3/docs/setup_en.md @@ -21,7 +21,20 @@ This client has only been tested with the Official Steam version of the game at ## Downpatching Dark Souls III -Follow instructions from the [speedsouls wiki](https://wiki.speedsouls.com/darksouls3:Downpatching) to download version 1.15. Your download command, including the correct depot and manifest ids, will be "download_depot 374320 374321 4471176929659548333" +To downpatch DS3 for use with Archipelago, use the following instructions from the speedsouls wiki database. + +1. Launch Steam (in online mode). +2. Press the Windows Key + R. This will open the Run window. +3. Open the Steam console by typing the following string: steam://open/console , Steam should now open in Console Mode. +4. Insert the string of the depot you wish to download. For the AP supported v1.15, you will want to use: download_depot 374320 374321 4471176929659548333. +5. Steam will now download the depot. Note: There is no progress bar of the download in Steam, but it is still downloading in the background. +6. Turn off auto-updates in Steam by right-clicking Dark Souls III in your library > Properties > Updates > set "Automatic Updates" to "Only update this game when I launch it" (or change the value for AutoUpdateBehavior to 1 in "\Steam\steamapps\appmanifest_374320.acf"). +7. Back up your existing game folder in "\Steam\steamapps\common\DARK SOULS III". +8. Return back to Steam console. Once the download is complete, it should say so along with the temporary local directory in which the depot has been stored. This is usually something like "\Steam\steamapps\content\app_XXXXXX\depot_XXXXXX". Back up this game folder as well. +9. Delete your existing game folder in "\Steam\steamapps\common\DARK SOULS III", then replace it with your game folder in "\Steam\steamapps\content\app_XXXXXX\depot_XXXXXX". +10. Back up and delete your save file "DS30000.sl2" in AppData. AppData is hidden by default. To locate it, press Windows Key + R, type %appdata% and hit enter or: open File Explorer > View > Hidden Items and follow "C:\Users\your username\AppData\Roaming\DarkSoulsIII\numbers". +11. If you did all these steps correctly, you should be able to confirm your game version in the upper left corner after launching Dark Souls III. + ## Installing the Archipelago mod From 80fed1c6fb444664cba8f7bc73c3a8c557eb6d12 Mon Sep 17 00:00:00 2001 From: agilbert1412 Date: Thu, 30 Nov 2023 03:32:32 -0500 Subject: [PATCH 7/7] Stardew Valley: Fixed potential softlock with walnut purchases if Entrance Randomizer locks access to the field office (#2261) * - Added logic rules for reaching, then completing, the field office in order to be allowed to spend significant amounts of walnuts * - Revert moving a method for some reason --- worlds/stardew_valley/logic.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/worlds/stardew_valley/logic.py b/worlds/stardew_valley/logic.py index 5a6244cf37..d4476a3f31 100644 --- a/worlds/stardew_valley/logic.py +++ b/worlds/stardew_valley/logic.py @@ -1536,6 +1536,7 @@ class StardewLogic: reach_west = self.can_reach_region(Region.island_west) reach_hut = self.can_reach_region(Region.leo_hut) reach_southeast = self.can_reach_region(Region.island_south_east) + reach_field_office = self.can_reach_region(Region.field_office) reach_pirate_cove = self.can_reach_region(Region.pirate_cove) reach_outside_areas = And(reach_south, reach_north, reach_west, reach_hut) reach_volcano_regions = [self.can_reach_region(Region.volcano), @@ -1544,12 +1545,12 @@ class StardewLogic: self.can_reach_region(Region.volcano_floor_10)] reach_volcano = Or(reach_volcano_regions) reach_all_volcano = And(reach_volcano_regions) - reach_walnut_regions = [reach_south, reach_north, reach_west, reach_volcano] + reach_walnut_regions = [reach_south, reach_north, reach_west, reach_volcano, reach_field_office] reach_caves = And(self.can_reach_region(Region.qi_walnut_room), self.can_reach_region(Region.dig_site), self.can_reach_region(Region.gourmand_frog_cave), self.can_reach_region(Region.colored_crystals_cave), self.can_reach_region(Region.shipwreck), self.has(Weapon.any_slingshot)) - reach_entire_island = And(reach_outside_areas, reach_all_volcano, + reach_entire_island = And(reach_outside_areas, reach_field_office, reach_all_volcano, reach_caves, reach_southeast, reach_pirate_cove) if number <= 5: return Or(reach_south, reach_north, reach_west, reach_volcano) @@ -1563,7 +1564,8 @@ class StardewLogic: return reach_entire_island gems = [Mineral.amethyst, Mineral.aquamarine, Mineral.emerald, Mineral.ruby, Mineral.topaz] return reach_entire_island & self.has(Fruit.banana) & self.has(gems) & self.can_mine_perfectly() & \ - self.can_fish_perfectly() & self.has(Craftable.flute_block) & self.has(Seed.melon) & self.has(Seed.wheat) & self.has(Seed.garlic) + self.can_fish_perfectly() & self.has(Craftable.flute_block) & self.has(Seed.melon) & self.has(Seed.wheat) & self.has(Seed.garlic) & \ + self.can_complete_field_office() def has_everything(self, all_progression_items: Set[str]) -> StardewRule: all_regions = [region.name for region in vanilla_regions]