Skip to content

Starfield-Reverse-Engineering/CLibSFPluginTemplate

Repository files navigation

CommonLibSF Plugin Template

C++23 Platform Game version

License requirements

This template uses CommonLibSF's GPLv3 with exceptions. Per the license, you must share the source code of your mod if you use CommonLibSF. Violation of the license will result in your mod being taken down from the Nexus.

Setup

This template consumes CommonLibSF as a git submodule, or a local fork. When you run the project setup script, you will be prompted to choose between the two (the default is as a local fork).

A python script, project_setup.py, is provided which automates several housekeeping steps required to get the template development-ready (requires Python). To run the script:

  1. If you want to use a local fork of CommonLibSF instead of a submodule, create a Windows environment variable called CommonLibSFPath that points to your local fork
  2. Run cd .\CLibSFPluginTemplate\
  3. Run py .\project_setup.py
  4. Enter your project name (in CamelCase)
  5. Choose how to consume CommonLibSF
    1. Press Enter to use the default of consuming CommonLibSF via a local fork
    2. Enter n to consume CommonLibSF as a git submodule instead

Building your project

  • Select one of the CMake presets (release or debug), configure, and build.
  • The .dll and .pdb files will be placed in contrib\PluginRelease or contrib\PluginDebug depending on your selected preset

Requirements

  • vcpkg
    • Create a new environment variable called VCPKG_ROOT which points to your vcpkg install directory
  • CMake
  • LLVM
  • Visual Studio 2022 build tools

Resources