Here is a FR/LG Switch Edition Rng Script in Python.
If you’ve been struggling with the frame-perfect timing required for RNG manipulation in Pokémon FireRed or LeafGreen on the Switch, this script is for you. RNG Architect automates the button sequences with millisecond precision via a USB-connected bot (like a Teensy or an ATMega32U4 flashed with Switch-compatible joystick firmware).
ython rng_architect.py
The main tab (CONTROLS) handles the heavy lifting. You will need values from EonTimer or your preferred RNG tool.
RNG on the Switch can have slight variations due to USB polling. Use the CALIBRATION tab to fix misses:
This Tutorial is Writen and Translated whit AI
If you’ve been struggling with the frame-perfect timing required for RNG manipulation in Pokémon FireRed or LeafGreen on the Switch, this script is for you. RNG Architect automates the button sequences with millisecond precision via a USB-connected bot (like a Teensy or an ATMega32U4 flashed with Switch-compatible joystick firmware).
🛠 Prerequisites
Before running the script, ensure you have the following:- Python 3.x Installed: Download it from python.org.
- Required Libraries: Open your terminal/command prompt and run
ip install pyusb
- USB Hardware: A microcontroller (Teensy 2.0++, Arduino Micro, etc.) flashed with a Switch-compatible USB-HID descriptor. The script looks for:
- Vendor ID: 0x057e (Nintendo)
- Product ID: 0x3000 (Switch Controller)
- USB Driver (Windows Only): Use Zadig to replace the microcontroller's driver with libusb-win32 or WinUSB so Python can communicate with it.
- https://lincoln-lm.github.io/ten-lines/?page=1
- https://dasampharos.github.io/EonTimer/
- You have to use a Overworld Frame from 800 or More (Click Timings)
- Have a Sweet Scent Pokemon on Place 1 whitout Learned HM´s
Getting Started
1. Launching the Script
Save the code provided above as rng_architect.py and run it2. Connecting the Hardware
- Connect your microcontroller to your PC and your Nintendo Switch.
- In the script, click the
CONNECT button. - If successful, the status will change from OFFLINE to a green READY.
Setting Up Your Timing
The main tab (CONTROLS) handles the heavy lifting. You will need values from EonTimer or your preferred RNG tool.- Start Wait (ms): The delay before the script begins (gives you time to switch focus or prepare).
- Anchor (ms + offset): This is your primary calibration point. It represents your "Target Frame" minus the system lag.
- Continue Delay (ms): The timing for clicking "Continue" in the GBA menu.
- Target Delay (ms): The final delay to hit your specific Pokémon/Seed.
Calibration (The "Secret Sauce")
RNG on the Switch can have slight variations due to USB polling. Use the CALIBRATION tab to fix misses:- Perform a run and check which frame/seed you actually hit in your RNG tool.
- Enter that value into the EonTimer / Result Value box.
- Click Calculate Anchor.
- The script will automatically update your Anchor offset (e.g., +16.0ms) to correct the drift for the next attempt.
Performing a Run
- Boot FireRed or LeafGreen on your Switch.
- Position your character in-game exactly where you need to be (e.g., in front of a Legendary or the Sweet Scent spot).
- Back out to the NSO GBA menu or the initial game splash screen as required by your specific RNG method.
- Click
START PRECISION RUN
. - Hands off! The script will execute the A, B, and D-Pad inputs automatically. The log area will show you exactly when each button was pressed down to the millisecond.
Important Notes
- Admin Rights: On Windows, you may need to run your terminal as Administrator for Python to access USB devices.
- High Priority: The script attempts to set itself to "High Priority" in Windows to ensure the timers aren't interrupted by background tasks.
- Safety: The script includes an Auto-Disconnect feature. Once a run is finished, it detaches the virtual controller so you can take manual control of your Switch immediately.
This Tutorial is Writen and Translated whit AI
Disclaimer: This tool is for educational and RNG purposes. Always keep a backup of your save data!
Attachments
Last edited by Stoned,






