Jump to content

Zelda OoT: How to load the normal Kokiri in any desired map.


Three_Pendants
 Share

Recommended Posts

To my knowledge this has been a mystery that has never been solved in a clean and efficient manner. Any modder worth their salt likely knows that you cannot normally load Kokiri outside of the Kokiri Forest or Lost Woods. For many years there have been talk on how to accomplish loading them elsewhere by moving scenes, changing the scene table, etc. But each one would have been a lot more work than the simple answer turned out being.

 

I recall john_smith_account telling me that Kokiri are loaded by scene and scene alone, and that somewhere, likely within the Kokiri actor, would be the keys to changing where they could be loaded. With that thought in mind I did  a check for 0055 in the Kokiri file as 0055 is the correlation of Kokiri Forest in the scene table and found two results. I changed the first one and saw the Kokiri were no longer in the forest save Saria and Mido (their separate actor files likely contain those matters). So I thought I had finally found the answer, but I couldn't clarify because none of the available tools that have group changers work for me.

 

This was located at E4E9D0 in ROM with a value of 24010055.

 

So I asked Giadrosich to do the favor of checking it for me. I asked her to change the value of 0055 to 0051, take a couple of Kokiri groups and load them in Hyrule Field.

 

(Scene Listing for Debug Rom can be found at...

http://wiki.spinout182.com/w/Zelda_64_Scene_Listings:_Debug_ROM

Don't Forget to Translate to Hex, they are in Numeral! 81 = 51 = Hyrule Field)

 

To my surprise it worked flawlessly! 

 

Right above this value at E4E9B0 is 2401005B which is the scene designator for the Lost Woods, in case you want to change the Single Kokiri that shows up there to something more useful. 

 

The ideal would be to get rid of the scene designators all around, but trying a clean sweep of the data only results in freezing unfortunately. Maybe someone will be able to figure that out, but for now this will have to do. It's more than we had in the past, right?

 

(Picture was taken by Giadrosich)

Posted Image

  • Like 7
Link to comment
Share on other sites

I *believe* if you change the value at 0xE4E9D0 in ROM (0x1BB4 in En_Ko) from 0x5061 to 0x1000, and the value at 0xE4EE48 in ROM (0x2028 in En_Ko) from 0x1041 to 0x1000, they should load in any scene. These two instructions basically change beq (branch if equal [to scene number in this case]) to b (branch unconditionally). If you'll notice, the previous instruction sets the scene number to load them to - this instruction is now useless.

 

The offsets to change for the lost woods kokiri are 0x1AF0 (0x55810020 => 0x00000000), 0x1B94 (0x1061 => 0x1000), 0x201C (0x1041 => 0x1000), 0x242C (0x55C1000B => 0x00000000). Add 0xE4CE20 to all these offsets to get ROM offsets.

 

Warning/Disclaimer: I haven't tested this, and it should be thoroughly tested with all potential variables. Based on the code, it looks like some variables yield different results depending on the scene number (e.g. a kokiri in lost woods is different than one in the kokiri forest even with the same variable!)

  • Like 2
Link to comment
Share on other sites

I *believe* if you change the value at 0xE4E9D0 in ROM (0x1BB4 in En_Ko) from 0x5061 to 0x1000, and the value at 0xE4EE48 in ROM (0x2028 in En_Ko) from 0x1041 to 0x1000, they should load in any scene. These two instructions basically change beq (branch if equal [to scene number in this case]) to b (branch unconditionally). If you'll notice, the previous instruction sets the scene number to load them to - this instruction is now useless.

 

The offsets to change for the lost woods kokiri are 0x1AF0 (0x55810020 => 0x00000000), 0x1B94 (0x1061 => 0x1000), 0x201C (0x1041 => 0x1000), 0x242C (0x55C1000B => 0x00000000). Add 0xE4CE20 to all these offsets to get ROM offsets.

 

Warning/Disclaimer: I haven't tested this, and it should be thoroughly tested with all potential variables. Based on the code, it looks like some variables yield different results depending on the scene number (e.g. a kokiri in lost woods is different than one in the kokiri forest even with the same variable!)

 

Keep it up, and you're going to have me hounding you to modify Adult Malon's event checks(and there's plenty of them) for the ZB2 project.

Link to comment
Share on other sites

I agree with spinout... while I'm not familiar with where the b commands are, you need to start removing those b commands to remove those conditions that prevent actors from loading in other areas. This will work for Malon and Zelda with some digging.

Link to comment
Share on other sites

I think the idea was:

if( lost_woods )

{

    behavior_a;

}

else if( kokiri_forest )

{

    behavior_b;

}

 

Unfortunately for us, they didn't code it:

if( lost_woods )

{

    behavior_a;

}

else

{

    behavior_b;

}

  • Like 1
Link to comment
Share on other sites

I think the idea was:

if( lost_woods )

{

    behavior_a;

}

else if( kokiri_forest )

{

    behavior_b;

}

 

Unfortunately for us, they didn't code it:

if( lost_woods )

{

    behavior_a;

}

else

{

    behavior_b;

}

Nintendo makes coding flaws like this all over the place, and it's ridiculous.

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.