jaxonz Posted March 11, 2015 Share Posted March 11, 2015 Hi there... I'm a huge fan of SkyUI and infinitely grateful for the ability to add MCM menus to our mods. I'm delighted to be able to contribute back to the community with a little library that makes coding MCM menus a little easier. Link to comment Share on other sites More sharing options...
cdcooley Posted March 11, 2015 Share Posted March 11, 2015 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. Link to comment Share on other sites More sharing options...
MotoSxorpio Posted March 12, 2015 Share Posted March 12, 2015 Very nice, jaxonz. Keep it up! Link to comment Share on other sites More sharing options...
jaxonz Posted March 12, 2015 Author Share Posted March 12, 2015 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.) Link to comment Share on other sites More sharing options...
cdcooley Posted March 12, 2015 Share Posted March 12, 2015 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. Link to comment Share on other sites More sharing options...
jayne2132 Posted March 12, 2015 Share Posted March 12, 2015 I'm delighted to be able to contribute back to the community with a little library that makes coding MCM menus a little easier. Thanks for making and sharing! Current MCM script is 600 lines and not complete. Going to redo it with your library. :) Link to comment Share on other sites More sharing options...
Recommended Posts