PwnzLPs Posted June 9, 2015 Share Posted June 9, 2015 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 More sharing options...
SoulofDeity Posted June 11, 2015 Share Posted June 11, 2015 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 More sharing options...
PwnzLPs Posted June 11, 2015 Author Share Posted June 11, 2015 Thanks, SoulofDeity! Hmm... So, I was wrong to a point. I figured this type of stuff would be in the DMA Table in Code, not in player_actor. Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts