Jump to content

Help with loading a separate sheath for Biggorons Sword?


PwnzLPs
 Share

Recommended Posts

So, I have been trying to come up with a way to load a separate sheath model for the Biggorons Sword, mostly dependent on which Link has it equipped. I have an idea of how to do this, my only problem is I don't know if it would work.

 

Basically, how I see this working is, somewhere in RAM, I have code that is constantly being checked or getting checked whenever a new weapon is equipped (still trying to figure out how to check it with both methods), and then that code will branch to a different DLIST pointer dependent on which sword is equipped. Could someone confirm this for me and help me with creating the code, please?

 

Thanks!

Link to comment
Share on other sites

Changing the model in memory does not change it permanently throughout the entire game. The point of using segments is that zobj's can be loaded anywhere in memory and still work as long as the entries in the segment table point at the right places. Knowing this, all you have to do add a single DE command into link's zobj that points to the sheath (branch, no return). Then, write a hook somewhere in the player actor file that looks up the physical address for the zobj in the segment table (it'll be the 7th entry because models use segment 6), add the offset of a custom DE command +4, and change the offset depending on which sword Link has equipped.

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

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