HylianFreddy

Glitched Masks

Mar 20th, 2022
492
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.84 KB | None | 0 0
  1. Item Charts
  2. - all versions: https://docs.google.com/spreadsheets/d/1xnnnWGMQckNOzamxZENF9hurLahkfsHlfmMLNodS5RA/edit#gid=703891443
  3. - my 3D specific one with notes: https://pastebin.com/4ReepiRU
  4.  
  5. If an item's "action parameter" is 58 or above, it will act like a mask (except for 66 which is Lens of Truth). The game determines the mask ID by subtracting 57, so that Keaton Mask is "mask 1" and Mask of Truth is "mask 8".
  6. From https://github.com/zeldaret/oot/blob/b2a3fb2f7fb84220088d3f7ebc6bd1ac29d24027/src/overlays/actors/ovl_player_actor/z_player.c#L2789 :
  7.  
  8. if (actionParam >= PLAYER_AP_MASK_KEATON) {
  9. if (this->currentMask != PLAYER_MASK_NONE) {
  10. this->currentMask = PLAYER_MASK_NONE;
  11. } else {
  12. this->currentMask = actionParam - PLAYER_AP_MASK_KEATON + 1;
  13. }
  14. func_808328EC(this, NA_SE_PL_CHANGE_ARMS);
  15. return;
  16. }
  17.  
  18. Glitched item values can end up having unusually high action parameters, creating glitched masks with IDs beyond 8.
  19. Wearing these masks crashes the game when they should appear. They can be used without crashing when Link is invisible, or simply adult in OoT3D, because masks aren't rendered in these cases.
  20.  
  21. When talking to an NPC that reacts to the masks, the game reads a matrix of reaction text IDs to find the correct dialog: there are 60 "reaction sets" that can be selected depending on which NPC you're talking to, and each one contains a "0" and the 8 text IDs for the 8 masks ("0" is used when the player isn't wearing a mask, and makes the NPC use their normal dialog instead).
  22. https://github.com/zeldaret/oot/blob/master/src/code/z_face_reaction.c
  23.  
  24. By using the glitched masks, it's possible to get the text ID either from the wrong reaction set, making the NPC use another character's dialog, or from past the end of the matrix, ending up with completely wrong texts.
Advertisement
Add Comment
Please, Sign In to add comment