A VSCode extension for compiling Papyrus scripts for Skyrim modding.
- 🔧 Compile Papyrus Scripts - Compile all .psc files in your project
- 🎯 Compile Current File - Compile just the file you're working on
- ✅ Syntax Checking - Validate your scripts without generating .pex files
- 🎨 Syntax Highlighting - Full color coding for Papyrus keywords, types, functions, and more
- 📝 Code Folding - Collapse/expand functions, properties, states, and groups
- 📦 Dependency Management - Configure SKSE, PapyrusUtil, and other dependencies in YAML
- 🖱️ Right-click Integration - Access compile commands directly from the editor
- Install the extension from the VSCode marketplace
- Create a
project.yamlfile in your workspace root - Start coding!
This extension was developed for Linux and bundles the Linux version of the papyrus compiler. While it may work on other platforms, it has been specifically tested on Linux.
If you're on Windows or macOS, you can specify a custom compiler path in your project.yaml:
# For Windows
game: "sse"
scripts: "C:/Games/Steam/steamapps/common/Skyrim Special Edition/Data/scripts/source"
compiler: "C:/path/to/your/papyrus-compiler.exe"
# For macOS
game: "sse"
scripts: "/path/to/Skyrim/Data/scripts/source"
compiler: "/path/to/your/papyrus-compiler-macos"Download the appropriate compiler for your platform from russo-2025's repository.
Create a project.yaml file in your workspace root:
name: "My Awesome Mod"
game: "sse"
# Path to the game scripts directory (for base game imports)
scripts: "/path/to/Skyrim Special Edition/Data/scripts/source"
# Source and output directories (relative to workspace root)
sourceDir: "./scripts/source"
outputDir: "./scripts"
# Optional: Configure dependencies
# Use {mods}, {scripts}, {game}, or {name} as placeholders
dependencies:
skse: "{mods}/SKSE/Scripts/Source"
skyui: "{mods}/SkyUI/Scripts/Source"
papyrusutil: "{mods}/PapyrusUtil/Scripts/Source"| Option | Required | Description |
|---|---|---|
name |
Yes | Your mod name |
game |
No | Game version (sse for Skyrim Special Edition) |
mods |
No | The path to your mods folder |
scripts |
Yes | Path to base game scripts for imports |
sourceDir |
No | Where your .psc files are (default: ./src/scripts/source) |
outputDir |
No | Where .pex files go (default: ./src/scripts) |
dependencies |
No | Map of dependency names to paths |
compiler |
No | Custom compiler path (default: bundled compiler) |
Access these commands from the Command Palette (Ctrl+Shift+P or Cmd+Shift+P):
- Scribe: Compile Papyrus Scripts - Compile all .psc files
- Scribe: Check Papyrus Syntax - Validate without compiling
- Scribe: Compile Current Papyrus File - Compile just the open file
You can also right-click on any .psc file in the editor to access these commands.
your-mod/
├── project.yaml # Configuration file
├── scripts/
│ ├── source/ # Your .psc files
│ └── *.pex # Compiled output
└── ...
Dependencies are added as -h flags to the compiler, allowing your scripts to import from them. Placeholders are supported:
{mods}- Path to your mods folder{scripts}- Path from thescriptsconfig{game}- Game identifier (e.g.,sse){name}- Your mod name from config
Example:
dependencies:
skse: "{mods}/SKSE/Scripts/Source"
skyui: "{mods}/SkyUI SDK/Scripts/Source"The tasks are registered as build tasks, so you can use:
Ctrl+Shift+B(orCmd+Shift+B) to run build tasks- Select from the available Papyrus compile options
Make sure you have a project.yaml file in the root of your workspace.
Check that your scripts path points to a valid directory containing .psc files.
Ensure the outputDir directory exists or can be created. The extension will create it if it doesn't exist.
This extension is provided as-is for Skyrim modding purposes.
Papyrus Compiler by russo-2025
This extension bundles the papyrus compiler created by russo-2025. The compiler is licensed under the MIT License and is included in compliance with its terms. The original compiler can be found at:
🔗 https://github.com/russo-2025/papyrus-compiler
Special thanks to russo-2025 for creating and maintaining this excellent Papyrus compiler!