Difference between revisions of "Hookpush"

From ALttP Speedrunning Wiki
Jump to: navigation, search
(General Technique)
(General Technique)
Line 19: Line 19:
 
## Have an ancilla in Slot 9. When we go to use the Cane of Somaria with the Front Slots filled, the game will take the value of the Search Index and look from that value down until it finds an ancilla to replace. If we have an ancilla in slot 9, the block will load there, which is exactly what we want. Usually, we'll hold a sword charge to do this, since the sparkles that appear on the sword use Slots 7-9 by default.
 
## Have an ancilla in Slot 9. When we go to use the Cane of Somaria with the Front Slots filled, the game will take the value of the Search Index and look from that value down until it finds an ancilla to replace. If we have an ancilla in slot 9, the block will load there, which is exactly what we want. Usually, we'll hold a sword charge to do this, since the sparkles that appear on the sword use Slots 7-9 by default.
 
## With the Search Index set above <code>09</code>, all of the Front Slots occupied, and an object loaded in Slot 9, we can use the Cane of Somaria and a block will be loaded into Slot 9. This will appear on the HUD as <code>2C</code> in Slot 9.
 
## With the Search Index set above <code>09</code>, all of the Front Slots occupied, and an object loaded in Slot 9, we can use the Cane of Somaria and a block will be loaded into Slot 9. This will appear on the HUD as <code>2C</code> in Slot 9.
# With a block in Slot 9, when we use the Hookshot, the game will look at the counter for the Hookshot's slot for the first frame of the Hookpush and then for each subsequent frame it will use the counter for the next slot down until it reaches Slot 0, where it will stay until the counter at Slot 0 had decremented down to <code>00</code>. How we choose these counters for the results that we want depends heavily on the context, but here are some notes that can help you create setups or figure out issues with existing ones:
+
# With a block in Slot 9, when we use the Hookshot, the game will look at the counter for the Hookshot's slot for the first frame of the Hookpush and then for each subsequent frame it will use the counter for the next slot down until it reaches Slot 0, where it will stay until the counter at Slot 0 had decremented down to <code>00</code>. How we choose these counters for the results that we want depends heavily on the context, and if you're looking to learn a specific Hookpush, you can go read the Applications section for info specific to what you're learning. But here are some general notes that can help you understand the manipulations being done:
 
## If you don't want to enter EG, you'll want your EG Check value to be <code>00</code> or you'll want to have [[Exploration Glitch|Weak EG]] set. It's important to note that this watch is viewing the EG Check at Slot 0. This is very relevant for avoiding unintentional EG since you'll typically be using Slot 0 to do the Hookpush, but if you want to enter EG, you can end the push early and use a different slot's EG Check value, which won't be displayed on the HUD. Currently most setups used to Hookpush to EG do use a higher slot with that slot's counter at <code>00</code> (so the Hookpush stops at that slot) but the EG Check for that slot is set above <code>00</code>.
 
## If you don't want to enter EG, you'll want your EG Check value to be <code>00</code> or you'll want to have [[Exploration Glitch|Weak EG]] set. It's important to note that this watch is viewing the EG Check at Slot 0. This is very relevant for avoiding unintentional EG since you'll typically be using Slot 0 to do the Hookpush, but if you want to enter EG, you can end the push early and use a different slot's EG Check value, which won't be displayed on the HUD. Currently most setups used to Hookpush to EG do use a higher slot with that slot's counter at <code>00</code> (so the Hookpush stops at that slot) but the EG Check for that slot is set above <code>00</code>.
 
## We'll generally want the counters in the slots between the Hookshot's slot and Slot 0 to be non-zero values. If any of these values are 0, then the Hookpush will end on the frame the game is using that counter. By default the Hookshot will spawn in Slot 4, and if that's what the setup calls for, then you'll probably want the counters for Slots 1-3 to be non-zero. You can also force the Hookshot to load into different slots. If I place a normal Somaria block (defaults to Slot 4) and then Dash Dust (will load in Slot 3), then my Hookshot will spawn in Slot 2. Now the Hookpush will ignore the counters in Slots 3 and 4, which can be convenient in some contexts.
 
## We'll generally want the counters in the slots between the Hookshot's slot and Slot 0 to be non-zero values. If any of these values are 0, then the Hookpush will end on the frame the game is using that counter. By default the Hookshot will spawn in Slot 4, and if that's what the setup calls for, then you'll probably want the counters for Slots 1-3 to be non-zero. You can also force the Hookshot to load into different slots. If I place a normal Somaria block (defaults to Slot 4) and then Dash Dust (will load in Slot 3), then my Hookshot will spawn in Slot 2. Now the Hookpush will ignore the counters in Slots 3 and 4, which can be convenient in some contexts.
 
## Generally we'll want the counter at Slot 0 to be a high value. This is because when the Hookpush gets to the counter in Slot 0, it will use only this counter until it decrements to <code>00</code>, when the Hookpush will end. Because Sword Beams write <code>4C</code> to their slot's counter, a Slot 0 Sword Beam is often used for this. 4C in decimal is 76, meaning we get a whopping 76 frames of Hookpushing with that value.
 
## Generally we'll want the counter at Slot 0 to be a high value. This is because when the Hookpush gets to the counter in Slot 0, it will use only this counter until it decrements to <code>00</code>, when the Hookpush will end. Because Sword Beams write <code>4C</code> to their slot's counter, a Slot 0 Sword Beam is often used for this. 4C in decimal is 76, meaning we get a whopping 76 frames of Hookpushing with that value.
## Somaria blocks run their code even when the game is paused to the item or S&Q menus. This includes Slot 9 Blocks and how they decrement the value stored at <code>$039D</code> every frame. The Hookshot does not function while the game is paused though, and this quirk allows for more setups. You can, for example, have a counter set to <code>00</code> in Slot 1, which would ordinarily mean the Hookpush will terminate there, before it can execute the data stored in Slot 0 (generally a very high counter). BUT if you use the Hookshot and pause the game just after it latches onto something, the Slot 9 Somaria block will be decrementing <code>$039D</code> every frame, meaning when you unpause, the Hookpush will be reading Slot 0. This is a useful way to bypass slots that have data you don't want to use.
+
## Somaria blocks run their code even when the game is paused to the item or S&Q menus. This includes Slot 9 Blocks and how they decrement the value stored at <code>$039D</code> every frame. The Hookshot does not function while the game is paused though, and this quirk allows for more setups. You can, for example, have a counter set to <code>00</code> in Slot 1, which would ordinarily mean the Hookpush will terminate there before it can execute the data stored in Slot 0 (generally a very high counter). BUT if you use the Hookshot and pause the game just after it latches onto something, the Slot 9 Somaria block will be decrementing <code>$039D</code> every frame, meaning when you unpause, the Hookpush will be reading Slot 0. This is a useful way to bypass slots that have data you don't want to use.
 
## Directions aren't displayed on the Ancilla HUD, but these are also very important for Hookpushing. Just like the Hookpush is using the counters set by other ancillae, it will also use the direction of other ancillae. If I do a Slot 0 Sword Beam to the south, the Hookpush will use that direction while using Slot 0's counter, regardless of which direction I'm actually using the Hookshot in. The direction of Slot 0's ancilla in the setup is especially important, as this is what most of your Hookpush frames will be using. Some setups are positionally sensitive enough that the directions set in other Slots are significant as well.
 
## Directions aren't displayed on the Ancilla HUD, but these are also very important for Hookpushing. Just like the Hookpush is using the counters set by other ancillae, it will also use the direction of other ancillae. If I do a Slot 0 Sword Beam to the south, the Hookpush will use that direction while using Slot 0's counter, regardless of which direction I'm actually using the Hookshot in. The direction of Slot 0's ancilla in the setup is especially important, as this is what most of your Hookpush frames will be using. Some setups are positionally sensitive enough that the directions set in other Slots are significant as well.
  

Revision as of 16:55, 27 May 2021

Hookpush is a Major Glitch that uses Misslotting to alter the values the Hookshot uses to determine how far and in what direction to pull Link when the hook latches onto something. Because the game mostly ignores collision while Link is being dragged by the Hookshot, this can be a very powerful glitch for bypassing walls and other obstacles.

Loose Explanation

Normally, when Link uses the Hookshot, a Hookshot ancilla is loaded into slot4 and a counter in that slot will immediately be set to 0 and then increment every frame the Hookshot is extending. When the Hookshot connects with an object to pull Link to, the counter will decrement every frame as Link is pulled to the object, with Link stopping when the counter gets back to 0. But what if we can get the Hookshot to look at different counters outside of its current ancilla slot? That's how this glitch is gonna work.

$039D is a memory address where the Hookshot's current slot value is written to when we use the Hookshot, and it is referenced when the game starts pulling Link to determine which slot's counters the game should use. A Somaria block placed in slot9 will decrement the value at this address every frame. This means that if we have a Somaria block in slot9, and we use the Hookshot with no other ancilla loaded, the Hookshot will spawn in slot4 and the counter for slot4 will increment until the Hook connects with an object. For the first frame of pulling, the slot4 counter will be used, but then, because of the slot9 block decrementing the value at $309D, the next frame of pulling will read data from slot3, the 3rd frame of pulling from slot2, then slot1, and then finally slot0, where it will continually use this counter until it reaches 0.

Through using other ancillae in specific ways, we can manipulate the counters in other slots to get the Hookshot to pull us for extended durations and/or in the incorrect directions. Or even have it pull us to EG.

General Technique

Labeled Ancillae Super Watch
To best learn this and debug problems that may arise, you'll want to use Ancilla Watch in the Practice Hack. Open the Practice Hack Menu, go to HUD Extras, then Super Watch and toggle to Ancillae. This will draw values important to misslotting and Hookpushing on the left side of your HUD. Reference the image to see what these values are.

In order to Hookpush, we want to do a few different things:

  1. Misslot a Somaria Block into Slot 9. This requires a couple of steps:
    1. Get the Search Index higher than 09. There are multiple ways to manipulate the Search Index, and the best way may depend on the specific Hookpush you're doing. However, the most common way to get a value higher than 09 is to quickly use the Lamp 3 times while Link is facing any direction except right. Not many things that crop up in normal gameplay write to this address, and only hard resets will put it back to 0. So you can often set this value way ahead of the exact room/moment where you want to do a Hookpush.
    2. Fill the Front Slots (slots 0-4) with ancillae. This is necessary because Somaria blocks will occupy a Front Slot by default, but we want it to load into Slot 9.
    3. Have an ancilla in Slot 9. When we go to use the Cane of Somaria with the Front Slots filled, the game will take the value of the Search Index and look from that value down until it finds an ancilla to replace. If we have an ancilla in slot 9, the block will load there, which is exactly what we want. Usually, we'll hold a sword charge to do this, since the sparkles that appear on the sword use Slots 7-9 by default.
    4. With the Search Index set above 09, all of the Front Slots occupied, and an object loaded in Slot 9, we can use the Cane of Somaria and a block will be loaded into Slot 9. This will appear on the HUD as 2C in Slot 9.
  2. With a block in Slot 9, when we use the Hookshot, the game will look at the counter for the Hookshot's slot for the first frame of the Hookpush and then for each subsequent frame it will use the counter for the next slot down until it reaches Slot 0, where it will stay until the counter at Slot 0 had decremented down to 00. How we choose these counters for the results that we want depends heavily on the context, and if you're looking to learn a specific Hookpush, you can go read the Applications section for info specific to what you're learning. But here are some general notes that can help you understand the manipulations being done:
    1. If you don't want to enter EG, you'll want your EG Check value to be 00 or you'll want to have Weak EG set. It's important to note that this watch is viewing the EG Check at Slot 0. This is very relevant for avoiding unintentional EG since you'll typically be using Slot 0 to do the Hookpush, but if you want to enter EG, you can end the push early and use a different slot's EG Check value, which won't be displayed on the HUD. Currently most setups used to Hookpush to EG do use a higher slot with that slot's counter at 00 (so the Hookpush stops at that slot) but the EG Check for that slot is set above 00.
    2. We'll generally want the counters in the slots between the Hookshot's slot and Slot 0 to be non-zero values. If any of these values are 0, then the Hookpush will end on the frame the game is using that counter. By default the Hookshot will spawn in Slot 4, and if that's what the setup calls for, then you'll probably want the counters for Slots 1-3 to be non-zero. You can also force the Hookshot to load into different slots. If I place a normal Somaria block (defaults to Slot 4) and then Dash Dust (will load in Slot 3), then my Hookshot will spawn in Slot 2. Now the Hookpush will ignore the counters in Slots 3 and 4, which can be convenient in some contexts.
    3. Generally we'll want the counter at Slot 0 to be a high value. This is because when the Hookpush gets to the counter in Slot 0, it will use only this counter until it decrements to 00, when the Hookpush will end. Because Sword Beams write 4C to their slot's counter, a Slot 0 Sword Beam is often used for this. 4C in decimal is 76, meaning we get a whopping 76 frames of Hookpushing with that value.
    4. Somaria blocks run their code even when the game is paused to the item or S&Q menus. This includes Slot 9 Blocks and how they decrement the value stored at $039D every frame. The Hookshot does not function while the game is paused though, and this quirk allows for more setups. You can, for example, have a counter set to 00 in Slot 1, which would ordinarily mean the Hookpush will terminate there before it can execute the data stored in Slot 0 (generally a very high counter). BUT if you use the Hookshot and pause the game just after it latches onto something, the Slot 9 Somaria block will be decrementing $039D every frame, meaning when you unpause, the Hookpush will be reading Slot 0. This is a useful way to bypass slots that have data you don't want to use.
    5. Directions aren't displayed on the Ancilla HUD, but these are also very important for Hookpushing. Just like the Hookpush is using the counters set by other ancillae, it will also use the direction of other ancillae. If I do a Slot 0 Sword Beam to the south, the Hookpush will use that direction while using Slot 0's counter, regardless of which direction I'm actually using the Hookshot in. The direction of Slot 0's ancilla in the setup is especially important, as this is what most of your Hookpush frames will be using. Some setups are positionally sensitive enough that the directions set in other Slots are significant as well.

Applications

Chicken House to Witch Hut

Kakariko Shop to Ice Cave

Skull Big Chest EG

Swamp Entrance to Mothula