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

Login with username, password and session length
News: The website has switched hosts and now has the domain zeldahacking.net!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Possible bug with global map scripts  (Read 643 times)
Jigglysaint
Hacking Guru
Full Member
*****
Offline Offline

Posts: 150


View Profile
« on: June 23, 2010, 02:00:07 AM »

I went to test out my hack, and for some reason the Maku Tree event isn't triggering properly.  It should work fine, but it doesn't.  Now I first patched my test rom that I was using to test other stuff, and it encountered an error that made lots of stuff glitch up, and one was the maku tree event.  Then I used a fresh rom and was hacking that and it seems the maku tree event still won't trigger properly.

Edit:  It seems random events just stop working.
« Last Edit: June 23, 2010, 03:02:20 AM by Jigglysaint » Logged
Lin
ZOLE Creator
Administrator
Hero Member
*****
Online Online

Posts: 580



View Profile
« Reply #1 on: June 23, 2010, 04:51:11 AM »

Okay, I'm pretty sure I've found the cause (Or atleast this explains the Past Maku Gate staying shut). Around 10F85 in the ROM (Aftually that should be 17. ZOLE changes it to 40) a bunch of the bytes are changed up, and I'm not sure why. But hopefully if I get that all sorted out they'll be fixed.

Edit: Dang... Found out why. Basically the game checks the region headers (What I call them) there and uses them for events, and since a lot of the data is changed for repointing, they won't work. This means I have to make new ASM scripts and a new header system with keeping the old one... Great...
« Last Edit: June 23, 2010, 04:54:33 AM by Lin » Logged
Jigglysaint
Hacking Guru
Full Member
*****
Offline Offline

Posts: 150


View Profile
« Reply #2 on: June 23, 2010, 07:23:15 PM »

I told you that all those region headers are used.  I was also thinking, how about a new script that would allow interactions to be placed in any bank you desire?  Currently it does a compare to send you to the bank that matches the parimiter, but what if you added in an extra table that gave the bank number so any interaction could be repointed anywhere in the rom?
Logged
Lin
ZOLE Creator
Administrator
Hero Member
*****
Online Online

Posts: 580



View Profile
« Reply #3 on: June 24, 2010, 12:35:00 AM »

(I'm on my phone, so excuse typos)

You did? I wish I would have known that before-hand. This probably means I'll have to add something to remove regional header-based events too.

I thought about interaction scripts, but it's so pointless. There's space at the end of the bank and a lot of interactions to delete. It's kind of a waste of time and asm space. Not much is left in the first bank for the hacker's content so I try to avoid adding scripts as much as possible. I'm on my phone now so I'll explain more later.
Logged
Jigglysaint
Hacking Guru
Full Member
*****
Offline Offline

Posts: 150


View Profile
« Reply #4 on: June 24, 2010, 02:29:56 AM »

No problem.  I found out that the reason the one event wasn't working, was that I was going straight up from the dungeon entrance, and for some reason that makes a big deal reguarding certain events.  As for the regional headers, just do a search for 2D CC and check and see all the stuff that is dependant on which region you are currently on.
Logged
Lin
ZOLE Creator
Administrator
Hero Member
*****
Online Online

Posts: 580



View Profile
« Reply #5 on: June 24, 2010, 06:08:34 PM »

No problem.  I found out that the reason the one event wasn't working, was that I was going straight up from the dungeon entrance, and for some reason that makes a big deal reguarding certain events.  As for the regional headers, just do a search for 2D CC and check and see all the stuff that is dependant on which region you are currently on.
Aah. Very odd, but that's a load off my shoulders. Also, I searched 2D CC but there are several results even in the first bank. Anything specific you meant?
Logged
Jigglysaint
Hacking Guru
Full Member
*****
Offline Offline

Posts: 150


View Profile
« Reply #6 on: June 25, 2010, 12:07:43 AM »

Not really.  I did find out that if I added some interactions to a new room, it bugs out the rest of the interactions massivly for the overworld areas.  The map scripts are also seriously messed up, with many rooms not even registering a script when I know there is supposed to be one there.  2D CC is used to initiate all region headers, all of them.  If you changed the way the headers worked, then a bunch of data won't work right.  Ages and Seasons has those two extra regions for sideview areas, and getting rid of them will bug stuff up.

But anyway, hope things are going well.  I created a hack of the first dungeon, but because the overworld was messed up, I deleted it.  Otherwise everything works really well.  Oh, as for the map arranger, I was thinking that the way you have it now, you enter a number and press OK to change one map is too time consuming.  Instead I think it's better if you allow for being able to wipe the minimap and enter values directly and fix up the map they way you want it before it updates.  There's also more data like what rooms have doors or the key sound and if the room is dark and stuff that needs space for editing.  I also notice that the area editor doesn't seem to have a spot for flags such as water, or which level the area is in.
Logged
Lin
ZOLE Creator
Administrator
Hero Member
*****
Online Online

Posts: 580



View Profile
« Reply #7 on: June 25, 2010, 12:55:27 AM »

Hmm... Well, I didn't change the region header and found the bug with events was somewhere else. Basically, map swapping wasn't working at all thanks to my custom loading script, but it's all good now and a new script is added at bank 54. And I see it impossible for a map script to not be detected, because the game checks the map you're heading into 3 times (Or maybe it's 4. I have the 0x11F5F check commented out, so maybe that's why).

I was always unsure about the other interactions... The code seemed a bit edgy and I hadn't tested it outside of dungeons, so I'll look into that. And at the room arranger, I thought I had it so maps get set before you press OK... But if not, I'll make sure it happens. Thanks.

Oh, and can you give me an example of a room that has a script?

EDIT: I guess I had the wrong bank for one two of the checks, so that's probably why it wasn't detecting them. But still, can you give me one of the rooms?

EDIT2: Aah, I found the interaction bug. First off, I noticed existing interactions don't get messed up. Second, there only seems to be one set of messed up interactions which get applied to every map that didn't already have them, which is at 49977, so pretty much all I have to do is make sure it doesn't write to there or anywhere near it because that's where the no-interactions are at.

EDIT3: Fixed the interactions bug... Basically adding interactions would clear out the old ones, and since the ones with no interactions do technically have interactions, it replaces the FF at 49977 with 0 and since the byte immediately after that is F2, a bunch of interactions get added randomly until FE/FF is hit. Also, the room arranger originally worked how you requested. Notice how if you change a room, the selection box becomes blue. Blue indicates changed and red indicates the same. I don't know why you thought you could only change one at a time though Tongue
« Last Edit: June 25, 2010, 01:40:07 AM by Lin » Logged
Jigglysaint
Hacking Guru
Full Member
*****
Offline Offline

Posts: 150


View Profile
« Reply #8 on: June 25, 2010, 02:13:59 AM »

An example of the problem I found was that at room 43 in the second dungeon bank(Mermaid's Cavern Past, 1F), it should use map script 0C to add the wall that you light the torches to make slide.  When I checked, it said there was no scripts.  Also, there are two sets of map scripts.  The one that causes several tiles to change, and the other that has a room value, a location, and a bit that's read to make that tile appear.  I would guess that you intend to make both editable, perhaps from a sub menu?

Edit:  Yeah, the problem with the map arranger is that it's not done in realtime.  If it's too much to make the rooms change as you change the room number, then I suggest you instead just go simple and have blocks represent the rooms.  Actually what would really help is if the map selector in the upper right corner actually changed the room at that location rather than just display a room.  That would help alot, as well as an option to clear the room order data for each map.

Nephi was pretty good when it came to editing room order.  At the upper left there was a 64 tile grid that had a blank square for a room that was 00, and a shded square for a spot with a room.  Now since Link's Awakening had different minimap format(seperate spot for maps), you could just choose the map marker right there.  Of course in Ages, it's much different.  How you changed the room order in Nephi was a simple matter of selecting a black square and changing the room number.  No additional menu was required.

So to make a long story short, allow for room arrangment on the main screen, with the map selector in the upper right be the selector.  Then you can press ok to update the map.  Also, there really isn't a need to have a prompt to update the minimap image since it's assumed the user wants the update as soon as they select it.
« Last Edit: June 25, 2010, 02:26:57 AM by Jigglysaint » Logged
Lin
ZOLE Creator
Administrator
Hero Member
*****
Online Online

Posts: 580



View Profile
« Reply #9 on: June 25, 2010, 02:31:20 AM »

Oh, then I guess I was wrong, and only 0x124A7 is used. Also, for the second one, there are several calls and jumps, so could you do me a favor and tell me the base address the group gets added to (Like the other one is 0x124A7). If you could, that'd be great and save me loads of time.

Edit: Alright, I'll do that instead, since there is quite a bit of space at the bottom right of the editor. Also, the prompt is there because it can take time people don't want to give up. It's faster on some computers and slower on others, so I always have the user confirm if they want it updated.

Edit 2: Hmm... I guess I had an error in my code. Both script checks seem to be 0x124A7, as when I fixed it script 0C was detected at that Level 6 map.
« Last Edit: June 25, 2010, 02:43:57 AM by Lin » 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!