No description
  • Assembly 55.9%
  • C 26%
  • Makefile 15.5%
  • Python 1.8%
  • Linker Script 0.3%
  • Other 0.5%
Find a file
Fidget Beeby 207ed26e6f Add CLAUDE.md and Podman build scripts
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 06:05:26 -04:00
armips Fill in move descriptions 2026-06-15 06:05:17 -04:00
asm Merge remote-tracking branch 'upstream/main' into HeartGold-Generations-(Full-Version-2.0) 2025-08-09 16:50:29 -07:00
data Merge remote-tracking branch 'upstream/main' into HeartGold-Generations-(Full-Version-2.0) 2025-08-09 16:50:29 -07:00
documentation improve hooks handling 2025-05-12 15:15:56 -04:00
include Disable level cap 2026-06-15 06:05:24 -04:00
rawdata Deleted HP bars on some strong moves. Fixed merge conflicts with main. 2024-06-10 02:25:24 -04:00
scripts Fill in move descriptions 2026-06-15 06:05:17 -04:00
sound/cries Add nearly all base form cries 2025-05-20 13:12:51 +08:00
src Merge remote-tracking branch 'upstream/main' into HeartGold-Generations-(Full-Version-2.0) 2025-08-09 16:50:29 -07:00
tools get rid of swav2swar and thus mono 2025-04-16 03:42:50 -04:00
.gitattributes Initial commit 2021-12-29 01:49:50 -05:00
.gitignore vscode folder name seems to have changed 2025-06-03 09:23:24 +02:00
.gitmodules start making a python script to allow the creation of btx0 overworld files 2024-06-07 23:00:21 -04:00
armhooks add arm hook functionality + debug on bank loads 2023-03-14 18:21:33 -04:00
bytereplacement fix a few issues with item reuse 2025-08-03 15:04:53 -04:00
charmap.txt mon expansion + megas work in one repo 2021-12-29 03:44:22 -05:00
CLAUDE.md Add CLAUDE.md and Podman build scripts 2026-06-15 06:05:26 -04:00
CONFIG.md make new rare candy level cap evolutions use GetLevelCap 2025-06-06 03:47:59 -04:00
CONTRIBUTING.md add discord links to CONTRIBUTING and README 2025-08-03 13:49:48 -04:00
CREDITS.md Merge branch 'move-dev' into move-dev 2024-07-27 22:21:21 +10:00
docker-login.cmd make docker scripts work for native windows run from cmd as well 2023-11-07 23:31:17 -05:00
docker-makerom.cmd make docker scripts work for native windows run from cmd as well 2023-11-07 23:31:17 -05:00
Dockerfile add exception for docker path to help address #433 2025-05-31 20:48:22 -04:00
hooks Update hooks 2025-08-09 17:00:25 -07:00
Makefile expand trainer validation script 2025-06-30 10:04:34 -04:00
narcs.mk expand trainer validation script 2025-06-30 10:04:34 -04:00
overlays.mk simplify the directory listing more for overlays 2025-04-16 04:05:47 -04:00
podman-login.cmd Add CLAUDE.md and Podman build scripts 2026-06-15 06:05:26 -04:00
podman-makerom.cmd Add CLAUDE.md and Podman build scripts 2026-06-15 06:05:26 -04:00
README.md add discord links to CONTRIBUTING and README 2025-08-03 13:49:48 -04:00
repoints add the rest of the things that terrains need to fully function 2024-12-18 17:20:47 -05:00
requirements.txt enforce python virtual environments seamlessly 2025-01-15 11:16:47 -05:00
rom.ld hook rare candy use in teh bag to allow for repeated use 2025-07-26 12:53:44 -05:00
routinepointers Add repel reuse prompt 2024-06-27 00:56:37 -04:00

hg-engine

About

A huge upgrade to the battle engine in HeartGold

Disclaimer

This repository and its assets are a community endeavor. By its nature, using it and subsequently profiting off of it is profiting on the backs of all of our work, all of which is intended to be used to further hobbies and for everyone to have fun. You have my blessing to use code and assets from this repository as you please as long as there is no money involved, including optional donations through whichever platform to play your hack. The creations that stem from this repository must be freely accessible and not hidden at all behind any paywall, including those that prompt the player to pay optionally (Ko-Fi's style comes to mind here). The Credits should also be replicated in your hack's repository and/or the post to your hack--we all sit on the shoulders of giants here.

Table of Contents

Features:

  • 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
  • New Weathers
  • Dynamic Speed
  • Accurate Turn Sequence
  • Accurate End-turn Resolution Order
  • 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.

If you are looking to contribute to hg-engine, please see the CONTRIBUTING.md.

Setup Instructions (Linux with apt)

  1. In a Terminal window, run the following commands:
    • sudo apt-get install libpng-dev build-essential cmake python3-pip python3-venv git automake autoconf gcc-arm-none-eabi pkg-config
  2. Continue to Further Setup Instructions

Setup Instructions (Linux with apk)

  1. In a Terminal window, run the following commands:
    • apk add libpng-dev build-base cmake python3 git automake autoconf
    • Grab your Alpine Linux version using the command grep PRETTY_NAME /etc/os-release. I get PRETTY_NAME='Alpine Linux v3.14', so my version is v3.14. Substitute that into the next command for [version].
    • apk add --no-cache binutils-arm-none-eabi gcc-arm-none-eabi newlib-arm-none-eabi --repository http://dl-cdn.alpinelinux.org/alpine/[version]/community
  2. Continue to Further Setup Instructions

Setup Instructions (Linux with dnf or yum)

  1. In a Terminal window, run the following commands (replace dnf with yum if applicable):
    • sudo dnf install libpng-devel arm-none-eabi-gcc-cs arm-none-eabi-newlib.noarch cmake python3 git automake autoconf make
  2. Continue to Further Setup Instructions

Setup Instructions (macOS)

  1. If you don't have it already, install brew by running the following in Terminal: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  2. In a Terminal window, run the following commands:
    • xcode-select --install
    • brew install python3 libpng automake autoconf cmake zlib pkg-config zstd
    • brew install --cask gcc-arm-embedded
    • export PKG_CONFIG_PATH=$(brew --prefix zlib)/lib/pkgconfig
  3. Continue to Further Setup Instructions

Setup Instructions (Windows on WSL)

  1. 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.
  2. 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.
  3. Open the "Run" window by pressing the Windows key and R at the same time, then type in wsl and 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 wsl to open WSL at the file explorer.
  4. In WSL, type in sudo apt update, and after it finishes processing, type in sudo apt upgrade. This will take 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.
  5. In WSL, run the following commands:
    • sudo apt-get install build-essential git libpng-dev gdebi-core python3 python3-pip python3-venv cmake automake autoconf gcc-arm-none-eabi pkg-config
      • You will be asked to confirm the installation, so press "y" followed by Enter to do so.
  6. Once the last process has finished, continue to Further Setup Instructions

Setup Instructions (Windows on MSYS2)

  1. Install MSYS2 from the website.
  2. Open up the base MSYS2 with the light purple background.
  3. Execute the commands:
    • pacman -Syu
    • pacman -S gcc base-devel cmake python git automake autoconf mingw-w64-x86_64-arm-none-eabi-gcc p7zip zlib-devel
    • export PATH=$PATH:/mingw64/bin
    • echo export PATH='$'PATH:/mingw64/bin >> ~/.bashrc
    • python3 -m ensurepip --upgrade
  4. Download libpng and install it. Decompress it to a folder, and then open MSYS2 in that source folder and run:
    • ./configure --prefix=/usr
    • make check
    • make install
  5. Once that process has finished, continue to Further Setup Instructions

Further Setup Instructions (All Platforms) (Continued from Individual Sections)

  1. In Terminal/WSL, run the following commands:
    • mkdir -p ~/git && cd ~/git
    • git clone --recursive https://github.com/BluRosie/hg-engine.git
  2. Continue to Build Instructions

Setup Instructions (Docker)

If you are using Docker, there is no need for complicated setup or anything. You just have to clone the git repository:

  • mkdir -p ~/git && cd ~/git
  • git clone --recursive https://github.com/BluRosie/hg-engine.git
  • cd 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.

Build Instructions (All Platforms) (Continued from Further Setup Instructions)

  1. Get your ROM, rename it to rom.nds and place it in ~/git/hg-engine.
    • [Windows] You can easily find where this is on MSYS2 or WSL by running the command explorer.exe . from the WSL terminal. This will open the File Explorer to the folder where hg-engine is located.
      • For WSL this will likely be in the Linux drive that has newly been appended to the bottom of your files. From there, it will likely be at Linux\Ubuntu\home\[USERNAME]\git\hg-engine.
      • For MSYS2 this will likely be in the C:\msys64\home\[USERNAME]\git\hg-engine directory.
  2. 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.
    • make is 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 from nproc--so my make command, with nproc giving me 8, is typically make -j8.
    • If you are a macOS user who is on arm64 (an Apple M Processor), you may have issues running this command due to libpng linker issues caused by an expected architecture mismatch. You can get around this issue by going to Applications/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 ~/git/hg-engine
      • make tools/nitrogfx
      • make 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).
  3. After the process completes, a new file will appear in the hg-engine folder named test.nds.
    • It is important to note that this alone will not add new Pokémon 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, Pokémon stats, and more in the files in armips/data.

Credits