Skip to content

Latest commit

 

History

History
71 lines (52 loc) · 3.37 KB

README.md

File metadata and controls

71 lines (52 loc) · 3.37 KB

CommonLibSSE NG

Because this uses CommonLibSSE NG, it supports Skyrim SE, AE, GOG, and VR.

Hook IDs and offsets must still be found manually for each version.

Requirements

  • Visual Studio 2022 (the free Community edition) or Visual Studio Code
  • vcpkg
      1. Clone the repository using git OR download it as a .zip
      1. Go into the vcpkg folder and double-click on bootstrap-vcpkg.bat
      1. Edit your system or user Environment Variables and add a new one:
      • Name: VCPKG_ROOT
        Value: C:\path\to\wherever\your\vcpkg\folder\is
    • The latest version of vcpkg needs a default repository defined in the json. If you're using an older version of vcpkg, simply delete the default repository definition in vcpkg-configuration.json

Opening the project

Once you have Visual Studio 2022 installed, you can open this folder in basically any C++ editor, e.g. VS Code or CLion or Visual Studio

  • for VS Code, if you are not automatically prompted to install the C++ and CMake Tools extensions, please install those and then close VS Code and then open this project as a folder in VS Code

You may need to click OK on a few windows, but the project should automatically run CMake!

It will automatically download CommonLibSSE NG and everything you need to get started making your new plugin!

Project setup

By default, when this project compiles it will output a .dll for your SKSE plugin into the build/ folder.

If you want to configure this project to output your plugin files into your Skyrim Special Edition's "Data" folder:

  • Set the SKYRIM_FOLDER environment variable to the path of your Skyrim installation
    e.g. C:\Program Files (x86)\Steam\steamapps\common\Skyrim Special Edition

If you want to configure this project to output your plugin files into your "mods" folder:
(for Mod Organizer 2 or Vortex)

  • Set the SKYRIM_MODS_FOLDER environment variable to the path of your mods folder:
    e.g. C:\Users\<user>\AppData\Local\ModOrganizer\Skyrim Special Edition\mods
    e.g. C:\Users\<user>\AppData\Roaming\Vortex\skyrimse\mods

Debugging

In order to attach a debugger, you must own a legal copy of Skyrim with the exe stripped using Steamless. Note that users with MO2 should have -forcesteamloader as an SKSE argument for plugins to load normally with a stub-removed exe.

For VSCode users, they must have a launch.json file like the one below:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "C++ Debugger",
            "type": "cppvsdbg",
            "request": "attach"
        },
        {
            "type": "cmake",
            "request": "launch",
            "name": "Debug portfile(s)",
            "cmakeDebugType": "external",
            "pipeName": "\\\\.\\pipe\\vcpkg_ext_portfile_dbg",
            "preLaunchTask": "Debug vcpkg commands"
        }
    ]
}