On Equip/Unequip Event Call

Discuss modding questions and implementation details.
Post Reply
l3lessed
Posts: 1400
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

On Equip/Unequip Event Call

Post by l3lessed »

Okay, I've finally hammered out all the major optimizations I can think of for the minimap mod, except one last one.

Right now, my mod is using the update loop to continually check if the player has changed equipment and if the change was equipping or removing a magical compass.

What I'm wondering is if there is a void call to hook into to run code only when the game detects an equip or removal of an item from the players equip table? This would allow me to remove the last of my code from my update loop and put all of it into one time calls. Right now, I have a system to ensure it only checks it when a new item has been put on by storing and checking the last UID with the present UID, but only doing this on an equip and unequip would be the most efficient route.

I can't find this oncall method for equipping and removing items if it is here. Any help pointing me would be appreciated.
My Daggerfall Mod Github: l3lessed DFU Mod Github

My Beth Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

Enjoy the free work I'm doing? Consider lending your support.

Post Reply