• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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

Hi, not sure if this belongs here, but currently Telepathy's effect isn't implemented and it's an easy copy-paste. Under src/battle_util.c, static u16 CalcTypeEffectivenessMultiplierInternal, adding the italicised lines:
Code:
    if (GetBattlerAbility(battlerDef) == ABILITY_WONDER_GUARD && modifier <= UQ_4_12(1.0) && gBattleMoves[move].power)
    {
        modifier = UQ_4_12(0.0);
        if (recordAbilities)
        {
            gLastUsedAbility = ABILITY_WONDER_GUARD;
            gMoveResultFlags |= MOVE_RESULT_MISSED;
            gLastLandedMoves[battlerDef] = 0;
            gBattleCommunication[MISS_TYPE] = B_MSG_AVOIDED_DMG;
            RecordAbilityBattle(battlerDef, ABILITY_WONDER_GUARD);
        }
    }
[I]    if (GetBattlerAbility(battlerDef) == ABILITY_TELEPATHY && battlerDef == BATTLE_PARTNER(battlerAtk)) {
        modifier = UQ_4_12(0.0);
        if (recordAbilities)
        {
            gLastUsedAbility = ABILITY_TELEPATHY;
            gMoveResultFlags |= MOVE_RESULT_MISSED;
            gLastLandedMoves[battlerDef] = 0;
            gBattleCommunication[6] = B_MSG_AVOIDED_DMG;
            RecordAbilityBattle(battlerDef, ABILITY_TELEPATHY);
        }[/I]
    }

Left image is before; right is after
[PokeCommunity.com] Battle Engine Upgrade
[PokeCommunity.com] Battle Engine Upgrade
It'd be great if you could open a Pull Request for the battle_engine branch of https://github.com/rh-hideout/pokeemerald-expansion :)!
 
Amazing job! Just out of curiosity, let's assume that I just want the smart AI in my ROM hack, without all the other features such as physical/special split, new moves and abilities, etc...
Can I do that? Do I just need to import the AI related files (overwriting the already existing ones)?
 
Last edited:
Amazing job! Just out of curiosity, let's assume that I just want the smart AI in my ROM hack, without all the other features such as physical/special split, new moves and abilities, etc...
Can I do that? Do I just need to import the AI related files (overwriting the already existing ones)?
No, you don't "just" import the AI related files, but yes, of course you can port the AI from the BE over to a clean Pokeemerald project.
It's all code. Just like the AI was revamped using the battle_engine as a base, it can be done in a clean copy of Pokeemerald too.
I'm sure it's gonna be one hell of a task, but it can be accomplished.

I suggest you to look up the PRs submitted to the battle_engine with "AI" in their title. More specifically, you should look at the "Files Changed" tab, starting from the oldest PR to the newest. The first PR you should check is Ghoulslash's "Overhaul AI" PR.
 
Last edited:
could someone help me make the file? i cant seem to do it on my own NOT ASKING FOR THE FILE TO BE SENT SINCE THAT IS ILLEGAL dm me please
 
could someone help me make the file? i cant seem to do it on my own NOT ASKING FOR THE FILE TO BE SENT SINCE THAT IS ILLEGAL dm me please
I wrote a tutorial about merging the different branches that were originally made by DizzyEgg.
https://www.pokecommunity.com/threads/432321

If you only and specifically want to use the battle_engine, then the only thing you'll need to do is to clone the current Pokeemerald-expansion repository, and once you're there, switch to the battle_engine branch by using git checkout origin/battle_engine && git checkout -b battle_engine.
After that, you can build a ROM following the same process you'd follow to build a regular copy of Pokeemerald.
 
i dont understand
Let me start by giving you a brief description of what the decomps are.
They're projects where the code of the different mainline GBA Pokémon games was dumped in a programming language called "Assembly" using a disassembler, then it was translated to a different programming language, one that is easier to work with that is called "C", and was then passed through the same compiler Game Freak used afterward, to verify that the code written was functionally equivalent to theirs.
As a result, the projects manage to recreate an exact matching copy of the games' ROMS.

Now, these projects make use of certain toolsets to do their work, such as Git and GNU Make.
The one I talked about before, as anyone could tell, was Git.

If you don't have an environment to build these projects set up, that'd be the first thing you'll want to do.
For that, you can check either my tutorial about this, or Pokeemerald's own INSTALL.md document.

After that, assuming that you understood what you read in either of those documents, you can come back and read my previous post again.
 
I seem to be unable to teach HMs to any pokemon. I'm using the battle engine and the item expansion.
 
Are you also using extra features, such as SBird1337's refactorization of TMs and HMs?
https://github.com/rh-hideout/pokeemerald-expansion/issues/2094
I am not. I was testing if infinite TMs/replacable HMs were implemented when i noticed that i couldn't teach HMs to anything.

Although regardless of that, TMs are currently having a bit of an Issue in the branches that has yet to be solved.
https://github.com/rh-hideout/pokeemerald-expansion/issues/2094
I saw that. That's pretty far above my understanding though, so i just figured out a workaround that should work for my project.
 
The GitHub link is broken...
Back around August 2022, the individual branches stopped being worked on and merged into a single one.
As a result, the remnants were deleted because they served no purpose besides misleading newcomers.
DizzyEgg has periods of inactivity, so he hasn't updated the main post yet to reflect that.
I suggest you go visit https://www.pokecommunity.com/threads/432321
 
Back
Top