FR/LG Rng Script Switch 1 Edition

  • Thread starter Thread starter Stoned
  • Start date Start date
  • Views Views 320
  • Replies Replies 1
  • Likes Likes 1

Stoned

Well-Known Member
Member
Joined
Mar 26, 2014
Messages
2,884
Reaction score
1,654
Trophies
2
Age
47
XP
5,300
Country
Germany
Here is a FR/LG Switch Edition Rng Script in Python.


Rng.png




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:

  1. Python 3.x Installed: Download it from python.org.
  2. Required Libraries: Open your terminal/command prompt and run:pip install pyusb
  3. 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)
  4. USB Driver (Windows Only): Use Zadig to replace the microcontroller's driver with libusb-win32 or WinUSB so Python can communicate with it.
  5. https://lincoln-lm.github.io/ten-lines/?page=1
  6. https://dasampharos.github.io/EonTimer/
  7. You have to use a Overworld Frame from 800 or More (Click Timings)
  8. 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 it:python rng_architect.py

2. Connecting the Hardware​

  1. Connect your microcontroller to your PC and your Nintendo Switch.
  2. In the script, click the 🔌 CONNECT button.
  3. 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:

  1. Perform a run and check which frame/seed you actually hit in your RNG tool.
  2. Enter that value into the EonTimer / Result Value box.
  3. Click Calculate Anchor.
  4. The script will automatically update your Anchor offset (e.g., +16.0ms) to correct the drift for the next attempt.


🎮 Performing a Run​

  1. Boot FireRed or LeafGreen on your Switch.
  2. Position your character in-game exactly where you need to be (e.g., in front of a Legendary or the Sweet Scent spot).
  3. Back out to the NSO GBA menu or the initial game splash screen as required by your specific RNG method.
  4. Click 🌟 START PRECISION RUN 🌟.
  5. 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,
  • Like
Reactions: Xyphoseos

Site & Scene News

Popular threads in this forum