• 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
Appreciate the speedy reply. The thing that I found odd is that it only seemed to be having issues with the already existing gen 1-3 mon sprites, not the new ones. I'll keep my eye on this thread for the time being.
I just went through the entire process myself, and there are no new remarkable merge conflicts.
There's one in include/constants/hold_effects.h when merging in the item_expansion, but it's no different than the one that was already there. The user just needs to delete the 3 lines added by Git to point out a merge conflict and nothing else in both instances.
 

Lunos

Random Uruguayan User
3,114
Posts
15
Years
Thank you for the guides, they have been very helpful. However, I got problems after doing the steps for Pokémon expansion, probably because I'm new to this and didn't understand the terminology well enough.
But I wasn't really planning on using any Pokémon past Gen 3 in my hack anyway, so would it be completely fine to stop after doing the steps to merge the item expansion with the battle engine?
Yes. You're not forced to use all the 3 feature branches, you can use whichever of them you want.
 
7
Posts
3
Years
  • Age 32
  • Seen Dec 26, 2023
Here is a fix for Flame Burst if anyone is interested (it had issues in double battles).
Code:
BattleScript_MoveEffectFlameBurst::
	printstring STRINGID_BURSTINGFLAMEMUK
	waitmessage 0x40
	savetarget
	copybyte gBattlerTarget, sBATTLER
	healthbarupdate BS_TARGET
	datahpupdate BS_TARGET
	restoretarget
	tryfaintmon BS_TARGET, FALSE, NULL
	goto BattleScript_MoveEnd
 

Lunos

Random Uruguayan User
3,114
Posts
15
Years
Here is a fix for Flame Burst if anyone is interested (it had issues in double battles).
Code:
BattleScript_MoveEffectFlameBurst::
	printstring STRINGID_BURSTINGFLAMEMUK
	waitmessage 0x40
	savetarget
	copybyte gBattlerTarget, sBATTLER
	healthbarupdate BS_TARGET
	datahpupdate BS_TARGET
	restoretarget
	tryfaintmon BS_TARGET, FALSE, NULL
	goto BattleScript_MoveEnd
For future reference, this thread is really not the right place to bring up something like this.
If possible, you should open an issue in RHH's repository.
Alternatively, battle_engine related posts can be sent to the battle_engine's own thread.
 
Last edited:

Lunos

Random Uruguayan User
3,114
Posts
15
Years
I updated the Manual Merge section of the tutorial yet again.
The conflicts in include/pokemon.h and include/constants/pokemon.h are slightly different.
 

Lunos

Random Uruguayan User
3,114
Posts
15
Years
I modified the main post yet again, simplifying the solution to the conflict in src/battle_gfx_sfx_util.c.
Hopefully, I may also remove the instructions to tweak battle_debug.c when manual merging in the near future.
 

Lunos

Random Uruguayan User
3,114
Posts
15
Years
I'll be updating the manual merging section of this guide between today and tomorrow since there's a couple of things I have to address.

EDIT: Alright, that was much faster than I thought. Done.
-The conflicts in include/constants/hold_effects.h are gone, so that was removed from the BE to IE part of the tutorial.
-The changes done in src/battle_debug.c are no longer required because we handled them using preproc directives (the constants that define each branch in include/global.h).
-There's a new change that has to be done in src/battle_gfx_sfx_util.c, at least until the next master branch merge.
 
Last edited:

Lunos

Random Uruguayan User
3,114
Posts
15
Years
I updated the tutorial to manually merge branches yet again.
The conflicts at include/global.h now happen in a new include/constants/expansion_branches.h file which now hosts the 3 feature branches' constants.
 
4
Posts
2
Years
  • Age 21
  • Seen Oct 14, 2021
When deleting deoxys base stats function should I delete just the words deoxys base stats, or `static const u8 sDeoxysBaseStats[] =` or everything from <<<<<<<Head to =======
 

Lunos

Random Uruguayan User
3,114
Posts
15
Years
When deleting deoxys base stats function should I delete just the words deoxys base stats, or `static const u8 sDeoxysBaseStats[] =` or everything from <<<<<<<Head to =======
As I said in the main post, you have to delete the 3 lines Git adds to point out a merge conflict and the entire sDeoxysBaseStats function.
That means everything from "<<<<<" to ">>>>>" in the area where the sDeoxysBaseStats function is located.
 
11
Posts
5
Years
  • Age 25
  • Seen Nov 3, 2022
I had no issues whole process, but now, in the end, I type the command "git push origin battle_engine"

this is what happens:

Enumerating objects: 145553, done.
Counting objects: 100% (145553/145553), done.
Delta compression using up to 8 threads
Compressing objects: 100% (52605/52605), done.
Writing objects: 100% (145553/145553), 155.49 MiB | 2.24 MiB/s, done.
Total 145553 (delta 91600), reused 145425 (delta 91493), pack-reused 0

I reloaled git and it looks like my branch has been added, though this process never actually ended. If I try closing the compiler it says:

Processes are running in session:

WPID PID COMMAND

5920 30981 git push battle engine
8916 30983 /usr/lib/git-core/git-remot
7412 30982 /usr/lib/git-core/git remot
8648 30984 /usr/lib/git-core/git send-

Close anyway ?

Sorry for making a double post: I tested the game and well, looks fine!!! Awesome work guys!
 
Last edited by a moderator:
4
Posts
2
Years
  • Age 21
  • Seen Oct 14, 2021
Do I have to push all the branches to my repository to get everything, or can I just `git push origin` to push my whole file
 

Lunos

Random Uruguayan User
3,114
Posts
15
Years
Do I have to push all the branches to my repository to get everything, or can I just `git push origin` to push my whole file
What you normally push to your repository is the branch that you're currently sitting on.
You don't need to push all the branches to your repository. You only push the branches you want to push.
If you have your repository already set with git remote and making use of the "origin" keyword, then you just git push origin <name of the branch you're on>.
If you don't know the name of the branch you're currently on, you can use git branch. It'll be highlighted in green.
If you want to rename it, you can use git branch -m <insert new name here>.
 
17
Posts
2
Years
  • Age 23
  • Seen Dec 14, 2022
Thank you so much for this tutorial. I'm having a little trouble with manual merge, specifically as it pertains to resolving merge conflicts. So my Powershell output after attempting to add the item expansion isn't the same as yours:
Spoiler:


, and when I go to where it says there were conflicts, I cannot find any "<<<<<< HEAD" string in any of them:
Spoiler:


Not sure what to do from here
 
Last edited:

Lunos

Random Uruguayan User
3,114
Posts
15
Years
Thank you so much for this tutorial. I'm having a little trouble with manual merge, specifically as it pertains to resolving merge conflicts. So my Powershell output after attempting to add the item expansion isn't the same as yours:


, and when I go to where it says there were conflicts, I cannot find any "<<<<<< HEAD" string in any of them:


Not sure what to do from here
Looking at your pics, it seems you have a Pokeemerald folder inside your Pokeemerald_egg folder.
The conflicts, as powershell shows, are in Pokeemerald_egg. Meanwhile, the folder you opened in VSC is Pokeemerald_egg/Pokeemerald.

As for the difference in conflicts, new conflicts may have appeared since I last updated the main post.
I'll check things out and re-update it as needed tomorrow.
 
17
Posts
2
Years
  • Age 23
  • Seen Dec 14, 2022
Looking at your pics, it seems you have a Pokeemerald folder inside your Pokeemerald_egg folder.
The conflicts, as powershell shows, are in

Pokeemerald_egg

. Meanwhile, the folder you opened in VSC is

Pokeemerald_egg/Pokeemerald

.

Okay, this makes sense to me. However, the only contents of the Pokeemerald_egg folder are the agbcc folder and the pokeemerald folder--ie there is no wild_encounter.c file in pokeemerald_egg that is not also in pokeemerald:
Spoiler:

Should I be attempting the merge in the pokeemerald folder?
 

Lunos

Random Uruguayan User
3,114
Posts
15
Years
Okay, this makes sense to me. However, the only contents of the Pokeemerald_egg folder are the agbcc folder and the pokeemerald folder--ie there is no wild_encounter.c file in pokeemerald_egg that is not also in pokeemerald:

Should I be attempting the merge in the pokeemerald folder?
src/wild_encounter.c should absolutely be inside your Pokeemerald folder. If it's not, then the project was somehow cloned incorrectly.

I don't really know why did you make a folder called "Pokeemerald_egg" and cloned agbcc and a Pokeemerald project into it. Is it even RHH's repository?
Regardless, if you feel like you're stuck, I'd suggest you to start from scratch and read the main post more carefully after I finish updating it.

I'll edit this post when I'm done.


EDIT: Alright, done. I feel like some of the last changes I made were not saved properly or something.
There was an ugly file path typo that someone pointed out to me that I'm sure I already corrected, and now it was back to its prior state, but whatever.

Again, I suggest you to start from scratch now, and to read the main post veeery carefully.
It's a long process, there's a lot of text, and every single part of it is relevant to learn and understand how to handle things you'll see often when working with projects like this one.
 
Last edited:

Lunos

Random Uruguayan User
3,114
Posts
15
Years
It hasn't been even a month yet, but there's been some juicy changes in the branches, so I'll need to update the main post again.
Before that though, I'll have to wait until a few PRs that address some minor issues are merged.
For now, people should refrain from doing a manual merge, or do it on their own.

EDIT (03/10/2021): I know it's been about a week. I'm sorry, the truth is the PRs I needed were merged pretty much on the same day I wrote this post, I've just been lazy.
I promise I'll have the main post updated before today ends for sure.

EDIT2: Alright, done. Honestly, it wasn't a big deal.
There's just 2 new conflicts when merging the IE into the BE, and that's it. The rest of the process remains the same.
I get lazy way too easily, lol.
 
Last edited:
16
Posts
8
Years
  • Age 21
  • Seen Dec 25, 2023
Is this supposed to happen?
Spoiler:

Spoiler:

Thanks!
 
Back
Top