Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pokemon RB: Rename launcher entry to 'Pokémon Red and Blue Client', rename client to PokemonRedBlueClient #2457

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions PokemonRedBlueClient.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from __future__ import annotations

import ModuleUpdate
ModuleUpdate.update()

from worlds.pokemon_rb.client import launch
import Utils

if __name__ == "__main__":
Utils.init_logging("PokemonRedBlueClient", exception_logger="Client")
launch()
10 changes: 5 additions & 5 deletions inno_setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,13 @@ Root: HKCR; Subkey: "{#MyAppName}n64zpf\shell\open\command"; ValueData: """{

Root: HKCR; Subkey: ".apred"; ValueData: "{#MyAppName}pkmnrpatch"; Flags: uninsdeletevalue; ValueType: string; ValueName: "";
Root: HKCR; Subkey: "{#MyAppName}pkmnrpatch"; ValueData: "Archipelago Pokemon Red Patch"; Flags: uninsdeletekey; ValueType: string; ValueName: "";
Root: HKCR; Subkey: "{#MyAppName}pkmnrpatch\DefaultIcon"; ValueData: "{app}\ArchipelagoPokemonClient.exe,0"; ValueType: string; ValueName: "";
Root: HKCR; Subkey: "{#MyAppName}pkmnrpatch\shell\open\command"; ValueData: """{app}\ArchipelagoPokemonClient.exe"" ""%1"""; ValueType: string; ValueName: "";
Root: HKCR; Subkey: "{#MyAppName}pkmnrpatch\DefaultIcon"; ValueData: "{app}\ArchipelagoPokemonRedBlueClient.exe,0"; ValueType: string; ValueName: "";
Root: HKCR; Subkey: "{#MyAppName}pkmnrpatch\shell\open\command"; ValueData: """{app}\ArchipelagoPokemonRedBlueClient.exe"" ""%1"""; ValueType: string; ValueName: "";

Root: HKCR; Subkey: ".apblue"; ValueData: "{#MyAppName}pkmnbpatch"; Flags: uninsdeletevalue; ValueType: string; ValueName: "";
Root: HKCR; Subkey: ".apblue"; ValueData: "{#MyAppName}pkmnbpatch"; Flags: uninsdeletevalue; ValueType: string; ValueName: "";
Root: HKCR; Subkey: "{#MyAppName}pkmnbpatch"; ValueData: "Archipelago Pokemon Blue Patch"; Flags: uninsdeletekey; ValueType: string; ValueName: "";
Root: HKCR; Subkey: "{#MyAppName}pkmnbpatch\DefaultIcon"; ValueData: "{app}\ArchipelagoPokemonClient.exe,0"; ValueType: string; ValueName: "";
Root: HKCR; Subkey: "{#MyAppName}pkmnbpatch\shell\open\command"; ValueData: """{app}\ArchipelagoPokemonClient.exe"" ""%1"""; ValueType: string; ValueName: "";
Root: HKCR; Subkey: "{#MyAppName}pkmnbpatch\DefaultIcon"; ValueData: "{app}\ArchipelagoPokemonRedBlueClient.exe,0"; ValueType: string; ValueName: "";
Root: HKCR; Subkey: "{#MyAppName}pkmnbpatch\shell\open\command"; ValueData: """{app}\ArchipelagoPokemonRedBlueClient.exe"" ""%1"""; ValueType: string; ValueName: "";

Root: HKCR; Subkey: ".apbn3"; ValueData: "{#MyAppName}bn3bpatch"; Flags: uninsdeletevalue; ValueType: string; ValueName: "";
Root: HKCR; Subkey: "{#MyAppName}bn3bpatch"; ValueData: "Archipelago MegaMan Battle Network 3 Patch"; Flags: uninsdeletekey; ValueType: string; ValueName: "";
Expand Down
2 changes: 0 additions & 2 deletions worlds/LauncherComponents.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ def launch_textclient():
Component('OoT Adjuster', 'OoTAdjuster'),
# FF1
Component('FF1 Client', 'FF1Client'),
# Pokémon
Component('Pokemon Client', 'PokemonClient', file_identifier=SuffixIdentifier('.apred', '.apblue')),
# TLoZ
Component('Zelda 1 Client', 'Zelda1Client', file_identifier=SuffixIdentifier('.aptloz')),
# ChecksFinder
Expand Down
17 changes: 17 additions & 0 deletions worlds/pokemon_rb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from Fill import fill_restrictive, FillError, sweep_from_pool
from worlds.AutoWorld import World, WebWorld
from worlds.generic.Rules import add_item_rule
from worlds.LauncherComponents import Component, SuffixIdentifier, components, Type, launch_subprocess
from .items import item_table, item_groups
from .locations import location_data, PokemonRBLocation
from .regions import create_regions
Expand All @@ -24,6 +25,22 @@
from . import poke_data


def launch_client(*args):
from .client import launch
launch_subprocess(launch, name="PokemonRedBlueClient")


components.append(
Component(
"Pokémon Red and Blue Client",
"PokemonRedBlueClient",
func=launch_client,
component_type=Type.CLIENT,
file_identifier=SuffixIdentifier(".apred", ".apblue"),
)
)


class PokemonSettings(settings.Group):
class RedRomFile(settings.UserFilePath):
"""File names of the Pokemon Red and Blue roms"""
Expand Down
13 changes: 6 additions & 7 deletions PokemonClient.py → worlds/pokemon_rb/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
from CommonClient import CommonContext, server_loop, gui_enabled, ClientCommandProcessor, logger, \
get_base_parser

from worlds.pokemon_rb.locations import location_data
from worlds.pokemon_rb.rom import RedDeltaPatch, BlueDeltaPatch
from .locations import location_data
from .rom import RedDeltaPatch, BlueDeltaPatch

location_map = {"Rod": {}, "EventFlag": {}, "Missable": {}, "Hidden": {}, "list": {}, "DexSanityFlag": {}}
location_bytes_bits = {}
Expand Down Expand Up @@ -117,7 +117,7 @@ class GBManager(GameManager):
logging_pairs = [
("Client", "Archipelago")
]
base_title = "Archipelago Pokémon Client"
base_title = "Archipelago Pokémon Red and Blue Client"

self.ui = GBManager(self)
self.ui_task = asyncio.create_task(self.ui.async_run(), name="UI")
Expand Down Expand Up @@ -216,7 +216,7 @@ async def gb_sync_task(ctx: GBContext):
data_decoded = json.loads(data.decode())
if 'scriptVersion' not in data_decoded or data_decoded['scriptVersion'] != SCRIPT_VERSION:
msg = "You are connecting with an incompatible Lua script version. Ensure your connector Lua " \
"and PokemonClient are from the same Archipelago installation."
"and PokemonRedBlueClient are from the same Archipelago installation."
logger.info(msg, extra={'compact_gui': True})
ctx.gui_error('Error', msg)
error_status = CONNECTION_RESET_STATUS
Expand Down Expand Up @@ -335,9 +335,8 @@ async def patch_and_run_game(game_version, patch_file, ctx):
async_start(run_game(comp_path))


if __name__ == '__main__':

Utils.init_logging("PokemonClient")
def launch():
Utils.init_logging("PokemonRedBlueClient")

options = Utils.get_options()

Expand Down
2 changes: 1 addition & 1 deletion worlds/pokemon_rb/docs/en_Pokemon Red and Blue.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,6 @@ you until these have ended.

## Unique Local Commands

The following command is only available when using the PokemonClient to play with Archipelago.
The following command is only available when using the PokemonRedBlueClient to play with Archipelago.

- `/gb` Check Gameboy Connection State
9 changes: 4 additions & 5 deletions worlds/pokemon_rb/docs/setup_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ As we are using BizHawk, this guide is only applicable to Windows and Linux syst
- Detailed installation instructions for BizHawk can be found at the above link.
- Windows users must run the prereq installer first, which can also be found at the above link.
- The built-in Archipelago client, which can be installed [here](https://github.com/ArchipelagoMW/Archipelago/releases)
(select `Pokemon Client` during installation).
- Pokémon Red and/or Blue ROM files. The Archipelago community cannot provide these.

## Optional Software
Expand All @@ -25,8 +24,8 @@ Once BizHawk has been installed, open EmuHawk and change the following settings:

- (If using 2.8 or earlier) Go to Config > Customize. Switch to the Advanced tab, then switch the Lua Core from "NLua+KopiLua" to
"Lua+LuaInterface". Then restart EmuHawk. This is required for the Lua script to function correctly.
**NOTE: Even if "Lua+LuaInterface" is already selected, toggle between the two options and reselect it. Fresh installs**
**of newer versions of EmuHawk have a tendency to show "Lua+LuaInterface" as the default selected option but still load**
**NOTE: Even if "Lua+LuaInterface" is already selected, toggle between the two options and reselect it. Fresh installs**
**of newer versions of EmuHawk have a tendency to show "Lua+LuaInterface" as the default selected option but still load**
**"NLua+KopiLua" until this step is done.**
- Under Config > Customize > Advanced, make sure the box for AutoSaveRAM is checked, and click the 5s button.
This reduces the possibility of losing save data in emulator crashes.
Expand Down Expand Up @@ -98,8 +97,8 @@ Now you are ready to start your adventure in Kanto.
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).
2. Open PopTracker, and load the Pokémon Red and Blue pack.
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.
4. Enter the AP address, slot name and password.

The rest should take care of itself! Items and checks will be marked automatically, and it even knows your settings - It will hide checks & adjust logic accordingly.
7 changes: 3 additions & 4 deletions worlds/pokemon_rb/docs/setup_es.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ Al usar BizHawk, esta guía solo es aplicable en los sistemas de Windows y Linux
- BizHawk: [BizHawk Releases en TASVideos](https://tasvideos.org/BizHawk/ReleaseHistory)
- La versión 2.3.1 y posteriores son soportadas. Se recomienda la versión 2.9.1.
- Instrucciones de instalación detalladas para BizHawk se pueden encontrar en el enlace de arriba.
- Los usuarios de Windows deben ejecutar el instalador de prerrequisitos (prereq installer) primero, que también se
- Los usuarios de Windows deben ejecutar el instalador de prerrequisitos (prereq installer) primero, que también se
encuentra en el enlace de arriba.
- El cliente incorporado de Archipelago, que se puede encontrar [aquí](https://github.com/ArchipelagoMW/Archipelago/releases)
(selecciona `Pokemon Client` durante la instalación).
- Los ROMs originales de Pokémon Red y/o Blue. La comunidad de Archipelago no puede proveerlos.

## Software Opcional
Expand Down Expand Up @@ -99,9 +98,9 @@ Ahora ya estás listo para tu aventura en Kanto.

## Auto-Tracking

Pokémon Red and Blue tiene un mapa completamente funcional que soporta seguimiento automático.
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/j-imbo/pkmnrb_jim/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).
Expand Down
Loading