SM64 Exposed Behind the Scenes

By James S.

Introduction

When you are playing the game, there is actually more going on than you may think, invisible objects that activate or spawn other objects, for example. I made a code that gives the invisible objects the signpost graphics so that you can see what they do.

Activators

Climb a tree to get a 1-up mushroom

For the trees that you climb to get a 1-up mushroom there are two invisible objects, one near the top of the tree (which I will refer to as the child object) and the other just above the top of the tree (which I call the parent object).

The parent invisible object spawns the child object and the1-up mushroom in advance. When Mario climbs the tree, he touches the child invisible object which looks for the 1-up mushroom that was spawned and increases its variable at offset 0xF4 to 0x01; the child invisible object is then removed. At the top of the tree, when Mario does a handstand, he touches the parent invisible object which also finds the previously spawned 1-up mushroom and increases its variable at offset 0xF4, but this time to 0x02, triggering the 1-up mushroom to come alive; the parent invisible object is removed.

Switch activated gate (Bob-omb Battlefield)

You would think that a switch that activates the opening of 2 gates in Bob-omb battlefield would be quite straight forward but there is actually a lot more going on than you would think. You can see the gates and switch below:

New: Climb a tree to get a 1-up mushroom.

Switch activated gate (Bob-omb Battlefield) (16/1/17)

You can email me at james.boshikoopa@gmail.com

Firstly, there is an invisible 'parent' object placed where the 2 gates meet which has the behaviour/GFX ID 0x130025E0/0x00 (I have assumed the GFX ID is 0). During level startup the gate parent spawns two gates (bhv/GFX ID 0x130025C0/0x38) and rotates one of them on the Y axis (so that they both rotate inward). That way, only the parent object needs to be placed in the level without having to worry about placing the two gates correctly. However, the gate parent does use a look-up value to place the two gates as does it also use a look-up value for the gate GFX ID when spawning, but the behaviour value is fixed in code. This does mean that it's not difficult to make the code spawn two objects other than gates.

When the gate parent spawns the two gates they both get a pointer to the parent in their object structures. Also, during initialisation, the gate parent looks for the switch (based on its behaviour) and stores a pointer to the switch in its object structure. The switch has bhv/GFX ID 0x13001478/0xCF.

When Mario presses the switch, after a brief amount of time (its uses its timer) it changes its action value (offset 0x14C) to 2. The gate parent monitors the switch to see if its action value is 2 and if so it stores 2 at offset 0x88 in its object structure. When the gates see this value they open by rotating on the Y axis for a set amount of time.

Spawning

There is a flowerbed in Bob-omb Battlefield which you can run around, triggering a 1-up mushroom. There are actually several objects placed around the flowerbed, each one is removed as Mario touches them and when all of them are gone the 1-up mushroom is spawned. This means you don't actually have to run around the flowerbed the one way, you could run across it one way and then another and still get the 1-up mushroom.

After a Bob-omb explodes it is replaced by a Bob-omb but one that has no yellow coin when it is defeated. When the original Bob-omb explodes, an invisible object appears; when the camera is far away from this object it changes into the new Bob-omb that has no coin.

All content of this and related pages is copyright (c) James S. 2009-2017