Register | Login | |||||
Main
| Memberlist
| Active users
| Calendar
| Chat
| Online users Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album |
| |
0 users currently in ROM Hacking. |
User | Post |
dcahrakos Posts: 418/499 |
Nope, thats the way it is in the document, and those are the right bytes,(so im guessing that the document is off then, or it does something weird to get those stats..)
here is a link to the enemy data doc http://starmen.net/pkhack/eb0/eb0_2C010.txt |
Disch Posts: 193/202 |
That doesn't match the layout you posted in your first post at all.
Either you pasted the wrong bytes, or that doc is waaaaay off. |
dcahrakos Posts: 416/499 |
ok, that makes sense, so heres the HP bytes for 2 enemies
0C C4 Doll - Has 12 HP(according to the game, and an enemy guide) 06 D4 Lamp - (Has 4 HP according to the game and a guide) the only way I can see the hp of those two enemies is to take the C from the 0C, so thats 12, and then the 4 from D4, I get the health then, and I suppose that sort of makes sense...yah |
Alchemic Posts: 2/8 |
It works as if the stats were using two bytes, stored in little-endian form - except the six highest bits are used for something else. Specifically:
Byte 4, bit 0: HP max +256 if set Byte 4, bit 1: HP max +512 if set And likewise for the other stats. |
Disch Posts: 192/202 |
It works out just as you described. The low two bits of the second byte are the high 2 bits of the given stat.
Example: byte 03 = $45 byte 04 = $01 then the enemy would have $145 HP byte 09 = $63 byte 0A = $57 then the enemy would have a defense of $363 (low two bits of $57 are %11, or $3) and it's enemy type would be $15 (high 6 bits of $57 are %010101, or $15) |
dcahrakos Posts: 413/499 |
I was looking at some documents that are on datacrystal about Earthbound Zero, and I got everything good, except how the game handles enemy stats, for example,
Structure ********* byte 03 - HP, low portion byte 04 - aaaaaabb (A = ??? - B = HP, high portion) byte 05 - PP, low portion byte 06 - aaaaaabb (A = ??? - B = PP, high portion) byte 07 - Offense, low portion byte 08 - aaaaaabb (A = ??? - B = Offense, high portion) byte 09 - Defense, low portion byte 0A - aaaaaabb (A = Enemy Type - B = Defense, high portion) does anyone know what in the hell that means, I can see that the second byte of each of those controls a high portion of the health, or atleast the last 2 bits do, but how in gods name does any of that work out? |