Jump to content

Recommended Posts

Posted

It looks very good, but you should ditch that OnUpdate loop you've set up. It is just there to maintain the registrations, right? But MCM scripts are already bumped by the player alias on every reload anyway so you can just as easily put the re-registrations in the OnGameReload() event and avoid the overhead of repeated updates (even if you were nice enough to set them to a reasonably long interval).

 

And for the record, registrations actually do persist in the SKSE co-save file. The only time they would disappear is if someone foolishly restarts the game without SKSE and makes a save without it running.

Posted

Hi CD,

 

That's a good point. There is erroneous information about mod event registration not persisting... frankly given the conflicting information I chose not to take chances.

 

The initial OnUpdate is also to avoid calling RegisterForModEvent in OnInit() which produced some bad results.

 

Will try that locally and see how it behaves. (Eliminating the loop and instead calling OnUpdate just once.)

Posted

Yes, I didn't mean to suggest you had to avoid OnUpdate entirely. Just the repeating part. Getting things out of OnInit is almost always the right thing to do.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...