From a9fae97752dfe694fd026aecc2c80e359270cd76 Mon Sep 17 00:00:00 2001 From: dayfine Date: Sat, 14 Nov 2026 12:39:51 -0800 Subject: [PATCH 1/2] FRLG RNG: Game Settings option to skip the program start checks Adds an "RNG Settings" section to the FRLG Game Settings with the online license check option and a new "Run Start Checks" checkbox (default on). When it is off, run_precheck() skips the black border check and the free party slots check, so a program restarted after a settings fix starts right away. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss --- .../VideoGames/PokemonFRLG/PokemonFRLG_Settings.cpp | 10 ++++++++++ .../VideoGames/PokemonFRLG/PokemonFRLG_Settings.h | 3 +++ .../RngManipulation/PokemonFRLG_RngProgram.cpp | 5 +++++ 3 files changed, 18 insertions(+) diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/PokemonFRLG_Settings.cpp b/SerialPrograms/Source/VideoGames/PokemonFRLG/PokemonFRLG_Settings.cpp index 6a08282535..ca1d31d44d 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/PokemonFRLG_Settings.cpp +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/PokemonFRLG_Settings.cpp @@ -65,6 +65,7 @@ GameSettings::GameSettings() LockMode::LOCK_WHILE_RUNNING, "3000 ms" ) + , m_rng_settings("RNG Settings:") , HANDLE_ONLINE_LICENSE_CHECK( "Handle Online License Check:
" "Turn this on if your console checks the game's license online when it starts the game: " @@ -73,6 +74,13 @@ GameSettings::GameSettings() LockMode::LOCK_WHILE_RUNNING, false // default ) + , RUN_RNG_START_CHECKS( + "Run Start Checks:
" + "Before an RNG program starts, check that the game has no black border and that your party has enough free slots. " + "Turn this off to skip these checks, e.g. when you restart a program often after fixing its settings.", + LockMode::LOCK_WHILE_RUNNING, + true // default + ) , m_shiny_audio_settings("Shiny Audio Settings:") , SHINY_SOUND_THRESHOLD( "Shiny Sound Threshold:
Maximum error coefficient to trigger a shiny detection.", @@ -98,7 +106,9 @@ GameSettings::GameSettings() PA_ADD_OPTION(SELECT_BUTTON_MASH0); PA_ADD_OPTION(ENTER_GAME_WAIT0); PA_ADD_OPTION(ENTER_GAME_MASH0); + PA_ADD_STATIC(m_rng_settings); PA_ADD_OPTION(HANDLE_ONLINE_LICENSE_CHECK); + PA_ADD_OPTION(RUN_RNG_START_CHECKS); PA_ADD_STATIC(m_shiny_audio_settings); PA_ADD_OPTION(SHINY_SOUND_THRESHOLD); PA_ADD_OPTION(SHINY_SOUND_LOW_FREQUENCY); diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/PokemonFRLG_Settings.h b/SerialPrograms/Source/VideoGames/PokemonFRLG/PokemonFRLG_Settings.h index 83583b1afb..c8015bbef4 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/PokemonFRLG_Settings.h +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/PokemonFRLG_Settings.h @@ -41,7 +41,10 @@ class GameSettings : public BatchOption, private ConfigOption::Listener{ MillisecondsOption SELECT_BUTTON_MASH0; MillisecondsOption ENTER_GAME_WAIT0; MillisecondsOption ENTER_GAME_MASH0; + + SectionDividerOption m_rng_settings; BooleanCheckBoxOption HANDLE_ONLINE_LICENSE_CHECK; + BooleanCheckBoxOption RUN_RNG_START_CHECKS; SectionDividerOption m_shiny_audio_settings; FloatingPointOption SHINY_SOUND_THRESHOLD; diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/RngManipulation/PokemonFRLG_RngProgram.cpp b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/RngManipulation/PokemonFRLG_RngProgram.cpp index a1014876d1..3486469c9a 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/RngManipulation/PokemonFRLG_RngProgram.cpp +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/RngManipulation/PokemonFRLG_RngProgram.cpp @@ -11,6 +11,7 @@ #include "Pokemon/Pokemon_Strings.h" #include "VideoGames/PokemonFRLG/Inference/Menus/PokemonFRLG_PartySlot.h" #include "VideoGames/PokemonFRLG/PokemonFRLG_Navigation.h" +#include "VideoGames/PokemonFRLG/PokemonFRLG_Settings.h" #include "PokemonFRLG_RngProgram.h" namespace PokemonAutomation{ @@ -65,6 +66,10 @@ void RngProgramInstance::run_precheck( SingleSwitchProgramEnvironment& env, ProControllerContext& context ){ + if (!GameSettings::instance().RUN_RNG_START_CHECKS){ + env.console.log("Start checks are off in the FRLG Game Settings. Skipping them."); + return; + } home_black_border_check(env.console, context); check_free_party_slots(env, context); } From 0c450cf3e68d7e5a3280862dfd88c035352c3a28 Mon Sep 17 00:00:00 2001 From: dayfine Date: Sat, 14 Nov 2026 12:48:40 -0800 Subject: [PATCH 2/2] FRLG RNG: always run the black border check; the setting covers the party check Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss --- .../Source/VideoGames/PokemonFRLG/PokemonFRLG_Settings.cpp | 3 +-- .../Programs/RngManipulation/PokemonFRLG_RngProgram.cpp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/PokemonFRLG_Settings.cpp b/SerialPrograms/Source/VideoGames/PokemonFRLG/PokemonFRLG_Settings.cpp index ca1d31d44d..30537d3cd0 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/PokemonFRLG_Settings.cpp +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/PokemonFRLG_Settings.cpp @@ -76,8 +76,7 @@ GameSettings::GameSettings() ) , RUN_RNG_START_CHECKS( "Run Start Checks:
" - "Before an RNG program starts, check that the game has no black border and that your party has enough free slots. " - "Turn this off to skip these checks, e.g. when you restart a program often after fixing its settings.", + "Run pre-program validation checks, e.g. that your party has enough free slots.", LockMode::LOCK_WHILE_RUNNING, true // default ) diff --git a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/RngManipulation/PokemonFRLG_RngProgram.cpp b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/RngManipulation/PokemonFRLG_RngProgram.cpp index 3486469c9a..d4257d7f37 100644 --- a/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/RngManipulation/PokemonFRLG_RngProgram.cpp +++ b/SerialPrograms/Source/VideoGames/PokemonFRLG/Programs/RngManipulation/PokemonFRLG_RngProgram.cpp @@ -66,11 +66,11 @@ void RngProgramInstance::run_precheck( SingleSwitchProgramEnvironment& env, ProControllerContext& context ){ + home_black_border_check(env.console, context); if (!GameSettings::instance().RUN_RNG_START_CHECKS){ env.console.log("Start checks are off in the FRLG Game Settings. Skipping them."); return; } - home_black_border_check(env.console, context); check_free_party_slots(env, context); }