Jump to content
Sign in to follow this  
Jebbalon

SKSE function RegisterForMenu on game reload

Recommended Posts

The SKSE function RegisterForMenu() needs to be refreshed on game load.

In my recent mod released on nexus  it uses the function to track when the Book Menu is opened. It works great from initialization - however, after saving, exiting game and reloading game the function stopped working. It wasn't obvious why but I thought about it and simplified it down to just needing to be called in OnPlayerGameLoad() and that worked. The OnMenuOpen() events fired correctly.

My point in telling you this is that this info is not mentioned in the CKit wiki pages for this function.
I've never edited a wiki page - so if someone knows how to add quick notes on there - go for it - or I guess I can figure it out.

If I am wrong about this - Please - look at my scripts and show me why it is not working without the re-register on reload.

Thanks

Share this post


Link to post
Share on other sites

Have you shared this with the SKSE folks (email: team@skse.silverlock.org)? 
I ask, because I believe they are the ones who maintain the SKSE section of the CK WIKI, and need to know if it needs updating. 
You may have also discovered a bug, and if such is the case, the folks who support SKSE still need to know. 
 

Share this post


Link to post
Share on other sites

SKSE functions are not persistent across game saves you need to use OnPlayerLoadGame() or similar to call them everytime they start theres nothing new there and I'm pretty sure this is on the Wiki somewhere or other. You'd be amazed at the people it catches out though.

Share this post


Link to post
Share on other sites

I will post in the Talk page on wiki - no I have not emailed them

RegisterForModEvent()  has the note saying " You must register for ModEvents after every game load! "
The other skse RegisterFor.. functions ( ... ActorAction, Control, Key, and Menu ) do not have that note.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

Support us on Patreon!

Patreon
×
×
  • Create New...