Skip to content

Sample code for prospective developers showcasing a build setup for a Skyrim SKSE plugin using the PrismaUI framework with CMake.

Notifications You must be signed in to change notification settings

langfod/PrismaUI-example-cmake-plugin

Repository files navigation

PrismaUI Example CMake Plugin

Sample code for prospective developers showcasing a build setup for a Skyrim SKSE plugin using the PrismaUI framework with CMake.

Features

  • Player Name Display - Shows the current player's name (after Save is loaded)
  • JavaScript Canvas 3D Demos - Three demos using Kevin Roast's Canvas 3D library:
    • Asteroids-like game
    • K3D test scene
    • K3D demo
  • Help Page - Links to https://www.prismaui.dev/
  • MCM Menu - Configure hotkeys through SkyUI's Mod Configuration Menu
    • F4 - Open plugin UI (default)
    • ?? - Open Inspector View for debugging (disabled by default)

Compatibility

Uses CommonLibSSE-NG as a git submodule.

  • ✅ Skyrim SE (1.5.x)
  • ✅ Skyrim SE (1.6.x / Anniversary Edition)
  • ❓ Skyrim VR (untested)

Requirements

Quick Start (Semi-Automated)

  1. Clone the repository with submodules:

    git clone --recurse-submodules https://github.com/langfod/PrismaUI-example-cmake-plugin.git
    cd PrismaUI-example-cmake-plugin
  2. Configure local paths:

    Copy-Item Build_Config_Template.ps1 Build_Config_Local.ps1

    Edit Build_Config_Local.ps1 with your local paths (Skyrim install, VS path, etc.)

  3. Download external dependencies:

    .\DownloadExternalDeps.ps1
  4. Build the release:

    .\BuildRelease.ps1

The release will be built to the dist folder and automatically zipped.

Manual Build Steps

If you prefer to build manually using CMake:

  1. Clone with submodules:

    git clone --recurse-submodules https://github.com/langfod/PrismaUI-example-cmake-plugin.git
    cd PrismaUI-example-cmake-plugin
  2. Download external dependencies:

    The CMake build expects these tools in specific locations under the external/ folder:

    • Papyrus Compiler: Download papyrus-compiler-windows.zip and extract to external/papyrus-compiler/ (should contain papyrus.exe)
    • Spriggit CLI: Download SpriggitCLI.zip and extract to external/SpriggitCLI-0.40.0/ (should contain Spriggit.CLI.exe) to match the entry in cmake\Spriggit.cmake.
  3. Configure CMake:

    cmake --preset release
  4. Build:

    cmake --build build/release --config Release
  5. Install (optional):

    cmake --install build/release --prefix dist

Project Structure

├── cmake/                  # CMake modules
├── external/               # External dependencies
│   ├── commonlibsse-ng/    # CommonLibSSE-NG submodule
│   ├── papyrus-compiler/   # Papyrus compiler
│   └── SpriggitCLI-0.40.0/ # Spriggit CLI tool (currently v0.40.0)
├── include/                # Header files
├── papyrus_scripts/        # Papyrus files
│   ├── headers/            # Papyrus headers for papyrus-compiler
│   └── sources/            # Papyrus script sources
├── plugins/                # ESP plugin data (Spriggit format)
├── src/                    # C++ source files
└── view/                   # HTML/JS/CSS for PrismaUI views

Working with the ESP Plugin

This project uses Spriggit to store the ESP plugin as human-readable JSON files in the plugins/ directory, enabling version control and easier collaboration.

To convert your edited plugin back to Spriggit JSON format:

.\serialize_gameplugin.ps1

For more information on working with plugins, see docs/plugins.md.

Dependencies & Tools

Tool Purpose Links
PrismaUI SKSE UI framework GitHub · Docs
CommonLibSSE-NG SKSE plugin library GitHub
Papyrus Compiler Script compilation GitHub · Releases
Spriggit Plugin serialization GitHub · Releases · Docs

JavaScript Demo Attribution

The Canvas 3D demos included in this example are sourced from Kevin Roast's excellent work:

Real-World PrismaUI Examples

Looking for more sophisticated examples? Check out these mods built with PrismaUI:

A scriptless mod configuration manager built with SKSE. by PaulMixMod

Adds new features like Multi-Dodge and True 8-way Dodge. by PaulMixMod

A clearer, more stylish floating damage display. by PaulMixMod

Overhauls the potion system with a modern action RPG-inspired flask mechanic. Replaces consumable potions with regenerating flask charges, bringing Souls-like and Cyberpunk-style healing to Skyrim. by Newrite

Adds a chat box (common in MMOs/MMORPGs) to Skyrim. Supports AI integration through SkyrimNet, MinAI, and Mantella. by orehomu

About

Sample code for prospective developers showcasing a build setup for a Skyrim SKSE plugin using the PrismaUI framework with CMake.

Resources

Stars

Watchers

Forks

Packages

No packages published