• ¿Estás trabajando en tu proyecto? ¿Falta poco para que saques una beta?

    Recuerda comunicarte con MasterYuri con varios días de anticipación antes de su lanzamiento para poder armar la promoción de tu juego de la mejor forma, tanto en el catálogo como en las redes.

  • ¡Próximamente se viene el MPT de Abril-Junio 2022!

    Faltan pocos días para el comienzo de uno de los eventos más importantes para la comunidad.
    Si aún no actualizaste tu proyecto en el último trimestre, recuerda que deberás hacerlo antes del 1ero de julio para ser nominado.

[Otros] Tutorial: 03 - Battle Engine Upgrade, Emerald USA


Usuario de oro
Today I will teach you how to set up and apply a various mechanical update on your Emerald rom hack.

Download here the file that contains the Engine: Battle Engine Upgrade
This here is the source of the Engine: Battle-Engine-Upgrade

In the post above you will see what this Engine updates in your rom hack, plus other cool mechanics that it will insert.
Now yes we will start the tutorial. After downloading the file above, extract it from that same folder where the Pokémon and Items Expansion folder is. My folder is organized like this:

I decided to organize it like this because it is the best possible sequence to apply the contents in your rom hack. So the risk of bugs is reduced, in addition to the ease of configuring everything.

Now that the folder has been extracted, your rom hack.
Remember your rom hack with Pokemon and expanded items? So we'll need it and its .ini.
Move your rom(test.gba) and your .ini(test.ini) into this extracted folder.
Now what you will have to do is rename your rom from test.gba to bpee0.gba, and your .ini from test.ini to roms.ini.
It should look more or less like this:

Now go to the "src" folder and then open the config.h file with Notepad++.

I'll explain what each option there does, and how to configure it:
#define ALL_POKES: Here you will define the maximum number of Pokémon in your rom hack. If you did the same as me, then you'll change the 412 to 1201.
#define ALL_ITEMS: Here you will define the total of existing items in your rom hack. And again, if you did the same as I did, you will change the 377 to 1001.
#define NUM_OF_EVOS: Leave 5, no need to mess with it.
#define KEYSTONE: Here you will define the ID of the item that will be the Mega Bracelet. In my case, the item ID 506, which is after HM 08, will be the item that I will configure as Mega Bracelet.
#define BUILD_LEARNSETS: Leave it as "True" if you plan to update the learnset of all your Pokémon, which are basically the moves learned per level. Leave it checked as "False" if you plan to edit everything manually.
GEN4/GEN5/GEN6/GEN7_LEARNSETS: Set "True" on all or only on the generation you want to update the learnset. Remembering that this option will have no effect if the BUILD_LEARNSETS is set to "False".
EXP_CAPTURE: If set to "True", will cause your Pokémon to gain Exp after you capture wild Pokémon.
STAT_RECALC: This option will reset your Pokémon's stats every time the battle ends.
ITEM_STEAL: Abilities like Magician or Moves like Thief allow you to steal the opponent's item. If you set this option to "True", item theft will be permanent. If marked "False", the stolen item will return to its owner after the battle is over.
ITEM_SWAP: This works similarly to the one above, only in this case it affects moves/abilities that swap items for both Pokémon. If marked "True", the item exchange is permanent. If marked "False", the traded item will return to its owner after the battle is over.
MAX_LEVEL: This option does not expand the maximum level, it is just to say what the current maximum level of your rom hack is. Perhaps this option appeared here if the level expansion had already been applied to the rom in some other way. Again, don't change the 100. In the next tutorial you will be able to expand the maximum level of Pokémon up to 255.
MAX_EVS: Set here the maximum Ev's that each of your Pokémon can get. There is practically no limit, but I think the most "logical" value to put here would be 1530, because then you could put 255 in all 6 stats. I myself opted for the value 630, so I can put 252 in two stats and there will still be 126 left to put in others. I think it's more balanced that way.
EXP_DIVIDE: If set to "True", 50% of the Exp of the battle will be divided among all team members, 100% of the Exp for those who participated in the battle. But be aware that it is necessary to have the Exp Share on the exchange for this effect to be active.
GENVI_EXPSHARE: Same as above, 50% is nerfed to 25%, and 100% is nerfed to 50%. I recommend deactivating one with "False" and activating the other with "True" because if both functions are with "True" I believe that this may bug something.
EXPSHARE_FLAG: To activate/deactivate Exp All it is necessary to use some flag, and this is where you will put this flag. Soon I will create a tutorial explaining how to assimilate an activation/deactivation script directly from Exp Share. For the laziest, you can change the "0" to the "8C0" flag. Thus, the Exp All system will be semi-active, leaving only the Exp Share in the bag for your entire team to start receiving Exp.
DISABLED_EXP_FLAG: With this flag here you can completely disable the Exp gain. For example, if in the script you set the setflag to 0xFLAG, the Exp gain will be disabled. And if in the same script, in another function you put the clearflag 0xFLAG the Exp gain will be restored.
DISABLED_EVS_FLAG: Here you will set a flag to enable/disable Ev's gain. It works identical to the function above.
DOUBLE_WILD_BATTLES: If set to "True", will enable double battles. If you set it to "True", you will have to perform an additional edit, it's quite simple. Go to the "src" folder and then locate and open the "double_wild_battles.c" file in Notepad++. Now go to line 19 and change the "70" to the desired value. This value will define the chance of spawning Double Battles. The higher this number (maximum is 255), the greater the chances of wild encounter. After changing the value, just press CTRL + S to save the change.
DOUBLE_WILD_TILES: I didn't quite understand this function, so better not change the existing value there.
EXPANDED_POKEBALLS: If set to "True", it will enable Pokémon expansion. It just inserts the effects of each new Pokéball. The new Pokéball's themselves will only be inserted in the next content of the next tutorial. So if you want your hack rom to have all pokemon, mark this function with "True".
INVERSE_FLAG: Set a flag here to enable/disable the inverse battle system. This system will reverse the effectiveness of typings during battle. For example, in a battle with this system active, your Fire-type strike will be able to deal non-super effective damage to Pokemon Ice or Grass, for example. And if any Grass moves are aimed at your Fire Pokémon, it will be super effective. This is a good mechanic for trolling and catching a lot of people off guard.
FISHING_FLAG: Set a flag here to make the game understand that you are fishing. This system is useful for some ball's that need it to increase the chance of capture, but you can use it for other purposes, use your imagination.
CANT_CATCH_FLAG: Set a flag here that will allow you to block/unblock the capture of Pokémon. I don't think it needs further explanation, it's self explanatory.
ALLOW_LOSE_FLAG: Set a flag here where when it is active it will allow you to continue a battle even if you lost it. This mechanic has a very specific use, which is very useful if used correctly.
FORCE_SET_FLAG: Set a flag here to force the "Set" function, where it will not show a Pokémon switching question during battles. I believe many are familiar with this function.
NO_OF_SLIDING_MSG_TRAINERS: This is a really cool mechanic in the Engine, where it allows you to customize phrases during battle. For now I will not explain how to configure this, I will create a tutorial where I will teach you how to do it. What you should know at the moment is that the number "10" that comes up corresponds to how many trainers it will be possible to configure these messages. I have no idea what the limit is, but when it comes to trainers I THINK the maximum value is 999. Just in case I set 255 in my rom hack, I won't need more than that and I doubt very much that I will use 30% of that number.
SCHOOLING_LEVEL: Here you will define the level from which Wishiwashi's Schooling ability will allow it to change forms. By default it comes at level 20, which means it can start changing shape at level 20.

//form indexes: In this part here you will define the index number where each of your Pokémon is. For example:

#define POKE_CHERRIM - xxx Cherrim Index Number.

#define POKE_CHERRIM_SUNSHINE - xxx Cherrim he was Sunshine Index Number.

I don't think I have much to explain in this part, the example above exemplifies it well.

The configuration at the bottom is not necessary to edit because there it defines the place where the icon will be in
the HP Box of Mega Evolution, Primal Form and Wish Evolution.

Now that you've configured everything just press CTRL + S on the config.h file and then just close it.

Now go to the scripts folder and then open the "" file in Notepad++.

When you get there, you'll see something like this:
OFFSET_TO_PUT = 0xF00000

All options will be marked with "False", change to "True" in all of them.

In the "OFFSET_TO_PUT " part, just change the existing offset there for an offset with free space in your rom hack. In my case, I will use the E92700 offset. Then just replace the F00000 with your offset with free space. Mine looked like this: OFFSET_TO_PUT = 0xE92700
Now just press CTRL + S to save and then you can close this file.

Now download the following file: Quick Command - Engine

After downloading it, just move it into the folder extracted from the Engine. So:

Now, with everything done, just double-click the Quick Command and wait a few seconds for the compilation to finish. Wait as it will take a while.
At the end, a new rom and .ini will be generated with the Engine applied. Just remembering that this new rom has the Pokémon Expansion, Item Expansion and now has the Engine applied.

And it still has the new test.ini compatible with all the edits made to the rom so far.

Now just open the rom on the PGE and check all the new moves, abilities, etc.
Also be sure to check out the other mechanics added in your rom hack.
Soon I will bring more tutorials regarding the contents of the Engine for you to use and abuse.

That's it for now, see you later.