-
Notifications
You must be signed in to change notification settings - Fork 24
Compilation
The Papyrus Language extension provides features related to source code compilation.
Do you have a complicated build system, or something simpler? VS Code will accommodate in any case. There are many ways to compile Papyrus scripts with VS Code. Read more about the Papyrus Compiler.
The Project Explorer for Papyrus provides compilation support.
Read more about the Project Explorer.
The VS Code Integrated Terminal provides a command line interface (CLI) inside the editor. The compiler may be executed using tasks in several ways.
PapyrusCompiler <psc> -i="<scripts folder>" -o="Data\Scripts" -f="TESV_Papyrus_Flags.flg"
PapyrusCompiler <folder> -i="<scripts folder>" -o="Data\Scripts" -f="TESV_Papyrus_Flags.flg"
PapyrusCompiler <ppj>"
- Copy the full file path string to a Papyrus Project intended for compilation.
- Open the VS Code Integrated Terminal and set the current working directory to the Papyrus Compiler folder.
- Execute the "PapyrusCompiler.exe" where the first argument is the file path of a Papyrus Project (*.ppj).
<Papyrus Compiler> PapyrusCompiler.exe "the\path\to\your\project.ppj"
A VS Code Task is a special workspace file ...\MyWorkSpace\.vscode\tasks.json
.
A task may be used to execute the compiler, call a batch file, or any other process.
For simple builds the compiler can be called directly with arguments from a task.
{
"version": "2.0.0",
"tasks": [
{
"label": "Papyrus Compile Directory (Fallout 4)",
"group": "build",
"type": "process",
"command": "${config:papyrus.fallout4.installPath}Papyrus Compiler\\PapyrusCompiler.exe",
"options": {
"cwd": "${config:papyrus.fallout4.installPath}"
},
"args": [
{
"value": "${config:papyrus.fallout4.installPath}Data\\Scripts\\Source\\User",
"quoting": "strong"
},
{
"value": "-import=${config:papyrus.fallout4.installPath}Data\\Scripts\\Source\\User;${config:papyrus.fallout4.installPath}Data\\Scripts\\Source\\Base",
"quoting": "strong"
},
{
"value": "-output=${config:papyrus.fallout4.installPath}Data\\Scripts",
"quoting": "strong"
},
{
"value": "-flags=Institute_Papyrus_Flags.flg",
"quoting": "strong"
},
{
"value": "-all",
"quoting": "strong"
}
],
"problemMatcher": []
}
]
}
This is a VS Code Tasks example for calling a batch file with arguments.
{
"version": "2.0.0",
"tasks": [
{
"label": "Papyrus Compile Custom (Skyrim SE)",
"group": "build",
"type": "shell",
"command": "the\\path\\to\\your\\compile.bat",
"args": [
{
"value": "${config:papyrus.skyrimSpecialEdition.installPath}",
"quoting": "strong"
},
{
"value": "path\\to\\directory\\for\\compilation",
"quoting": "strong"
}
],
"problemMatcher": []
}
]
}

Extension
Features
- Language Definition
- IntelliSense
- Code Navigation
- Refactoring
- Compilation
-
Debugging
- Debug View
- [Debug Console](Debug Console)
- [Assembly View](Assembly View)
Creation Engine
Language
Help