A huge upgrade to the battle engine in HeartGold
- Features
- Setup Instructions (Linux with apt)
- Setup Instructions (macOS)
- Setup Instructions (Windows on WSL)
- Setup Instructions (Windows on MSYS2)
- Further Setup Instructions
- Setup Instructions (Docker)
- Build Instructions
- Credits
- Dex Expansion (through Gen 6 almost entirely implemented)
- Ability Expansion (through Gen 6 almost entirely implemented)
- Move Expansion with future generation moves
- Item Expansion with future generation items
- Mega Evolutions + Primal Reversions
- Much More Customizable Trainers
- Fairy Type
- Hidden Abilities
- Updated Effects for Existing Moves and Abilities
- 30 PC Boxes
A more comprehensive list of features + a roadmap can be found by visiting the hg-engine wiki. Please read this README and the Wiki thoroughly before asking questions.
- In a Terminal window, run the following commands:
sudo apt-get install libpng-dev build-essential cmake python3-pip git automake gcc-arm-none-eabipip3 install ndspy
- On distros where
monois not preinstalled (Ubuntu-based ones come to mind), install it withsudo apt-get install mono-devel - Continue to Further Setup Instructions
- If you don't have it already, install
brewby running the following in Terminal:/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - In a Terminal window, run the following commands:
xcode-select --installbrew install python3 libpng automake cmake zlib pkg-configbrew install --cask gcc-arm-embeddedpython3 -m pip install ndspyexport PKG_CONFIG_PATH=$(brew --prefix zlib)/lib/pkgconfig
- Download and install Mono using the download and instructions here.
- Continue to Further Setup Instructions
- Open the Windows Command Prompt as Administrator (look up "Command Prompt" on your Start Menu, Right Click -> Run as Administrator). Once you have done that, execute the following command:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all- Once this process finishes, you will have to restart your PC by entering "Y"
- If Windows is not cooperating and has issues logging in when your PC reboots, do not worry! You likely just need to enable virtualization in your BIOS. For instructions on that, look here.
- Go to the Microsoft Store and search "Ubuntu". Go to any one of the version's pages in the store and click the blue "Get" button. It shouldn't matter which you choose.
- Once Ubuntu finishes installing, launch it from its page in the Microsoft Store so it can finish setting itself up.
- Once Ubuntu finishes setting itself up, it will ask you to enter a username (in lowercase letters only) and password. After doing so, you can close Ubuntu.
- Open the "Run" window by pressing the
Windows keyandRat the same time, then type inwsland press Enter. This is how you should open WSL from now on.- Note that you can also delete the folder path at the top of the File Explorer and just type in
wslto open WSL at the file explorer.
- Note that you can also delete the folder path at the top of the File Explorer and just type in
- In WSL, type in
sudo apt update, and after it finishes processing, type insudo apt upgrade. This will take a QUITE a while, so find something else to do in the meantime. These two commands together will update all of the packages that came pre-installed with Ubuntu.- At some point during the process, you'll be asked to confirm whether you want WSL to restart automatically during package updates. We'll select "Yes" and press Enter. The process will then proceed.
- In WSL, run the following commands:
sudo apt-get install build-essential git libpng-dev gdebi-core python3 python3-pip cmake automake mono-devel gcc-arm-none-eabi- You will be asked to confirm the installation, so press "y" followed by Enter to do so.
pip3 install ndspy
- Once the last process has finished, continue to Further Setup Instructions
- Install MSYS2 from the website.
- Open up the base MSYS2 with the light purple background.
- Execute the commands:
pacman -Syupacman -S gcc base-devel cmake python git automake mingw-w64-x86_64-mono mingw-w64-x86_64-arm-none-eabi-gcc p7zip zlib-develexport PATH=$PATH:/mingw64/binecho export PATH='$'PATH:/mingw64/bin >> ~/.bashrcpython3 -m ensurepip --upgradepython3 -m pip install ndspy
- Download libpng and install it. Decompress it to a folder, and then open MSYS2 in that source folder and run:
./configure --prefix=/usrmake checkmake install
- Once that process has finished, continue to Further Setup Instructions
- In Terminal/WSL, run the following commands:
cd Documentsgit clone --recursive https://github.com/BluRosie/hg-engine.git
- Continue to Build Instructions
If you are using Docker, there is no need for complicated setup or anything. You just have to clone the git repository:
cd Documentsgit clone --recursive https://github.com/BluRosie/hg-engine.gitcd hg-engine
Docker handles all of the setup for you with relative replicability across platforms. This abstracts a bit of it away from the user and is slightly slower, but such is the price of simplicity.
To set up for the first time, all that needs to be run is:
docker build . -t hg-engine
To build, you can then run a simple shell script to build the test.nds:
./docker-makerom.cmd
This script is written in such a way that it works on every platform (including from cmd on Windows).
There is no need to continue to Build Instructions for anything. Docker handles it all for you.
You will still have to make clean and make clean_code manually when changing code or other things that won't build for some reason. But this makes setup really convenient.
- Get your ROM, rename it to rom.nds and place it in
Documents/hg-engine. - In Terminal/WSL, type
make. It will start with building all the tools necessary, then move to the code, then the rest of the files in the folders.makeis initially very slow. It can be sped up by specifying a certain amount of threads through the-j#flag, where # is a number. The ideal amount of threads is typically the number that is given fromnproc--so mymakecommand, withnprocgiving me8, is typicallymake -j8.- If you are a macOS user who is on arm64 (an Apple M1 Processor), you may have issues running this command due to
libpnglinker issues caused by an expected architecture mismatch. You can get around this issue by going toApplications/Utilities/, right clicking on Terminal, Clicking "Get Info", and clicking the "Open using Rosetta" checkbox so it becomes blue. Close Terminal if you had it open, then open it again and run the following:cd Documents/hg-enginemake tools/nitrogfxmake tools/ENCODE_IMG
- Make sure to undo your changes to Terminal after you are done so it will run as a native arm64 application again (uncheck the checkbox from before).
- After the process completes, a new file will appear in the
hg-enginefolder named test.nds.- It is important to note that this alone will not add new pokemon to the wild, trainers, etc...; it simply makes them available in your game. It is up to you to place them.
- You can edit various game data such as trainers, dex entries, pokemon stats, and more in the files in
armips/data