Skip to content

Extend Scene Object Limit#208

Merged
Admentus64 merged 1 commit intomasterfrom
extend-scene-object-limit
Mar 16, 2026
Merged

Extend Scene Object Limit#208
Admentus64 merged 1 commit intomasterfrom
extend-scene-object-limit

Conversation

@Admentus64
Copy link
Copy Markdown
Contributor

Increase the object limit from 19 to 20.

OoT already allocated 3 objects at all times:

  • gameplay_keep
  • gameplay_field_keep (when in overworld scene) or gameplay_dangeon_keep (when in dungeon scene)
  • object_link_child (when Link is child) or object_link_boy (when link is adult)

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.

@Admentus64 Admentus64 merged commit c43fb7c into master Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant