A Python tool to patch NieR: Automata's executable files to enable Ending E while offline.
NieR: Automata's true ending (Ending E) normally requires an online connection to display messages from other players. This tool patches the game executable to bypass that requirement, allowing you to experience the complete ending offline.
- Automatic Detection: Finds and patches both DirectX 11 and DirectX 12 versions
- Safe Patching: Creates automatic backups before making any changes
- Flexible Options: Command-line interface with multiple operation modes
- Dry Run Mode: Preview changes without actually modifying files
- Restore Function: Easy restoration from backup files
- Cross-Platform: Works on Windows, macOS, and Linux
File | Version | Offset |
---|---|---|
NieRAutomata.exe |
DirectX 12 | 0x8B6000 |
NieRAutomataCompat.exe |
DirectX 11 Compatibility | 0x8AD800 |
- Download the script to your NieR: Automata game directory
- Run the patcher:
python NierPatch.py
That's it! The tool will automatically:
- Find your game executables
- Create backups
- Apply the necessary patches
- Verify the changes
- Download the compiled
NierPatch.exe
- Place it in your NieR: Automata game directory
- Run the executable
- Follow the on-screen instructions
python NierPatch.py [OPTIONS]
Option | Description |
---|---|
-v, --verbose |
Enable detailed output |
--dry-run |
Preview changes without applying them |
--target EXECUTABLE |
Patch only the specified executable |
--directory DIR |
Specify game directory (default: current) |
--restore |
Restore from backup files |
--status |
Check patch status of executables |
--version |
Show version information |
# Check patch status
python NierPatch.py --status
# Preview changes without applying
python NierPatch.py --dry-run --verbose
# Patch only DirectX 12 version
python NierPatch.py --target NieRAutomata.exe
# Restore original files from backup
python NierPatch.py --restore
# Patch files in a different directory
python NierPatch.py --directory "C:\Games\NieR Automata"
The --status
command shows the current state of your executables:
Patch Status:
--------------------------------------------------
โ
NieRAutomata.exe: PATCHED
โ NieRAutomataCompat.exe: UNPATCHED
- โ PATCHED: Ready for offline Ending E
- โ UNPATCHED: Original, requires online connection
โ ๏ธ UNKNOWN: Unexpected bytes found (proceed with caution)- ๐ฅ INVALID_OFFSET: File structure doesn't match expected format
- Python 3.6+ (for running the script)
- NieR: Automata installed on your system
- Write permissions to the game directory
The script uses only built-in Python libraries:
mmap
- Memory-mapped file accessos
/pathlib
- File system operationsshutil
- File copying and backupargparse
- Command-line interface
Before any modification, the tool creates backup files:
NieRAutomata.exe.bak
NieRAutomataCompat.exe.bak
- Confirms original bytes before patching
- Verifies patch application after modification
- Detects already-patched files to prevent double-patching
- Graceful handling of permission errors
- Clear error messages for troubleshooting
- Safe restoration from backups
"Permission denied" error
- Run as administrator (Windows) or with
sudo
(Linux/macOS) - Close NieR: Automata before patching
"File not found" error
- Ensure you're in the correct game directory
- Verify NieR: Automata is properly installed
"Original bytes do not match" error
- Your game version might be different than expected
- Try updating to the latest game version
- Use
--status
to check current file state
Patch appears successful but ending still requires internet
- Restart the game completely
- Verify patch status with
--status
command - Ensure you patched the correct executable version
If something goes wrong, you can manually restore:
# Restore from backup
copy NieRAutomata.exe.bak NieRAutomata.exe
copy NieRAutomataCompat.exe.bak NieRAutomataCompat.exe
Or use the built-in restore function:
python NierPatch.py --restore
The patch modifies a single assembly instruction:
Original | Patched | Effect |
---|---|---|
33 C0 83 |
B0 01 C3 |
Changes function return value from 0 to 1 |
This simple change tricks the game into thinking it has received online messages, allowing Ending E to proceed offline.
The patch locations were determined through reverse engineering:
- NieRAutomata.exe: Offset
0x8B6000
- NieRAutomataCompat.exe: Offset
0x8AD800
# Clone the repository
git clone https://github.com/RehanPlayz/NierEOffline.git
cd NierEOffline
# Run directly
python NierPatch.py
# Or build executable with PyInstaller
pip install pyinstaller
pyinstaller --onefile --name NierPatch NierPatch.py
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
Massive thanks to Lance McDonald for discovering this solution and sharing it publicly. His original findings on X/Twitter made this tool possible.
Lance's work involved:
- Reverse engineering the game's online connectivity checks
- Identifying the exact memory locations to patch
- Sharing the technical details with the community
This tool simply automates the manual hex editing process Lance described, making it accessible to more players.
This project is licensed under the MIT License - see the LICENSE file for details.
The MIT License allows you to:
- โ Use the software for any purpose
- โ Modify and distribute the software
- โ Include in commercial projects
- โ Hold the authors liable for any damages
"Everything that lives is designed to end."