The following is a bin file that I'm experimenting with to determine each bytes function in game (this is written in big endian format):
08 00 00 0A 58 00 00 32 0C 02 E2 10 00 F0 FF E2 00 2D FF DF 5A 46 90 03 00 42 05 00 0C 83 82 10 00 F0 FF E2 00 2D 00 20 5A 46 90 03 00 42 05 00 0D 03 82 10 01 2C 00 6E 00 28 00 20 5A 46 90 03 00 42 05 00 0D 82 E2 10 01 2C 00 6E 00 28 FF DF 5A 46 90 03 00 42 05 00 4C 00 00 29 04 00 00 04 0C 02 E1 50 00 F0 FF E2 00 2D FF DF 5A 46 40 03 00 22 02 80 0C 83 81 50 00 F0 FF E2 00 2D 00 20 5A 46 40 03 00 22 02 80 0D 02 E1 50 00 F0 00 6E 00 28 FF EF 5A 46 40 03 00 22 02 80 0D 83 81 50 00 F0 00 6E 00 28 00 00 5A 46 40 03 00 22 02 80 04 00 00 08 58 00 00 00 18 00 00 00 00 00 00 00
For context, this is from the source code of a super smash bros rom hack and is the binary file for a specific character's move. This particular move has a total of 8 hitboxes. The following are the sequences that represent the characters sweet spot (more damage when the attack lands)
0C 02 E2 10 00 F0 FF E2 00 2D FF DF 5A 46 90 03 00 42 05 00 0C 83 82 10 00 F0 FF E2 00 2D 00 20 5A 46 90 03 00 42 05 00 0D 03 82 10 01 2C 00 6E 00 28 00 20 5A 46 90 03 00 42 05 00 0D 82 E2 10 01 2C 00 6E 00 28 FF DF 5A 46 90 03 00 42 05 00
the following are the sequences that represent the characters sour spot (less damage)
0C 02 E1 50 00 F0 FF E2 00 2D FF DF 5A 46 40 03 00 22 02 80 0C 83 81 50 00 F0 FF E2 00 2D 00 20 5A 46 40 03 00 22 02 80 0D 02 E1 50 00 F0 00 6E 00 28 FF EF 5A 46 40 03 00 22 02 80 0D 83 81 50 00 F0 00 6E 00 28 00 00 5A 46 40 03 00 22 02 80
I was able to determine that 0xE2 10 and 0x82 10 sets the damage value for the sweet spot and 0xE1 50 and 0x81 50 sets the damage value for the sour spot. What I fail to understand is how two separate hex values can produce the same result in game.
Below is a comparison of the two sequences responsible for generating the hitboxes. with the exception of the damage value, here are the differences bolded
0C 02 E2 10 00 F0 FF E2 00 2D FF DF 5A 46 90 03 00 42 05 00 0C 83 82 10 00 F0 FF E2 00 2D 00 20 5A 46 90 03 00 42 05 00
I'm very new hex editing and everything I know I've learned through trial and error. If anybody has any insight on what the function of these values might be, I would greatly appreciate the advice of someone more knowledgeable than myself.
I tried removing the hitboxes that contained damage values of e2 10 and e1 50. as expected, it removed those hitboxes from the game. I also did the inverse by removing the hitboxes that contained damage values 82 10 and 81 50. As expected, it removed the other half of the hitboxes from the game.
I tried changing all hitbox damage values to 82 10 and 81 50. This appeared to produce the same result as leaving them as e2 10 and e1 50. I also did the inverse by changing all hitbox damage values to e2 10 and e1 50, which crashes the game every time the attack is performed.
I tried changing the values for 0c 02 and 0C 83. I couldn't really see how it changed the hitboxes. When increased beyond a certain point it completely removes the hitbox. The did the same for FF DF and 00 20 with similar results