Lunos

Random Uruguayan User

Male
Montevideo (Uruguay)
Seen 19 Hours Ago
Posted 21 Hours Ago
2,923 posts
13.9 Years
I've updated the main post yet again to address the new conflicts.
I also posted a copy of the main post in GitHub Gist. That way any changes to the contents of the post can be checked at a glance, using the Revisions tab,
https://gist.github.com/LOuroboros/a6865d9ad10845085b1729faabb6dd88
EDIT: Naturally, I'll be updating it whenever I update the main post.

Lunos

Random Uruguayan User

Male
Montevideo (Uruguay)
Seen 19 Hours Ago
Posted 21 Hours Ago
2,923 posts
13.9 Years
Hi, i was trying to start the second part of the tutorial but i ran into a problem:
What should i do here?
UNIX based systems are case sensitive. Are you sure that the repository you wanna push to is linked to a remote called "ORIGIN" and not "origin"?
You can check this using
git remote -v
.

Lunos

Random Uruguayan User

Male
Montevideo (Uruguay)
Seen 19 Hours Ago
Posted 21 Hours Ago
2,923 posts
13.9 Years

Well I used remote -v, so what do u think I should do now? I know i'm meant to see a popup for my username and token but it never shows up

Thx for replying btw
git push origin battle_engine
, assuming that the branch you're currently on is actually called "battle_engine".
I explain all this in the main post of this very thread.

Vennovia

Male
United Kingdom
Seen June 21st, 2022
Posted June 4th, 2022
5 posts
4.5 Years
Hey,

So, i've followed all the steps so far but whenever i try the "make" command, i keep coming up with these errors and i'm at a bit of a loss on what to do here, was hoping you might be able to give me some pointers.



p.s I'm fairly new to all this, just a heads-up.

Thanks in advance :)

Lunos

Random Uruguayan User

Male
Montevideo (Uruguay)
Seen 19 Hours Ago
Posted 21 Hours Ago
2,923 posts
13.9 Years
Hey,

So, i've followed all the steps so far but whenever i try the "make" command, i keep coming up with these errors and i'm at a bit of a loss on what to do here, was hoping you might be able to give me some pointers.



p.s I'm fairly new to all this, just a heads-up.

Thanks in advance :)
There is no such item as a "Leeky Barb". You clearly screwed up your renames.
It's
ITEM_LEEK
and
ITEM_STICKY_BARB
.

Vennovia

Male
United Kingdom
Seen June 21st, 2022
Posted June 4th, 2022
5 posts
4.5 Years
There is no such item as a "Leeky Barb". You clearly screwed up your renames.
It's
ITEM_LEEK
and
ITEM_STICKY_BARB
.
Ah, i see, from renaming
ITEM_STICK
to
ITEM_LEEK


Oversight 101
Seen June 14th, 2022
Posted June 9th, 2022
3 posts
72 Days
Hi, I have followed the tutorial exactly a few times, and I keep coming across the same error each time when I try to build the ROM. It appears there is a merge conflict that you do not have documented in the main post. Here is the error code I keep getting:

https://imgur.com/HGC2MEQ

When I look at the event.inc file the merge conflict appears to be caused by the Kubfu evolution macro from the pokemon_expansion branch and the totem macro from the battle_engine branch. I have tried deleting the Kubfu macro while keeping the totem macro and vice versa. I have also tried keeping both adn keeping neither. This causes the error regarding the event.inc file to be fixed, but the event_scripts.o still fails to build. I assume there must be some greater issue causing the error. Regardless, here is the code for the macro file:

https://imgur.com/8O6puWn
https://imgur.com/07c6qiG

Thank you for any help. I really appreciate the tutorial.
Seen June 18th, 2022
Posted June 9th, 2022
1 posts
1.6 Years
Hi, I have followed the tutorial exactly a few times, and I keep coming across the same error each time when I try to build the ROM. It appears there is a merge conflict that you do not have documented in the main post. Here is the error code I keep getting:

https://imgur.com/HGC2MEQ

When I look at the event.inc file the merge conflict appears to be caused by the Kubfu evolution macro from the pokemon_expansion branch and the totem macro from the battle_engine branch. I have tried deleting the Kubfu macro while keeping the totem macro and vice versa. I have also tried keeping both adn keeping neither. This causes the error regarding the event.inc file to be fixed, but the event_scripts.o still fails to build. I assume there must be some greater issue causing the error. Regardless, here is the code for the macro file:

https://imgur.com/8O6puWn
https://imgur.com/07c6qiG

Thank you for any help. I really appreciate the tutorial.
It looks like the ".macro totemboost_evas2" right above the "@ Attempts to trigger a special evolution" line is losing its ".endm" on the last image you posted. Which could cause you to get an error like "Unexpected end of file". I suggest setting up a github repo as that will help other's help you.
Seen June 14th, 2022
Posted June 9th, 2022
3 posts
72 Days
Yes, I figured out that the .endm was pushed down by the addition of the Kubfu evolution macro, which was causing the totem boost to not end like you said. However, it still did not solve the error code regarding the failure to build the event_script.o file.

I will work on getting a repo set up later today. This is my first time using git, so I have had to figure it all out.

Lunos

Random Uruguayan User

Male
Montevideo (Uruguay)
Seen 19 Hours Ago
Posted 21 Hours Ago
2,923 posts
13.9 Years
Yes, I figured out that the .endm was pushed down by the addition of the Kubfu evolution macro, which was causing the totem boost to not end like you said. However, it still did not solve the error code regarding the failure to build the event_script.o file.

I will work on getting a repo set up later today. This is my first time using git, so I have had to figure it all out.
That file,
asm/macros/event.inc
, is also sensible to End of Line formats.
The file's last line must have an LF format, which you can check with text editors like Notepad++ (View -> Show Symbols -> End of Line).

Others like Sublime Text handle it automatically. In those cases you just need to delete the last line which should be an empty one, and then press enter to re-create it.
Male
Seen 2 Weeks Ago
Posted July 5th, 2022
51 posts
8.2 Years
In addition to the 'asm/macros/event.inc' merge conflict, I am also getting one for 'data/specials.inc', right at the end of the file:
<<<<<<< HEAD
def_special SetTotemBoost
=======
def_special TrySpecialOverworldEvo
>>>>>>> ade935f6cfedcc109f61251dfcf1fa423c07f91e
Also, in the first set of merge conflicts in this tutorial, another merge conflict that isn't addressed is 'src/item.c', once again at the end of the file:
Spoiler:
<<<<<<< HEAD
bool32 IsPinchBerryItemEffect(u16 holdEffect)
{
switch (holdEffect)
{
case HOLD_EFFECT_ATTACK_UP:
case HOLD_EFFECT_DEFENSE_UP:
case HOLD_EFFECT_SPEED_UP:
case HOLD_EFFECT_SP_ATTACK_UP:
case HOLD_EFFECT_SP_DEFENSE_UP:
case HOLD_EFFECT_CRITICAL_UP:
case HOLD_EFFECT_RANDOM_STAT_UP:
case HOLD_EFFECT_CUSTAP_BERRY:
case HOLD_EFFECT_MICLE_BERRY:
return TRUE;
}

return FALSE;
}

=======
>>>>>>> 720b919994170647fb0dde2a33341fad28f11eb0
u8 ItemId_GetFlingPower(u16 itemId)
{
return gItems[SanitizeItemId(itemId)].flingPower;
}

In the case of item.c, I'm assuming it's just a case of removing the three lines added by Git. For the other stuff, I'm not sure though. Started out modding this game years ago with hex editors etc. Finally trying to dive into the decomp of Emerald and not too sure how to proceed from here. Hope to see an update of this great tutorial soon.

Lunos

Random Uruguayan User

Male
Montevideo (Uruguay)
Seen 19 Hours Ago
Posted 21 Hours Ago
2,923 posts
13.9 Years
In addition to the 'asm/macros/event.inc' merge conflict, I am also getting one for 'data/specials.inc', right at the end of the file:
<<<<<<< HEAD
def_special SetTotemBoost
=======
def_special TrySpecialOverworldEvo
>>>>>>> ade935f6cfedcc109f61251dfcf1fa423c07f91e
You need to keep both macros, but separate them properly.
Grab the battle_engine's
asm/macros/event.inc
and plug in the pokemon_expansion's
TrySpecialOverworldEvo
after the end of the
SetTotemBoost
macro.
Also, in the first set of merge conflicts in this tutorial, another merge conflict that isn't addressed is 'src/item.c', once again at the end of the file:
Spoiler:
<<<<<<< HEAD
bool32 IsPinchBerryItemEffect(u16 holdEffect)
{
switch (holdEffect)
{
case HOLD_EFFECT_ATTACK_UP:
case HOLD_EFFECT_DEFENSE_UP:
case HOLD_EFFECT_SPEED_UP:
case HOLD_EFFECT_SP_ATTACK_UP:
case HOLD_EFFECT_SP_DEFENSE_UP:
case HOLD_EFFECT_CRITICAL_UP:
case HOLD_EFFECT_RANDOM_STAT_UP:
case HOLD_EFFECT_CUSTAP_BERRY:
case HOLD_EFFECT_MICLE_BERRY:
return TRUE;
}

return FALSE;
}

=======
>>>>>>> 720b919994170647fb0dde2a33341fad28f11eb0
u8 ItemId_GetFlingPower(u16 itemId)
{
return gItems[SanitizeItemId(itemId)].flingPower;
}

In the case of item.c, I'm assuming it's just a case of removing the three lines added by Git.
That conflict should no longer exist.
Thanks for bringing this up. I'll make sure to fix it up with a PR for the battle_engine and then look into updating the tutorial.
Male
Seen 2 Weeks Ago
Posted July 5th, 2022
51 posts
8.2 Years
Thank you for that, followed your instructions there. If I'm not being a pain, the error I'm receiving upon trying to build now appears to point to the 'src/battle_gfx_sfx_util.c' file from the second stage of merge conflicts. I was actually unsure what exactly to do here because your instructions were:

Spoiler:
Grab a copy from the master branch.
After that, Ctrl+F

static const struct SpritePalette sSpritePalettes_HealthBoxHealthBar

and replace that whole line with:

#if P_ENABLE_DEBUG == TRUE
const struct SpritePalette sSpritePalettes_HealthBoxHealthBar[2] =
#else
static const struct SpritePalette sSpritePalettes_HealthBoxHealthBar[2] =
#endif


The problem is, this appears to already be done in the copy from the master branch that you linked. If it helps at all, this is the error from what I can tell (I'm new to this so I hope I'm reading the whole thing right):

Spoiler:
agbcc: warnings being treated as errors
src/battle_gfx_sfx_util.c: At top level:
src/battle_gfx_sfx_util.c:606: warning: type defaults to `int' in declaration of `paletteOffset'
src/battle_gfx_sfx_util.c:606: `battlerId' undeclared here (not in a function)
src/battle_gfx_sfx_util.c:606: initializer element is not constant
src/battle_gfx_sfx_util.c:606: warning: data definition has no type or storage class
src/battle_gfx_sfx_util.c:608: syntax error before `if'
src/battle_gfx_sfx_util.c:613: warning: type defaults to `int' in declaration of `LZDecompressWram'
src/battle_gfx_sfx_util.c:613: warning: parameter names (without types) in function declaration
src/battle_gfx_sfx_util.c:613: conflicting types for `LZDecompressWram'
include/decompress.h:8: previous declaration of `LZDecompressWram'
src/battle_gfx_sfx_util.c:613: warning: data definition has no type or storage class
src/battle_gfx_sfx_util.c:614: syntax error before `0x20'
src/battle_gfx_sfx_util.c:614: warning: type defaults to `int' in declaration of `LoadPalette'
src/battle_gfx_sfx_util.c:614: conflicting types for `LoadPalette'
include/palette.h:56: previous declaration of `LoadPalette'
src/battle_gfx_sfx_util.c:614: warning: data definition has no type or storage class
src/battle_gfx_sfx_util.c:615: syntax error before `0x80'
src/battle_gfx_sfx_util.c:615: warning: type defaults to `int' in declaration of `LoadPalette'
src/battle_gfx_sfx_util.c:615: warning: data definition has no type or storage class
src/battle_gfx_sfx_util.c:620: syntax error before `->'
src/battle_gfx_sfx_util.c:620: warning: type defaults to `int' in declaration of `LZDecompressWram'
src/battle_gfx_sfx_util.c:620: warning: data definition has no type or storage class
src/battle_gfx_sfx_util.c:621: syntax error before `->'
src/battle_gfx_sfx_util.c:621: warning: type defaults to `int' in declaration of `LoadPalette'
src/battle_gfx_sfx_util.c:621: warning: data definition has no type or storage class
src/battle_gfx_sfx_util.c:628: syntax error before `+'
src/battle_gfx_sfx_util.c: In function `BattleLoadPlayerMonSpriteGfx':
src/battle_gfx_sfx_util.c:659: syntax error before `>'
src/battle_gfx_sfx_util.c: At top level:
src/battle_gfx_sfx_util.c:693: redefinition of `BattleLoadPlayerMonSpriteGfx'
src/battle_gfx_sfx_util.c:633: `BattleLoadPlayerMonSpriteGfx' previously defined here
src/battle_gfx_sfx_util.c: In function `HandleSpeciesGfxDataChange':
src/battle_gfx_sfx_util.c:932: warning: implicit declaration of function `HandleLoadSpecialPokePic_DontHandleDeoxys'
src/battle_gfx_sfx_util.c:951: syntax error before `<'
src/battle_gfx_sfx_util.c:966: syntax error before `=='
src/battle_gfx_sfx_util.c:1001: syntax error before `>'
src/battle_gfx_sfx_util.c:1020: syntax error before `else'
src/battle_gfx_sfx_util.c: At top level:
src/battle_gfx_sfx_util.c:1052: syntax error before `}'
{standard input}: Assembler messages:
{standard input}:2450: Error: symbol `BattleLoadPlayerMonSpriteGfx' is already defined
tools/agbcc/bin/agbcc <flags> -o build/emerald/src/fldeff_misc.o src/fldeff_misc.c
make: *** [Makefile:339: build/emerald/src/battle_gfx_sfx_util.o] Error 1
make: *** Waiting for unfinished jobs....