gottyduke / SF_PluginTemplate

Plugin template for SFSE plugins. click "Use this template" to generate your project.
GNU General Public License v3.0
38 stars 9 forks source link

Game Loading Issue with .dll Generated by Template #4

Closed tsGod closed 10 months ago

tsGod commented 10 months ago

Hello!

I have followed the steps under the Getting Started section in the README to install the development environment (cmake 3.26+, powershell, vcpkg, vs 2022, steam distro of starfield). I am linking the submodules using

update-submodule.bat

and then making with

.\make-sln-msvc.bat

I then build using

cmake --build build

The build completes successfully and I am taking the output in the SFSE directory in root/Plugin/dist/Data and adding it to my Steam Starfield installation Data\SFSE\Plugins directory. I then launch SFSE using sfse_loader.exe.

After attempting to launch using the SFSE loader, the game hangs and does not launch. There is no error message or otherwise indicator of an issue, there is a running Starfield process but the game never launches.

Since I did not modify any files I assumed an environment or build issue. To debug I cloned https://github.com/shad0wshayd3/BakaAchievementEnabler and followed the same setup and build steps to generate the .dll. I copied this .dll into my empty Data\SFSE\Plugins and launched again but got the same behavior.

[I have this mod installed using MO2 and have no problems running the game]

I decided there must be a problem with my environment or installation so I created a fresh install of Windows 11, and installed in the following order:

  1. git
  2. cmake
  3. vcpkg
  4. VS 2022 (just desktop dev with c++)
  5. Steam + Starfield

I then ran cmake in the x64 prompt and update-submodule, ./make-sln-msvc.bat, and cmake--build build in my generated template repository, but still have the same behavior when I try to launch the game through the sfse_loader

Please let me know if there is a build or installation step I am missing or if I am using the template incorrectly! I am using the latest version of SFSE v0.1.2 for Starfield 1.7.29

Additionally, if this is not the correct place for this issue let me know, I will move it to a more appropriate forum.

gottyduke commented 10 months ago

This is because you are building a debug build: there's a sleep loop waiting for debugger to attach at main.cpp#L40. If you are not debugging the plugin, you should build with cmake --build build --config Release

tsGod commented 10 months ago

Got it, worked for me. Thank you!