This project is for educational and archival purposes.
It's a small script I made a while ago as practice. Works with European and USA versions only, haven't checked JP at all, feel free to fork and add it!
Safe shiny-odds patcher for Pokemon Gen 3 GBA ROMs:
- FireRed
- LeafGreen
- Ruby
- Sapphire
- Emerald
- CRC32 ROM auto-detection (only known clean revisions are accepted)
- Strict byte validation at every patch offset before writing
- Never overwrites the input ROM (always writes a new output file)
If CRC32 is unknown, patching is refused.
python shiny_patcher.py "Pokemon Emerald.gba" --odds 4096Guided mode (recommended for beginners):
python shiny_patcher.py --guidedIf no input_rom is provided, guided mode starts automatically:
python shiny_patcher.pyArguments:
input_rom: source.gbaROM path--odds N: desired shiny rate as1 in N(required)--output PATH: optional output ROM path--overwrite-output: allow replacing an existing output file--guided: interactive wizard, scans a folder for ROMs and guides patching--folder PATH: folder to scan in guided mode (default: current directory)
Default output naming:
<input_stem>.shiny_1inN.gba
Example:
python shiny_patcher.py "Pokemon FireRed.gba" --odds 2048 --output "FireRed_1in2048.gba"Guided scan of a specific folder:
python shiny_patcher.py --guided --folder "C:\ROMs\GBA"Gen 3 uses a threshold internally (base threshold is 8, equivalent to 1/8192).
This tool converts 1 in N to the nearest threshold with:
threshold = round(65536 / N)- clamped to
1..255(ROM instruction encoding limit at target offsets)
0xF0815EE7- Pokemon Ruby Version (USA, Europe) Rev 00x61641576- Pokemon Ruby Version (USA, Europe) Rev 10x554DEDC4- Pokemon Sapphire Version (USA, Europe) Rev 00xBAFEDAE5- Pokemon Sapphire Version (Europe) Rev 10xDD88761C- Pokemon FireRed Version (USA) Rev 00x84EE4776- Pokemon FireRed Version (USA, Europe) Rev 10xD69C96CC- Pokemon LeafGreen Version (USA) Rev 00xDAFFECEC- Pokemon LeafGreen Version (USA, Europe) Rev 10x1F1C08FB- Pokemon Emerald Version (USA, Europe) Rev 0
python --version
python shiny_patcher.py --help<<<<<<< HEAD
Use patch_drag_drop.bat for simple usage:
- Drag one or more
.gbaROM files ontopatch_drag_drop.bat - The launcher reads odds from patcher_config.ini
- It calls
shiny_patcher.pyand creates patched ROM output files
Edit this line in patcher_config.ini to change odds:
odds=4096Example values:
odds=8192(vanilla)odds=4096odds=2048=======
Distributed under the MIT License. See LICENSE for more information.