• 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!

Salute To The Flags: The Hitbox Flag Directory

Toomai

Smash Ace
Joined
Aug 17, 2006
Messages
769
Location
Someplace in Canada
SALUTE TO THE FLAGS
THE HITBOX FLAG DIRECTORY
[/cheesy]

DISCLAIMER
(read this you maggots)​

This is currently a one-man deal. I've so far only looked in-depth at the hitboxes of Mario, Luigi, Peach, Bowser, Yoshi, Wario, DK, Diddy, and Link, as well as passingly as other characters. As such, this may be incomplete or even *gasp* incorrect.

PREAMBLE
(the witty bit)​

So you've opened up your favourite character editing program (i.e. the only one that works) and are dutifully working away on your moveset editing or whatever. But there's always the time when you're changing a hitbox and you run into a string of eight digits that you don't really know what they do. Maybe you know it does something with the attack's effects or sound, but you can't find a pattern. You probably copy the unhelpfully-labelled "flags" from an attack that does what you want, but wouldn't it be better if you could completely control it instead? That's where all this comes in.

(To skip the rest of the preamble, you can go right to "The Roles Of Flags".)

WHUTS R FLAGGS?
(non-newbies can skip this part)​

A flag is basically a bit. You probably know that a bit can be either 0 or 1. Often, bits work together to store numbers or text, but flags sometimes work alone as well.

So, a flag is a bit. But now you're probably thinking, "But the thing called 'Flags' is made of numbers and letters, not 0s and 1s!" That because you're looking at hex digits. Hex (or hexadecimal) is a way to write down four bits in one number - for example, the bit string 0110 is equal to 6. Letters are used because there are only 10 digits, whilere there are 16 possible 4-digit bit strings. For example, D is equal to 13, which is equal to a bit string of 1101. The list of decimal-hex-binary conversions is this:

Code:
[center]+----------------+-----------+-------------+
|Number (decimal)|Digit (hex)|String (bits)|
+----------------+-----------+-------------+
|        0       |     0     |     0000    |
|        1       |     1     |     0001    |
|        2       |     2     |     0010    |
|        3       |     3     |     0011    |
|        4       |     4     |     0100    |
|        5       |     5     |     0101    |
|        6       |     6     |     0110    |
|        7       |     7     |     0111    |
|        8       |     8     |     1000    |
|        9       |     9     |     1001    |
|       10       |     A     |     1010    |
|       11       |     B     |     1011    |
|       12       |     C     |     1100    |
|       13       |     D     |     1101    |
|       14       |     E     |     1110    |
|       15       |     F     |     1111    |
+----------------+-----------+-------------+
[/center]
What does this mean? The thing labelled "flags" is eight digits long, but since each digit represents 4 bits, we're talking about 32 bits here. For example, the flag 39030200 as a string of bits, is 00111001000000110000001000000000. (Note: If you see a flag that's less than eight digits long, you have to fill in 0s at the beginning until it is before you can work with it properly.)

DIVISION OF LABOUR
(breaking it up)​

The first time you looked at flags, you may have guessed that each of the eight digits had a purpose. That's not a bad idea, and it's partly true - however, it breaks down once you actually try it out. The real culprits are the bits that the digits are made of - they don't work together in evenly-distributed groups. This leads to one attribute overlapping two or even three of a flag's hex digits. Lucky for you, after looking at hundreds of flags, I've pieced together how everything goes together. Let's take the simple 39030200 as an example:

39030200
3 9 0 3 0 2 0 0
0011 1001 0000 0011 0000 0010 0000 0000
00111001000000110000001000000000
0011 1 00100 0000 1 1 00 00001000 0 00000

See how the bits are in unevenly-sized groups? Now we just have to convert them into decimal (understandable numbers), and:

0011 1 4 0000 1 1 00 8 0 0

And now you have some meaningful numbers. Or almost - the meaning of the numbers is the subject of the next section.

(if you don't know how to put a big binary number into decimal, you can put "0b00001000 in decimal" into Google)

THE ROLES OF FLAGS
(the entire point)​

The following is a list of how to make the flags do what you want them to do. There are still a few mystery bits, but I believe all the important ones are known.

Bits 1-4: Unfortunately, we have to start with an unknown. Most attacks have a 0011 here, while some have 0010, others have 0001, and a few have 0000, but it's currently a mystery as to what they accomplish.

Bit 5: Clang This is the clang bit. You've probably heard of "clang" before - it's when two attacks hit each other and they're both interrupted. This bit controls whether a hitbox is able to clang with other hitboxes - if it's 1, it will; if it's 0, it won't. This doesn't mean it will always clang with any other attack (attacks can only clang if they're both grounded and they deal similar damage within 8%), but it does mean that it will be able to, for example, cancel out similarily-damaging projectiles.

Note: Many people will understand this better if I call it the "priority" bit, with 1 being normal priority and 0 being transcendent priority. However, since it's a single bit, convention dictates that 1 be a "yes it can" and a 0 be a "no it can't", and thus I call it the clang bit.

Bits 6-10: Type You generally won't care about what these bits contain, unless you intend your edits to be useful in the Subspace Emissary (or you just like being thorough and complete). That's because these five bits determine what type an attack is, and thus what kinds of stickers will work on it. Most attacks in a character's basic moveset are given a type, while items are only given a type if they can appear in the Subspace Emissary; in the same way Giga Bowser's and Wario-Man's movesets generally lack typing, as (most likely) do Pokémon and Assist Trophies. (The data would have taken up no more space, so it's just a case of the developers being lazy.) When the five bits are interpreted as an integer (number without a decimal), these are the types:

0: Typeless. Most anything that doesn't appear in the Subspace Emissary gets this, as do attacks that don't fit into the other categories (like Mario's Fireball).
1: Head. Things like Yoshi's up smash have this typing.
2: Body. This is applied to things like shoulder rams, bellyflops, and the like.
3: Butt. Moves that use one's rear end as a weapon get this type.
4: Arm. Punches, slaps, and so on.
5: Elbow. Very few moves have this type.
6: Leg. Kicks, generally.
7: Knee. You can probably count these ones on one hand.
8: Throwing. Throws don't have flags like normal hitboxes do, but throws like Mario's back throw that hurt bystanders using the throwee have this type.
9: Weapon. This applies only to weapons in general, like Mario's FLUDD.
10: Sword. This should be obvious.
11: Hammer. Again, obvious.
12: Explosive. Most explosives have this type, but there are a few surprising ones, like Samus' fire blasts and R.O.B.'s burner attacks.
13: Spin. Anything that involves spinning for generally more than one or two revolutions. Note that you cannot have a hitbox that's Spin and something else at the same time.
14: Bite. Omnomnom.
15: Magic. Again, you can't have a Magic/Arm attack, since they take up the same slot.
16: PK. Or Psychic, if you wanna call it that.
17: Light. So far, unique to Pit's arrows.
20: Umbrella. Applies to Peach's Parasol only (for documented attacks).
21: Pikmin. All of 'em.
22: Water. Only Squirtle gets this - FLUDD is considered Weapon.
23: Whip. I haven't looked at everything, but this is used exclusively by two things: ZSS's whip, and Ivysaur's vines.
24: Tail. And all that entails.
25: Energy. Things like Fox's Blaster, Samus' Charge Shot, Ray Gun shots, and so on.

You've probably noticed two things:

1. Numbers 18 and 19 are missing. I haven't seen every hitbox in the game, so they're either hidden away somewhere, or they don't exist. There's enough room for 32 types (0-31) and there don't appear to be any after 25, either.
2. There are more types than sticker effects. I can guess there were going to be Elbow stickers at some point and such, but they decided that there were too few such attacks and merged the effect with Arm. Same with Body/Butt, Leg/Knee, Weapon/Sword/Hammer/Umbrella (probably), and so on.

Bits 11-14: I have yet to find a hitbox that has these be something other than 0000, so I have no clue.

Bit 15 and Bit 16: [color="#7f7ff"]Aerial[/color] and Grounded Bits These two work in tandem to determine whether a hitbox can hit aerial targets, grounded targets, or both. If it's 1, it can hit said target, if it's 0, it cannot. Most moves have both bits as 1, so it'll hit both aerial and grounded targets. Sometimes, a move will have two hitboxes of the same size in the same place, with one hitting air and the other hitting ground; this is used so attacks can have different behaviour on different opponents. A good example of this is Samus' up tilt, it only Meteor Smashes opponents that are grounded.

Bits 17-18: Again, these bits are always 00 for all currently documented hitboxes.

Bits 19-26: Sound When interpreted as an integer, these bits determine what noise you hear when the hitbox strikes an opponent. (Most non-Smasher targets override these sounds, such as breakable walls and such). If an attack deals no damage, the sound will not play. The currently known sounds are as follows:

0: None
1: None? (hard to tell, could be very quiet) (Peach Blossom)
2: Triforce Slash final hit (so far, unique)
3: None
4: None
5: None
6: None
7: None
8: Weak punch
9: Medium punch
10: Strong punch
11: None
12: Weak punch
13: Medium punch
14: Strong punch
15: None
16: Weak kick
17: Medium kick
18: Strong kick
19: None
20: Weak kick
21: Medium kick
22: Strong kick
23: None
24: Weak slash
25: Medium slash
26: Strong slash
27: None
28: Weak slash
29: Medium slash
30: Strong slash
31: None
32: Coin
33: Coin
34: Coin
35: Coin
36: Coin
37: Coin
38: Coin
39: Coin
40: Medium clonk ("clonk" being the noise of a non-smash Home-Run Bat impact)
41: Strong clonk
42: Ping (this is not a coincidence, I tell you)
43: None
44: Weak clonk
45: Medium clonk
46: Ping
50: Paper hit (Luigi's f-smash)
58: Strong shock
64: Weak burn
65: Medium burn
66: Strong burn
72: Splash (FLUDD)
88: Small explosion
90: Large explosion
91: Huge explosion
129: Magic blast (Peach's u-tilt)
137: Weak shell (the "b'dook" noise)
138: Strong shell
144: Weak slap (Peach's neutral)
146: Strong slap (Peach's f-throw)
152: Frying pan
161: Weak golf club
162: Strong golf club
168: Weak racket
170: Strong racket

See the excessive amount of duplication? It's possible that two sounds I think are the same are actually different in minor ways, but I like to think I have a good ear and can tell things apart if they're any different. You can always make your own judgements. Note that for duplicated sound sets (the two sets of three punch sounds, for example), only the first set is what you'll see in established hitboxes.

Bit 27: This one's never been non-0 either.

Bits 28-32: Effect This is a rather significant attribute, and one that's already been decoded elsewhere for the most part. This is probably because it's the last hex digit, it doesn't usually overlap (the leftmost bit is part of the previous hex digit), and its effects are rather obvious. These are also used for sticker purposes in the Subspace Emissary, although they have a much greater effect, so no hitboxes have been skirted like they were for type. Here's the list:

0: Normal hit. Uses the standard hit effects and the "jagged" impending angle indicator.
2: Slash. Uses cutting hit effects and the "boomerang" impending angle indicator. Assuming that this is what activates Slash stickers, this gives rather odd attacks the Slash property - such as Luigi's f-smash and Ray Gun blasts.
3: Electric. Shocks the target, leaving them to spark for a bit. I believe making an attack electric slightly increases its freeze frames. Causes Hotheads to grow and does jack to Yellow Pikmin.
4: Ice. All ice attacks freeze the target; I believe the freeze time is based only on knockback taken. Hitting a frozen opponent with an ice attack won't increase or reset the freeze time.
5: Fire. Aside from the normal effect, fire is by far the most common effect. Fire attacks will set opponents alight and instantly explode Blast Boxes, as well as thaw frozen enemies and deal 110% knockback to Ivysaur. Squirtle takes only 90% knockback from fire attacks, whereas Red Pikmin are completely immune. Also causes Hotheads to grow. Essentially all explosive attacks use the fire effect.
6: Coin. Causes a coin to pop out of the opponent. Does not cause the coin noise, this is set seperately. This is what the Super Jump Punch (and a flubbed Fire Jump Punch) use.
7: Reverse: Turns the opponent around. Mario's Cape is the best example of this. Hacking this effect onto attacks that deal regular knockback will cause the target to take minimal fixed knockback (in the opposite direction due to the reverse), making the move impossible to KO with.
8: Trip. This is not the same as having a trip chance of 100%. With a trip chance, the opponent must take little enough knockback that they remain on the ground. With this, the opponent is guarenteed to remain on the ground and trip. This applies even when hacked onto regular attacks - they'll still take all the sideways knockback, so they'll be sliding while tripping.
9: Sleep. Opponents hit by a sleep attack will take no knockback, instead going to sleep. Hitting a sleeping opponent with a sleep attack will not increase or reset the duration. Only grounded opponents can go to sleep; I believe aerial opponents will take whatever knockback the move has.
11: Bury. Has no extra effect on aerial opponents, but anyone on the ground will find themselves stuck in the dirt. Burying someone already embedded will not increase or reset the duration, although unlike other attacks they won't be sent flying. Hitting an airborne opponent with this does nothing special (normal knockback).
12: Stun. This puts the target into their "I'm drunk" state as if their shield broke. Hitting them again won't increase or reset yadda yadda yadda.
14: Flower. Poisons Plants a flower on the target's head, dealing damage constantly. Hitting them again will increase the flower's staying power up to a point.
17: Grass. Squirtle takes 110% knockback from these attacks, while Charizard takes 90%. Otherwise, this effect doesn't do anything special. Uses Slash-like impact effects.
18: Water. This causes Charizard to take 110% knockback while Ivysaur takes 90%. This also gives Blue Pikmin a relaxing, completely non-threatening bath. No effect otherwise. Uses Normal-like impact effects.
19: Darkness. Sets the opponent on purple fire. Ganondorf and Giga Bowser are the general culprits here, although White Pikmin probably use the effect as well (they shouldn't be immune to it).
20: Paralyze. This effect makes the target shake in place for a while before taking any knockback. ZSS uses this a bit, as do some Final Smashes.
21: Aura. If Lucario is the user, this effect will cause the attack to get stronger or weaker depending on his damage and place in the match. Otherwise, it'll do nothing but produce blue fire.
22: Plunge. This is what Pitfalls do - normally it's identical to burying, but it will shove people downwards through soft platforms.
23: Down. Hitting with this causes the opponent to immediately lie on their back like Snake's down throw (throws are not hitboxes but do have effects). Hitting in succession will keep the target down. Aerial opponents take minimal knockback in what appears to be the down-back direction, which makes me speculate that this is what actually causes the effect.
24: Flinchless. This effect does damage but nothing else; the target will not flinch or get any freeze frames. Interestingly, while Training Mode will correctly report how much damage the hit did, it will not report on consecutive hits or total damage; they will be left unchaged from whatever the previous hit displayed.

You'll see that a few numbers are missing, namely 1, 10, 13, 15, 16, and everything from 25 to 31. As far as I know these effects are undefined; an undefined effect has no hit effects but does deal normal damage and knockback.

SPECIAL HITBOXES
(double trouble)​

If you've done moveset stuff, you may have noticed that some hitboxes have two extra parameters. These are special hitboxes - they may have characteristics that most hitboxes don't need denoted (such as reflectability). The first parameter is the rehit rate (makes the hitbox hit repeatedly every X frames), while the second one is - an entirely new 32-bit set of flags! Here we go again!

Note: I currently have a significantly smaller sample size of special hitboxes, so there will be far more unknowns.

Bits 1-7: No idea. Sorry. However, I am guessing that bit 5 has to do with the attacker/attacking object getting freeze frames.

Bit 8: Absorbability If this bit is 0, put away PSI Magnet and Oil Panic, because they're useless. But if it's 1, put up your energy shield and the hitbox will be absorbed.

Bit 9: Reflectability If this bit is 0, don't bother with your Capes and Reflectors. But if it's 1, return postage ahoy.

Bit 10: Shieldability This is normally 1 for obvious reasons. But if this bit is 0, your normally-reliable concentration bubble/egg will fail to save you. Presumably, this will also make a move go through counters.

Bits 11-12: Seem to always be 0.

Bits 13-26: Hit Bits These bits control what kind of targets the hitbox will be able to hit. Exactly what is what is sketchy right now, but the following are the plausible ones:

Bit 17: Damageable Floors
Bit 18: Damageable Walls
Bit 19: Damageable Ceilings
Bit 26: Smashers

Bits 27-29: Don't really have a clue.

Bits 30-32: Angle Flipping? Normally, an attack will always send the target away from the attacker. However, I believe that these bits can control things so that the target is always sent the direction the attacker is facing, or the direction the attacker is not facing.

EXAMPLE
(the fun part)​

So now you're armed with information. Now you just gotta put it into practice - how do you do that?

Say you want a hitbox to be an Arm/Flower attack that plays the Ping noise. You don't care about whether it clangs, so you leave that as a "yes", and you want it to hit both aerial and grounded opponents. So, write it out:

Clang: Yes; Type: Arm; Hits aerial: Yes; Hits grounded: Yes; Sound: Ping; Effect: Flower​

Now, convert into numbers.

1; 4; 1; 1; 42; 14​

Convert those numbers into binary. Remember that Type and Effect are 5 bits long while Sound is 8 bits - don't leave out the leading zeros.

1; 00100; 1; 1; 00101010; 01110​

Now you need to fit these bits into the correct spaces - the Clang bit is bit 5, the Type bits are 6 to 10, and so on. Use 0s to fill in the space (leave bits 1-4 as 0011 until we find out what they do).

0011 1 00100 0000 1 1 00 00101010 0 01110
00111001000000110000101010001110​

Finally, convert it into hex.

0011 1001 0000 0011 0000 1010 1000 1110
3 9 0 3 0 A 8 E​

And there you have it, your flags are 39030A8E!

CLOSING
(teh edn)​

Now you know a few things about making your own flags, instead of just copying the ones already in the game. You ain't gonna find an Explosive/Grass attack that makes a slapping noise in pre-existing code, are you? Would you even want that kind of hitbox? Well, if you did, you should be able to do it now.
 

Toomai

Smash Ace
Joined
Aug 17, 2006
Messages
769
Location
Someplace in Canada
CONTRIBUTIONS
(them peeps who helped and what they did)​

AMKalmar: Wrote a little Flash called Flagger, which will do conversion from numbers to flags (for regular hitboxes).

Hozu: Tipped me off that there's a mystery flag out there that lets moves hit teammates regardless of Team Attack.
 

rPSIvysaur

[ɑɹsaɪ]
Joined
Jun 7, 2009
Messages
16,415
Salute! I got Bio to add copy this thread in here. This is for resource purposes.
 

rPSIvysaur

[ɑɹsaɪ]
Joined
Jun 7, 2009
Messages
16,415
Deriving data from hitbox flags.
(numbers like 3A08C240)

Figuring out clang.
To know what clang is we need to determine bit number 5. This is the first one in number 2 (as indicated by green). Since it is the first bit of that number, we need to find if the number is greater or less than 8. If the number is greater than 8, then it clangs. If it is less than 8 then it does not clang.
Figuring out Aerial/Grounded Hitboxes
To find out if a hitbox hits aerial/grounded opponents we need to look for the 15th and 16th bits. These are in the 4th number in the flags (indicated by magenta). To find out if it hits an aerial opponent the number needs to either be 2, 3, 6, 7, A, B, E, F. To find out if it hit a grounded opponent it needs to be an odd number (B, D, F included).
Figuring out the hit effect
This relies on the last two numbers. First of all, of the second to last number (as indicated by cyan), all you need to note if it's even or odd. Now for the part where you have to understand binary conversion. Now convert the last number (as indicated by red) into binary. It should be something sort of like this:
8 → 1000
Now since the part is 5 bits long, we need to know the last bit of the second to last number. This will require to know if the second to last is even or odd. If it is odd add a 1 to the front of your binary sort of like this:
8 → 1000 → 11000
If it is even add a 0 in front.
Now convert your new number into decimal. For the one above we'd end up with something like this:
8 → 1000 → 11000 → 24
Now use the new decimal number you found and compare it to this:
Hitbox Flag Index said:
0: Normal hit. Uses the standard hit effects and the "jagged" impending angle indicator.
2: Slash. Uses cutting hit effects and the "boomerang" impending angle indicator. Assuming that this is what activates Slash stickers, this gives rather odd attacks the Slash property - such as Luigi's f-smash and Ray Gun blasts.
3: Electric. Shocks the target, leaving them to spark for a bit. I believe making an attack electric slightly increases its freeze frames. Causes Hotheads to grow and does jack to Yellow Pikmin.
4: Ice. All ice attacks freeze the target; I believe the freeze time is based only on knockback taken. Hitting a frozen opponent with an ice attack won't increase or reset the freeze time.
5: Fire. Aside from the normal effect, fire is by far the most common effect. Fire attacks will set opponents alight and instantly explode Blast Boxes, as well as thaw frozen enemies and deal 110% knockback to Ivysaur. Squirtle takes only 90% knockback from fire attacks, whereas Red Pikmin are completely immune. Also causes Hotheads to grow. Essentially all explosive attacks use the fire effect.
6: Coin. Causes a coin to pop out of the opponent. Does not cause the coin noise, this is set seperately. This is what the Super Jump Punch (and a flubbed Fire Jump Punch) use.
7: Reverse: Turns the opponent around. Mario's Cape is the best example of this. Hacking this effect onto attacks that deal regular knockback will cause the target to take minimal fixed knockback (in the opposite direction due to the reverse), making the move impossible to KO with.
8: Trip. This is not the same as having a trip chance of 100%. With a trip chance, the opponent must take little enough knockback that they remain on the ground. With this, the opponent is guarenteed to remain on the ground and trip. This applies even when hacked onto regular attacks - they'll still take all the sideways knockback, so they'll be sliding while tripping.
9: Sleep. Opponents hit by a sleep attack will take no knockback, instead going to sleep. Hitting a sleeping opponent with a sleep attack will not increase or reset the duration. Only grounded opponents can go to sleep; I believe aerial opponents will take whatever knockback the move has.
11: Bury. Has no extra effect on aerial opponents, but anyone on the ground will find themselves stuck in the dirt. Burying someone already embedded will not increase or reset the duration, although unlike other attacks they won't be sent flying. Hitting an airborne opponent with this does nothing special (normal knockback).
12: Stun. This puts the target into their "I'm drunk" state as if their shield broke. Hitting them again won't increase or reset yadda yadda yadda.
14: Flower.*Poisons*Plants a flower on the target's head, dealing damage constantly. Hitting them again will increase the flower's staying power up to a point.
17: Grass. Squirtle takes 110% knockback from these attacks, while Charizard takes 90%. Otherwise, this effect doesn't do anything special. Uses Slash-like impact effects.
18: Water. This causes Charizard to take 110% knockback while Ivysaur takes 90%. This also gives Blue Pikmin a relaxing, completely non-threatening bath. No effect otherwise. Uses Normal-like impact effects.
19: Darkness. Sets the opponent on purple fire. Ganondorf and Giga Bowser are the general culprits here, although White Pikmin probably use the effect as well (they shouldn't be immune to it).
20: Paralyze. This effect makes the target shake in place for a while before taking any knockback. ZSS uses this a bit, as do some Final Smashes.
21: Aura. If Lucario is the user, this effect will cause the attack to get stronger or weaker depending on his damage and place in the match. Otherwise, it'll do nothing but produce blue fire.
22: Plunge. This is what Pitfalls do - normally it's identical to burying, but it will shove people downwards through soft platforms.
23: Down. Hitting with this causes the opponent to immediately lie on their back like Snake's down throw (throws are not hitboxes but do have effects). Hitting in succession will keep the target down. Aerial opponents take minimal knockback in what appears to be the down-back direction, which makes me speculate that this is what actually causes the effect.
24: Flinchless. This effect does damage but nothing else; the target will not flinch or get any freeze frames. Interestingly, while Training Mode will correctly report how much damage the hit did, it will not report on consecutive hits or total damage; they will be left unchaged from whatever the previous hit displayed.

You'll see that a few numbers are missing, namely 1, 10, 13, 15, 16, and everything from 25 to 31. As far as I know these effects are undefined; an undefined effect has no hit effects but does deal normal damage and knockback.
 
Joined
May 3, 2009
Messages
7,190
I posted about transcendence blah blah blah days ago in the Hitbox Repository... I even made a thread.

i mad:mad:
 
Top Bottom