• 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] About the basics of Git and starting a project with the Pokeemerald-expansion

Lunos

Random Uruguayan User
3,114
Posts
15
Years
So, you have our environment set up and ready to go (WSL or MSys2) and you know the basics of building a ROM in Pokeemerald.
What should you do now? Well, you can either use a clean copy of Pokeemerald as is, or you can use a community-made project like the Pokeemerald-expansion.

Today, I'll teach you all:
  • How to start a project using the Pokeemerald-expansion
  • About the basics of Git
  • About hosting your projects online

Let's start with an introduction of sorts.

What is the Pokeemerald-expansion?

The Pokeemerald-expansion is a project created using Pokeemerald, which focuses on updating many of Pokémon Emerald's core aspects to newer standards.
It was originally created by DizzyEgg and at some point, it was split into 3 Git branches (I'll talk about "branches" later), and recently, it was all merged back into a single branch.
For more information on what aspects of the game it updates, I suggest reading its readme.

Now you're ready. Let's get started.

How to start a project using the Pokeemerald-expansion?

Well, this is far easier than you might think.
The mere action of cloning the project using git clone https://github.com/rh-hideout/pokeemerald-expansion will give you a working copy of the project's Master branch ready to use.
After cloning the project and installing agbcc like you normally would when you clone a project based on Pret's GBA decomps, you're free to do whatever you want.

There's a small choice you can make and it wouldn't be fair not to talk about it.
You see, currently, the project has 2 big branches; Master which is the default branch, and Upcoming.
The difference between these is that Master acts as a Stable branch of sorts, while Upcoming acts as a Development branch.
What does this mean? That Upcoming gets every single new feature and piece of code submitted to the project first and foremost.
Only when it has all been thoroughly tested, the code is then merged into the Master branch.
Many open source projects have a Stable and a Development branch, the Master and the Upcoming branches of this project are kind of like those.

You can choose between sticking to the Master branch, or jumping to the Upcoming branch by typing git checkout upcoming if you want to get every single change done to the project by the time you cloned the project.

About the basics of Git

Spoiler:


About hosting your projects online

Spoiler:


And with this, I conclude the tutorial.
If you have any questions related to the decompilation projects created by Pret, feel free to join their Discord server (invitation linked in your project's README).

A copy of this tutorial will be kept as a Gist in my GitHub account.
If I have to update this tutorial in the future, the gist will be updated as well.
https://gist.github.com/LOuroboros/c592c047ee8e8babf8a7b32713f982ad

Original tutorial (outdated, only posted for archival purposes):
https://gist.github.com/LOuroboros/a6865d9ad10845085b1729faabb6dd88
 
Last edited:
11
Posts
4
Years
  • Age 32
  • Seen Jul 24, 2021
Thanks a lot! This tutorial really helpme. I can finally doit rigth

Spoiler:
 
10
Posts
5
Years
Thanks a lot for the tutorial. I have only one problem that I don't know how to fix since I'm new. I can't finish to build the ROM because of this. It's already the second time that this happens to me and it stays like this for a long time, like 2 hours, resulting in me not being able to build the ROM. I was wandering if this was normal or, if I made something wrong, how to fix this😅. Thank you again for this amazing tutorial.
Here's what I'm talking about:
Spoiler:

cd build/emerald && sed "s#tools/#../../tools/#g" ../../ld_script.txt > ld_script.ld
 

Lunos

Random Uruguayan User
3,114
Posts
15
Years
Thanks a lot for the tutorial. I have only one problem that I don't know how to fix since I'm new. I can't finish to build the ROM because of this. It's already the second time that this happens to me and it stays like this for a long time, like 2 hours, resulting in me not being able to build the ROM. I was wandering if this was normal or, if I made something wrong, how to fix this😅. Thank you again for this amazing tutorial.
Here's what I'm talking about:
Spoiler:

cd build/emerald && sed "s#tools/#../../tools/#g" ../../ld_script.txt > ld_script.ld
That's... not really an error? Not by itself anyway.
Could you please post a screencap of your terminal/shell, or be more specific about the error?
 

Lunos

Random Uruguayan User
3,114
Posts
15
Years
Ok, thanks for your help. I don't know why, but everytime I get to that part it stops. I waited all day but nothing happened. Guess I'll try again??????. Thanks again!
Try doing a few left clicks on the window or its title bar. Sometimes the terminal/shell may look inactive, but it's actually working normally without updating the text log in the window.
I don't know why is that, but it has happened to me a few times.
 
10
Posts
5
Years
Try doing a few left clicks on the window or its title bar. Sometimes the terminal/shell may look inactive, but it's actually working normally without updating the text log in the window.
I don't know why is that, but it has happened to me a few times.

Ok, I'll try. Thanks for your patience.
 
180
Posts
6
Years
  • Age 20
  • Seen Apr 15, 2024
So, i've made some changes to my project, but when I make the "git push ORIGIN master" thing, it says everything is up-to-date, but it isn't. How do I commit my changes?
 

Lunos

Random Uruguayan User
3,114
Posts
15
Years
So, i've made some changes to my project, but when I make the "git push ORIGIN master" thing, it says everything is up-to-date, but it isn't. How do I commit my changes?
You haven't provided enough information so it's hard for me to help you, but I encourage you to read the 3rd section of the main post again.

If you tried to make changes to files, and then git push just like that, you're doing it wrong.
 
180
Posts
6
Years
  • Age 20
  • Seen Apr 15, 2024
You haven't provided enough information so it's hard for me to help you, but I encourage you to read the 3rd section of the main post again.

If you tried to make changes to files, and then git push just like that, you're doing it wrong.
Yes, I read it, and I have made a lot of changes, in graphics, h and c files, that kind of stuff. Then I saved them, I came to here for seeing how to commit my changes, and then I did the git push thing.
But, how do I update my repository then? I tried the git push thing, but it does nothing, I tried with a new branch, but it doesn't work (obviously), so, what do I have to do for updating it?
 
Last edited:

Lunos

Random Uruguayan User
3,114
Posts
15
Years
Yes, I read it, and I have made a lot of changes, in graphics, h and c files, that kind of stuff. Then I saved them, I came to here for seeing how to commit my changes, and then I did the git push thing.
But, how do I update my repository then? I tried the git push thing, but it does nothing, I tried with a new branch, but it doesn't work (obviously), so, what do I have to do for updating it?
If you made a commit properly and then tried to push it, make sure you're pushing it to the same branch where you're on.
You can check your current branch by using git branch.
You can't push commits to a branch called master if you're not in a branch with the same name.
 
8
Posts
7
Years
  • Age 30
  • Seen Nov 12, 2022
Hey I've been working with Dizzy's works for a bit now and it all went fluently until now, I just added a couple of moves in LEVEL_UP_LEARNSETS and edited a few types and abilities in BASE_STATS; but now i get these errors;
What did I do wrong?

Spoiler:


What can I do to fix this?
 
794
Posts
10
Years
Hey I've been working with Dizzy's works for a bit now and it all went fluently until now, I just added a couple of moves in LEVEL_UP_LEARNSETS and edited a few types and abilities in BASE_STATS; but now i get these errors;
What did I do wrong?

Spoiler:


What can I do to fix this?

Hard to say from the log alone, could you copy the contents of the mentioned files to pastebin and post them here?
 
8
Posts
7
Years
  • Age 30
  • Seen Nov 12, 2022
It just accidentally deleted one "}" when editing an ability so it seems but didn't find it immediately , very frustrating!
But now I managed to fix it :p !
But thanks anyway, and thank you for your hard work and help, Dizzy! (and Lunos.. and everyone else involved with the disassembly projects).
It really is much more convenient to work with than binary hacking.
 

ShinyVolcanion_

VibeCheck
4
Posts
6
Years
  • Age 27
  • Seen Feb 11, 2021
If i wanted to add another pokeemerald thing like follow me (by
ghoulslash)what would i do and where/when would i add it
 
146
Posts
16
Years
  • Age 25
  • Seen yesterday
I followed this tutorial as closely as possible, but I keep getting a build error. I've tried and retried about 3 times now, but it still doesn't work, it just stops after the last line in this quote.

arm-none-eabi-as -mcpu=arm7tdmi --defsym MODERN=0 -o build/emerald/src/mail.o build/emerald/src/mail.s
tools/gbagfx/gbagfx.exe graphics/unknown/unknown_58E82C.pal graphics/unknown/unknown_58E82C.gbapal
arm-none-eabi-as -mcpu=arm7tdmi --defsym MODERN=0 -o build/emerald/src/battle_util.o build/emerald/src/battle_util.s
tools/gbagfx/gbagfx.exe graphics/interface/hold_icons.png graphics/interface/hold_icons.4bpp
make: *** [Makefile:252: build/emerald/src/pokemon.o] Error 1
make: *** Waiting for unfinished jobs....
arm-none-eabi-as -mcpu=arm7tdmi --defsym MODERN=0 -o build/emerald/src/librfu_intr.o build/emerald/src/librfu_intr.s
arm-none-eabi-as -mcpu=arm7tdmi --defsym MODERN=0 -o build/emerald/src/script_pokemon_util_80F87D8.o build/emerald/src/script_pokemon_util_80F87D8.s
arm-none-eabi-as -mcpu=arm7tdmi --defsym MODERN=0 -o build/emerald/src/battle_gfx_sfx_util.o build/emerald/src/battle_gfx_sfx_util.s

EDIT: I was able to get it to build with no issues after removing pokemon_expansion.
 
Last edited:
Back
Top