Advertiser Content
  • 135716 views
  • 892 replies

Chacha Dinosaur

Adamant and adaptive dinosaur.

Age 24
Male
Seen March 4th, 2018
Posted September 8th, 2017
454 posts
6.1 Years
BIG ANNOUNCEMENT HERE

---------------------------------------------------------------------------------------------------------------------------------------------------

Emerald Battle Engine Upgrade




Greetings! It's been a while since JPAN's engine and the Physical/Special Split defined Fire Red hacking.
MrDollSteak's patch then became one of the most frequently used patches on Pokecommunity.
Then came Touched's Mega Evolution implementation that introduced us to C hacking, which has since been promoted by FBI.
With this in mind I present to you what I think is the next revolution in the Rom hacking scene.



Battle Features



Spoiler:
- Damage Calculator rewritten from scratch

Spoiler:
Done so in the style of Black and White and later games


- Physical, Special and Status Split

Spoiler:
Including the icons


- Fairy Type

Spoiler:
Done so using the information from here


- New Abilities

Spoiler:
All abilities from gens4-6 have been added


- Updated Abilities

Spoiler:
Abilities from gens1-3 have been updated to reflect new generations


- New Move Effects

Spoiler:
All of the new moves from Gens 4-6 are included


- New Move Animations

Spoiler:
Currently most of the new moves from Gens 4 are complete with more from further generations


- New Item Effects

Spoiler:
All item effects that have an effect in battle have been included.
In the defines folder, see the 'itemeffects.h' file to get the values they hold.
To set item effect to an item, set that value in the 'special 1/2' box in Kurapika's Gen3 Tools (I'm not sure how other item editors have named this field)


- Updated Item Effects

Spoiler:
Item effects have been updated to reflect new generations


- Optimized and Updated Type Effectiveness Calculation

Spoiler:
To facilitate adding new moves and abilities


- Triple Pokemon Types in Battle

Spoiler:
Used by Trick-or-Treat and Forest's Curse or a custom move with same effect you'd like to add


- Dual Type Moves

Spoiler:
Used by Flying Press and Freeze Dry but also allows for custom moves


- Triple Stat Change Messages

Spoiler:
Messages will now be displayed for moves and abilities that raise or lower stats to 3 or more


- Updated Critical Hit Calculation

Spoiler:
To assign a higher crit ratio to a move, tick the 0x40 byte(first unused byte in most move editors)


- Rewritten Battle Script Commands

Spoiler:
To better support New Abilities, Moves and Item Effects


- Support for Custom Battle Messages

Spoiler:
The ability to assign New Battle Messages to support new Abilities, Moves and Item Effects


- Improved Targeting

Spoiler:
There are more targeting options available for moves like Acupressure


- Improved Event Sequencing

Spoiler:
End of turn events have been adjusted to better match later generations (may not be 100% correct, please inform us if our order is wrong!)


- New Learnsets

Spoiler:
All pokemon now have their correct learnsets from Omega Ruby and Alpha Sapphire.

Compatible with PGE.


- Double Wild Battles

Spoiler:
Just like in the Black/White series it's now possible to encounter two pokemon in a wild battle. The mechanics are the same as in the original games.


- Trainer messages in battle

Spoiler:
Similarly to the newer games, trainers are now able to say something in the middle of a battle.


- Support for expanded pokemon, items and evolution tables.
Spoiler:

If you changed the evolution entries per pokemon, so that each poke can have 8 evolution or expanded pokemon/items change that line in the defines.h file
#define ALL_POKES 412 //number of all pokemon                      
#define ALL_ITEMS 377 //number of all items                       
#define NUM_OF_EVOS 5 //number of evolutions per pokemon


- In battle-form(e) changes (e.g Stance Change, Primal Reversion, Flower Gift, Relic Song, Illusion)
Spoiler:

All working exactly like in Gen6


- Rewritten and improved AI supporting new moves, abilities and items.

Spoiler:
No more AI using new moves mindlessly!


- And much more!


Mega Evolution, Form Changes and Configuration


Spoiler:

Fully functional Mega Evolution. Huge thanks for Touched for his code which we used and improved.
To enable Megas
:
Spoiler:

1. Open the config.h files in the src folder. In line 9, change the keystone index to the item index of your liking. Player has to posses that item in order to mega evolve. Build file after the change.
2. In G3T, open the 'pokemon editor.ini' file in the Customization folder.
3. Paste this:
FB=MegaEvo
FC=Fervent
FD=Primal
FF=RevertMegas
in the evolution conditions section.
4. Now, open the item editor. Choose an item of your choice to be used as a mega stone. Set its Special Value 1/2 (or Held Item Effect) to 139 (in decimal) or 0x8B (in hex).
5. In the extra section of item, put the index of the target Mega Pokemon (e.g index of Mega Scizor if want your item to behave like Scizorite). Note that if you're using Kurapika's Gen3Tools you'll have to insert the ID in hex.
6. Now, open the pokemon editor, choose the mon you want to mega evolve. Then go to the evolution tab and add an entry there by setting 'Condition To Evolve' as 'Mega evolution' and
'Evolve To' to the Mega Species (e.g Mega Scizor in case of Scizor).
7. Make sure to set back the original species as Revert Megas evolution of mega species. (Unless you want your pokemon to stay as mega forever :P)
(e.g Scizor as Revert Megas evolution of Mega Scizor).
8.To activate it in a battle, press the start button while choosing a move. You will hear a sound and the evolution happens shortly after.

Form Changes and Configuration:
Spoiler:

Here's a link to a beautifully written post of Deokishisu that goes in detail on what each define does. Make sure to read it before configuring the engine.
https://www.pokecommunity.com/showpost.php?p=9593094&postcount=600

For info on trainer messages and background customization see this post.
https://www.pokecommunity.com/showpost.php?p=9612109&postcount=627



Additional Features



Spoiler:
- Dynamic Insertion

Spoiler:
Being completely dynamic means it doesn't matter if you're using a clean or hacked rom.
It supports expanded roms.


- No more Pokemon data encryption

Spoiler:
Allows for easier editing of Pokemon information, though it does require you to start a new game or erase all your currently owned Pokemon.

If you don't want this feature, delete the 'negates pokemon encryption' section in the 'bytereplacement' file.


- Faster speed button

Spoiler:
(after building the file, may require you to load the game from the gamesave, not the savestate(only once))

Same as above


Screenshots


Screenies:
Spoiler:









Gifs:


Planned Features



Spoiler:
- Finish the Move Animations

Spoiler:
See the PendingMoveAnimations.md file


- Add Gen7 abilities and moves

- Optional features suggested by users


Installation Instructions



Spoiler:
- Download devkitpro from here.
And install it.

Download r45 of devKitARM from here:
https://sourceforge.net/projects/devkitpro/files/devkitARM/devkitARM_r45/

Open the devkitARM folder (installed using the first link), and replace its contents with the contents of devkitARM r45.

- Download the latest version of python(3.4, 3.5 or 3.6 should be good).
After downloading and before proceeding to install make sure that the 'add to path' checkbox is ticked, otherwise you'll have to add the python path in the environment variables manually.

- Download the master folder from our github page here.
(click 'Clone or Download', then 'Download Zip')

- Open a 'make.py' file in the scripts folder and configure the offset location, the rom name and additional options.

- Run the cmd.exe in the main folder.
You can do this by typing 'cmd' and hitting enter in the url address or selecting 'run command prompt from here' from right clciking on empty space while holding the shift key

- In the command prompt window, type 'python scripts/make.py' and press Enter
A new gba file will appear named as test.gba.
This is your resultant file.

- For PGE users, you will have to follow an additional step.

- Place a copy of a valid roms.ini in the master folder and in cmd prompt type 'python scripts\PGEinidump.py'.
A corresponding test.ini will be created for test.gba.

- These steps should be repeated, if you want to update it to the latest build.


Bug Reporting and Suggestions



Spoiler:
If you encounter any bugs feel free to report it.
Our goal is to achieve a flawless updated battle engine.

You can post them here or on our GitHub page(New Issue).
We'd prefer the latter as it would be easier for us to keep track of the pending and the fixed ones

You are also welcome to give suggestions for features to include in the engine and to express your opinions on the project.

To get in contact with us PM or VM me or KDS, post in the thread or pull an issue on GitHub.
Most of the time I'm available on the #RomHacking IRC.


Contribution Instructions



Spoiler:
- there are lots of moves to be yet animated, if you know or you're willing to learn how animations are done, you're more than welcome to help. See PendingMoveAnimations.md file which states which moves are yet to be animated.
We'll guide you a bit and explain how to add them to the project.

- if you have experience with ASM, I bet you can also work in C which is a higher level than assembly, making it more convenient and easier to implement new features.

Make sure to read FBi's tutorial.
It should give you a good briefing how to code in C for Pokemon.
Contact me or KDS after that.

- decapitalizing in-battle messages, move and item descriptions and so on.
This boils down to finding a string's address and changing uppercase letters to lowercase.
(See our 'bytereplacement' file)

- Testing! No matter how hard we try, there's always gonna be something overlooked or acting not the way it should.
If you find something, please tell us!



This engine is available for anyone to use, just make sure that if you do, give proper credit by linking to this page.

Credits



Spoiler:

- MrDollSteak for Move Animations, Move Names, Move Descriptions, Ability descriptions, Contest data and Fairy-type Implementation

- FBI for the C tutorial

- Touched for his python files and Emerald IDB

- Knizz for the FR IDB and huge amounts of research

- Jambo51 for Battle Script Pro

- JPAN for his research on battle script commands

- Bird for Scald animation

- kleenexfeu for the Move Messages and Move descriptions from his rombase

- My cousins for lots of testing and bug finding

- If I forgot someone, please let me know and I'll add you immediately

Chacha Dinosaur

Adamant and adaptive dinosaur.

Age 24
Male
Seen March 4th, 2018
Posted September 8th, 2017
454 posts
6.1 Years
Given that Touched has created Mega Evolution that works so well, have you considered adding it to your engine? Frankly, I think that Mega Evolution is integral to Pokemon now.
See the 'features to implement' section. It is definitely part of the plan.

ElijahCabugao

Metagross's Metagrossite is reacting to Elijah's Mega Bracelet!!!

Male
Kalos Region
Seen 2 Weeks Ago
Posted February 21st, 2017
28 posts
3.6 Years
See the 'features to implement' section. It is definitely part of the plan.
Wow so this is your combined project... Its amazing... Well, Im also waiting for the mega evolution to be implemented... Good luck dudes
Seen October 23rd, 2016
Posted September 4th, 2016
23 posts
10.7 Years
See the 'features to implement' section. It is definitely part of the plan.
Fantastic! Kudos to you for making this engine! I look forward to seeing it completed.
Right now I'm using KristianAngel's Rombase for my hack. It's almost done, but there are some abilities (such as mold breaker) which just don't work.

thedarkdragon11

New World Pirate

Male
Raftel, New World
Seen 5 Days Ago
Posted 5 Days Ago
820 posts
10.2 Years
Whoa there! This is going to be huge! I look forward to your releases!

Will this also feature Pokémons from Gen. 4 onwards and use Chaos Rush and MrDollSteak sprites and icons?

You might want to hear my idea for a "Soaring in the sky" or not?

i0Bjhansen0

Age 23
Male
Seen March 3rd, 2018
Posted August 30th, 2017
130 posts
3.4 Years
Gosh this almost makes me want to scrap everything I've worked on with FR and go back to EM...
Check out my Hack-in-progress and help decide the last Mega Evolution.



If my Avatar flashes too much, let me know and I'll change it. I increased the frames from the original before uploading it.

i0Bjhansen0

Age 23
Male
Seen March 3rd, 2018
Posted August 30th, 2017
130 posts
3.4 Years
Join the #EM team {XD}
I'll probably make an EM hack after I finish most of my FR hack. I was initially going to make an EM hack but then I went to FR because of the ease of making new Pokemon.

Couple questions. What Icon are you using for the Fairy type? Are you using a contest type or did you manage to change it so you could add on to the image?
Is it possible to create new abilities before applying your changes? Such as making new abilities similar to Pixilate, Refrigerate, and Aerilate? I would be planning on making new types and would like to be able to make new ate abilities for all the types, even if I wouldn't use them all.
Check out my Hack-in-progress and help decide the last Mega Evolution.



If my Avatar flashes too much, let me know and I'll change it. I increased the frames from the original before uploading it.

DizzyEgg

Age 21
Male
Poland
Online now
Posted 1 Week Ago
783 posts
5.6 Years
I
Couple questions. What Icon are you using for the Fairy type? Are you using a contest type or did you manage to change it so you could add on to the image?
Is it possible to create new abilities before applying your changes? Such as making new abilities similar to Pixilate, Refrigerate, and Aerilate? I would be planning on making new types and would like to be able to make new ate abilities for all the types, even if I wouldn't use them all.
Fairy Type icon is probably the same as in Dollsteak's patch.
You can create new abilities but after the changes.
Also making new -ate abilities should be much easier with our engine, take a look at function set_attacking_move_type in the 'bsstartattack.c' file to see what I mean.

C me

Creator of Pokemon League Of Legends

Age 22
Male
Seen February 2nd, 2019
Posted September 9th, 2018
683 posts
5.6 Years
This is truly amazing but I can't help feeling that I've wasted a lot of time doing these things myself now that they are easily available. I had to port a few items just recently from FireRed which took a while.

Oh well, I guess I learned stuff along the way and that's what counts(just kidding, feelsbadman).

BluRose

blu rass

Age 18
Male
rip x
Seen 3 Weeks Ago
Posted July 10th, 2019
763 posts
5.3 Years
Gosh this almost makes me want to scrap everything I've worked on with FR and go back to EM...
Join the #EM team {XD}
don't you dare encourage this </3
so um
this is, like, awesome, so happy to see it getting somewhere! this definitely revolutionizes the hacking scene; the simple ease with which one can introduce new things compared to how it used to be and i've been trying to implement focus sash for 2 days now, and still haven't figured out how to remove the item using asm

my first thoughts are of wanting to port to #FR (by replacing all of the addresses in all of the relevant files), but this was made for emerald and i feel like that would be defacing its name

so i'll ask anyways <3
am i cool yet

i0Bjhansen0

Age 23
Male
Seen March 3rd, 2018
Posted August 30th, 2017
130 posts
3.4 Years
Fairy Type icon is probably the same as in Dollsteak's patch.
You can create new abilities but after the changes.
Also making new -ate abilities should be much easier with our engine, take a look at function set_attacking_move_type in the 'bsstartattack.c' file to see what I mean.
I don't know about Dollsteak's patch. When I was working on my EM hack I used the contest type spaces. I'm not sure if they did the same or managed to add new types behind the contest types. I just looked at the thread and I was surprised that he was able to add the fairy type to the end.
What do you mean "after the changes"? I was talking about before putting all the files or data into the EM rom. That way instead of backtracking and moving stuff around, I can add new things and then put in the stuff.
I managed to be able to add more -ate abilities in the ASM provided by Mr. DS (I think) before I put them into my FR hack. I just copied how the code was and put the other types in.
Check out my Hack-in-progress and help decide the last Mega Evolution.



If my Avatar flashes too much, let me know and I'll change it. I increased the frames from the original before uploading it.

jiangzhengwenjzw

ASM hacker, now working on pokefirered

Male
Seen 2 Hours Ago
Posted 21 Hours Ago
164 posts
6.9 Years
my first thoughts are of wanting to port to #FR (by replacing all of the addresses in all of the relevant files), but this was made for emerald and i feel like that would be defacing its name
Actually the porting work will not be just replacing offsets. The 'same' functions in FR & EM sometimes have DIFFERENT formats. You can go and see Pokemon_XY's partial (and abandoned) port of kleenexfeu's old base HERE. The routines of mega in rombase.asm will show you everything (He has correctly found the return addresses and you can see the functions there).

I guess the base is still a WIP one, so the firered port may not be available recently.(?)

DizzyEgg

Age 21
Male
Poland
Online now
Posted 1 Week Ago
783 posts
5.6 Years
I'm not sure what's happened, but I installed as per the instructions and it has messed up my rom. Looking at the details on my existing save, it has corrupted all the pokemon into glitches or eggs.

Starting a new game just freezes the game when I select the Pokemon from the bag. Does it not work with progressing hacks?
It does work on progressing hacks. See the OP under 'additional features'
Additional Features:
- no more Pokemon data encryption(requires you to start a new game or erase all your owned Pokemon)
If you don't want it, delete the 'negates pokemon encryption' part in the 'bytereplacement' file
The file can opened by any text editor.

DizzyEgg

Age 21
Male
Poland
Online now
Posted 1 Week Ago
783 posts
5.6 Years
OK, the pokemon don't seem to be warped but if I enter the summary screen it resets the game. Am I best scrapping my hack and just using this from a fresh rom?
Not at all. This was designed to work with progressing hacks. Try changing the location for the engine. The freezing on summary screen sounds to me like ability name/description names issue. Try erasing them for a while to insert a file in the 'repoints' file and see if it still freezes.
Male
Seen May 9th, 2017
Posted May 9th, 2017
88 posts
3.3 Years
It got worse, if anything. Now it locks up and causes ear piercing screeches! I'll try one more time, and if not then I'll just start from scratch. Hopefully it shouldn't take too long, especially if stuff like YAPE and AdvanceMap still work.

How many bytes is needed for the engine? I put at xF00902, which seemed to have quite a substantial amount of space available.

Thanks
Male
Seen 3 Days Ago
Posted February 5th, 2017
91 posts
4.8 Years
I've been messing around with this on a clean rom for a while and it seems to work: this is seriously legit. This must have taken a lot of hard work. Props to everyone who contributed!

That being said, as a PGE user, I am noticing a few issues, particularly with moves:

- Selecting a Gen 4+ move in the attack editor leads to an 'SelectedIndex' error
- Trying to add a Gen 4+ move in a Pokemon's level up adds a different move at a different level
- I assume that all the level-ups have been updated to ORAS, but PGE is giving me the native Emerald data

I believe this is an .ini issue, but I cannot say for sure.
Other than those things, it seems to work fine, although I haven't examined much in-game yet.

Loved Pokemon Glazed? Try my hack, Blazed Glazed!

DizzyEgg

Age 21
Male
Poland
Online now
Posted 1 Week Ago
783 posts
5.6 Years
I've been messing around with this on a clean rom for a while and it seems to work: this is seriously legit. This must have taken a lot of hard work. Props to everyone who contributed!

That being said, as a PGE user, I am noticing a few issues, particularly with moves:

- Selecting a Gen 4+ move in the attack editor leads to an 'SelectedIndex' error
- Trying to add a Gen 4+ move in a Pokemon's level up adds a different move at a different level
- I assume that all the level-ups have been updated to ORAS, but PGE is giving me the native Emerald data

I believe this is an .ini issue, but I cannot say for sure.
Other than those things, it seems to work fine, although I haven't examined much in-game yet.
It's because the learnset table are not repointed. PGE currently doesn't support the way we expanded the moves, because of alignment issues. If you do want to change the moves however, you can do it manually in the file called 'Learnsets.c' in the 'src' folder. KDS will talk this through with Gamer3030 soon.

It got worse, if anything. Now it locks up and causes ear piercing screeches! I'll try one more time, and if not then I'll just start from scratch. Hopefully it shouldn't take too long, especially if stuff like YAPE and AdvanceMap still work.

How many bytes is needed for the engine? I put at xF00902, which seemed to have quite a substantial amount of space available.

Thanks
That's strange. I've got no idea why it acts like this. Yeah, the location you've chosen is more than enough.
I would also suggest not using YAPE, because it's an outdated program and doesn't support move expansion. Try Kurapika's gen3 tool or PGE.
On second thought maybe the issue comes from the type expansion. Did you make any changes to the game functions? Any hooks or expansions?
Male
Seen January 18th, 2017
Posted January 17th, 2017
263 posts
9.2 Years
I don't know if it's possible, but maybe add an option in the source to change the max level of Pokemon from 100 to anything up to 255. I saw a thread where the max level in Fire Red was changed to 127 although I do realize this is Emerald and not Fire Red. Still, it would be kinda cool, and I would totally use this as a base for a hack.
John 3:16
For God so loved the world that He gave His only begotten Son, that everyone who believes into Him shall by no means perish but have eternal life.

Acts 2:21
And everyone who calls on the name of the Lord will be saved.

I believe in Jesus Christ my Savior. If you do too, and aren't too scared to admit it, then copy and paste this into your signature.

Jesus is Lord!
Advertiser Content