• 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
  • what is the .4bpp file does it need to be changed when i change the trainer sprites and do i use the green like background that are used the non binary way or can I use a plain white background
    You already asked this to me via PM and I answered you.
    Besides, your doubts are not related in any way to the Battle Engine Upgrade of DizzyEgg which this thread is about.

    I will still leave my reply here, in case anyone else is curious about the matter, but do try to stay On Topic.
    .4bpp files are generated automatically when you build a ROM. You can't nor have to modify them at all.
    Sprites follow the exact same regulations as in binary hacking, as it is related to how the GBA processes things I believe. Sprites must have a maximum of 16 colors and the first color of the palette, which will be transparent inside the game, must be a color that is not present in the sprite.
    More likely than not, your sprite already uses the white color, so you really should avoid using a white background on it.
     

    Jessler

    PidgeyFox
    33
    Posts
    6
    Years
  • So, first off, this is incredible. But, I did have a question about mega evolutions. Is there a way to enable trainers to use them? I can't figure that out. Thanks!
     

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • So, first off, this is incredible. But, I did have a question about mega evolutions. Is there a way to enable trainers to use them? I can't figure that out. Thanks!
    Yes, there is.

    First, you have to make sure to configure their trainerbattle correctly.
    In their entry at src/data/trainers.h, give them the F_TRAINER_PARTY_HELD_ITEM party flag, and set their trainerbattle type to ItemCustomMoves, or any other that lets you configure a trainer's Pokémon's held item.
    Then make sure to set that same trainerbattle type in the trainer's party entry at src/data/trainer_parties.h, and give them a Pokémon that can mega evolve (that is, a Pokémon that they can evolve into via the EVO_MEGA_EVOLUTION evolution method). Said Pokémon must be holding their mega stone too.

    Once you've done that, just build a ROM and test it out.
     
    Last edited:

    Jessler

    PidgeyFox
    33
    Posts
    6
    Years
  • Yes, there is.

    First, you have to make sure to configure their trainerbattle correctly.
    In their entry at src/data/trainers.h, give them the F_TRAINER_PARTY_HELD_ITEM party flag, and set their trainerbattle type to ItemCustomMoves, or any other that lets you configure a trainer's Pokémon's held item.
    Then make sure to set that same trainerbattle type in the trainer's party entry at src/data/trainer_parties.h, and give them a Pokémon that can mega evolve (that is, a Pokémon that they can evolve into via the EVO_MEGA_EVOLUTION evolution method). Said Pokémon must be holding their mega stone too.

    Once you've done that, just build a ROM and test it out.

    Thanks so much! I really appreciate it!
     

    thiaguinhohp

    Hacking newbie
    49
    Posts
    10
    Years
  • This is completely not begginer friendly... where the patches? it's way easier. In this way we have to know git, know how to use python, etc. I downloaded devkitpro, downloaded this engine to a folder and ran cmd.exe in that folder. I tried to run this "python scripts//make.py" but no scripts folder is there. What to do? I'm in windows 8.1

    Better yet... where are the patches for that?
     
    760
    Posts
    15
    Years
    • Seen yesterday
    @thiaguinhohp

    This resource is for the decomps. You don't edit already compiled code with a patch, you edit it from the source code.

    Even in binary hacking, static patches are not the way to go. Patches work very limiting and don't allow for dynamic changes after using it (How convenient they may sound to beginners).
     

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • This is completely not begginer friendly... where the patches? it's way easier. In this way we have to know git, know how to use python, etc. I downloaded devkitpro, downloaded this engine to a folder and ran cmd.exe in that folder. I tried to run this "python scripts//make.py" but no scripts folder is there. What to do? I'm in windows 8.1

    Better yet... where are the patches for that?
    You seem to be heavily confused.
    First things first, we don't use neither Python nor the Windows Command Prompt here, not at all.
    The decomps do rely on certain tools to do their work, but they're not something you have to worry about yourself. Beyond the setup, they're used automatically without you having to do anything particularly hard.

    Now secondly, "Where the patches" you ask? In the trash bin where they belong.
    Patches are user friendly (in their insertion and that alone, all things being said), but at a cost.
    They can easily overwrite data in your ROM, they often contain bugs and they don't even provide a friendly way to view the changes that they introduce to a ROM meaning that the average person would effectively not know what is a patch doing to their ROM.

    And thirdly, I'm not sure if you even took a look at the files before you tried to do whatever you tried to do, but there isn't a make.py file here at all, because again, this project does not make use of Python. None of Pret's Decompilation Projects or forks of them like this Battle Engine Upgrade do, in fact, which means that you'd have to go out of your way to use Python with them.
    Without any files with an extension that Python can read in the project, you can naturally not use Python, so using python scripts//make.py was never going to do anything at all.

    You don't seem like the type who wants to actually put in effort into their project, but if you end up considering it, I wrote some tutorials to both; build a clean ROM using the Decompilation Projects of Pret and to merge Egg's feature branches (the Battle Engine posted in this thread, his item_expansion and his pokemon_expansion).

    I will link them right here, you can do whatever.
    Building a clean ROM with the decomps (not necessarily required, but it serves to understand the basic procedure of building a ROM with the decomps):
    https://www.pokecommunity.com/showthread.php?t=432351 - WSL (If you're using Win10, this is the superior choice.)
    https://www.pokecommunity.com/showthread.php?t=425246 - MSys2 (For Windows 8.1 or Windows 7 users specifically.)
    https://www.pokecommunity.com/showthread.php?t=426921 - Cygwin (For Windows 8.1 or Windows 7 users specifically. Slightly worse than MSys2.)

    How to merge DizzyEgg's works:
    https://www.pokecommunity.com/showthread.php?t=432321

    If you prefer to stick to binary hacking and all its flaws, then this is simply not the right thread for you.
    I assume you were talking about the old and no longer supported battle engine upgrade. Since its thread is closed, if you have any questions about using it nowadays, you'll have to open a new thread in the ROM Hacking Help Section of the forum.
     
    17
    Posts
    3
    Years
    • Seen Feb 19, 2024
    Hello. How would I edit Type Effectiveness? Noticed Battle Main drastically is different compared to vanilla emerald. I'm not a fan of Fairy types, and already changed many move and mon types to compensate, so I just need to tweak the Type Effectiveness before I started importing new mons
     
    49
    Posts
    5
    Years
    • Seen Dec 27, 2023
    Are you using the old branch from DizzyEgg or the new maintained one from RomHackingHideout? If you are using the new one, theres a good chance they added a toggle for fairy types
     

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • Hello. How would I edit Type Effectiveness? Noticed Battle Main drastically is different compared to vanilla emerald. I'm not a fan of Fairy types, and already changed many move and mon types to compensate, so I just need to tweak the Type Effectiveness before I started importing new mons
    In this battle engine, the Type Effectiveness table is handled by a table labeled sTypeEffectivenessTable in src/battle_util.c.
    Are you using the old branch from DizzyEgg or the new maintained one from RomHackingHideout? If you are using the new one, theres a good chance they added a toggle for fairy types
    That's not a thing, no. The Fairy Type is a feature of the battle_engine and it's not toggleable, as it strives to reach the standard of the Gen. 7 Pokémon Games.
    As is, if you want to disable it you'll have to do it manually, either by removing it or by locking it behind a defined constant.

    EDIT: It is important to note that certain abilities make specific use of the Fairy Type too, more specifically Pixilate, Fairy Aura and Natural Gift.
    The Fairy Type also has an entry in the table that handles the effect of type boosting items for the Pixie Plate.
     
    Last edited:
    6
    Posts
    7
    Years
    • Seen Dec 23, 2020
    This is gonna be a rather specific question. I'm using this expansion as reference, and I was looking at the implementation of Roost. Why does it reserve an array of 3 elements to store the user's types? The first two positions make sense, but so far, I've only seen the third position be used to store TYPE_FLYING when the user is pure flying type, and it is stored on the first and second position too. When restoring the flying type, it only uses the first two positions.
    Here is the definition of the array, in line 518.
    Here is the only instance of use I've found, on line 4363.
     
    39
    Posts
    3
    Years
    • Seen Aug 23, 2023
    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
     
    Back
    Top