Advertisement
exodus122

Priority of Link's actions in OoT

Apr 25th, 2022 (edited)
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.03 KB | None | 0 0
  1. Here's something interesting I learned from decomp which shows the priority of many of link's actions.
  2.  
  3. These list of numbers determine which action functions to run and which order to run them in while Link is in certain states in the game. It will stop after one succeeds. This means if you perform 2 actions on the same frame it will choose the earlier one in the list and perform that one. Ignore the negatives on numbers. Negatives are just used to determine if it is the last function.
  4.  
  5. D_808543E0[] = { 13, 2, 4, 9, 10, 11, 8, -7 }: Stand while Targeting with shuffling feet (holding shield or targeting an enemy)
  6. D_808543E8[] = { 13, 1, 2, 5, 3, 4, 9, 10, 11, 7, 8, -6 }: Standing while targeted
  7. D_808543F4[] = { 13, 1, 2, 3, 4, 9, 10, 11, 8, 7, -6 }: Sidewalk slowly
  8. D_80854400[] = { 13, 2, 4, 9, 10, 11, 8, -7 }: Backwalk or Stutter step
  9. D_80854408[] = { 13, 2, 4, 9, 10, 11, 12, 8, -7 }: Sidewalk fast, and an unknown action
  10. D_80854414[] = { -7 }: Turn in place, leaving water
  11. D_80854418[] = { 0, 11, 1, 2, 3, 5, 4, 9, 8, 7, -6 }: Standing while untargeted, and an unknown action
  12. D_80854424[] = { 0, 11, 1, 2, 3, 12, 5, 4, 9, 8, 7, -6 }: Walk while untargeted
  13. D_80854430[] = { 13, 1, 2, 3, 12, 5, 4, 9, 10, 11, 8, 7, -6 }: Walk forward while targeted
  14. D_80854440[] = { 10, 8, -7 }: something to do with z-targeting
  15. D_80854444[] = { 0, 12, 5, -4 }: Swimming
  16.  
  17. The game checks if each action below is doable in a separate function, and the functions might do more than I wrote:
  18. 0 = func_8083B998 = Use C-up / Use Cutscene item or First Person item
  19. 1 = func_80839800 = Open Door
  20. 2 = func_8083E5A8 = Grab Actor
  21. 3 = func_8083E0FC = Mount Epona
  22. 4 = func_8083B644 = Speak / Check something
  23. 5 = func_8083F7BC = Enter Crawlspace or lift heavy block
  24. 6 = func_8083C1DC = Untargeted Roll
  25. 7 = func_80850224 = Slash sword / Spin attack
  26. 8 = func_8083C544 = Charge Spin Attack
  27. 9 = func_8083EB44 = Drop/Throw Held Actor
  28. 10 = func_8083BDBC = Targeted roll / Jumpslash
  29. 11 = func_8083C2B0 = Shield
  30. 12 = func_80838A14 = Climb Ledge
  31. 13 = func_8083B040 = Use Cutscene item or First Person item
  32.  
  33. As you can see, "Backwalk", "Sidewalking fast", and "Stand while Targeting with shuffling feet" do not run function 1 or 3, so that is why you cannot open Doors or mount Epona while doing one of those actions (even though the A button says Open or Climb).
  34.  
  35. Some other things it explains:
  36. -why you can't climb ledges while targeting with shield or sidewalking slowly (but can while sidewalking quickly)
  37. -why opening doors is prioritized over grabbing actors such as bombs
  38. -why if you press shield and open a door on the same frame, link will open the door if you are targeted, but shield if you are not
  39. -why you can't c-up while targeted, but when you can, it is prioritized over almost everything
  40. -and more...
  41.  
  42.  
  43. More decomp info:
  44.  
  45. func_80837348 is the function which loops one of these arrays. It stops after a negative number or if one of these functions returns a 1.
  46.  
  47. This is the list of functions from 0 to 13:
  48. static s32 (*D_80854448[])(Player* this, GlobalContext* globalCtx) = {
  49. func_8083B998, func_80839800, func_8083E5A8, func_8083E0FC, func_8083B644, func_8083F7BC, func_8083C1DC,
  50. func_80850224, func_8083C544, func_8083EB44, func_8083BDBC, func_8083C2B0, func_80838A14, func_8083B040,
  51. };
  52.  
  53. References of the arrays:
  54. -D_808543E0: func_80840450 (Stand while Targeting with shuffling feet from holding shield or targeting an enemy)
  55. -D_808543E8: func_808407CC (Standing while targeted)
  56. -D_808543F4: func_80840DE4 (Sidewalk slowly)
  57. -D_80854400: func_808414F8 (Backwalk), func_8084170C(Stutter step), func_808417FC (stand up from Stutter step)
  58. -D_80854408: func_8084193C (Sidewalk fast), func_808423EC (?)
  59. -D_80854414: func_80841BA8 (Turn in place or leave water)
  60. -D_80854418: func_808374A0 (?), func_80840BC8 (Stand untargeted)
  61. -D_80854424: func_80842180 (Walk untargeted)
  62. -D_80854430: func_8084227C (Walk straight while targeted)
  63. -D_80854440: func_8084251C (?)
  64. -D_80854444: func_8084D610 (Swim Idle), func_8084D84C (Swim move untargeted), func_8084DAB4 (Swim move targeted)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement