Logging Update (#16)

* Jak 1: Separate info and debug logs.

* Jak 1: Update world info to refer to Archipelago Options menu.
This commit is contained in:
massimilianodelliubaldini
2024-06-01 11:55:17 -04:00
committed by GitHub
parent 50f56064eb
commit 33a858e526
4 changed files with 17 additions and 12 deletions

View File

@@ -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()

View File

@@ -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.")

View File

@@ -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

View File

@@ -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.