A Python script that completely automates the process of replacing RPG Maker MV/MZ game runtime with a modern NW.js installation, providing better performance, space savings, and developer tools access.
This script transforms your RPG Maker games by replacing their outdated runtime with modern NW.js versions.
- ๐พ Massive Space Savings: Save 100-120MB per game (one NW.js serves all games)
- ๐ ๏ธ Developer Tools: Press F12 for debugging, modding, and game analysis
- โก Better Performance: Modern NW.js with latest bug fixes and optimizations
- ๐ฎ Custom Game Names: Create personalized executable names
- ๐ค Zero Manual Work: Fully automated with intelligent error handling
- ๐ 100% Safe: Creates backups and validates everything before changes
- ๐ Cross-Platform: Works on Windows, macOS, and Linux
- Game Validation: Verifies the directory contains a valid RPG Maker MV/MZ game
- NW.js Download: Automatically downloads the specified NW.js version if not provided
- Runtime Cleanup: Intelligently removes NW.js runtime files while preserving game assets
- Configuration Updates: Modifies
package.json
with required fields for newer NW.js versions - Launch Script Creation: Creates platform-specific launch scripts (.bat for Windows, .sh for Unix)
- Intelligent Setup: Launch scripts automatically check and install dependencies
- Cross-Platform: Works seamlessly on Windows, macOS, and Linux
- Desktop Integration: Optional desktop shortcuts for instant access
- Zero Configuration: Works out-of-the-box with sensible defaults
- Visual Feedback: Colored terminal output with clear progress indicators
- Automatic Backup: Creates a backup of the original game before modifications
- File Preservation: Carefully preserves game assets, README files, and custom directories
- Error Handling: Comprehensive error handling with informative messages
- Validation: Multiple validation steps to ensure safe processing
- Download the latest release from GitHub Releases
- Extract anywhere convenient (Desktop, Tools folder, etc.)
- Double-click the launcher for your system:
- Windows:
run_nwjs_automator_win.bat
- Mac/Linux:
run_nwjs_automator_unix_mac.sh
- Windows:
That's it! The launcher will:
- โ Check if Python is installed (with install guidance if needed)
- โ Automatically install required dependencies
- โ Offer to create desktop shortcuts
- โ Launch the automation tool
- โ Keep the terminal open to show results
The script will guide you through everything with a user-friendly interface!
python nwjs_automator.py
- Python 3.6+ (script will check and guide you if needed)
- Internet connection (to download NW.js if not provided)
- Required packages (automatically installed):
requests
- Windows: Download from python.org and check "Add to PATH"
- Mac:
brew install python3
or download from python.org - Linux: Usually pre-installed, or
sudo apt install python3 python3-pip
pip install requests
Download nwjs_automator.py
from the releases page
-
Run the script:
python nwjs_automator.py
-
Follow the colorful prompts:
- ๐ Game Path: Enter your RPG Maker game folder
- ๐ฏ Game Name: Choose your custom executable name (e.g., "MyAwesomeGame")
- ๐ง NW.js Version: Pick from optimized presets or go custom
- ๐ ๏ธ Build Type: SDK (recommended) or Normal
- ๐พ Backup: Yes (recommended) or No
-
Sit back and watch: The script handles everything automatically!
The script offers smart version presets:
Option | Version | Best For | Windows Support |
---|---|---|---|
1 | v0.29.4 | Maximum compatibility (RPG Maker MV era) | Windows 7+ |
2 | v0.49.2 | Balanced default - best overall choice | Windows 7+ |
3 | v0.72.0 | Modern stable (last Win7 support) | Windows 7+ |
4 | v0.90.0+ | Latest features, best performance | Windows 10+ |
5 | Custom | Specific version needs | Varies |
๐ก Recommendation: Use option 2 (v0.49.2) for the best balance of compatibility and performance.
-
SDK Build (Recommended):
- โ Includes F12 Developer Tools
- โ Perfect for modding and debugging
- โ Only 5-10MB larger
-
Normal Build:
- โ Slightly smaller size
- โ No developer tools
โ ๏ธ Use only if you need absolute minimum size
# Basic usage
python nwjs_automator.py --game-path "C:\Your\Game"
# Custom executable name
python nwjs_automator.py --game-path "C:\Your\Game" --executable-name "MyGame"
# Specific NW.js version
python nwjs_automator.py --game-path "C:\Your\Game" --nwjs-version "v0.72.0"
# Use existing NW.js installation
python nwjs_automator.py --game-path "C:\Your\Game" --nwjs-path "C:\nwjs"
# Skip backup (not recommended)
python nwjs_automator.py --game-path "C:\Your\Game" --no-backup
# Normal build instead of SDK
python nwjs_automator.py --game-path "C:\Your\Game" --no-sdk
# Verbose logging
python nwjs_automator.py --game-path "C:\Your\Game" --verbose
Argument | Description | Default |
---|---|---|
--game-path |
Path to RPG Maker game directory | Required |
--executable-name |
Custom name for game executable | "Game" |
--nwjs-path |
Path to existing NW.js installation | Auto-download |
--nwjs-version |
NW.js version to use | "v0.49.2" |
--no-sdk |
Use normal build instead of SDK | SDK build |
--no-backup |
Skip creating backup | Create backup |
--verbose , -v |
Enable detailed logging | Normal logging |
--interactive , -i |
Force interactive mode | Auto-detect |
- โ Checks if directory contains valid RPG Maker MV/MZ game
- โ
Verifies
package.json
andwww/
folder exist - โ
Validates and fixes
package.json
for NW.js compatibility - โ Ensures all critical files are present
- โ
Creates complete backup as
GameName_backup
- โ
Backs up critical files (
package.json
,www/
,index.html
) - โ Validates backup integrity before proceeding
- โ Downloads specified NW.js version (if not provided)
- โ Extracts and prepares NW.js runtime
- โ Chooses correct architecture (x64, x86, ARM) automatically
- โ Removes old NW.js runtime files from game
- โ Preserves all game assets and custom files
- โ Cleans up unnecessary files (chromedriver, docs, etc.)
- โ Keeps only essential locale files (en-US)
- โ Copies new NW.js runtime to game directory
- โ Restores game files with proper structure
- โ
Creates/fixes
index.html
if missing - โ Renames executable to your custom name
- โ Removes unnecessary NW.js files
- โ Creates Windows shortcuts (if applicable)
- โ Sets proper file permissions
- โ Validates final game structure
YourGame/ (~120MB)
โโโ Game.exe (NW.js runtime)
โโโ nw.dll, ffmpeg.dll, etc. (Runtime files)
โโโ resources.pak (NW.js resources)
โโโ locales/ (All languages)
โโโ www/ (Your game!)
โโโ package.json (Game config)
YourGame/ (~5-15MB)
โโโ YourCustomName.exe (Your named executable)
โโโ www/ (Your game - preserved)
โโโ package.json (Updated & optimized)
โโโ index.html (Validated/created)
โโโ YourCustomName.lnk (Windows shortcut)
YourGame_backup/ (~120MB)
โโโ [Complete original backup]
With SDK build (default), press F12 in your game for:
- Console: Execute JavaScript commands directly
- Elements: Inspect game DOM structure
- Sources: Debug game scripts with breakpoints
- Network: Monitor resource loading
- Performance: Profile game performance
// In the game console (F12):
// Check NW.js version
process.versions
// Increase save slots
DataManager.maxSavefiles = () => 99
// Modify player stats
$gamePlayer.gainGold(99999)
$gameActors.actor(1).gainExp(999999)
// Skip events or change switches
$gameSwitches.setValue(1, true)
$gameVariables.setValue(1, 100)
// Test battles
$gameParty.addActor(2)
SceneManager.push(Scene_Battle)
- Smart Detection: Finds and preserves existing
index.html
- Intelligent Creation: Creates optimized
index.html
if missing - Script Auto-Discovery: Automatically includes all game scripts in correct order
- Library Order: Maintains proper RPG Maker MV library loading sequence
- Name Field: Adds required
name
field for newer NW.js versions - UTF-8 Encoding: Ensures proper character encoding
- Validation: Checks JSON syntax and structure
- Backup: Preserves original configuration while adding required fields
The script carefully preserves:
- โ
All game assets (
www/
folder) - โ
Custom README files (
.txt
,.md
,.pdf
) - โ User-created directories
- โ Save files and configuration
- โ Plugin data and custom resources
Removes only unnecessary files:
- โ
chromedriver.exe
(development tool) - โ Documentation files (
AUTHORS
,CHANGELOG.md
, etc.) - โ Unused PAK files (
nw_100_percent.pak
, etc.) - โ Extra locale files (keeps only
en-US
) - โ SDK-specific files (if using normal build)
- RPG Maker MV: Works with all versions (use v0.29.4 for maximum compatibility)
- RPG Maker MZ: Use v0.49.2 or newer
- Encrypted Games: May not work with DRM-protected games
- Custom Plugins: Most work fine, some may need specific NW.js versions
๐ C:\RPG Games\
โโโ ๐ Game1\ # Processed (5MB)
โโโ ๐ Game1_backup\ # Original backup (120MB)
โโโ ๐ Game2\ # Processed (8MB)
โโโ ๐ Game2_backup\ # Original backup (135MB)
โโโ ...
๐ C:\Tools\
โโโ ๐ nwjs_automator\ # Keep script here
โโโ nwjs_automator.py
โโโ temp_nwjs\ # Auto-created temp folder
- Always backup: Script creates backups automatically, but keep your own too
- Test games: Launch processed games once to ensure they work
- Save early saves: Keep save files from before processing
- Document versions: Note which NW.js version works best for each game
โ "package.json not found"
- โ Make sure you're pointing to the game's root directory
- โ
Directory should contain both
package.json
andwww/
folder
โ "Python not found"
- โ Install Python 3.6+ from python.org
- โ On Windows, check "Add to PATH" during installation
- โ Restart command prompt after installation
โ "Failed to download NW.js"
- โ Check internet connection
- โ Try a different NW.js version
- โ
Use
--nwjs-path
to point to existing NW.js installation
โ "Game won't start after processing"
- โ Try older NW.js version (v0.29.4 for maximum compatibility)
- โ
Restore from backup and try with
--no-sdk
flag - โ Check if game has custom plugins requiring specific versions
โ "Permission denied" (Linux/Mac)
- โ
Run with
sudo
if needed - โ Make sure you have write permissions to game directory
- โ
Check file ownership with
ls -la
โ "Missing dependencies"
- โ
Install with:
pip install requests
- โ
On some systems:
pip3 install requests
- โ
Try:
python -m pip install requests
For detailed troubleshooting, use verbose mode:
python nwjs_automator.py --verbose --game-path "C:\Your\Game"
This shows detailed logs of every operation, perfect for diagnosing issues.
If you're still having issues:
- Check the backup: You can always restore from
GameName_backup
- Try interactive mode: More user-friendly than command line
- Use verbose logging:
--verbose
shows detailed error information - Test with different versions: Some games work better with specific NW.js versions
- Check GitHub Issues: Someone might have had the same problem
- Use SDK build unless you absolutely need smaller size
- Choose v0.49.2 for best balance of features and compatibility
- Process multiple games - they'll all share the same NW.js runtime
- Keep backups - you can always try different NW.js versions
- Use F12 tools to debug and test your games
- Test save/load functionality after processing
- Check plugin compatibility with your chosen NW.js version
- Document your settings - note what works for each game
- One NW.js for all: All processed games share the same runtime
- Clean up temp files: Script does this automatically
- Organize backups: Keep original backups for safety
- Monitor space savings: You'll save 100MB+ per game processed
This project is licensed under the MIT License - see the LICENSE file for details.
What this means:
- โ Free to use for personal and commercial projects
- โ Modify and redistribute as needed
- โ Include in your own tools without restrictions
โ ๏ธ Attribution required (keep the copyright notice)
- Original Guide: Based on the excellent tutorial by Fairy's Voice
- NW.js Project: https://nwjs.io/ - The amazing runtime that makes this possible
- RPG Maker Community: For testing, feedback, and compatibility reports
- Python Community: For the incredible tools and libraries that power this script
- ๐ชณ Fixed: Indentation error on line 460-462 (thanks to T1MM5H for reporting the issue)
- ๐ชณ Fixed: Os specific scripts and error handling improved
- โจ New: Completely redesigned interactive experience
- โจ New: Smart NW.js version presets with compatibility guidance
- โจ New: Automatic
index.html
creation and validation - โจ New: Intelligent
package.json
fixing for newer NW.js versions - โจ New: Custom executable naming with automatic extension handling
- โจ New: Cross-platform shortcut creation (Windows
.lnk
files) - โจ New: Advanced file preservation logic
- โจ New: Comprehensive error handling and validation
- โจ New: Detailed progress reporting with colored output
- โจ New: Support for multiple NW.js architectures (x64, x86, ARM)
- ๐ง Improved: Much more robust file handling and safety checks
- ๐ง Improved: Better cleanup of unnecessary NW.js files
- ๐ง Improved: Enhanced backup and restore system
- ๐ง Improved: Smarter temporary file management
- ๐ง Improved: Platform-specific optimizations
- ๐ง Improved: More informative logging and user feedback
- โจ New: Intelligent one-click launcher scripts
- โจ New: Automatic dependency installation
- โจ New: Desktop shortcut creation
- ๐ง Improved: Cross-platform compatibility
- โจ New: Full automation of NW.js replacement process
- โจ New: Interactive and command-line modes
- โจ New: Automatic backup system
- โจ New: Cross-platform support
We welcome contributions from the RPG Maker community!
- ๐ Report Bugs: Found an issue? Let us know!
- ๐ก Suggest Features: Have ideas for improvements?
- ๐ง Submit Code: Pull requests are welcome
- ๐ Improve Docs: Help make the documentation even clearer
- ๐ฎ Test Games: Try the script with different games and report compatibility
- ๐ Translate: Help translate the script for international users
git clone https://github.com/aeagisdev/rpgm-nwjs-automator.git
cd rpgm-nwjs-automator
pip install -r requirements.txt
If this tool helped you, consider:
- โญ Star the repository on GitHub
- ๐ฆ Share on social media - help other RPG Maker developers discover this tool
- ๐ฌ Join discussions - share your experiences and help others
- ๐ฎ Report compatibility - let us know which games work great
- ๐ Write reviews - help spread the word about the benefits
- GitHub Issues: Report bugs and request features
- Discussions: Ask questions and share experiences
- Wiki: Community compatibility database
Made with โค๏ธ by RPG Maker developers, for RPG Maker developers.
Transform your games. Save space. Unlock potential.