From 33a858e5261099ae48d81edb738d0b75879073b2 Mon Sep 17 00:00:00 2001 From: massimilianodelliubaldini <8584296+massimilianodelliubaldini@users.noreply.github.com> Date: Sat, 1 Jun 2024 11:55:17 -0400 Subject: [PATCH] Logging Update (#16) * Jak 1: Separate info and debug logs. * Jak 1: Update world info to refer to Archipelago Options menu. --- worlds/jakanddaxter/Client.py | 2 +- worlds/jakanddaxter/client/MemoryReader.py | 6 +++--- worlds/jakanddaxter/client/ReplClient.py | 10 +++++----- .../docs/en_Jak and Daxter The Precursor Legacy.md | 11 ++++++++--- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/worlds/jakanddaxter/Client.py b/worlds/jakanddaxter/Client.py index 2b2a83795f..4417c49b10 100644 --- a/worlds/jakanddaxter/Client.py +++ b/worlds/jakanddaxter/Client.py @@ -110,7 +110,7 @@ class JakAndDaxterContext(CommonContext): def on_package(self, cmd: str, args: dict): if cmd == "ReceivedItems": for index, item in enumerate(args["items"], start=args["index"]): - logger.info(args) + logger.debug(f"index: {str(index)}, item: {str(item)}") self.repl.item_inbox[index] = item self.memr.save_data() self.repl.save_data() diff --git a/worlds/jakanddaxter/client/MemoryReader.py b/worlds/jakanddaxter/client/MemoryReader.py index 30ed927bb1..c1b10ff3a6 100644 --- a/worlds/jakanddaxter/client/MemoryReader.py +++ b/worlds/jakanddaxter/client/MemoryReader.py @@ -130,7 +130,7 @@ class JakAndDaxterMemoryReader: cell_ap_id = Cells.to_ap_id(next_cell) if cell_ap_id not in self.location_outbox: self.location_outbox.append(cell_ap_id) - logger.info("Checked power cell: " + str(next_cell)) + logger.debug("Checked power cell: " + str(next_cell)) for k in range(0, next_buzzer_index): next_buzzer = int.from_bytes( @@ -142,7 +142,7 @@ class JakAndDaxterMemoryReader: buzzer_ap_id = Flies.to_ap_id(next_buzzer) if buzzer_ap_id not in self.location_outbox: self.location_outbox.append(buzzer_ap_id) - logger.info("Checked scout fly: " + str(next_buzzer)) + logger.debug("Checked scout fly: " + str(next_buzzer)) for k in range(0, next_special_index): next_special = int.from_bytes( @@ -163,7 +163,7 @@ class JakAndDaxterMemoryReader: special_ap_id = Specials.to_ap_id(next_special) if special_ap_id not in self.location_outbox: self.location_outbox.append(special_ap_id) - logger.info("Checked special: " + str(next_special)) + logger.debug("Checked special: " + str(next_special)) except (ProcessError, MemoryReadError, WinAPIError): logger.error("The gk process has died. Restart the game and run \"/memr connect\" again.") diff --git a/worlds/jakanddaxter/client/ReplClient.py b/worlds/jakanddaxter/client/ReplClient.py index 8b6c935d75..2360601d5f 100644 --- a/worlds/jakanddaxter/client/ReplClient.py +++ b/worlds/jakanddaxter/client/ReplClient.py @@ -72,7 +72,7 @@ class JakAndDaxterReplClient: response = self.sock.recv(1024).decode() if "OK!" in response: if print_ok: - logger.info(response) + logger.debug(response) return True else: logger.error(f"Unexpected response from REPL: {response}") @@ -101,7 +101,7 @@ class JakAndDaxterReplClient: # Should be the OpenGOAL welcome message (ignore version number). if "Connected to OpenGOAL" and "nREPL!" in welcome_message: - logger.info(welcome_message) + logger.debug(welcome_message) else: logger.error(f"Unable to connect to REPL websocket: unexpected welcome message \"{welcome_message}\"") except ConnectionRefusedError as e: @@ -198,7 +198,7 @@ class JakAndDaxterReplClient: "(pickup-type fuel-cell) " "(the float " + str(cell_id) + "))") if ok: - logger.info(f"Received a Power Cell!") + logger.debug(f"Received a Power Cell!") else: logger.error(f"Unable to receive a Power Cell!") return ok @@ -210,7 +210,7 @@ class JakAndDaxterReplClient: "(pickup-type buzzer) " "(the float " + str(fly_id) + "))") if ok: - logger.info(f"Received a {item_table[ap_id]}!") + logger.debug(f"Received a {item_table[ap_id]}!") else: logger.error(f"Unable to receive a {item_table[ap_id]}!") return ok @@ -222,7 +222,7 @@ class JakAndDaxterReplClient: "(pickup-type ap-special) " "(the float " + str(special_id) + "))") if ok: - logger.info(f"Received special unlock {item_table[ap_id]}!") + logger.debug(f"Received special unlock {item_table[ap_id]}!") else: logger.error(f"Unable to receive special unlock {item_table[ap_id]}!") return ok diff --git a/worlds/jakanddaxter/docs/en_Jak and Daxter The Precursor Legacy.md b/worlds/jakanddaxter/docs/en_Jak and Daxter The Precursor Legacy.md index 54e0a1a563..9160701be7 100644 --- a/worlds/jakanddaxter/docs/en_Jak and Daxter The Precursor Legacy.md +++ b/worlds/jakanddaxter/docs/en_Jak and Daxter The Precursor Legacy.md @@ -80,9 +80,14 @@ scout fly. So in short: - Second, you will immediately complete the "Free 7 Scout Flies" check, which will send out another item. ## I got soft-locked and can't leave, how do I get out of here? -Open the game's menu, navigate to Options, and find the "Warp To Home" option at the bottom of the list. -Selecting this option will instantly teleport you to Geyser Rock. From there, you can teleport back to the nearest -sage's hut to continue your journey. +Open the game's menu, navigate to `Options`, then to `Archipelago Options`, then to `Warp To Home`. +Selecting this option will ask if you want to be teleported to Geyser Rock. From there, you can teleport back +to the nearest sage's hut to continue your journey. + +## How do I know which special items I have? +Open the game's menu, navigate to `Options`, then to `Archipelago Options`, then to `Item Tracker`. +This will show you a list of all the special items in the game, ones not normally tracked as power cells or scout flies. +Grayed-out items indicate you do not possess that item, light blue items indicate you possess that item. ## I think I found a bug, where should I report it? Depending on the nature of the bug, there are a couple of different options.