The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   Other Dream World Abilities (https://www.pokecommunity.com/showthread.php?t=348531)

azurile13 May 6th, 2015 11:40 AM

Dream World Abilities
 
Alright, I wanted to implement hidden abilities in a fire red rom, and I don't mean the cheap way of simply replacing a regular ability with a hidden ability. Now, I have the theoretical method, and it is very simple. The base stats data http://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon_base_stats_data_structure_in_Generation_III of each pokemon has a full word of padding, and it would only take a byte to store any ability I wanted. And the pokemon data structure http://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon_data_structure_in_Generation_III has a ton of unused bytes (or I guess it could even be a bit) that can turn off or on the hidden ability, but aren't randomized in a random encounter. Most of it is encrypted, but there are already decryption methods, and you could even use something like language (who cares in a hack), pokerus remaining if you haven't added a RTC, or markings. Of course, that's the easy part. I have no idea where/how the game reads abilities or even how I would go about finding that out. Are there any existing guides or documentation/how would I do it myself/is this lightyears beyond the reach of a noob who is still asking the questions in beginner's lounge?

Touched May 6th, 2015 2:43 PM

Quote:

Originally Posted by azurile13 (Post 8738999)
Alright, I wanted to implement hidden abilities in a fire red rom, and I don't mean the cheap way of simply replacing a regular ability with a hidden ability. Now, I have the theoretical method, and it is very simple. The base stats data http://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon_base_stats_data_structure_in_Generation_III of each pokemon has a full word of padding, and it would only take a byte to store any ability I wanted. And the pokemon data structure http://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon_data_structure_in_Generation_III has a ton of unused bytes (or I guess it could even be a bit) that can turn off or on the hidden ability, but aren't randomized in a random encounter. Most of it is encrypted, but there are already decryption methods, and you could even use something like language (who cares in a hack), pokerus remaining if you haven't added a RTC, or markings. Of course, that's the easy part. I have no idea where/how the game reads abilities or even how I would go about finding that out. Are there any existing guides or documentation/how would I do it myself/is this lightyears beyond the reach of a noob who is still asking the questions in beginner's lounge?

I don't know what you mean by a "ton of unused bytes" - there really aren't that many?

Anyway, you're right - all you really need is one bit. The main problem is finding where the abilities are set/read. You could lookup the XREFs of pokemon_getattr and pokemon_setattr, and find which set the ability bit and manually hook and change them all.

The main problem is that code like this is repeated a lot throughout the engine, and changing it is tedious at best.
Code:

u8 ability = pokemon_getattr(pokemon, REQ_ABILITY_BIT) ? base_stats[species].ability2 : base_stats[species].ability1;


What I wanted to do was change the pokemon_getattr to return a byte and change all of the above to:

Code:

u8 ability = pokemon_getattr(pokemon, REQ_ABILITY);


But I gave up because I was feeling too lazy. If you have IDA and a basic understanding of ASM, you should be able to do this - you have the right idea. Come onto the IRC and I can try to guide you through implementing this.

azurile13 May 7th, 2015 11:50 AM

Quote:

Originally Posted by Touched (Post 8739151)
I don't know what you mean by a "ton of unused bytes" - there really aren't that many?

Anyway, you're right - all you really need is one bit. The main problem is finding where the abilities are set/read. You could lookup the XREFs of pokemon_getattr and pokemon_setattr, and find which set the ability bit and manually hook and change them all.

The main problem is that code like this is repeated a lot throughout the engine, and changing it is tedious at best.
Code:

u8 ability = pokemon_getattr(pokemon, REQ_ABILITY_BIT) ? base_stats[species].ability2 : base_stats[species].ability1;


What I wanted to do was change the pokemon_getattr to return a byte and change all of the above to:

Code:

u8 ability = pokemon_getattr(pokemon, REQ_ABILITY);


But I gave up because I was feeling too lazy. If you have IDA and a basic understanding of ASM, you should be able to do this - you have the right idea. Come onto the IRC and I can try to guide you through implementing this.

Thanks for the offer. I have no experience with using IDA and I'd call my ASM knowledge surface level at best. I think I'll do a bit of research/practice before I bug you on the IRC!


All times are GMT -8. The time now is 2:24 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.