Behind the scenes: what is Yo-yo glitch?
Section 1: Hitbox activation and the Yo-yo glitch.
Almost all non-projectile hitboxes in melee are created and activated in a uniform manner : through "
hitbox creation events". Each new hitbox ID requires it's own event. In these events, hitbox data for the hitbox ID in question is interpreted and stored into the corresponding hitbox ID slot in the character's data section. The events may also "
activate" the hitbox, and erase "
hit records" (Clears out the list of characters the hitbox has already hit, so that the new hitbox won't ignore characters a previous hitbox hit).
If the hitbox ID is already active when the event is called for a "new" hitbox of that ID, then the erasure of hit records and hitbox activation are skipped. In that case, the event functions as a
hitbox modification event . Typical examples are moves that get weaker after a certain amount of frames, such as Fox's nair.
The significant part of a
hitbox creation event in relation to the Yo-yo glitch is that whenever the event
activates a new hitbox, it also turns on a specific flag in the characters data section (at 8th bit of data + 0x2219, for those interested). That
Action-State Change Hitbox Deactivation Flag makes the game deactivate all hitboxes upon action-state change, if the flag is on. For example, the Action-State Change Hitbox Deactivation Flag notifies the game that should Fox land during his nair when hitboxes are still out, the hitboxes must be deactived. Hitbox deactivation process then also turns off the flag.
Ness usmash and dsmash use a special way of
re-activating the Yo-yo hitbox, without involving a
hitbox creation event: If the Yo-yo hits an object, a 30 frame timer is created. After those 30 frames have passed (the timer doesn't tick during the initial hitlag), if Ness is still performing the usmash or dsmash and hasn't passed frame 38 of the move, it's hitbox is
re-activated. The purpose of the reactivation is probably simple: it's there to make the Yo-yo potentially hit the same enemy twice while Ness is charging the smash attack. The re-activation involves clearing
hit records and
activating the hitbox ID0 (Only hitbox ID for both Ness usmash and dsmash). However, the re-activation process fails turning on the
Action-State Change Hitbox Deactivation Flag.
That failure is the core reason behind the Yo-yo glitch, as it can create a situation where the hitbox ID0 is active, but the Action-State Change Hitbox Deactivation Flag is off. That in turn leads to the hitbox persisting when the move ends and the action-state changes. Both upsmash and dsmash deactivate all hitboxes on frame 32. If the re-activation occurs before f32, the move still works as intended, because the Action-State Change Hitbox Deactivation Flag is naturally still on, and the re-activated hitbox will be deactivated anyway. But if the re-activation takes place after the normal hitbox deactivation, then the Action-State Change Hitbox Deactivation Flag is off (due to the deactivation earlier), and the glitch occurs. Once the glitch is performed, the Yo-yo hitbox will stay active on the ground, glued to the last place where the Yo-yo was before disappearing.
Thus, with usmash, the re-activation must occur between frames 32 and 37 of the move to activate the glitch. Typical way to achieve that is to hit with the very first hit of Yo-yo on f12, and charge the usmash for 6 - 12 frames. The charging delays the usmash animation from proceding, so that the 30 frame re-activation timer can end during the window of f32 - f37. If the move is charged too short, the re-activation won't happen. If it's charged for too long, then the re-activation occurs too early into the move, before the hitbox deactivation event.
Dsmash has an additional hitbox deactivation event on frame 43. Because of that, dsmash can only activate the Yo-yo glitch if the player is able to interrupt the dsmash prematurely, before the second deactivation (but after re-activation has occurred).
Section 2: Consequences of the Yo-yo glitch ("Jackets", "Special Yo-yos" etc.)
The best known Yo-yo glitch derivative are probably
jackets. Once Ness has activated the Yo-yo glitch, he can replace the Yo-yo hitbox with any attack hitbox of a move that only uses a single hitbox (ID 0). The new hitbox will then also persist active, if the attack (or other action-state that places hitbox on Ness) is interrupted before any hitbox deactivation event (i.e. before the hitboxes of the attack would end naturally).
The jackets occur due to how the standard hitbox creation event interacts with the Yo-yo glitch. The event notices that the ID 0 hitbox is already active, so the event is then considered as a modification event. In addition to the clearing of the hitbox record and activation being skipped, the
Action-State Change Hitbox Deactivation Flag being turned on is also skipped. Thus the hitbox of the new move will also persist through action-state changes. The hitbox creation event replaces the characteristics of the ID 0 yo-yo hitbox with the new hitbox data. That involves bone attachment in addition to damage, kb angle and so on. Thus, the new hitbox will appear where it normally would related to Ness body, only it will persist and stay on him.
If Ness already has a jacket, he can "equip" another jacket the same way as if he had Yo-yo glitch hitbox left on ground. Naturally, as the ID 0 hitbox of the jacket is active, so the hitbox creation event handles the jacket switch as a hitbox modification, and the
Action-State Change Hitbox Deactivation Flag is off and stays off.
Moves with multiple hitboxes cannot be jacketed, because for creation events of the hitbox IDs different from 0, that hitbox ID won't be active beforehand. Thus, the portion of the event code for new hitboxes is completed, including
Action-State Change Hitbox Deactivation Flag being turned on.
When Ness has equipped a jacket and starts usmash or dsmash, the jacket hitbox attaches to the Yo-yo (special Yo-yo), but other hitbox characteristics remain at the beginning of the smash. This is due to the particular way the Yo-yo hitbox moves normally: The hitbox isn't attached to Ness. Instead, it's moved to where the Yo-yo is every frame individually.
The movement code begins at the beginning of the smash, even though the hitbox creation event only occurs later. Normally that doesn't matter as the hitbox that is moved isn't active, but with a jacket, it moves the jacket hitbox to where the Yo-yo is. When the Yo-yo glitch is performed (without a jacket), the glitched hitbox stays where the Yo-yo last was, because the code that moves the hitbox stops being executed. Also because of that, if a special Yo-yo usmash or dsmash is interrupted before the creation of the regular Yo-yo hitbox, the jacket hitbox then "drops" to ground to where the Yo-yo was when interrupted, and stays there (dropped jacket).
A hit with a "special Yo-yo" still starts the timer for the hitbox re-activation, even though normally no hitbox should be active at the time. As the special Yo-yo hit occurs earlier into the smash than a normal Yo-yo hit would, it can start entirely new Yo-yo glitch without the need to charge the smash.
Section 3: Game modification to allow multi-hitbox jackets:
I created a gecko code (for NTSC v1.02) to allow multi-hitbox moves like nair, bair, or even fsmash to be jacketed. One must still be able to interrupt a move before any hitbox deactivation event to equip a jacket. The code simply changes slightly how the hitbox creation event works: the
Action-State Change Hitbox Deactivation Flag being turned on will be skipped if any hitbox is active, instead of just if the hitbox ID corresponding to the event is active.
Code:
$Universal Jackets (NTSC 1.02) [tauKhan]
* Ness can equip a jacket from multi-hitbox moves after performing YYG
040712B4 40820010
C20712A8 00000006
387F0914 38800000
38C00000 7CA3202E
7CC62B78 38840138
2C0403A8 4081FFF0
2C060000 38A00001
7FC4F378 00000000