From 480c98c444c47675139f11d0ec9a21eaa185f372 Mon Sep 17 00:00:00 2001
From: fyex <33452346+fyex@users.noreply.github.com>
Date: Sat, 16 May 2026 19:40:17 +0200
Subject: [PATCH 1/2] fix physical orbeetle attack debug images being saved
twice
---
.../RNG/PokemonSwSh_OrbeetleAttackAnimationDetector.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/SerialPrograms/Source/PokemonSwSh/Inference/RNG/PokemonSwSh_OrbeetleAttackAnimationDetector.cpp b/SerialPrograms/Source/PokemonSwSh/Inference/RNG/PokemonSwSh_OrbeetleAttackAnimationDetector.cpp
index 852bb0da33..6fb6ed0264 100644
--- a/SerialPrograms/Source/PokemonSwSh/Inference/RNG/PokemonSwSh_OrbeetleAttackAnimationDetector.cpp
+++ b/SerialPrograms/Source/PokemonSwSh/Inference/RNG/PokemonSwSh_OrbeetleAttackAnimationDetector.cpp
@@ -89,7 +89,7 @@ OrbeetleAttackAnimationDetector::Detection OrbeetleAttackAnimationDetector::run(
return Detection::SPECIAL;
}
if (save_screenshot){
- animation_image->save("orbeetle-attack-physical-" + now_to_filestring() + ".png");
+ //animation_image->save("orbeetle-attack-physical-" + now_to_filestring() + ".png");
dump_debug_image(m_stream.logger(), "rng", "orbeetle-physical", animation_image);
}
m_stream.log("Orbeetle Attack Animation: Physical animation detected.");
From 66c712ddac9c2f9278b9ad66aa884ce17911ee08 Mon Sep 17 00:00:00 2001
From: fyex <33452346+fyex@users.noreply.github.com>
Date: Sat, 16 May 2026 20:40:55 +0200
Subject: [PATCH 2/2] add config option for wait time between checking the
receive dialog
---
.../Programs/RNG/PokemonSwSh_CramomaticRNG.cpp | 10 +++++++++-
.../Programs/RNG/PokemonSwSh_CramomaticRNG.h | 1 +
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/SerialPrograms/Source/PokemonSwSh/Programs/RNG/PokemonSwSh_CramomaticRNG.cpp b/SerialPrograms/Source/PokemonSwSh/Programs/RNG/PokemonSwSh_CramomaticRNG.cpp
index 817c020fbb..7f4bb7f9e8 100644
--- a/SerialPrograms/Source/PokemonSwSh/Programs/RNG/PokemonSwSh_CramomaticRNG.cpp
+++ b/SerialPrograms/Source/PokemonSwSh/Programs/RNG/PokemonSwSh_CramomaticRNG.cpp
@@ -146,6 +146,13 @@ CramomaticRNG::CramomaticRNG()
LockMode::LOCK_WHILE_RUNNING,
"80 ms"
)
+ , DIALOG_RELEASE_DURATION(
+ "Dialog Release Duration:
"
+ "After releasing the button, wait this long before checking the dialog.
"
+ "For tick-imprecise controllers, this number will be increased automatically.",
+ LockMode::LOCK_WHILE_RUNNING,
+ "1840 ms"
+ )
, SAVE_SCREENSHOTS(
"Save Debug Screenshots:",
LockMode::LOCK_WHILE_RUNNING,
@@ -174,6 +181,7 @@ CramomaticRNG::CramomaticRNG()
PA_ADD_OPTION(MAX_UNKNOWN_ADVANCES);
PA_ADD_OPTION(ADVANCE_PRESS_DURATION);
PA_ADD_OPTION(ADVANCE_RELEASE_DURATION);
+ PA_ADD_OPTION(DIALOG_RELEASE_DURATION);
PA_ADD_OPTION(SAVE_SCREENSHOTS);
PA_ADD_OPTION(LOG_VALUES);
}
@@ -348,7 +356,7 @@ std::pair CramomaticRNG::receive_ball(SingleSwitchProgramEnvi
while (presses < 30 && !arrow_detected){
presses++;
- pbf_press_button(context, BUTTON_B, 80ms, 1320ms);
+ pbf_press_button(context, BUTTON_B, 80ms, DIALOG_RELEASE_DURATION);
context.wait_for_all_requests();
VideoSnapshot screen = env.console.video().snapshot();
diff --git a/SerialPrograms/Source/PokemonSwSh/Programs/RNG/PokemonSwSh_CramomaticRNG.h b/SerialPrograms/Source/PokemonSwSh/Programs/RNG/PokemonSwSh_CramomaticRNG.h
index f0ee4d9db4..9763c22f0c 100644
--- a/SerialPrograms/Source/PokemonSwSh/Programs/RNG/PokemonSwSh_CramomaticRNG.h
+++ b/SerialPrograms/Source/PokemonSwSh/Programs/RNG/PokemonSwSh_CramomaticRNG.h
@@ -62,6 +62,7 @@ class CramomaticRNG : public SingleSwitchProgramInstance{
SimpleIntegerOption MAX_UNKNOWN_ADVANCES;
MillisecondsOption ADVANCE_PRESS_DURATION;
MillisecondsOption ADVANCE_RELEASE_DURATION;
+ MillisecondsOption DIALOG_RELEASE_DURATION;
BooleanCheckBoxOption SAVE_SCREENSHOTS;
BooleanCheckBoxOption LOG_VALUES;