Giter Club home page Giter Club logo

hairgrowth-skse's Introduction

Work in progress...

Upcoming features:

  • Including SKSE64 in projects (LE, SE, VR, AE)
  • vcpkg for everything, no submodules by default
  • supported submodules for CommonLibSSE to stay up-to-date with latest RE efforts
  • end-to-end tests which run SKSE tests inside the game
  • code coverage (for C++ only - potentially separate reports for unit -vs- e2e tests, gotta try merging support)
  • end-to-end tests for Papyrus scripts
  • will make sure non-SKSE/Skyrim specific things work cross-platform, e.g. if you want to ship a library
  • better CLion support for workflow related to options and compiling
  • integrated Papyrus Project File for compiling Papyrus scripts as well as bundling the mod for you for distribution
  • simple version which is the simplest working plugin (rather than demonstrating tons of features)

Mrowr Purr's SKSE plugin template ๐Ÿ˜ผ

If you use this template, please make your SKSE plugin Open Source โœจ

<Insert YouTube Tutorial Video Here>

Overview

Dependencies

Download or Use Project Template

The easiest way to get started it by using the Use this template button on this GitHub repository.

That will create a copy of this repository of your own to get started with!

Alternatively, git clone the project:

git clone https://github.com/mrowrpurr/Mrowr-Purr-SKSE-Template.git

If you are new to git, I highly recommend using the GitHub Desktop application. It works with GitHub, GitLab, or any hosted or local git.

Setup Plugin Name and Version

Once you have the code downloaded, open CMakeLists.txt and configure your project name and version:

# Set your SKSE plugin name and version.
project(
	ExampleProject
	VERSION 1.0.0
	LANGUAGES CXX
)

Configure Open Source License

Please make your SKSE plugin publicly available on GitHub with one of these recommended Open Source Licenses:

  • MIT
  • Apache 2.0
  • BSD

This project includes an MIT LICENSE file which you can edit.

I recommend MIT. CommonLibSSE is MIT. Many Skyrim projects use MIT.

Open LICENSE and simply add your name:

MIT License

Copyright (c) 2022 <Your Name Here>

Permission is hereby granted, free of charge, to any person obtaining a copy ...

You can review the differences of Open Source Licenses if so desired.

Please only use GPL licenses is you fully understand open source licenses and the impact of releasing software under GPL licenses. Otherwise - don't.

Setup Project Folder

This template uses git submodules to pull in recent versions
of CommonLibSSE (separate versions for AE vs SE), CommonLibVR, and vcpkg (separate versions for each version of Skyrim).

You must run these commands to setup the git submodules:

git submodule init
git submodule update

Setup Environment Variables

Output directly to your MO2/Nexus Mods folder

The easiest way to get started is to set an environment variable which points to your MO2 or Nexus mods folder.

SKYRIM_MODS="C:\Path\To\Mods"

To set this:

  1. Hit the Start key
  2. Start typing "Edit the system environment variables" and choose the option
  3. Click Environment Variables...
  4. Choose New... under _"User variables for [user]"
  5. Set Variable name: to SKYRIM_MODS
  6. Set Variable value: to the path to your mods folder

With this configured, whenever you build your project a directory will be created in your mods folder named [Your Project Name] - [Skyrim Version]:

  • e.g. MyProject - AE or CoolProject - VR.

Different folders are created for different versions of Skyrim.

Configure Specific Output Folders

A more advanced, but simple, option is to configure different paths for mods for different versions of Skyrim.

If you have different mod folder root paths for different versions of Skyrim or would simply like to output the files in a different location, you can set these environment variables:

  • SKSE_SKYRIM_AE_DEV="C:\My Mods\My AE Development\"
  • SKSE_SKYRIM_SE_DEV="C:\My Mods\My SE Development\"
  • SKSE_SKYRIM_VR_DEV="C:\My Mods\My VR Development\"

If you have these set, they will be used instead of the SKYRIM_MODS environment variable, if set.

Default path: output/

If neither SKYRIM_MODS nor the respective SKSE_SKYRIM_[version]_DEV variable(s) are set, then the plugin output will be put into the relative ./output/ folder here in the project.

Building the project (for different versions of Skyrim)

To build the project for a certain version of Skyrim, you must "prepare" the project for that version.

To do so, run the PREPARE .bat file in the project folder for your version of Skyrim:

./PREPARE_AE.bat

This will run cmake and generate the contents of the build/ folder, preparing it to compile and output your SKSE plugin.

Then, build the project!

./BUILD.bat

This compiles the project. Any compilation errors should be visible. If there are none, file should be output to your configured output location from the Setup Environment Variables step.

Upgrading to Newer Versions of CommonLibSSE and CommonLibVR

CommonLibSSE and CommonLibVR are included in the project as git submodules.

The submodules are located here:

CommonLib/
  AE/ --> https://github.com/powerof3/CommonLibSSE
  SE/ --> https://github.com/powerof3/CommonLibSSE
  VR/ --> https://github.com/mrowrpurr/CommonLibVR

At the time of writing, the most frequently updated versions of CommonLib are:

  • powerof3's CommonLibSSE repository with dev and dev-ae branches for SE and AE
  • lfrazer's CommonLibVR repository (which I forked and made a lazy hack to make it compile which I'll cleanup later but it works)

The way that git submodules work is:

  • Each submodule is pinned to a certain commit for the repository

So if you want to update to the latest CommonLibSSE, here are the steps that I currently recommend:

# Update AE to the latest dev-ae
cd CommonLib/AE
git checkout dev-ae
git pull origin dev-ae

# Update SE to the latest dev
cd ../SE
git checkout dev
git pull origin dev

At the time of writing, I have AE and SE pinned to specific commits because the latest dev and dev-ae didn't compile for me so I went back just a couple of commits.

For CommonLibVR, I will try to keep mrowrpurr/CommonLibVR up-to-date. Otherwise you may want to switch to a different person's CommonLibVR by updating the submodule to point at a different remote repository.

Upgrading to Newer vcpkg Packages

Just like CommonLib projects, vcpkg is included in this project as a submodule with separate versions for each version of Skyrim.

Why? Why not just have 1 vcpkg globally on the system? Or 1 vcpkg for the repository?

Sometimes CommonLibSSE/CommonLibVR don't work with the latest versions of public packages, so - to ensure this project tempalte always compiles - I have submodules for vcpkg for each version of Skyrim pinned to a specific version.

This is a temporary solution. I will switch to requiring specific versions of vcpkgs. For my forks, I will switch to providing them via my vcpkg repo.

To update vcpkg for any version of Skyrim:

# Update AE (or SE or VR)
cd vcpkg/AE
git checkout master
git pull origin master

Working with Papyrus scripts

One of the awesome features of Skyrim Script Extender (SKSE) is that it can extend scripts.

SKSE::GetPapyrusInterface()->Register(PapyrusFunctions);

In addition to being configured as a C++ CMake project, this project folder is also configured as a Papyrus Project.

... TODO DOCUMENTATION ...

Writing Unit Tests for C++

... TODO DOCUMENTATION ...

Example Project Features

... TODO ...


TODO

  • script to build all (AE, SE, and VR) and ideally stop on error
  • .zip packaging!
  • .ini reading
  • add a few forms of Form querying/lookup
  • add an example or two of Script reflection and function invocation

hairgrowth-skse's People

Contributors

ozooma10 avatar

Stargazers

Christopher Layne avatar

Watchers

 avatar

Forkers

clayne rethesda

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.