• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Pokeemerald] Battle Engine Upgrade

21
Posts
6
Years
  • Age 25
  • Seen Apr 26, 2023
Can you tell me which files did you specifically edit, so I can know what files I can import with your pokemon expansion?
 
794
Posts
10
Years
Can you tell me which files did you specifically edit, so I can know what files I can import with your pokemon expansion?

You should do it by using git and merging, I will write a tutorial on that soon. Doing it otherwise...well that'd be like gluing without glue.
 
Last edited:
9
Posts
5
Years
  • Age 27
  • Seen May 6, 2022
i can't seem to get it to work. I've copied the battle engine folder into my repository but when I compile it, it creates normal emerald without the changes. Can someone help?
 

Lunos

Random Uruguayan User
3,114
Posts
15
Years
i can't seem to get it to work. I've copied the battle engine folder into my repository but when I compile it, it creates normal emerald without the changes. Can someone help?
What exactly do you mean by that?

Normally, if you're not using Git, one way to go about compiling the battle engine v2 would be to download the battle_engine_v2 branch as a ZIP from the GitHub Repository's website, install pokeruby-tools on it like you normally would, and then compile.
 
9
Posts
5
Years
  • Age 27
  • Seen May 6, 2022
I put the file in my cygwin folder and copy both ruby tools and dizzy egg's battle engine folder into it, then I compile it. Does it compile the .zip folder? Because I didn't alter it at all.
 

Lunos

Random Uruguayan User
3,114
Posts
15
Years
I put the file in my cygwin folder and copy both ruby tools and dizzy egg's battle engine folder into it, then I compile it. Does it compile the .zip folder? Because I didn't alter it at all.
When you say "Cygwin folder", you actually mean C:\cygwin64\home\USER, right?
That is the correct path.

Once you're ready, open your preferred terminal or command prompt and use the following commands one at a time:
Code:
cd (name of the folder where the battle engine v2 is)
make -j(N)
Note: Replace "(N)" with the amount of CPU Cores you want to assign to the compiling process. The more cores you can assign, the better.

And that should be it. The process will take a while if you're compiling it for the first time.
 
Last edited:

Lunos

Random Uruguayan User
3,114
Posts
15
Years
Um, how do you put the Pokémon expansion, item expansion, and Battle Engine together to compile a ROM?
Assuming you know how to compile Pokeemerald, use the following commands in your command-line tool of choice:
1) git clone https://github.com/dizzyeggg/pokeemerald
2) cd pokeemerald
3) git pull origin battle_engine_v2
4) git pull origin pokemon_expansion
5) Fix merge conflicts as I show in this commit.
6) git pull origin item_expansion
7) Remove the defined items in include\constants\battle_config.h as I show in this commit.
8) make -jN
Note: Replace "N" with the amount of CPU Cores you want to assign to the process. The more cores, the faster it'll work.

EDIT: If you wanted to merge Egg's branches into your already created repository, instead of cloning Egg's, what you would do is:
1) cd (your pokeemerald folder)
2) git remote add (keyword) https://github.com/dizzyeggg/pokeemerald
And then you can just follow the rest of the steps I listed up there.
Example: If we decide to use "egg" as our keyword, we would use git pull egg battle_engine_v2.

EDIT: Oh yeah, I almost forgot. Wild pokémon held items and conditions for evolution methods are commented out by default, so undo those comments using your favorite text editor.
They can be found in the src\data\pokemon\base_stats.h and src\data\pokemon\evolution.h files.

Protip: You can do this pretty quickly using the Replace All function of your text editor.

|In base_stats.h|
Find: NONE, // ITEM
Replace with: Nothing

|In evolution.h|
Find: ITEM_NONE,/*
Replace with: Nothing

Find: MOVE_NONE,/*
Replace with: Nothing

Find: */
Replace with: A comma
 
Last edited:
106
Posts
11
Years
Assuming you know how to compile Pokeemerald, use the following commands in your command-line tool of choice:

8) make -jN

I keep getting "make: *** [Makefile:161: build/emerald/src/pokemon.o] Error 1"
Before the error, it's returning "src/data/pokemon/evolution.h:451: initializer element for 'gEvolutionTable' is not constant" and "initializer element for gBaseStats is not constant" (as well as 'gEvolutionTable[803]', etc etc).

I followed all the steps to a T but I don't know C but it seems to be either pokemon.o, basestats.h or evolution.h (I compared the latter two to the original and there's no difference between (what I believe is) the initializer elements.
 

Lunos

Random Uruguayan User
3,114
Posts
15
Years
I keep getting "make: *** [Makefile:161: build/emerald/src/pokemon.o] Error 1"
Before the error, it's returning "src/data/pokemon/evolution.h:451: initializer element for 'gEvolutionTable' is not constant" and "initializer element for gBaseStats is not constant" (as well as 'gEvolutionTable[803]', etc etc).

I followed all the steps to a T but I don't know C but it seems to be either pokemon.o, basestats.h or evolution.h (I compared the latter two to the original and there's no difference between (what I believe is) the initializer elements.
As the error says, your problem lies in the Line 451 of the src\data\pokemon\evolution.h file.

EDIT: The instructions weren't working correctly before, but they should be working just fine now, after the 2 commits related to the base_stats.h and evolution.h files that I sent and Egg merged.
 
Last edited:
1
Posts
5
Years
  • Age 28
  • Seen Dec 9, 2019
Has anyone compiled all 3 and made a download? I don't know how to otherwise I would do it myself.
 
2
Posts
5
Years
I just followed the instructions Lunos posted above and I was able to set it up perfectly fine. Just follow his steps.
 
23
Posts
6
Years
  • Age 32
  • Seen Nov 28, 2023
Thank you for this engine, it works really nicely! I only have one question about the wild double battles. On default configuration, all wild battles seem to be double battles. How would I go on about creating specific patches for double battles (like in BW) while retaining single battles in other areas?
 
Back
Top