From d6cc2beec2625168a352507faefbc367646b5056 Mon Sep 17 00:00:00 2001 From: REALAZK Date: Thu, 26 Nov 2026 23:19:07 +0000 Subject: [PATCH 1/3] Keep silver rupees in their own world in Archipelago A Silver Rupee is counted by the flow of the chest it is found in, which the mailbox cannot run. One placed in another world left the receiving slot unbuildable. Co-Authored-By: Claude Opus 5.5 --- randomizer/core/src/ap/export.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/randomizer/core/src/ap/export.rs b/randomizer/core/src/ap/export.rs index 13c615d..a4cda47 100644 --- a/randomizer/core/src/ap/export.rs +++ b/randomizer/core/src/ap/export.rs @@ -162,6 +162,9 @@ fn keep(p: &Plan, kind: &str) -> Option { /// its setting is Anywhere and the mailbox can hand it over (crate::ap::mailbox::dungeon_item). fn local_only(d: &Data, p: &Plan, name: &str) -> bool { let Some(i) = d.item(name) else { return false }; + if crate::slice::silver::is_item(name) { + return true; + } if super::mailbox::LOCAL_KINDS.contains(&i.kind.as_str()) { return !(keep(p, &i.kind) == Some(crate::slice::support::Keep::Anywhere) && super::mailbox::dungeon_item(d, name).is_some()); } @@ -605,4 +608,16 @@ mod tests { let chest: Vec<&str> = arr(row(&b, "KF Midos Top Left Chest"), "deny").iter().map(|i| items[i.as_i64().unwrap() as usize].get("name").unwrap().as_str().unwrap()).collect(); assert!(!chest.contains(&"Bomb Bag")); } + /// A Silver Rupee is counted by the flow of the chest it is found in, which the mailbox + /// cannot run, so a Silver Rupee placed in another world left this slot unbuildable. + #[test] + fn silver_rupees_stay_in_their_own_world() { + let d: Data = Data::load().unwrap(); + let mut s: Settings = preset("full_shuffle"); + s.set("shuffle_silver_rupees", crate::settings::model::Value::Bool(true)).unwrap(); + let b: Json = export(&d, &s.finish().unwrap(), "custom").unwrap(); + for r in &crate::slice::silver::ROOMS { + assert!(local(&b, r.item), "{}", r.item); + } + } } From cd16960d57f57a4bcb262053dc6c67eaad828c7f Mon Sep 17 00:00:00 2001 From: REALAZK Date: Thu, 26 Nov 2026 23:22:19 +0000 Subject: [PATCH 2/3] Archipelago client: log each change of the game link state The state was only shown by /ootrr, so a player's log could not tell when the client lost the game or the game refused an item. Co-Authored-By: Claude Opus 5.5 --- archipelago/ootrr/client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/archipelago/ootrr/client.py b/archipelago/ootrr/client.py index b14a498..205e1fa 100644 --- a/archipelago/ootrr/client.py +++ b/archipelago/ootrr/client.py @@ -236,6 +236,7 @@ def step(self) -> List[Dict[str, Any]]: async def game_loop(ctx: OOTRRContext) -> None: + shown = None while not ctx.exit_event.is_set(): try: msgs = await asyncio.to_thread(ctx.step) @@ -244,6 +245,9 @@ async def game_loop(ctx: OOTRRContext) -> None: except Exception as e: logger.exception(e) ctx.status = f"Error: {e}" + if ctx.status != shown: + shown = ctx.status + logger.info(f"OOTRR: {shown}") await asyncio.sleep(POLL) From e40da406e9c59914e1021c4077175fd017fc110a Mon Sep 17 00:00:00 2001 From: REALAZK Date: Thu, 26 Nov 2026 23:34:21 +0000 Subject: [PATCH 3/3] Archipelago: key the custom export cache on the OOTRR app build too The cache was keyed on the settings string and seed only, so regenerating with the same seed after updating OOTRR reused logic from the old app. Co-Authored-By: Claude Opus 5.5 --- archipelago/ootrr/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/archipelago/ootrr/__init__.py b/archipelago/ootrr/__init__.py index 7af628a..b90a090 100644 --- a/archipelago/ootrr/__init__.py +++ b/archipelago/ootrr/__init__.py @@ -42,7 +42,12 @@ class Exe(settings.UserFilePath): def export_custom(exe: str, text: str, seed: str) -> Bundle: import Utils - key: str = hashlib.sha256(f"{text}\0{seed}".encode("utf-8")).hexdigest()[:20] + try: + st = os.stat(exe) + build: str = f"{st.st_size}:{st.st_mtime_ns}" + except OSError: + build = "" + key: str = hashlib.sha256(f"{text}\0{seed}\0{build}".encode("utf-8")).hexdigest()[:20] out: str = Utils.cache_path("ootrr", f"{key}.json") os.makedirs(os.path.dirname(out), exist_ok=True) if not os.path.isfile(out):