Primary Zelda Hacking
April 21, 2014, 09:25:34 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Current Zelda Oracles Hacking Suite beta version: 0.05
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Chests and Buttons, Interaction Type 9...  (Read 381 times)
Lin
ZOLE Creator
Administrator
Hero Member
*****
Online Online

Posts: 580



View Profile
« on: June 29, 2010, 11:07:32 PM »

Well, last night it has came clear to me that making a chest appear when a trigger is stepped on is well, impossible outside of a couple of dungeons. I think the only way to avoid this is to swap the script from dungeon to dungeon or make the code in a global bank. I'm not sure of how the 2xxx interactions work, but I'm sure it can't be too hard to figure out.

Also, I've realized my description for interaction type 9 is completely inaccurate. It's used to spawn NPCs too, which means it might be a regular interaction that sets OAM and VRAM and gives the object AI. I have to look into it though...

~Lin
Logged
Jigglysaint
Hacking Guru
Full Member
*****
Offline Offline

Posts: 150


View Profile
« Reply #1 on: June 29, 2010, 11:51:49 PM »

Okay, 20 XX leads to a script that gets the event based on what dungeon map you are on, and what index.  For example, 20 00 in level 1 is used for chests spawned by switches, but in level two, it's the Roc's Feather.  Each dungeon has a list of events that are used.  It actually doesn't make much sense since why not just have one global script list, but this game has chosen to load via dungeon number.  I believe the pointer to the event in bank 0C that deals with level 1's chest switch is at 20C52.

Now 21 xx is used for tile puzzles, and depending on the index, it loads an ASM script that sets the tiles and it's trigger.  Note that ASM scripts can incoporate event scripts, and event scripts can point to ASM scripts(but only in bank 15).

Also, F8 09 is used for switches.  For the second byte, the lower nybble is used for switch index(0, 1, etc), and bit 7 means the switch is a toggle switch, but the event must be set to aknowlege it's a toggle or else it will just continue to spawn that event.
Logged
Lin
ZOLE Creator
Administrator
Hero Member
*****
Online Online

Posts: 580



View Profile
« Reply #2 on: June 30, 2010, 12:34:50 AM »

Aah, so it's only 20 XX that's dungeon-specific. That helps a lot. Gonna look into it and add more later.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!