Welcome to the PokéCommunity!

Hi there! Thanks for visiting PokéCommunity. We’re a group of Pokémon fans dedicated to providing the best place on the Internet for discussing ideas and sharing fan-made content. Welcome! We’re glad you’re here.

In order to join our community we need you to create an account with us. Doing so will allow you to make posts, submit and view fan art and fan fiction, download fan-made games, and much more. It’s quick and easy; just click here and follow the instructions.

We’re on social media!

Research & DevelopmentGot a well-founded knack with ROM hacking? Love reverse-engineering the Pokémon games? Or perhaps you love your assembly language. This is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!

Research & Development programs in this forum are subject to moderator approval before they are displayed.

In emerald, at the offset 0x611C9A, there's a table with 10 entries of 2 bytes (shorts), followed by an FFFF at the end of the table, which marks the pokemon restricted for entry in Battle Tower. To add or remove entries, add the pokemon number reversed in hex, and end the table with FFFF. If you want to remove all the limitations, just write FFFF to the beginning of the table (offset 611C9A).

~Sonic1

__________________

This signature has been disabled.

over 350px high
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.

I have found the transform animation in FireRed. It's located at 0xDF9BC.
It gets called multiple times, once a frame I believe, during the transformation. Everything is in here, including the pallet loading part which gets the "whited out" pallet, and the part which gets the actual sprite.

Using this routine, we could theoretically create custom transformations, such as Burmy changing into a different forme, or perhaps even in battle evolution.

__________________

Hey guys, please check out my recreations of the gen 1 and 2 music on my custom engine at my SoundCloud! - Here!

I have a spreadsheet file that contains a bunch of useful information for those who like to keep organized when scripting. With it, you can quickly reference and grab information in a easy to read format.

Anyway, I'd like to implement a very dynamic script in my game...Basically, I wanted to allow myself to release events for my game. But instead of being limited to whatever I choose at the time, and avoiding releasing a new patch every time I wanted to do an event, I decided to make a spot in my game with a person that asks for a series of codes. These codes would be released by me, and the script would take the codes hex values, arrange them as necessary, do some checks to make sure the player isn't just mashing buttons, and "build" a completely custom Pokemon. This would allow me to easily decide an event, calculate the code, and release it in a post.

But my problem is that I need a keyboard to pop up, in order to enter the code. I've decided on two approaches:

The easy way would be to edit the mail input to take easy chat words and convert them into code. This would be good, since there are so many words, and I assume each is a byte value. But it's somewhat unprofessional.

The hard way would be to recreate the "nickname" keyboard. I wouldn't know whats involved, but I know emerald has one for Walda...could we port it over.

Aw man, I made my post immensely long for no reason again ._. Sorry, and thanks for the help!

Anyway, I'd like to implement a very dynamic script in my game...Basically, I wanted to allow myself to release events for my game. But instead of being limited to whatever I choose at the time, and avoiding releasing a new patch every time I wanted to do an event, I decided to make a spot in my game with a person that asks for a series of codes. These codes would be released by me, and the script would take the codes hex values, arrange them as necessary, do some checks to make sure the player isn't just mashing buttons, and "build" a completely custom Pokemon. This would allow me to easily decide an event, calculate the code, and release it in a post.

But my problem is that I need a keyboard to pop up, in order to enter the code. I've decided on two approaches:

The easy way would be to edit the mail input to take easy chat words and convert them into code. This would be good, since there are so many words, and I assume each is a byte value. But it's somewhat unprofessional.

The hard way would be to recreate the "nickname" keyboard. I wouldn't know whats involved, but I know emerald has one for Walda...could we port it over.

Aw man, I made my post immensely long for no reason again ._. Sorry, and thanks for the help!

Well, either way of doing things, if you want to create a completely "custom" pokemon, you're gonna need ASM.
My approach is: why don't you build a system that, when inputting some values in the ram, reads them and does things based on them?
Did you know that VBA's Memory Viewer has the ability of loading hex data into ram offsets? You could create your .raw/.bin files and ask the player to load them manually with vba.

But yeah, thats only an idea i have.

~Sonic1

__________________

This signature has been disabled.

over 350px high
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.

Well, either way of doing things, if you want to create a completely "custom" pokemon, you're gonna need ASM.
My approach is: why don't you build a system that, when inputting some values in the ram, reads them and does things based on them?
Did you know that VBA's Memory Viewer has the ability of loading hex data into ram offsets? You could create your .raw/.bin files and ask the player to load them manually with vba.

I already knew that I'd need ASM, and I do have a plan on making this work...Each letter has a byte value, and I want to make the keyboard thing store a byte value to certain variables (0x8000 to 0x8009 come to mind). The all you need to do is create a certain code, e.g the first two bytes determine pokemon species, etc. etc, put in some checks, and then voila, the Pokemon is created. I've already studied extensively on pokemon data structures, and JPANs hack engine makes it easier...simply give a "base pokemon" (aka Bulbasaur), use the special that "unlocks" the pokemon, and "push" the values from the variables to the corresponding bytes. All I need to make is the keyboard store each letters byte value into a variable.

I realise that simply giving a .raw file would be simple, but I dunno, I kinda want it to look nice, keep it interesting, and make it so even the noobiest of rom hack players could obtain my events, and I'm sure almost everyone can input some codes.

I already knew that I'd need ASM, and I do have a plan on making this work...Each letter has a byte value, and I want to make the keyboard thing store a byte value to certain variables (0x8000 to 0x8009 come to mind). The all you need to do is create a certain code, e.g the first two bytes determine pokemon species, etc. etc, put in some checks, and then voila, the Pokemon is created. I've already studied extensively on pokemon data structures, and JPANs hack engine makes it easier...simply give a "base pokemon" (aka Bulbasaur), use the special that "unlocks" the pokemon, and "push" the values from the variables to the corresponding bytes. All I need to make is the keyboard store each letters byte value into a variable.

I realise that simply giving a .raw file would be simple, but I dunno, I kinda want it to look nice, keep it interesting, and make it so even the noobiest of rom hack players could obtain my events, and I'm sure almost everyone can input some codes.

There's just one problem with that. What about people that use hardware (ie. A Flashcard) and not VBA?

Well... Yeah, i admit, it isn't good for those, but you can just do an action replay that overwrites the values in RAM.

Quote:

I already knew that I'd need ASM, and I do have a plan on making this work...Each letter has a byte value, and I want to make the keyboard thing store a byte value to certain variables (0x8000 to 0x8009 come to mind). The all you need to do is create a certain code, e.g the first two bytes determine pokemon species, etc. etc, put in some checks, and then voila, the Pokemon is created. I've already studied extensively on pokemon data structures, and JPANs hack engine makes it easier...simply give a "base pokemon" (aka Bulbasaur), use the special that "unlocks" the pokemon, and "push" the values from the variables to the corresponding bytes. All I need to make is the keyboard store each letters byte value into a variable.

Well, you know, its fairly easy to use the naming routine (the keyboard thing). Its just calling the routine with 2 parameters plus 2 optional (optinal depending on the type of usage = player, pokemon, box, mail). R0 is type of naming/usage, and R1 is the adress in RAM where the input is gonna be stored! This is a valuable info for you. You can store the adress of the var 8000 there and it will store 10 bytes (max letters) from the initial address onward (thus ending in var 8005, if i'm correct).

But hey, don't try to put everything in just 1 input. Make 3-4 inputs depending on your needs. I doubt 2 bytes are enough to store a pokemon species using the keyboard, because the keyboard doesn't have access to 255 different symbols (ok, what i'm tryin' to explain is a bit hard, and i don't know how to explain it well).

~Sonic1

__________________

This signature has been disabled.

over 350px high
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.

I've been fiddling around with special 0xC2 which apparently hatches eggs, to try and create a 'force hatching' scenario.

The special alone (in a script) seems to only work if 'egg' is the only thing in your party. Having 2 eggs in your party - only the first one will hatch. Having any pokemon in your party and a " - hatched from the Egg" message will occur, giving you the option to nickname 'egg' but having no effect.

I tried using Special2 and set the store variable to 0x2 to see if it could 'select' the correct position for the egg, if it was 2/3rd in the party. However the only change this made was the egg then hatched to ??????, which then got nicknamed, but the eggs stayed in the party still.

So is it possible to use the special / special2, in co-ordination with writing a byte or calling forth a variable to then either pick what the egg hatches into, or what egg hatches.

I've been fiddling around with special 0xC2 which apparently hatches eggs, to try and create a 'force hatching' scenario.

The special alone (in a script) seems to only work if 'egg' is the only thing in your party. Having 2 eggs in your party - only the first one will hatch. Having any pokemon in your party and a " - hatched from the Egg" message will occur, giving you the option to nickname 'egg' but having no effect.

The normal egg hatching script:

I tried using Special2 and set the store variable to 0x2 to see if it could 'select' the correct position for the egg, if it was 2/3rd in the party. However the only change this made was the egg then hatched to ??????, which then got nicknamed, but the eggs stayed in the party still.

So is it possible to use the special / special2, in co-ordination with writing a byte or calling forth a variable to then either pick what the egg hatches into, or what egg hatches.

Well... Yeah, i admit, it isn't good for those, but you can just do an action replay that overwrites the values in RAM.

Well, you know, its fairly easy to use the naming routine (the keyboard thing). Its just calling the routine with 2 parameters plus 2 optional (optinal depending on the type of usage = player, pokemon, box, mail). R0 is type of naming/usage, and R1 is the adress in RAM where the input is gonna be stored! This is a valuable info for you. You can store the adress of the var 8000 there and it will store 10 bytes (max letters) from the initial address onward (thus ending in var 8005, if i'm correct).

But hey, don't try to put everything in just 1 input. Make 3-4 inputs depending on your needs. I doubt 2 bytes are enough to store a pokemon species using the keyboard, because the keyboard doesn't have access to 255 different symbols (ok, what i'm tryin' to explain is a bit hard, and i don't know how to explain it well).

I understand completely what you mean I had planned to make the script something with a maybe 4 or 5 inputs...I wanted complete control over species, IVs, moves, item held, and possibly nickname. How do you recommend I make this work, however? Would I have to make an ASM that just puts the ram offset into R1, then call the normal nicknaming special?

This brings up something else...If I just use the nickname keyboard, the text says "[pokemon's] Nickname?". If it's not hard, I'd like to make it say something else on it, otherwise I'm sure I could live with it.

Hmm the pointer to the egg script lies at 0x6d71c, the only data string that is just before that pointed to a script with the line 'fadesong 0x9AOD' which as far as I know doesn't exist - so looks like egg hatching is controlled by ASM.

Does anyone know where Egg-Step information is stored?

//

Been looking for possibly Egg-Step info, can't seem to find it anywhere o_o nobody lists it with species/etc. data, and I have looked around the areas with it to no avail (For example, I'm assuming Pikachu will have a value of '15' somewhere in it's data to signify 21 cycles for hatching. If that value was momentarily set to 0, I wonder if the egg would insta-hatch.

Hmm the pointer to the egg script lies at 0x6d71c, the only data string that is just before that pointed to a script with the line 'fadesong 0x9AOD' which as far as I know doesn't exist - so looks like egg hatching is controlled by ASM.

Does anyone know where Egg-Step information is stored?

//

Been looking for possibly Egg-Step info, can't seem to find it anywhere o_o nobody lists it with species/etc. data, and I have looked around the areas with it to no avail (For example, I'm assuming Pikachu will have a value of '15' somewhere in it's data to signify 21 cycles for hatching. If that value was momentarily set to 0, I wonder if the egg would insta-hatch.

I think the egg to hatch is stored in a variable...I think it's 0x8004, but I don't know for sure. You wouldn't use special2, because that just specifies where the output goes, not what the input is. I believe the slot number of the egg is stored to 0x8004, and the egg hatch special is called.

I understand completely what you mean I had planned to make the script something with a maybe 4 or 5 inputs...I wanted complete control over species, IVs, moves, item held, and possibly nickname. How do you recommend I make this work, however? Would I have to make an ASM that just puts the ram offset into R1, then call the normal nicknaming special?

As for this, now i'm outta time, but i'll try to do something to you. Thing is, there's a routine in the rom, a powerful one, that has ENTIRE access to a pokemon's data, and can change anything about it!
List of things discovered that the routine can change (don't mind the hex numbers):

This brings up something else...If I just use the nickname keyboard, the text says "[pokemon's] Nickname?". If it's not hard, I'd like to make it say something else on it, otherwise I'm sure I could live with it.

I understand completely what you mean I had planned to make the script something with a maybe 4 or 5 inputs...I wanted complete control over species, IVs, moves, item held, and possibly nickname. How do you recommend I make this work, however? Would I have to make an ASM that just puts the ram offset into R1, then call the normal nicknaming special?

This brings up something else...If I just use the nickname keyboard, the text says "[pokemon's] Nickname?". If it's not hard, I'd like to make it say something else on it, otherwise I'm sure I could live with it.

I think the egg to hatch is stored in a variable...I think it's 0x8004, but I don't know for sure. You wouldn't use special2, because that just specifies where the output goes, not what the input is. I believe the slot number of the egg is stored to 0x8004, and the egg hatch special is called.

You are right, 0x8004 0x1 hatches an egg that is 2nd in the party, etc.

The only trouble now is identifying where the egg is. I've had a look at JPAN's Pokemon data decryption thread from years ago, in which he has a routine that can return a species, even in egg form - but that can't give a permission.

Ideally something like

Check (egg) species -> Locate species -> setvar 0x8004 to position

Especially if it's a one of pokemon, so there can't be more than one, so there is no trouble in accidentally hatching a normal pokemon instead. Anything to identify where the egg is would be a great start ><.

Especially if it's a one of pokemon, so there can't be more than one, so there is no trouble in accidentally hatching a normal pokemon instead. Anything to identify where the egg is would be a great start ><.

You are right, 0x8004 0x1 hatches an egg that is 2nd in the party, etc.

The only trouble now is identifying where the egg is. I've had a look at JPAN's Pokemon data decryption thread from years ago, in which he has a routine that can return a species, even in egg form - but that can't give a permission.

Ideally something like

Check (egg) species -> Locate species -> setvar 0x8004 to position

Especially if it's a one of pokemon, so there can't be more than one, so there is no trouble in accidentally hatching a normal pokemon instead. Anything to identify where the egg is would be a great start ><.

You actually don't need ASM for this one. I quote from the list of specials, courtesy of JPAN:

Quote originally posted by JPAN:

[Special 0x]147 checks your pokemon in position referenced by 0x8004 and returns to the given variable its pokemon number. returns 0x19c if an egg.

So all you need to do is use set the variable 0x8004 to 0x0, special2 LASTRESULT 0x147, compare LASTRESULT 0x19C, if 0x1 goto @hatch, if 0x0, add 0x1 to 0x8004, and repeat. You also need to build in a failsafe for if they don't have an egg, so the script won't loop you forever.

Quote originally posted by sonic1:

As for this, now i'm outta time, but i'll try to do something to you. Thing is, there's a routine in the rom, a powerful one, that has ENTIRE access to a pokemon's data, and can change anything about it!
List of things discovered that the routine can change (don't mind the hex numbers):

My first problem is that the method you posted earlier is that it stores the value in only five variables, which basically means two letter per variable, and this is NOT what I want...I want one letter per variable. I'm sure I could whip up a seperation script, though. After doing this, the game applies a cipher, and applies my method of conversion, which I won't reveal right here, so I don't have someone who's playing my rom hack in the future stumble upon it, and suddenly find him or herself able to create a team of six level 100 Arceus. If you really want/need to know, feel free to PM me. And thanks for your help!

Oh yea...thanks for that routine...but after a quick glance, it seems to all be stuff I can already access.

My first problem is that the method you posted earlier is that it stores the value in only five variables, which basically means two letter per variable, and this is NOT what I want...I want one letter per variable. I'm sure I could whip up a seperation script, though. After doing this, the game applies a cipher, and applies my method of conversion, which I won't reveal right here, so I don't have someone who's playing my rom hack in the future stumble upon it, and suddenly find him or herself able to create a team of six level 100 Arceus. If you really want/need to know, feel free to PM me. And thanks for your help!

Well about the method, it isn't my fault, it's how the keyboard works, and i can't do anything about it without breaking compatibility to all other things that use it (at least me, i'm sure that there are many people out there who know a lot more ASM than me).

But yeah, a separation script is totally possible, just use copybyte to copy a byte to other variable while using writebytetooffset to clear the other 8bits (1-byte) of the variable.

The cipher... Well, i'm a student of asm for about 2 years from now, and i'm willing to try to learn everything about it. I'm not asking to see your cipher specifically, but an example of one would be nice for me to learn how to deal with those things.

Quote originally posted by redriders180:

Oh yea...thanks for that routine...but after a quick glance, it seems to all be stuff I can already access.

Well, if you say so... But yeah, the things i posted are the only ones that i know what it does, that routine is actually able to change everything, but i don't know what to pass as arguments to actually change everything, just those.

__________________

This signature has been disabled.

over 350px high
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.

You are right, 0x8004 0x1 hatches an egg that is 2nd in the party, etc.

The only trouble now is identifying where the egg is. I've had a look at JPAN's Pokemon data decryption thread from years ago, in which he has a routine that can return a species, even in egg form - but that can't give a permission.

Ideally something like

Check (egg) species -> Locate species -> setvar 0x8004 to position

Especially if it's a one of pokemon, so there can't be more than one, so there is no trouble in accidentally hatching a normal pokemon instead. Anything to identify where the egg is would be a great start ><.

Well what you can do is have a series of checks that check each pokemon in the party's catch level (Which would be zero since it didn't hatch yet)that way you can tell where the egg is in the party, and if there is even one in said party.

Also isn't egg hacking based on the amount of steps the player takes. You can just add a certain amount of steps to the area where the amount of steps are stored, then start the routine for the egg check. Just my brain storming, I didn't actually try it myself, so tell me how it goes.

After a quick research, i discovered that in R/S/E, the scripting command 0x2E, Resetvars, doesn't reset vars.
In Firered does, but in those versions it sets 8000 to the current clock hours, 8001 to minutes and 8002 to seconds. The reason FIRERED resets those vars is because it doesn't have Real Time Clock.

__________________

This signature has been disabled.

over 350px high
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.

As I've been doing a Fakemon hack in Emerald, the Frontier was obviously a mess. Things weren't very well documented outside of the normal structures for the Tents and regular Pokemon (which is very well documented on Bulbapedia - for brevity they will not be discussed here, go to bulbapedia.bulbagarden.net/wiki/Battle_Frontier_data_structures_in_Generation_III if interested), but this still left things like the Brains and wild spawns in the Pyramid/Pike up in the air. After a bit of snooping around, I've found some stuff. I really doubt this warrants its own thread, so I'll put it here.

Shown was Salon Maiden Anabel's Alakazam. It has a Modest nature, IVs of 24, an EV investment of 106 HP/152 DEF/152 SPD/100 SATK, and a movepool of Thunderpunch, Fire Punch, Ice Punch, and Disable. Its hold item is a Brightpowder.
Two things interesting to note is that Frontier Brains use normal item indexing instead of the Frontier's custom indexing, so they can hold whatever is wished for them to hold. Also, similarly to Steven's team in the Space Center event, they can have up to 255 EVs in each stat, and all EVs will be accounted for.

At each offset is six Pokemon. The first three Pokemon are used in the Silver symbol battle, and the next three Pokemon are used in the Gold symbol battle.
*This is two copies of Steven's team in the Space Center event - as Factory Head Noland uses random Pokemon from the Factory listing, he doesn't get a special team to use.

I'm not quite sure what the ?? is, but it's 02 in every wild spawn entry.
Showcased here is a Pluslie with EV investment of HP/ATK/SDEF, and a movepool of Thunder Wave, Spark, and Encore.

As strange as it is to EV in Attack, it was most likely done to keep it from being too "bulky" as EVs in regular Frontier Pokemon are evenly distributed among each stat (in which case this is 170 in each stat, compared to 255 in both HP and SDEF)

The wild spawns themselves are located at 0x6126B0 for Level 50 and 0x612E80 for Open Level. At each offset is a master list of 160 Pokemon broken up into groups of eight, and then twenty pointers respective to which round it is pointing to. The list is virtually identical for Level 50 and Open Level, but the EVs are different in Open Level. A listing of the Pokemon in the Pyramid itself can be found at Bulbapedia, and it generally follows the order that the Pokemon are listed.

I haven't looked at the wild spawns in the Pike yet, but they probably share a similar format to the wilds in the Pyramid. Hopefully this can help out with Frontier hacking.

As for this, now i'm outta time, but i'll try to do something to you. Thing is, there's a routine in the rom, a powerful one, that has ENTIRE access to a pokemon's data, and can change anything about it!
List of things discovered that the routine can change (don't mind the hex numbers):

The PokéCommunity

Meta

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, or The Pokémon Company International. We just love Pokémon.