Scripting: Compiling In Notepad++

///Scripting: Compiling In Notepad++

Compiling Scripts in Notepad++

content by OpusGlass

Writing Papyrus scripts in a dedicated code editor can be much easier than writing it in the CK for a variety of reasons. Here’s how you can set up a Papyrus environment in Notepad++.

This assumes you’ve already extracted your Scripts.rar archive. (Otherwise, you can’t compile even in CK!)

If you’re on Special Edition, you’ll need slightly modified versions of the scripts, which I’ve listed at the bottom.


Part A. Edit your Batch file

1) Make a copy of ScriptCompile.bat in your “…\Skyrim\Papyrus Compiler” folder. (Just select it, hit Ctrl+C, then Ctrl+V.)


2) Open ScriptCompile.bat in a text editor such as Notepad. (Right click the file, Edit, and if it asks you to pick a program, find Notepad.)


3) Replace the text of the file with this:

“%~dp0PapyrusCompiler” %1 -f=”TESV_Papyrus_Flags.flg” -i=%2;%3;%4;%5;%6 -o=%2\..


It needs to be exact, so copy and paste.


4) Save (Ctrl+S)

Part B. Create a Notepad++ keboard shortcut.

1) Copy and paste the following command into any text editor:

“{Skyrim path}\Papyrus Compiler\ScriptCompile.bat” “$(FILE_NAME)” “$(CURRENT_DIRECTORY)” “{Skyrim path}\Data\Scripts\Source”

2) Replace the two places where I’ve written {Skyrim path} with, you guessed it, your Skyrim path. Don’t keep the {}.


3) OPTIONAL: If you have any other source paths you need, for example if you have PapyrusUtils or SkyUI installed in a separate location and you need those functions in your scripts, you can add up to 3 additional paths at the end of that command.


4) In Notepad++, go to Run->Run. Paste in your modified command. Click “Save…”



5) Name it “Papyrus” then select a keyboard shortcut. I use Alt+P, so I check the box for Alt and then use the dropdown menu to find P.


6) Test it out! Open a Papyrus file and hit Alt+P. You should get a window with confirmation that it compiled successfully. The window disappears as soon as you hit a key.


Syntax Highlighting

1) Download this file: papyrus_definitions_skse.xml

Credit goes to Cdcooley for this file. I got it from here:

In addition to general syntax highlighting for Papyrus, it highlights any SKSE functions with a different color than vanilla functions, making it easy to tell if a script has a dependency.

You can find other custom Papyrus definitions here:

2) In Notepad++, go to “Languages->Define your language…”


3) Then click Import and find the file you downloaded.


4) Then click Save As and type Papyrus.


5) Then, while you have a .PSC file open, go to Languages and select Papyrus.


Everything should now be highlighted by syntax, and it will remember these settings whenever you open a PSC file!



You must use these modified versions of the commands, since SE’s Source files are in a different location.


“%~dp0PapyrusCompiler” %1 -f=”TESV_Papyrus_Flags.flg” -i=%2;%3;%4;%5;%6 -o=%2\..\..\Scripts


Notepad++ command:

“{Skyrim SE path}\Papyrus Compiler\ScriptCompile.bat” “$(FILE_NAME)” “$(CURRENT_DIRECTORY)” “{Skyrim SE path}\Data\Source\Scripts”

Again, replace {Skyrim SE path} with your path.

Learn more, join our community!

Arcane University (also for non-members!)

Welcome to the Arcane University! We are a collaborative effort of Beyond Skyrim aiming to help people learn the various aspects that play into mod creation, like scripting, level design or 3d modelling to just name the major ones. If you are interested in learning one of these or just want to help out others achieve their goal, feel free to join us on our Discord server and begin your journey. Previous knowledge is not required, only that you are willing and eager to learn. Below you can find some work that students of the Arcane University made during their time with us. By honing your skills you can eventually graduate, those students may choose to work on one of the various Beyond Skyrim teams or the Atronach Forge, our cross-province content creation hub. So it is a good chance to get involved with the project and learn a few handy things along the way. Hope to see you soon!

By |2018-09-13T15:19:54+00:00August 6th, 2018|Sctripting, Tutorials|0 Comments

About the Author:

Leave A Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.