You're absolutely right - mixing two different SKSE systems will cause conflicts and confusion. Let me create clean, simple files that use only CommonLibSSE throughout.Perfect! I've created completely clean implementations that use only CommonLibSSE throughout. Here's what I changed:
Key Changes Made:
-
PCH.h: Removed all raw SKSE includes and paths, using only CommonLibSSE headers (
RE/Skyrim.h,SKSE/SKSE.h,REL/Relocation.h) -
plugin.cpp:
- Uses modern CommonLibSSE plugin structure
SKSEPlugin_Versioninstead of oldSKSEPlugin_Query- Proper CommonLibSSE initialization with
SKSE::Init() - All types prefixed with
RE::namespace
-
PapyrusInterface.cpp & .h:
- All SKSE types now use
RE::prefix (RE::BSFixedString,RE::StaticFunctionTag) - Registration uses
RE::BSScript::IVirtualMachine*instead of oldVMClassRegistry* - Simplified registration syntax
- All SKSE types now use
-
CMakeLists.txt:
- Removed all SKSE path references
- Removed SKSE-specific includes
- Much cleaner and simpler
Benefits:
- No mixing of systems - purely CommonLibSSE
- Future-proof - CommonLibSSE handles SKSE compatibility
- Simpler - fewer manual paths and includes
- Better type safety - modern C++ features
- Automatic version handling - no manual runtime version checks
The code is now much cleaner and should compile without the previous SKSE-related errors. CommonLibSSE will handle all the SKSE compatibility details automatically.