A Flask web application for generating event codes to receive special Pokémon in Pokémon Maize, a ROM hack of Pokémon Red Version.
This is the source code for the Pokémon Maize Event Giveaway website. Originally hosted on Heroku, this application generates unique 13-number codes that players can enter in-game to receive special event Pokémon.
Pokémon Maize is a ROM hack of Pokémon Red Version that features an in-game system where players can enter codes to receive special Pokémon. The website takes a player's Trainer ID and generates a personalized code that can be redeemed at the Agate City PokéCenter.
✨ All event Pokémon are shiny! ✨
The website now supports 5 different event Pokémon, each with unique characteristics:
- Pokémon: Shiny Pikachu (Pikablue)
- Level: 5
- Moves: Fly or Surf (random), Thundershock, Growl
- Special: Can learn Fly or Surf, making it a unique Pikachu variant!
- Pokémon: Shiny Squirtle with sunglasses
- Level: 5
- Moves: Bubblebeam, Surf, Skull Bash
- Special: Alternate sprite with cool sunglasses!
- Pokémon: Shiny Wartortle with sunglasses
- Level: 16
- Moves: Surf, Skull Bash, Hydro Pump
- Special: Alternate sprite with cool sunglasses!
- Pokémon: Shiny Blastoise with sunglasses
- Level: 36
- Moves: Surf, Hydro Pump, Skull Bash
- Special: Alternate sprite with cool sunglasses!
- Pokémon: Shiny Electrode with headband
- Level: 30
- Moves: Thunder, Explosion, Self-Destruct
- Special: Alternate sprite with a stylish headband!
- Enter your Trainer ID (found on your trainer card in-game, between 0-65535)
- Select the Pokémon you want from the dropdown menu
- Get your code - a unique 13-number code will be generated
- Redeem in-game - Talk to the NPC in Agate City's PokéCenter and enter the numbers in order
For ease of use, this project can also be run as a standalone desktop application for Windows, MacOS, and Linux. This version works offline and does not require any installation or a separate web browser.
You can download the latest version for your operating system from the Releases page.
- Python 3.x
- Flask 3.0.3
- Flask-WTF 1.2.1
- WTForms 3.1.2
# Clone the repository
git clone <repository-url>
cd maize-event
# Install dependencies
pip install -r requirements.txt
# Run the application
python run.pyThe application will be available at http://127.0.0.1:5000
You can also build the desktop application from source.
-
Install additional dependencies:
pip install pyinstaller pywebview
-
Build with PyInstaller:
- On Windows:
pyinstaller --onefile --windowed --name "MaizeEventApp" --add-data "app/static;app/static" --add-data "app/templates;app/templates" --hidden-import "webview" --hidden-import "config" --icon="icon.ico" desktop.py
- On macOS:
pyinstaller --onefile --windowed --name "MaizeEventApp" --add-data "app/static:app/static" --add-data "app/templates:app/templates" --hidden-import "webview" --hidden-import "config" --icon="icon.icns" desktop.py
- On Linux:
pyinstaller --onefile --windowed --name "MaizeEventApp" --add-data "app/static:app/static" --add-data "app/templates:app/templates" --hidden-import "webview" --hidden-import "config" --icon="icon.png" desktop.py
The executable will be created in the
dist/folder. - On Windows:
This project can be deployed to various platforms:
The project can be deployed to Vercel:
-
Install Vercel CLI (optional):
npm i -g vercel
-
Deploy:
vercel
Or connect your GitHub repository directly in the Vercel dashboard.
-
Configuration: The project includes
vercel.jsonandapi/index.pyfor Vercel compatibility.
Note: Vercel automatically detects Python projects and uses the @vercel/python runtime. The Flask app is served through the api/index.py entry point.
This Flask application can also be deployed to other platforms like:
- Heroku (original hosting platform)
- Railway
- Render
- PythonAnywhere
- Any platform that supports Python/Flask applications
The code generation algorithm:
- Uses XOR encryption with the Trainer ID for security
- Generates checksums to validate the code
- Creates a unique 13-number code for each Trainer ID and Pokémon combination
- ✅ Support for 5 different event Pokémon
- ✅ Shiny Pokémon generation
- ✅ Alternate sprite support
- ✅ Randomized moves (for Pikablue)
Marcus Huderle (2015) - Original creator of the Pokémon Maize Event Giveaway website and the Pokémon Maize ROM hack.
- CalentadasTCG - Introduced me to this amazing ROM hack and helped test the new code implementations! 🎮
This version includes:
- ✨ Multi-Pokémon support (originally only supported Pikachu)
- 🔧 Updated dependencies for modern Python versions
- 🎨 Enhanced UI with Pokémon selection
- 🐛 Fixed internal Pokémon IDs for correct code generation
This project is licensed under the MIT License - see the LICENSE file for details.
Original code (2015) by Marcus Huderle. This version includes modifications and extensions to support multiple Pokémon, updated dependencies, and enhanced functionality.
Note: This was originally a Heroku-hosted application. The code has been updated to work with modern Python and Flask versions while maintaining compatibility with the original Pokémon Maize ROM hack.