Extend Scene Object Limit#208
Merged
Admentus64 merged 1 commit intomasterfrom Mar 16, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Increase the object limit from 19 to 20.
OoT already allocated 3 objects at all times:
On top of that are additional objects in by the scene. With a limit of 19, the scene can only allocate 16 objects (remember, we got 3 always-present objects).
For Child Master Quest there's a room in Jabu-Jabu that allocates 17 objects.
As you might guess, it crashes.
This fix bumps up the amount of objects that can loaded in by the game. Each reserved object (even if not loaded and empty) only takes up 0x44 (68) bytes in the RAM. So it's any RAM costs going from 19 to 20 are negible. Could be bumped up even more if needed, but currently we don't have any scene adjustments that demand more than 17 objects.
That particular room in Jabu had a Like-Like in it, so extra object allocations were needed for the shields (3) and tunics (1). Two more objects than regular MQ allocates, pushing it just beyond the reserved 16.