Hi guys, I'm fairly new to ROM Hacking, but I've already got a hack in production underway, which you can find information on in the ROM Edit Ideas section (Probably gonna recreate it in the Progressing Edits once I get up to the first gym done and release a beta test version). It will include things like Edited trainers, pokemon stats, pokemon types, new wild pokemon, etc. But of course, I had to learn how to edit this data. I did most of the stats and types and such by using a tool by TwistedFatal, but with changed types, of course came other things like, for example, the TMs and HMs that each pokemon could learn.
That specifically is what inspired me to make this thread. I never could find a thread about TM and HM compatability. I got the information about that from Drayano. But as it turns out, ALL of the Pokemon's data (except for movesets) is located in the same narc. So, lets take a look at exactly what is in this narc file.
First off, you should extract the a/0/1/6 narc file using Nitro Explorer. Next, I reccomend downloading Crystaltile2, it is a phenomenal hex editor with a feature that makes editing the hex so much easier. In the best download I found, there are two .dll files that are missing, but you can just google search them and put them in the same folder as CT2 and it should work. And for one last preparation, I reccomend you go to this website:http://www.mathsisfun.com/binary-dec...converter.html. This is an amazing Hex-Decimal-Binary converter. Now, open up the a016 narc with Crystaltile2 and in the side window that pops up, double click on the section that has "(narc file name) 1" in it. This will take you straight to Bulbasaur's Data. Let's take a closer look at it.
The first byte of each Pokemon's Data is the HP stat (in Hex of course) for Bulbasaur, this is 2D, which is 45 in Decimal. Say you wanted to raise the HP stat to 65. Just type in 65 on the decimal line on that site I linked you to, and replace that 2D with whatever pops up in the Hexadecimal line (should be 41).
The second byte is the base Attack Stat. 3rd is base Defense, 4th is base speed, 5th is base Sp. Atk, and 6th is base Sp. Def. This should be the exact same order for every pokemon's data.
Now for the 7th and 8th bytes, I have not tested this yet, however, they should be the Pokemon types. According to this thread:this explaining things about move data, 0B, which is in byte 7 of bulbasaur's data, corresponds to the Grass type, which just so happens to be Bulbasaur's primary type. It's 8th byte, which is 03, corresponds to poison type, which is Bulbasaur's secondary type. So, more than likely, the 7th and 8th bytes are the pokemon's types.
In Bulbasaur's 9th byte, we have 2D, which is 45 in decimal, which just so happens to be Bulbasaur's catch rate.
In the 10th byte for Bulbasaur we have 01, which I do not know exactly what that does. My theory is that it could be it's national Pokedex number. The byte after that (11th) as two 0s in Bulbasaur's data, which could have numbers in it when it gets to the higher pokedex numbers. Probably the National dex number in hex, split into pairs, and then reversed, just like it is for the moves when editing those via hex. This is only a theory and requires testing.
Now we have the 12th byte. In Bulby's data, this is another 01. I honestly have no idea what this does. Perhaps there are two different Pokedex numbers that really come into play when you get to the Unova Pokemon? I will be editing this if I find out anything new.
Bytes 13-18 are just a bunch of 0s for bulby. These may come into play more in other pokemon, I have not looked into this much yet, this research is a work in progress for me. I will edit the post when and if I find out anything.
I have also been unable to figure out byte 19 or 20 off of info from Serebii alone either. I will edit the post if I find out something, as usual. If it helps anyone, Bulbasaur's byte 19 is 1F (31 in dec) and byte 20 is 14 (20 in dec). My conjecture is that maybe they have something to do with Egg Groups.
Byte 21 appears to be Base happiness, as the 46 there in Bulbasaur's slot (70 in decimal) is equivelant to the info on Serebii.
I am not sure what bytes 22-24 are.
Byte 25 appears to be a slot for abilities, because in Bulbys data, it has 41, which is 65 in decimal. According to the Ability list on Bulbapedia, 65 is Overgrow's index number. Byte 26 is probably the second ability a pokemon could have, but since Bulbasaur doesn't have one, it has only 0s there. This is made even more likely by the fact that the value in byte 27 of Bulby's data corresponds to the ability, Clorophyll (index number 34, which is 22 in hex), which bulbasaur can have through the Dream World.
Bytes 29-32 are 0s in Bulbasaur's data, so I'm not yet sure what those mean. I will experiment more with that later.
Byte 33 has a 01 in Bulbasaur's data. I'm not sure what exactly this means yet either.
Byte 34 has a 03. Again, not quite sure what this means.
Byte 35 has 40 (64 in hex). Not quite sure what that means either.
Byte 36 has 00. Clueless yet again.
In fact, I have no clue what pretty much all the bytes do for a while. Perhaps it is what tells the pokedex to say in the pokedex entry's and classification, cries, honestly idk. But that's why I'm researching, to find out.
Now, at Byte 41, I finally find something I know about. I'm just going to say right now, Thank you so much Drayano, he's the one who taught me how to read this part. Now, we start getting into why I even decided to do the research of this narc file. The TM HM compatability. Now, at Bulbasaur's byte 21, we find the hex value, 20. If we put that into the hex section of the coverter I linked you too, we actually need to look at the binary equal to that value. It should show up as 100000, now add two zeros to the beginning of this, and we have a string of 8 numbers in binary code. This string represents Bulbasaur's compatability, to TM01-08. But the tricky part, is that it goes backwards, so the first number actually represents TM 08, and it goes backwards down the line to TM 01. The 0s mean bulbasaur can't learn that TM. The 1s mean it can. So let's get into a bit more detail shall we. After you added the two 0s to make it a string of 8 the first number is a 0, meaning that Bulbasaur can't learn TM 08. The next number is another 0, meaning it can't learn TM 07. The next number, however is a 1, meaning that Bulbasaur CAN learn TM 06. The rest are 0s, meaning that Bulbasaur can't learn TMs 05-01. Say you wanted it to be able to learn TM 01, you would go into the converter and replace the corresponding number in the binary section (in this case the last one), and replace the old hex number with the new hex number that came up on the Hex line of the converter. Now, you may be wondering "What about all the other TMs?" That comes with the next several bytes. These bytes each represent Bulbasaur's conpatability with 8 different TMs (don't forget it's in backwards order, so instead of TM 09-16, it's actually 16-09, and same for all the other bytes). When you get to the byte that's supposed to represent TMs 96-90, you may be thinking "Hey! There is no TM 96!" Well that's correct. Instead, HM 01 takes up that spot. Then, the byte after that only represents the 5 remaining HMs (so the binary string should only be 5 digits long). One last thing to note, obviously, if any of these bytes contains two 0s, that means bulbasaur can't learn ANY of the 8 TMs that that byte represents. There should be 13 bytes containing TM HM compatability data.
And finally, after the TM HM compatability bytes, we come up on some more bytes that I don't know what they do. Hurrah! I have a feeling that one of the groups of bytes that consisted of mostly 00s with a 01 thrown in had something to do with the amount of EVs given out upon defeating a bulbasaur in the wild, but I do not know which.
So anyway, that's all I could figure out for now. I'll be sure to edit this post with the appropriate info if I find out anything new.
don't trying create new post with same topic, and you wrong place too, please check on http://projectpokemon.org/forums/sho...W-Pokemon-Data is was posted, is already discovered, before - after TM/HM byte (3 byte-total 6 byte) is padding data.
ROM Research & Development is just post a tools or something editing tools, for research data or like this please post on ROM Editing Help please...
I wouldn't share something if I don't want you to use it.
Oh, sorry about that, and I didn't see a thread or anything about this here, so I was trying to put it here so anyone who didn't already know could see it. Sorry again.
Thanks for posting this, though. It was a good refresher for me to remember how to do the TM/HM stuff.
What are you going to do with Jesus?