adb3nj Posted July 16, 2024 Share Posted July 16, 2024 I would like to take my modding to the next level by being able to expose some more of the game engine to Papyrus. I've tried following Ryan McKenzie's tutorial for setting up Visual Studio here: https://www.youtube.com/watch?v=FLRhsrQ8mqw I'm guessing I'll have a problem when trying to create a plugin for the OG version of the game though, since the version of F4SE on GitHub is the NG version? So I tried manually building the OG F4SE solution I already had on my laptop, but I keep getting build errors (image attached) regardless of whether I try building in Release mode or Debug Mode. The problematic line of code in this case was: noexcept(_Pred(_Left, _Right)) && noexcept(_Pred(_Right, _Left))) { Based on a Stack Overflow thread, I tried adding 'const' at the end of the line… but then when I try to build, Visual Studio wants me to save xutility somewhere, and I can't figure out where it's supposed to be located. Do I even need to be building F4SE to create a script extender? I've looked at the source code for the likes of Lighthouse and Garden of Eden, and they look much simpler than other types of F4SE plugin, but evidently I don't know what I'm doing! I've also tried building various example plugins, but they throw up their own problems. I'd like to get to a place where I can try to reverse engineer various engine functions. Link to comment Share on other sites More sharing options...
LarannKiar Posted July 17, 2024 Share Posted July 17, 2024 Certain plugins like Garden of Eden SE and Lighthouse Papyrus SE uses CommonLibF4 so their implementation is a bit different than those that are compiled with vanilla F4SE. I have 4 environments for Fallout actually (with/without CommonLibF4, Next-Gen / non Next-Gen) and the plugin structure (so the code itself to make SFSE load them) is quite similar. std::set<std::pair<BGSMaterialSwap::MaterialSwap*,float>, CompareMaterial> is in PapyrusObjectReference.cpp which is from vanilla F4SE, not CommonLibF4 so it seems you have mixed or merged the environments. You can use both F4SE and CommonLibF4 simultaneously to compile plugins but configuring them to work together is a bit tricky.. If you're not sure you're project has been configured properly, you may need to get acquainted with Visual Studio first. You have to build F4SE / CommonLibF4 as a static library (.lib) to make plugins (.dll). As for reverse engineering game functions, that requires knowledge in assembly and C++ (not necessarily advanced level but a slightly deeper as functions were written by actual game developers and some of them are quite complex) and of course knowing some reverse engeering softwares for both dynamic and static analysis. Some knowledge in Python or Java is also handy (just like Pascal for xEdit) as custom scripts executable in RE softwares can greatly speed up reverse engeenering. Link to comment Share on other sites More sharing options...
adb3nj Posted July 23, 2024 Author Share Posted July 23, 2024 Thanks for the tips! I was trying to build vanilla F4SE, not CommonLibF4 – I was only looking at Lighthouse and GoE for clues as to what I would need to do next. I had it configured to build as a static library. I've done a bit of C++ programming but a long, long time ago, and not with Visual Studio, so maybe I should go back to basics with a Visual Studio tutorial. Link to comment Share on other sites More sharing options...
Recommended Posts