Welcome Guest [Log In] [Register]

Announcements

Welcome to Zelda64.net. Announcements can be found below!

6.26.2018  Make sure you keep your passwords safe. If you use the same password on here as on other sites, it is highly recommended that you change it. If you can't change your password, and want it changed, let me or other active staff know, and we can force a reset or change it for you. ~PwnzLPs
Welcome to Zelda64. We hope you enjoy your visit.


You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. A valid email address is required. Your email address will NOT be sold as it is only needed to prevent spammers (and admittedly, some still get around this, but this makes it a bit more difficult, plus, if the moderators need to contact you, we have an email on file to do so). Thanks for considering us!


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
OoT Debug: Adult Link cannot enter Hyrule castle
Topic Started: Nov 28 2016, 11:58 AM (650 Views)
Killgore52
Member Avatar
Map Maker
I tried to load the hyrule castle scene as adult link and the game crashes and if you are spotted by a whistle blowing guard on a different scene as an adult, the game will crash. However, it works fine with young link even if he gets spotted by a guard in a different scene, however he does get warped to the spot you are usually thrown out by that type of guard. I have not tried with the guards that are in the castle courtyard but im assuming the same would happpen.
Offline Profile Quote Post Goto Top
 
mzxrules

why are you posting this in documentation, when you don't understand what's going on?

To start, take a look at the entrance table data, specifically entrance index 0x0138 to start with. Now the way spawning works in Ocarina of Time is that you have a base entrance index (0x0138) which more or less represents a point in the game world (regardless of day/night/child/adult) to spawn at. The base entrance index is what the developers use to specify where you spawn in the game world.

However, your *actual* entrance index is calculated via an algorithm based on a few key variables. This can be simplified to the formula "base entrance index" + "scene setup id" = "final entrance index", where the scene setup id order is usually as such: 0 = Child Day, 1 = Child Night, 2 = Adult Day, 3 = Adult Night, 4 to 16 = Cutscene 0 to 12.

So, the reason you usually can't spawn in Hyrule Castle as an adult is that being adult sets your scene setup id to 2 or 3. If your base entrance index is 0x0138, that means that your final entrance index as an adult will either be 0x013A or 0x013B, which spawns you at Ganon's Castle.


Next, the crash.

The reason the game crashes is that when you are captured, the guards in Hyrule Castle send you to a base entrance index of 0x047E, which corresponds to spawn index 04 (the fifth spawn) in both the Hyrule Castle scene and the Ganon's Castle scene. The problem here is that Ganon's Castle only properly defines four spawns for Link, meaning that the game reads in some "garbage" data as a spawn, and attempts to load a map that the Ganon's Castle scene doesn't have. Getting caught by the guards in Zelda's Courtyard won't crash the game because they take you to spawn index 03 (the fourth spawn), and since that's defined in Ganon's Castle, no crash happens.
Edited by mzxrules, Nov 30 2016, 10:40 PM.
Offline Profile Quote Post Goto Top
 
Killgore52
Member Avatar
Map Maker
I had no idea how it worked, I posted this just to let people know and to see if someone had a reason.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Documentation · Next Topic »
Add Reply