• Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

All Aboard The Pain Train: Hurtboxes

Toomai

Smash Ace
Joined
Aug 17, 2006
Messages
769
Location
Someplace in Canada
ALL ABOARD THE PAIN TRAIN
THE HURTBOX INFORMATION TOPIC

PREAMBLE
(read this you maggots)​

Righto, this topic will get into hurtboxes/hurtbubbles/damageable areas/whatever you feel like calling them.

First, a word of warning: Hurtboxes are a lot harder to work with than, say, hitboxes. The physics are about the same but the editing and semantics might be tougher.

HURTBOX INTRODUCTION
(exactly what it says on the can)​

A hurtbox is a sphere, tube, plane, or cuboid shape used to detect collision with hitboxes. As you may know, hitboxes are (almost?) always perfectly spherical. Hurtboxes are not. Here are some example hurtbox shapes:



Hurtboxes are attached to specific bones and rotate (and most likely scale) along with them. They also have another attribute or two.

THE NITTY-GRITTY
(what you came here for)​

Q: Where do I find hurtbox data?
A: That depends. If you're using Tabuu, you have it (kind of) easy, just open FitChar.pac and go to Sections->data->Misc->UnknownT. This is important: The thing labelled "Hurtboxes" actually isn't hurtboxes. You want UnknownT. Each UnknownT is a hurtbox.

If you don't have Tabuu, then it's a bit tougher. You'll have to manually read the file in a hex editor and look for a string of "FFFFFFFF FFFFFFFF" after the last subaction of the character and its articles. After that and a few integers you'll come upon the hurtboxes - without a bit of experience you may not recognize them, but the flags should give them away after a while.

Q: What is a hurtbox composed of?
A: A hurtbox is made of seven floats and a set of flags. In order, these values are:
  1. X Offset
  2. Y Offset
  3. Z Offset
  4. X Stretch
  5. Y Stretch
  6. Z Stretch
  7. Size
  8. Flags

Q: What are "offset" and "size"?
A: Just like hitboxes, hurtboxes start out centered on their parent bones, and can be shifted along the bone's relative axes through a nonzero offset. Also like hitboxes they have a size, given as a radius.

Q: What's "stretch"?
A: This is best described by example. Let's go back to that image above:

The hurtbox on the left has all its stretch values equal to 0; it remains a perfect sphere. Note that all these hurtboxes have a size of 1.

Hurtbox number 2 has an X Stretch of 2. The hurtbox is now 2 units longer along the X-axis in the positive direction - it retains its radius of 1, and the ends are half-spheres. Think of it like duplicaing the sphere, moving it a distance equal to the stretch value, and then joining the two along a line.

The third hurtbox has an X Stretch of 2 and a Y Stretch of 1, while the fourth also has a Z Stretch of 1. Note that changing the hurtbox's size will not change how much it gets stretched, it will only chang ethe radius of the semispheres at each corner of the cuboid.

Also, another important note: If the stretch is negative, this does not mean the hurtbox will be flattened along the axis; it mean it will be stretched in the opposite direction. This means that, in this image:

...you cannot make a hurtbox shaped like the one on the left (a disc) by giving it a size of 1 and a negative Y Stretch. The closest you can get is the one on the right (a square), which has a size of 0.1, an X Stretch of 1.6, and a Z Strech of 1.6.

Q: What are the flags?
A: The flags are a set of 32 bits that are used for extra data (though only the first 16 bits seem to be used). Remember, while they're displayed as hex digits, you have to convert to binary in order to split up the bits.
  • Bits 1-9, when interpreted as a number, are the hurtbox's parent bone. The parent bone is how the hurtbox moves with animations and is also how the game decides what to make invincible/intangible (e.g. Mario's up smash), so it's important to get this right.
  • Bits 10-11 do something but I don't know what. Generally, they seem to be 00 for most body parts, 01 for lower arms, and 11 for legs. They can be 10 in some cases that don't seem to be related.
  • Bits 12-13, when read as an integer, are the zone of the hurtbox. There are three zones: lower (0), middle (1), and upper (2). This is the value used to determine whether the hurtbox activates a low, middle, or high damage animation.
  • Bits 14 and 15 appear to be unused.
  • Bit 16 appears to always be 1. It's possible that setting it to 0 will disable the hurtbox. Since this is always 1, you can look for hurtboxes by searching for any hex string that has an odd number in position 4 followed by four 0s (place your bets on when this will backfire).
For example, a flag set of 17a90000 means the hurtbox is attached to bone 47 and has a zone of 1.

WARNING! If you're using Tabuu, it doesn't show these flags properly if you just read it off the right panel (it'll show a917 instead of 17a90000). You have to right-click on the UnknownT and open the Hex Viewer to see it properly (experts: for some reason the right panel uses little-endian ordering instead of the correct big-endian).

Q: Can I change how many hurtboxes a character has?
A: Deleting hurtboxes should be easy - you can just set flag 16 to 0 (if that's what it does), or you can give it a size of 0 and hide it in the character's body somewhere.

Adding hurtboxes, on the other hand...I'm going to claim this isn't possible at the present time. The main reason is that you would have to displace all of the file that comes after the hurtbox data - since this is after all the subaction and article data it wouldn't be too catastrophic, but it would still be a massive pain to sync everything up again - even if you knew how to tell the game there are now 16 hurtboxes instead of 14.

Q: Anything else important to know?
A: Yep.
  • Some characters, like Dedede and Olimar, have hitData objects in their Sections list (in Tabuu). This contains hurtboxes for things like Waddle Dees and Pikmin.
  • As for item hurtboxes - I've look for them the best I can and can only find any for Wario's bike. I think we can all agree that things like Crates and Barrels must have hurtboxes, but I can't find them.
 

Eternal Yoshi

I've covered ban wars, you know
Joined
Mar 3, 2007
Messages
5,450
Location
Playing different games
NNID
EternalYoshi
3DS FC
3394-4459-7089
What the Hell?
Thanks for this info man.

Anwyay, what value in Unknown T controls the bone that the hurtbox is attached to????

Oh. Thanks again. This should help SO MUCH.

Err... I seem to be having trouble with reattaching the hurtboxes.

I don't remember how to interpet the bits as numbers.

I have this for example

Flag: 24E10000

Then I get this:

Binary:
0010 0100 1110 0001 0000 0000 0000 0000

So can anyone help me with reattaching the hurtbox to a different bone?

http://acc6.its.brooklyn.cuny.edu/~gurwitz/core5/nav2tool.html
NVM Found this.:/

Another Edit:

Success!!
 

Eternal Yoshi

I've covered ban wars, you know
Joined
Mar 3, 2007
Messages
5,450
Location
Playing different games
NNID
EternalYoshi
3DS FC
3394-4459-7089
I know it's tricky.

First you need to convert the Flags into binary.
http://www.smashboards.com/showthread.php?t=286748
This thread has a great reference list.

Example Flag: 24E10000
To Binary:

0010 0100 1
110 0001 0000 0000 0000 0000

Then you take the first 9 bits(colored lime for you) and interpet them as a number.
You do this by copying the bits highlighted in green, opening this:
http://acc6.its.brooklyn.cuny.edu/~gurwitz/core5/nav2tool.html
and Pasting it in the lower section in the slot: Binary number to convert.
BE SURE TO REMOVE THE SPACES, VERY IMPORTANT.
Click Convert to decimal and that's the bone it's attached to(in decimal not hex).

If you want a new bone to attach it to, look at the top of that window, and type the bone index you want in decimal number to convert.

Let's say I want bone index 20, the program gives me 10100

Then copy the number and paste it so that the last bit is the 9th one.

1010 0
110 0001 0000 0000 0000 0000

Now fill the rest to the left with zeroes.

0000
1010 0110 0001 0000 0000 0000 0000

Now we convert this to hex.

0A610000

And that as they say is that.
 

Toomai

Smash Ace
Joined
Aug 17, 2006
Messages
769
Location
Someplace in Canada
"As for item hurtboxes - I've look for them the best I can and can only find any for Wario's bike."

Where?
In common3_en.pac at ItmWarioBikeParam; extracting the MiscData[0] with BrawlBox makes the location 0x994.

I can't find anything that looks like a hurtbox in the other ItmParam files.
 

Toomai

Smash Ace
Joined
Aug 17, 2006
Messages
769
Location
Someplace in Canada
I think bits 10-13 have to do with which animation the person is sent into when they get hit in a specific hurtbox
That's kind of what I meant by "assigning body position". Something's telling me it also has something to do with footstools, that is maybe it helps in deciding which hurtboxes you can footstool off of.
 

Toomai

Smash Ace
Joined
Aug 17, 2006
Messages
769
Location
Someplace in Canada
Okay, after having a good look at Melee's hurtboxes, I think I've got body position down pat. Going to go update the first post now.

The bad news is that this creates more unknown bits.
 
Top Bottom