BluRosie/hg-engine
Acerca de
Motor completo de HeartGold
Otros proyectosWhat you can do
- Dex Expansion (through Gen 6 almost entirely implemented)
- Ability Expansion up to 512 (through Gen 6 almost entirely implemented)
- Move Expansion with future generation moves
- Item Expansion with future generation items
Crecimiento de estrellas medido
- in 24h
- +2
- in 7 days
- +3
- in 15 days
- +6
- in 1 month
- Recopilando historial
Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.
README.md
Originalhg-engine
About
hg-engine is an engine overhaul for English Pokémon HeartGold with a focus on bringing battles up to par with recent mainline Pokémon games and their mechanics.
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
- hg-engine
- About
- Table of Contents
- Features
- Quick Start (Docker)
- Setup Instructions (Linux with apt)
- Setup Instructions (Linux with apk)
- Setup Instructions (Linux with dnf or yum)
- Setup Instructions (Linux with pacman)
- Setup Instructions (macOS)
- Setup Instructions (Windows on WSL)
- Setup Instructions (Windows on MSYS2)
- Further Setup Instructions (All Platforms) (Continued from Individual Sections)
- Build Instructions (All Platforms) (Continued from Further Setup Instructions)
- Build Instructions (Docker)
- Updating Your Repository
- Credits
Features
- Dex Expansion (through Gen 6 almost entirely implemented)
- Ability Expansion up to 512 (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.
Quick Start (Docker)
The Docker image contains the entire toolchain, so with Docker you can skip all of the Setup Instructions below, for any platform, granted you run Docker on the Linux kernel. (macOS, Linux, WSL)
- Install Docker Desktop (macOS, Windows) or Docker Engine (Linux).
- Clone a copy of
hg-engineby following Further Setup Instructions including submodules. - Put your US HeartGold dump in the
hg-enginefolder asrom.nds. Step 1 of Build Instructions shows how to check that it is a correct dump. - From the
hg-enginefolder, run:
docker build --tag hg-engine .once, or whenever theDockerfileis changed.sh docker-makerom.cmd(on Windows:docker-makerom.cmd) to buildtest.nds.
See Build Instructions (Docker) for more. On macOS, Linux and WSL, Docker builds in its own volume and only copies test.nds back, so it can be used next to a native setup in the same checkout. From cmd on Windows it builds in the checkout itself, so don't mix it with a native setup there.
Setup Instructions (Linux with apt)
- In a Terminal window, run the following command:
sudo apt-get install libpng-dev build-essential cmake python3-pip python3-venv git gcc-arm-none-eabi pkg-config pipxcurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shto install rustup.
- Continue to Further Setup Instructions
Setup Instructions (Linux with apk)
- In a Terminal window, run the following command:
apk add libpng-dev build-base cmake python3 git- Grab your Alpine Linux version using the command
grep PRETTY_NAME /etc/os-release. I getPRETTY_NAME='Alpine Linux v3.14', so my version isv3.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]/communitycurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shto install rustup.
- Continue to Further Setup Instructions
Setup Instructions (Linux with dnf or yum)
- In a Terminal window, run the following command (replace
dnfwithyumif applicable):sudo dnf install libpng-devel arm-none-eabi-gcc-cs arm-none-eabi-newlib.noarch cmake python3 git makecurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shto install rustup.
- Continue to Further Setup Instructions
Setup Instructions (Linux with pacman)
- In a Terminal window, run the following command:
sudo pacman -S libpng cmake python-pip python git arm-none-eabi-gcc arm-none-eabi-newlib pkg-config base-devel python-pipxcurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shto install rustup.
- Continue to Further Setup Instructions
Setup Instructions (macOS)
- Follow Further Setup Instructions to pull a local copy of
hg-engine.
Manually
All actions are expected to happen from the repository root.
- Install Homebrew if you don't have it yet. Its installer also installs the Command Line Tools.
- Run
brew bundleto install the required packages from the Brewfile. The Arm toolchain (gcc-arm-embedded) asks for your macOS password due to needing root permissions. - Run
git submodule update --init --recursiveto fetch the git submodules. python3 --versionmust show 3.11 to 3.14. If it doesn't, runecho 'export PATH="$(brew --prefix [email protected])/libexec/bin:$PATH"' >> ~/.zprofileand open a new Terminal window.echo "4fcded0e2713dc03929845de631d0932ea2b5a37 rom.nds" | shasum --algorithm 1 --checkto check yourrom.nds, once you have put it in place. It should printrom.nds: OK.
From script
[!WARNING]
Always inspect shell scripts before running them.
In Terminal, from the hg-engine folder, run ./scripts/setup-macos.sh. It installs everything listed in the Brewfile, fetches the git submodules and checks your rom.nds if it is already there. It can be run again, for example after pulling updates. If macOS asks to install the Command Line Tools when you first run git, accept and run the command again afterwards.
After installing manually or via script, continue to Build Instructions
Setup Instructions (Windows on WSL)
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 at Microsoft Support: Enable Virtualization on Windows.
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 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 cmake python3 python3-pip python3-venv gcc-arm-none-eabi pkg-config pipx- You will be asked to confirm the installation, so press "y" followed by Enter to do so.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shto install rustup.
Once the last process has finished, continue to Further Setup Instructions
Setup Instructions (Windows on MSYS2)
- 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 mingw-w64-x86_64-arm-none-eabi-gcc p7zip zlib-devel mingw-w64-x86_64-rust pipxexport PATH=$PATH:/mingw64/binecho export PATH='$'PATH:/mingw64/bin >> ~/.bashrcpython3 -m ensurepip --upgrade
- 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
Further Setup Instructions (All Platforms) (Continued from Individual Sections)
You now need to get a local copy of the hg-engine source code. Choose one of the options below.
Option A: Continue with a fork (RECOMMENDED)
This approach provides a smoother long-term experience. It allows you to store your code changes on GitHub in case of computer issues as well as providing a way for you to get the latest development changes from upstream. This approach requires a little bit more reading but is
Create a GitHub account.
Read the short GitHub docs for setting up authentication if you're unfamiliar (docs).
Fork
BluRosie/hg-enginevia GitHub (docs).Run the following commands in Terminal/WSL, replacing
[YOUR-USERNAME]with your GitHub username:mkdir -p ~/git && cd ~/git git clone --recursive https://github.com/[YOUR-USERNAME]/hg-engine.git cd hg-engineAdd
BluRosie/hg-engineas anupstreamsource so you can pull changesgit remote add upstream https://github.com/BluRosie/hg-engine.gitContinue to Build Instructions
Option B: Continue without a fork (NOT recommended)
This approach is the fastest way to get working with hg-engine and does not require a GitHub account.
This is generally not recommended because you can easily lose your progress if WSL has issues, and you will
have a harder time keeping up with repository changes.
- Run the following commands in Terminal/WSL:
mkdir -p ~/git && cd ~/git
git clone --recursive https://github.com/BluRosie/hg-engine.git
cd hg-engine
- Continue to Build Instructions
Build Instructions (All Platforms) (Continued from Further Setup Instructions)
- 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-enginedirectory.
- 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
- Check that your ROM is a clean, untrimmed US HeartGold ROM. Its SHA-1 should be
4fcded0e2713dc03929845de631d0932ea2b5a37. From thehg-enginefolder, run the command for your platform; it should printrom.nds: OK.- Linux/WSL/MSYS2:
echo "4fcded0e2713dc03929845de631d0932ea2b5a37 rom.nds" | sha1sum --check - macOS:
echo "4fcded0e2713dc03929845de631d0932ea2b5a37 rom.nds" | shasum --algorithm 1 --check
- Linux/WSL/MSYS2:
- [Windows] You can easily find where this is on MSYS2 or WSL by running the command
- 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 M 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 ~/git/hg-enginemake tools/nitrogfxmake tools/ENCODE_IMGmake tools/btx
- 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 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
data/(for exampledata/Trainers.c,data/Species.c,data/Moves.canddata/Encounters.c).
Build Instructions (Docker)
Docker handles 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 --tag hg-engine .
To build, you can then run a simple shell script to build the test.nds:
sh docker-makerom.cmd (on Windows: docker-makerom.cmd)
This script is written in such a way that it works on every platform (including from cmd on Windows).
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.
Updating Your Repository
Normal Clone
If you cloned the repository without forking, follow these steps:
- Change to your local repository:
cd ~/git/hg-engine
- Fetch the latest changes
git fetch origin
- Pull the latest changes from the main repository. Note: without a fork, your
pullmay fail due to uncommitted changes.git pull origin main
Fork
If you cloned your own fork and added an upstream remote, follow these steps:
- Change to your local repository:
cd ~/git/hg-engine
- Fetch the latest changes from the main repository:
git fetch upstream
- Merge
upstream/maininto your current branch:git merge upstream/main
If the CLI indicates merge conflicts, check this article for how to navigate them.
Credits
- CREDITS.md.
- Bubble (Base Mega Code)
- Skeli (FR template)
- PokeDiamond decompilation projects (nitrogfx, msgenc)
- Mikelan98, Nomura (ARM9 Expansion Subroutine )
- Rafael Vuijk (ndstool)
- Aetias (dsrom)
- Come swing by the Kingdom of DS Hacking or DS Modding Community Discord servers for any help with this!
Explorar proyectos relacionados
Cargando…