azer67

TWW - Weirdshots Explanation by bowser

May 31st, 2024
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.69 KB | None | 0 0
  1. Ground (weird shot) clips can only be done in the normal walking, first person, and targeting scooting animations. Other animations do not work. To properly understand how ground clips work it is crucial to understand how Link’s horizontal and vertical displacement work (in the specified animations). Link’s horizontal displacement is determined by 2 values stored in the game’s RAM: speed angle and actual speed. (Note: horizontal displacement is technically based on actual speed angle = (speed angle) // 16 so actual speed angle goes from 0 to 4095. Note: the actual speed value can be negative this has the same magnitude of its positive counterpart, but the actual speed angle gets turned by 180 degrees.)
  2.  
  3. Link’s horizontal displacement can get stopped by collision that gets in its way. Collision is determined to be in Link’s way if, along Link’s path, Link would need to deviate more than 30 units up to go over an obstacle. (Note: Link’s Y value is not changing yet.) Link’s horizontal displacement can also be stopped from above. If there is an obstacle that is less than 140 units above Link’s feet, then Link will be unable to go under it. (Note: collision detection detects a vertical line (small collision) not an upright cylinder (big collision). Big collision gets calculated later in the frame and for our purposes can be ignored.)
  4.  
  5. Once Link’s horizontal displacement is calculated, Link’s vertical displacement starts to be determined. The game checks to see if, at the new horizontal position, there is a spot to stand either 30 units up or 30 units down from the previous vertical position. If there is, Link will go to the highest valid Y value and stay in the grounded state. If there is no spot to stand, Link will enter the falling state. If link remains in a grounded state and is in specifically one of the previously mentioned animations, a second vertical displacement occurs. In other animations the vertical displacement would be done being calculated for the frame.
  6.  
  7. We do not know why the following happens. Our best guess is that it is the result of the developers wanting Link’s feet to be better aligned with the incline that he is walking on, but that explanation does not fully add up. Regardless, it is very broken.
  8.  
  9. The second vertical displacement uses a different horizontal position known as the projected position. The projected position is the horizontal displacement added a second time. (Note: Link does not move here just that the vertical displacement uses this position.) Like the first vertical displacement, the second vertical displacement looks for standable collision but this time at the projected position. The game checks to see if there is a spot to stand up to 30 units from the previous vertical position and Link will stand on the highest collision it can find. If it cannot find any collision in the range, you will not displace at all. Either way you say in the grounded state. (Note: the previous vertical position is the position after the first vertical displacement.) As for how far down the game checks it is bit more complicated.
  10.  
  11. The maximum displacement downwards can have no practical limit or be as little as 0. The main factors that determine this are the relative slope to Link’s facing angle and the sign and magnitude of the actual speed. (There might be other factors. These just seem to affect it the most.) The way I approximate the maximum possible downward displacement is by taking the apparent slope based on Link’s facing angle and continuing it for length of the magnitude of the actual speed. If you are facing up the slope you need negative speed and if you are facing down the slope you need positive speed. (This seems somewhat accurate, but I do not know). (Note: I have no idea if it can prevent the upward displacement SHOULD TEST.)
  12.  
  13. As mentioned above Link is 140 units tall. So, if you want to clip under the floor, you need to clip at least 140 units down. After you clip you are in the grounded state so you will continue with speed. You still can get stopped by walls and everything.
  14. If you clip between 140 and 30 units and are against a wall, Link will pop back up and loose his speed. If you clip 30 units or less against a wall you will stay grounded and keep your speed. This causes a weird shot. If you repeatedly clip 30 units, this is known as a mega weird shot. (Note: how far you weird shot needs more testing.)
  15.  
  16. There are a few methods to do a weird shot clip, depending on the collision around you. For all methods you need a slope, and you need some lower, further-away collision (projected collision).
  17.  
  18. If the projected collision is in the direction of up the slope (the slope needs to raise Link 30 units), you can clip going up the slope (for example, fairy fountains).
  19.  
  20. If the slope meets with a wall and the projected collision is behind the wall, you can clip charging against the wall (for example, door clip).
  21.  
  22. You can also clip without being stopped by walls/slopes. This requires having enough space to move in a straight line the distance of the slope to the projected collision (for example, early savage or song sone skip with tingle balloon).
  23. Finally, you can theoretically clip when the projected collision is behind a slope that goes up less than 30 units. You can do this if you can do one of the aforementioned clipping techniques first clip down a little less than 30 units (for example, wind temple boss key skip WIP).
  24.  
  25. The entire overworld has an ocean floor. This enables weird shot clip island hops. There is also a pseudo floor at -1e9 (-1000000000) everywhere. This is only useful if there is water to help pop you back up (for example, forbidden woods boss key skip) since if you fall past -1e9 not in a cutscene state you will crash.
  26.  
Add Comment
Please, Sign In to add comment