From 92023a2cb590152b5c2b5452a1ea3d96701d72d7 Mon Sep 17 00:00:00 2001 From: coveleski Date: Sat, 15 Jun 2024 18:55:52 -0500 Subject: [PATCH 1/6] Pokemon RB: Add new options to slot_data (#3538) Added require_pokedex, blind_trainers, and area_1_to_1 mapping, which would be helpful to the poptracker packs to accurately reflect the checks available to players. --- worlds/pokemon_rb/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/worlds/pokemon_rb/__init__.py b/worlds/pokemon_rb/__init__.py index 003e0a32e9..5f52703328 100644 --- a/worlds/pokemon_rb/__init__.py +++ b/worlds/pokemon_rb/__init__.py @@ -661,6 +661,9 @@ class PokemonRedBlueWorld(World): "dark_rock_tunnel_logic": self.multiworld.dark_rock_tunnel_logic[self.player].value, "split_card_key": self.multiworld.split_card_key[self.player].value, "all_elevators_locked": self.multiworld.all_elevators_locked[self.player].value, + "require_pokedex": self.multiworld.require_pokedex[self.player].value, + "area_1_to_1_mapping": self.multiworld.area_1_to_1_mapping[self.player].value, + "blind_trainers": self.multiworld.blind_trainers[self.player].value, } From 2a11d610b6d18df9e226719e9c14ab34dddacc27 Mon Sep 17 00:00:00 2001 From: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> Date: Sun, 16 Jun 2024 01:56:20 +0200 Subject: [PATCH 2/6] The Witness: Fix Shuffle Postgame always thinking it's Challenge Victory (#3504) * Fix postgame thinking it's the wrong panel * Also don't have a default value for it so it doesn't happen again --- worlds/witness/player_logic.py | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/worlds/witness/player_logic.py b/worlds/witness/player_logic.py index 4335f9524f..05b3cf3a98 100644 --- a/worlds/witness/player_logic.py +++ b/worlds/witness/player_logic.py @@ -399,6 +399,16 @@ class WitnessPlayerLogic: mnt_lasers = world.options.mountain_lasers chal_lasers = world.options.challenge_lasers + # Victory Condition + if victory == "elevator": + self.VICTORY_LOCATION = "0x3D9A9" + elif victory == "challenge": + self.VICTORY_LOCATION = "0x0356B" + elif victory == "mountain_box_short": + self.VICTORY_LOCATION = "0x09F7F" + elif victory == "mountain_box_long": + self.VICTORY_LOCATION = "0xFFF00" + # Exclude panels from the post-game if shuffle_postgame is false. if not world.options.shuffle_postgame: adjustment_linesets_in_order += self.handle_postgame(world) @@ -418,17 +428,6 @@ class WitnessPlayerLogic: if not victory == "challenge": adjustment_linesets_in_order.append(["Disabled Locations:", "0x0A332"]) - # Victory Condition - - if victory == "elevator": - self.VICTORY_LOCATION = "0x3D9A9" - elif victory == "challenge": - self.VICTORY_LOCATION = "0x0356B" - elif victory == "mountain_box_short": - self.VICTORY_LOCATION = "0x09F7F" - elif victory == "mountain_box_long": - self.VICTORY_LOCATION = "0xFFF00" - # Long box can usually only be solved by opening Mountain Entry. However, if it requires 7 lasers or less # (challenge_lasers <= 7), you can now solve it without opening Mountain Entry first. # Furthermore, if the user sets mountain_lasers > 7, the box is rotated to not require Mountain Entry either. @@ -874,7 +873,7 @@ class WitnessPlayerLogic: self.PRECOMPLETED_LOCATIONS = set() self.EXCLUDED_LOCATIONS = set() self.ADDED_CHECKS = set() - self.VICTORY_LOCATION = "0x0356B" + self.VICTORY_LOCATION: str self.ALWAYS_EVENT_NAMES_BY_HEX = { "0x00509": "+1 Laser (Symmetry Laser)", From e8542b8acd9e951cbc2a1736abbae59cf91d8fd2 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Sun, 16 Jun 2024 03:27:06 +0200 Subject: [PATCH 3/6] Generate: split ERmain out of main (#3515) --- Generate.py | 9 +++++---- test/hosting/generate.py | 3 ++- test/programs/test_generate.py | 7 ++++--- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Generate.py b/Generate.py index 1fbb9e76a4..d7dd6523e7 100644 --- a/Generate.py +++ b/Generate.py @@ -65,7 +65,7 @@ def get_seed_name(random_source) -> str: return f"{random_source.randint(0, pow(10, seeddigits) - 1)}".zfill(seeddigits) -def main(args=None): +def main(args=None) -> Tuple[argparse.Namespace, int]: # __name__ == "__main__" check so unittests that already imported worlds don't trip this. if __name__ == "__main__" and "worlds" in sys.modules: raise Exception("Worlds system should not be loaded before logging init.") @@ -237,8 +237,7 @@ def main(args=None): with open(os.path.join(args.outputpath if args.outputpath else ".", f"generate_{seed_name}.yaml"), "wt") as f: yaml.dump(important, f) - from Main import main as ERmain - return ERmain(erargs, seed) + return erargs, seed def read_weights_yamls(path) -> Tuple[Any, ...]: @@ -547,7 +546,9 @@ def roll_alttp_settings(ret: argparse.Namespace, weights): if __name__ == '__main__': import atexit confirmation = atexit.register(input, "Press enter to close.") - multiworld = main() + erargs, seed = main() + from Main import main as ERmain + multiworld = ERmain(erargs, seed) if __debug__: import gc import sys diff --git a/test/hosting/generate.py b/test/hosting/generate.py index 356cbcca25..d5d39dc95e 100644 --- a/test/hosting/generate.py +++ b/test/hosting/generate.py @@ -26,6 +26,7 @@ def _generate_local_inner(games: Iterable[str], with TemporaryDirectory() as players_dir: with TemporaryDirectory() as output_dir: import Generate + import Main for n, game in enumerate(games, 1): player_path = Path(players_dir) / f"{n}.yaml" @@ -42,7 +43,7 @@ def _generate_local_inner(games: Iterable[str], sys.argv = [sys.argv[0], "--seed", str(hash(tuple(games))), "--player_files_path", players_dir, "--outputpath", output_dir] - Generate.main() + Main.main(*Generate.main()) output_files = list(Path(output_dir).glob('*.zip')) assert len(output_files) == 1 final_file = dest / output_files[0].name diff --git a/test/programs/test_generate.py b/test/programs/test_generate.py index 887a417ec9..9281c9c753 100644 --- a/test/programs/test_generate.py +++ b/test/programs/test_generate.py @@ -9,6 +9,7 @@ from pathlib import Path from tempfile import TemporaryDirectory import Generate +import Main class TestGenerateMain(unittest.TestCase): @@ -58,7 +59,7 @@ class TestGenerateMain(unittest.TestCase): '--player_files_path', str(self.abs_input_dir), '--outputpath', self.output_tempdir.name] print(f'Testing Generate.py {sys.argv} in {os.getcwd()}') - Generate.main() + Main.main(*Generate.main()) self.assertOutput(self.output_tempdir.name) @@ -67,7 +68,7 @@ class TestGenerateMain(unittest.TestCase): '--player_files_path', str(self.rel_input_dir), '--outputpath', self.output_tempdir.name] print(f'Testing Generate.py {sys.argv} in {os.getcwd()}') - Generate.main() + Main.main(*Generate.main()) self.assertOutput(self.output_tempdir.name) @@ -86,7 +87,7 @@ class TestGenerateMain(unittest.TestCase): sys.argv = [sys.argv[0], '--seed', '0', '--outputpath', self.output_tempdir.name] print(f'Testing Generate.py {sys.argv} in {os.getcwd()}, player_files_path={self.yaml_input_dir}') - Generate.main() + Main.main(*Generate.main()) finally: user_path.cached_path = user_path_backup From 753eb8683f2aaa17ae52bbd6ef52c18893dbfa20 Mon Sep 17 00:00:00 2001 From: palex00 <32203971+palex00@users.noreply.github.com> Date: Sun, 16 Jun 2024 04:10:50 +0200 Subject: [PATCH 4/6] Pokemon Red/Blue: Replaces link to R&B Poptracker with a new one (#3516) * Update setup_en.md * Update setup_es.md --- worlds/pokemon_rb/docs/setup_en.md | 4 ++-- worlds/pokemon_rb/docs/setup_es.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/worlds/pokemon_rb/docs/setup_en.md b/worlds/pokemon_rb/docs/setup_en.md index 45b0175eac..773fb14da9 100644 --- a/worlds/pokemon_rb/docs/setup_en.md +++ b/worlds/pokemon_rb/docs/setup_en.md @@ -15,7 +15,7 @@ As we are using BizHawk, this guide is only applicable to Windows and Linux syst ## Optional Software -- [Pokémon Red and Blue Archipelago Map Tracker](https://github.com/j-imbo/pkmnrb_jim/releases/latest), for use with [PopTracker](https://github.com/black-sliver/PopTracker/releases) +- [Pokémon Red and Blue Archipelago Map Tracker](https://github.com/coveleski/rb_tracker/releases/latest), for use with [PopTracker](https://github.com/black-sliver/PopTracker/releases) ## Configuring BizHawk @@ -109,7 +109,7 @@ server uses password, type in the bottom textfield `/connect
: [p Pokémon Red and Blue has a fully functional map tracker that supports auto-tracking. -1. Download [Pokémon Red and Blue Archipelago Map Tracker](https://github.com/j-imbo/pkmnrb_jim/releases/latest) and [PopTracker](https://github.com/black-sliver/PopTracker/releases). +1. Download [Pokémon Red and Blue Archipelago Map Tracker](https://github.com/coveleski/rb_tracker/releases/latest) and [PopTracker](https://github.com/black-sliver/PopTracker/releases). 2. Open PopTracker, and load the Pokémon Red and Blue pack. 3. Click on the "AP" symbol at the top. 4. Enter the AP address, slot name and password. diff --git a/worlds/pokemon_rb/docs/setup_es.md b/worlds/pokemon_rb/docs/setup_es.md index 9d87db224b..6499c95012 100644 --- a/worlds/pokemon_rb/docs/setup_es.md +++ b/worlds/pokemon_rb/docs/setup_es.md @@ -17,7 +17,7 @@ Al usar BizHawk, esta guía solo es aplicable en los sistemas de Windows y Linux ## Software Opcional -- [Tracker de mapa para Pokémon Red and Blue Archipelago](https://github.com/j-imbo/pkmnrb_jim/releases/latest), para usar con [PopTracker](https://github.com/black-sliver/PopTracker/releases) +- [Tracker de mapa para Pokémon Red and Blue Archipelago](https://github.com/coveleski/rb_tracker/releases/latest), para usar con [PopTracker](https://github.com/black-sliver/PopTracker/releases) ## Configurando BizHawk @@ -101,7 +101,7 @@ Ahora ya estás listo para tu aventura en Kanto. Pokémon Red and Blue tiene un mapa completamente funcional que soporta seguimiento automático. -1. Descarga el [Tracker de mapa para Pokémon Red and Blue Archipelago](https://github.com/j-imbo/pkmnrb_jim/releases/latest) y [PopTracker](https://github.com/black-sliver/PopTracker/releases). +1. Descarga el [Tracker de mapa para Pokémon Red and Blue Archipelago](https://github.com/coveleski/rb_tracker/releases/latest) y [PopTracker](https://github.com/black-sliver/PopTracker/releases). 2. Abre PopTracker, y carga el pack de Pokémon Red and Blue. 3. Haz clic en el símbolo "AP" en la parte superior. 4. Ingresa la dirección de AP, nombre del slot y contraseña (si es que hay). From 1d314374d7f10c2d49cca689fc3aa0ed5ce9cef8 Mon Sep 17 00:00:00 2001 From: Mrks <68022469+mrkssr@users.noreply.github.com> Date: Sun, 16 Jun 2024 04:31:32 +0200 Subject: [PATCH 5/6] LADX: Moved ROM requirement from generate_output to stage_assert_generate. (#3540) Co-authored-by: Mrks --- worlds/ladx/__init__.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/worlds/ladx/__init__.py b/worlds/ladx/__init__.py index f7de0f41f9..c127ce93ba 100644 --- a/worlds/ladx/__init__.py +++ b/worlds/ladx/__init__.py @@ -7,7 +7,7 @@ import typing import bsdiff4 import settings -from BaseClasses import Entrance, Item, ItemClassification, Location, Tutorial +from BaseClasses import Entrance, Item, ItemClassification, Location, Tutorial, MultiWorld from Fill import fill_restrictive from worlds.AutoWorld import WebWorld, World from .Common import * @@ -24,7 +24,7 @@ from .LADXR.worldSetup import WorldSetup as LADXRWorldSetup from .Locations import (LinksAwakeningLocation, LinksAwakeningRegion, create_regions_from_ladxr, get_locations_to_id) from .Options import DungeonItemShuffle, links_awakening_options, ShuffleInstruments -from .Rom import LADXDeltaPatch +from .Rom import LADXDeltaPatch, get_base_rom_path DEVELOPER_MODE = False @@ -433,6 +433,12 @@ class LinksAwakeningWorld(World): return "TRADING_ITEM_LETTER" + @classmethod + def stage_assert_generate(cls, multiworld: MultiWorld): + rom_file = get_base_rom_path() + if not os.path.exists(rom_file): + raise FileNotFoundError(rom_file) + def generate_output(self, output_directory: str): # copy items back to locations for r in self.multiworld.get_regions(self.player): From c6222407301925994fee0829ba6bc979954c0496 Mon Sep 17 00:00:00 2001 From: Scipio Wright Date: Sat, 15 Jun 2024 23:02:48 -0400 Subject: [PATCH 6/6] Tunc: Update plando connections description (#3545) --- worlds/tunic/options.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/worlds/tunic/options.py b/worlds/tunic/options.py index ff9872ab48..bf1dd860ae 100644 --- a/worlds/tunic/options.py +++ b/worlds/tunic/options.py @@ -174,6 +174,13 @@ class ShuffleLadders(Toggle): class TunicPlandoConnections(PlandoConnections): + """ + Generic connection plando. Format is: + - entrance: "Entrance Name" + exit: "Exit Name" + percentage: 100 + Percentage is an integer from 0 to 100 which determines whether that connection will be made. Defaults to 100 if omitted. + """ entrances = {*(portal.name for portal in portal_mapping), "Shop", "Shop Portal"} exits = {*(portal.name for portal in portal_mapping), "Shop", "Shop Portal"}