Zelda Ocarina Of Time Decomp – Customizing Actor Code
For whatever reason, Fast64 doesn’t include a built-in option to make breakable pots consistently spawn fairies—which is honestly surprising. You can make them drop rupees, hearts, or even something as specific as a Zora Tunic, but not a simple fairy? That blew my mind. In this tutorial, we’ll walk through how to solve that by customizing actors in the Zelda: Ocarina of Time decomp project. Specifically, you’ll learn how to modify the breakable pot actor to always spawn a fairy, complete with step-by-step code examples.
This is the 3rd tutorial in our Zelda Ocarina Of Time Decomp Tutorial series. If you haven’t checked out our previous guides you can read them here.
How to Install Zelda Ocarina Of Time Decom Project & Creating a Map In Fast64 and Blender
Step 1: Add a Breakable Pot Actor to Your Scene
To begin, you need to place a breakable pot (OBJ_TSUBO) into your custom scene using Fast64. Here’s how to do it:
Create an Empty in Blender:
In the 3D viewport, press (Shift + A) → Empty → Cube.
(You can also use “Axes”, but Cubes are usually easier to see and select. Just a personal preference)
If using a Cube, make sure the center of the cube is level with the ground where you want the pot to sit. Otherwise you will have a floating pot.
Adjust Actor Properties:
Go to the Object Properties tab (the orange square icon in the right-hand panel).
Make sure you’re in Object Mode.
Under the “Actor Settings” section:
Actor ID: Select Breakable Pot – OBJ_TSUBO.
Drop Collectible: Set to Flexible Drop.
Flexible Drop
Was designed to sometimes spawn a fairy if Link has 1 heart. But we’re going to take it a step further—by modifying the source code, we’ll make sure it ALWAYS SPAWNS A FAIRY, regardless of Link’s health.
Step 2: Modify The Code
First we need to look up the name of the code file that contains the code for the breakable pot. You can look it up here. Search for Breakable Pot. The name of the code file was also in the Actor ID: OBJ_TSUBO.
Open z_obj_tsubo.coot\src\overlays\actors\ovl_Obj_Tsubo\z_obj_tsubo.c
After analysising the file I realized the code for flexable drop is actually in this file included in the header. #include “z_en_item00.h” We open the C version of this because that’s where all the coding logic will be.
Open z_en_item00.coot\src\code\z_en_item00.c
Scroll down to if (dropId == ITEM00_FLEXIBLE) and comment out the code in green.
if (dropId == ITEM00_FLEXIBLE) {
// if (gSaveContext.save.info.playerData.health <= 0x10) { // 1 heart or less
// EDIT: FLEX ALWAYS DROP FAIRY
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ELF, spawnPos->x, spawnPos->y + 40.0f, spawnPos->z, 0, 0, 0,
FAIRY_HEAL_TIMED);
EffectSsDeadSound_SpawnStationary(play, spawnPos, NA_SE_EV_BUTTERFRY_TO_FAIRY, true,
DEADSOUND_REPEAT_MODE_OFF, 40);
return;
/*}
else if (gSaveContext.save.info.playerData.health <= 0x30) { // 3 hearts or less
params = 0xB * 0x10;
dropTableIndex = 0x0;
dropId = ITEM00_RECOVERY_HEART;
} else if (gSaveContext.save.info.playerData.health <= 0x50) { // 5 hearts or less
params = 0xA * 0x10;
dropTableIndex = 0x0;
dropId = ITEM00_RECOVERY_HEART;
} else if ((gSaveContext.save.info.playerData.magicLevel != 0) &&
(gSaveContext.save.info.playerData.magic == 0)) { // Empty magic meter
params = 0xA * 0x10;
dropTableIndex = 0x0;
dropId = ITEM00_MAGIC_LARGE;
} else if ((gSaveContext.save.info.playerData.magicLevel != 0) &&
(gSaveContext.save.info.playerData.magic <= (gSaveContext.save.info.playerData.magicLevel >> 1))) {
params = 0xA * 0x10;
dropTableIndex = 0x0;
dropId = ITEM00_MAGIC_SMALL;
} else if (!LINK_IS_ADULT && (AMMO(ITEM_SLINGSHOT) < 6)) {
params = 0xA * 0x10;
dropTableIndex = 0x0;
dropId = ITEM00_SEEDS;
} else if (LINK_IS_ADULT && (AMMO(ITEM_BOW) < 6)) {
params = 0xA * 0x10;
dropTableIndex = 0x0;
dropId = ITEM00_ARROWS_MEDIUM;
} else if (AMMO(ITEM_BOMB) < 6) {
params = 0xD * 0x10;
dropTableIndex = 0x0;
dropId = ITEM00_BOMBS_A;
} else if (gSaveContext.save.info.playerData.rupees < 11) {
params = 0xA * 0x10;
dropTableIndex = 0x0;
dropId = ITEM00_RUPEE_RED;
} else {
return;
}*/
}
Zelda Oot Decomp Tutorials
DECOMP COURSE
From the creator of
'The Ultimate Trial'
FAST 64 DECOMP COURSE
From the creator of
'The Ultimate Trial'


