• 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

Lunos

Random Uruguayan User
3,114
Posts
15
Years
  • 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
    n0x3JRR.gif
    FqQ1FMh.gif
    It'd be great if you could open a Pull Request for the battle_engine branch of https://github.com/rh-hideout/pokeemerald-expansion :)!
     
    2
    Posts
    3
    Years
    • Seen Mar 9, 2023
    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:

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • 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:
    2
    Posts
    4
    Years
    • Seen Oct 29, 2023
    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
     

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • 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/showthread.php?t=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.
     

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • 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.
     
    6
    Posts
    3
    Years
    • Seen Aug 17, 2023
    I seem to be unable to teach HMs to any pokemon. I'm using the battle engine and the item expansion.
     

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • 6
    Posts
    3
    Years
    • Seen Aug 17, 2023
    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.
     

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • 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/showthread.php?t=432321
     

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • what are the steps to implement just the battle upgrades and nothing else
    That's no longer an option due to majority vote.
    The expansion is distributed as a single feature branch, because that's how most of the people used the individual feature branches when they were still around.
     
    Back
    Top