-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Hi there! I wanted to preface this with that I'm rather new to modding in general and I'm not a master with C++ by any means, so I apologize if what I'm talking about might be obvious.
When I first pulled this template about 3 weeks ago everything for the most part worked great. I ran the python script, built with vcpkg, and I could drop the DLL into the plugins directory for SFSE and it would recognize and load it great. I got my mod working the way I wanted to and didn't have any issues.
I decided to pull this template again to work on a different mod and I have run into some issues that are preventing me from even getting a DLL from this template to run properly with zero changes. In the SFSE.txt file I'm getting this issue:
checking plugin NoReload.dll
plugin NoReload.dll (00000000 00000000) no version data 0 (handle 0)
After some sleuthing, I found out the culprit was the 'inline' keyword on the version dll export #define in the CommonLibSF:
#define SFSEPluginVersion extern "C" [[maybe_unused]] __declspec(dllexport) inline constinit SFSE::PluginVersionData SFSEPlugin_Version
This appears to be different than when I pulled this template (which in turn pulled commonlib) originally. Removing 'inline' got me past this issue and allowed my plugin to load.
However now trying to call any commonlibSF classes or functions results in a game crash. I even put in my previous working mod into my new project and just ended up with crashes any time my hook was fired.
I'm not totally sure what could be causing this. The game version hasn't changed in the time period that I've been using this template, so I'm not sure what would be causing all of these new issues. Maybe CommonlibSF changed the way offsets or IDs are calculated? Though my previously working mod also didn't work so maybe not?
I'm not getting build issues btw (other than with clang, but I'm not using that anyway), that part is working very smoothly. It's just after the plugin is loaded by SFSE that issues are arising.