(Link to AcmlmWiki) Offline: thank ||bass
Register | Login
Views: 13,040,846
Main | Memberlist | Active users | Calendar | Chat | Online users
Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album
05-08-24 02:43 PM
0 users currently in ROM Hacking.
Acmlm's Board - I3 Archive - ROM Hacking - EB0 Data Help New poll | |
Add to favorites | Next newer thread | Next older thread
User Post
dcahrakos

490


 





Since: 11-17-05

Last post: 6505 days
Last view: 6505 days
Posted on 05-10-06 01:12 PM Link | Quote
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?


(edited by dcahrakos on 05-10-06 12:13 PM)
Disch

Red Cheep-cheep


 





Since: 12-10-05

Last post: 6568 days
Last view: 6568 days
Posted on 05-10-06 02:12 PM Link | Quote
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)
Alchemic



 





Since: 11-17-05

Last post: 6402 days
Last view: 6288 days
Posted on 05-10-06 02:16 PM Link | Quote
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.
dcahrakos

490


 





Since: 11-17-05

Last post: 6505 days
Last view: 6505 days
Posted on 05-10-06 02:48 PM Link | Quote
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
Disch

Red Cheep-cheep


 





Since: 12-10-05

Last post: 6568 days
Last view: 6568 days
Posted on 05-10-06 03:47 PM Link | Quote
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

490


 





Since: 11-17-05

Last post: 6505 days
Last view: 6505 days
Posted on 05-12-06 12:57 PM Link | Quote
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


(edited by dcahrakos on 05-12-06 12:04 PM)
Add to favorites | Next newer thread | Next older thread
Acmlm's Board - I3 Archive - ROM Hacking - EB0 Data Help |


ABII

Acmlmboard 1.92.999, 9/17/2006
©2000-2006 Acmlm, Emuz, Blades, Xkeeper

Page rendered in 0.014 seconds; used 368.27 kB (max 445.29 kB)