Jump to content

Setting up Notepad++ for script compiling


Recommended Posts

Posted

I am trying to set up my Notepad++ to be able to compile Skyrim SE scripts.

 

I have found and followed the following guide:

https://www.creationkit.com/index.php?title=Notepad%2B%2B_Setup

 

I have neither got the Setting up a quick compile method to work, nor the Fully Integrated Compiler with NppExec (Best Choice) one.

 

For the quick compile my adjusted code is:

S:\Spiele\Steam\SteamApps\common\Skyrim Special Edition\Papyrus Compiler\ScriptCompile.bat" "$(FILE_NAME)" "$(CURRENT_DIRECTORY)"

 

Apparently I need to adjust my ScriptCompile.bat as well, so it reads:

"S:\Spiele\Steam\SteamApps\common\Skyrim Special Edition\Papyrus Compiler\PapyrusCompiler.exe" %1 -f="TESV_Papyrus_Flags.flg" -o="S:\Spiele\Steam\SteamApps\common\Skyrim Special Edition\Data\Scripts"
pause

 

However if I get the error message:

<unknown>(0,0): Unable to find flags file: Institute_Papyrus_Flags.flg

as well as script-specific errors as these:

Skyrim Special Edition\Data\Scripts\Source\MyFirstScript.psc(6,1): variable Debug is undefined

 

 

 

Then I have tried to follow the instructions under Fully Integrated Compiler with NppExec (Best Choice):

npe_console -- m-
npp_save
set local TES5 = S:\Spiele\Steam\SteamApps\common\Skyrim Special Edition\
set local papyrus = $(TES5)\Papyrus Compiler\PapyrusCompiler.exe
set local scripts = $(TES5)\Data\Scripts
set local source = $(scripts)\Source
set local include = $(source)\user;$(source)\base;$(source)
"$(papyrus)" "$(CURRENT_DIRECTORY)\$(FILE_NAME)" -f="TESV_Papyrus_Flags.flg" -i="$(include)" -o="$(scripts)"

 

Again, same error message as above.

For some reason the compiler does not seem to find TESV_Papyrus_Flags.flg

 

So I tried to add the folder it is in to the above:

npe_console -- m-
npp_save
set local TES5 = S:\Spiele\Steam\SteamApps\common\Skyrim Special Edition\
set local papyrus = $(TES5)\Papyrus Compiler\PapyrusCompiler.exe
set local scripts = $(TES5)\Data\Scripts
set local source = $(scripts)\Source
set local include = $(source)\user;$(source)\base;$(source)
set local flagg = $(TES5)Data\Source\Scripts\
"$(papyrus)" "$(CURRENT_DIRECTORY)\$(FILE_NAME)" -f="$(flagg)TESV_Papyrus_Flags.flg" -i="$(include)" -o="$(scripts)"

 

The compiler seems to be able to find it now, but now I am getting way more errors:

Spoiler
Location.psc(7,50): unknown type locationreftype
Location.psc(10,49): unknown type locationreftype
Location.psc(16,41): unknown type locationreftype
Actor.psc(27,49): unknown type globalvariable
Actor.psc(28,34): globalvariable is not a known user-defined type
Actor.psc(28,1): type mismatch on parameter 1 (did you forget a cast?)
ActorBase.psc(4,15): unknown type class
LeveledItem.psc(13,24): unknown type globalvariable
LeveledItem.psc(14,40): unknown type globalvariable
MagicEffect.psc(48,15): unknown type light
MagicEffect.psc(49,24): unknown type light
MagicEffect.psc(51,22): unknown type effectshader
MagicEffect.psc(52,35): unknown type effectshader
MagicEffect.psc(54,22): unknown type effectshader
MagicEffect.psc(55,39): unknown type effectshader
MagicEffect.psc(57,20): unknown type projectile
MagicEffect.psc(58,34): unknown type projectile
MagicEffect.psc(60,19): unknown type explosion
MagicEffect.psc(61,32): unknown type explosion
MagicEffect.psc(72,23): unknown type impactdataset
MagicEffect.psc(73,40): unknown type impactdataset
MagicEffect.psc(78,28): unknown type imagespacemodifier
MagicEffect.psc(79,45): unknown type imagespacemodifier
Race.psc(20,19): unknown type voicetype
Race.psc(23,52): unknown type voicetype
ActorBase.psc(55,24): unknown type class
ActorBase.psc(104,19): unknown type voicetype
ActorBase.psc(105,32): unknown type voicetype
Shout.psc(4,21): unknown type wordofpower
Shout.psc(8,46): unknown type wordofpower
Actor.psc(187,17): unknown type package
Ammo.psc(9,20): unknown type projectile
Weapon.psc(54,16): unknown type static
Weapon.psc(55,33): unknown type static
Actor.psc(307,45): unknown type associationtype
Actor.psc(471,28): unknown type idle
Actor.psc(474,38): unknown type idle
Actor.psc(760,29): unknown type package
Actor.psc(764,30): unknown type package
Actor.psc(768,27): unknown type package
Game.psc(176,41): unknown type wordofpower
Game.psc(251,57): unknown type imagespacemodifier
Game.psc(257,31): unknown type wordofpower
Game.psc(263,32): unknown type wordofpower
ObjectReference.psc(110,5): unknown type key
ObjectReference.psc(112,5): type mismatch on parameter 1 (did you forget a cast?)
ObjectReference.psc(112,29): cannot compare a none to a int (cast missing or types unrelated)
ObjectReference.psc(113,3): type mismatch on parameter 1 (did you forget a cast?)
ObjectReference.psc(245,15): unknown type scene
ObjectReference.psc(269,13): unknown type key
ObjectReference.psc(368,19): unknown type voicetype
ObjectReference.psc(374,20): unknown type worldspace
ObjectReference.psc(388,41): unknown type locationreftype
ObjectReference.psc(465,90): unknown type encounterzone
ObjectReference.psc(477,45): unknown type impactdataset
ObjectReference.psc(517,19): unknown type topic
ObjectReference.psc(665,67): unknown type projectile
ObjectReference.psc(822,24): unknown type referencealias
ObjectReference.psc(834,26): unknown type referencealias[]
Quest.psc(12,66): unknown type globalvariable
Quest.psc(13,12): globalvariable is not a known user-defined type
Quest.psc(18,34): globalvariable is not a known user-defined type
Quest.psc(18,40): cannot compare a none to a float (cast missing or types unrelated)
Quest.psc(18,40): cannot relatively compare variables to None
Quest.psc(18,90): globalvariable is not a known user-defined type
Quest.psc(18,96): cannot compare a none to a float (cast missing or types unrelated)
Quest.psc(18,96): cannot relatively compare variables to None
Quest.psc(135,58): unknown type globalvariable
MyFirstScript.psc(6,1): variable Debug is undefined
MyFirstScript.psc(6,7): none is not a known user-defined type
No output generated for MyFirstScript.psc, compilation failed.

 

 

Anyone else uses Notepad++ as well and can help me out how I need to configure it?

Posted

TBH, I never bothered with getting my IDE (VS Code for me) to compile Papyrus, I just use PCA. Yes, it's another tool, but at least you don't have to open up the CK anymore for simple compilation ;) 

Posted

Working with scripting on SE in Notepad ++

Put this file here

"..\SteamLibrary\steamapps\common\Skyrim Special Edition\Data\Scripts\Source"

 

TESV_Papyrus_Flags.flg

and try again.

 

Check that you have unpacked game scripts in folder "\SteamLibrary\steamapps\common\Skyrim Special Edition\Data\Scripts\Source"

Posted

My amended .bat looks different as i have a i= and a o=

 

"C:\Steam\steamapps\common\Skyrim Special Edition\Papyrus Compiler\PapyrusCompiler.exe" %1 -f="TESV_Papyrus_Flags.flg" -i="C:\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts" -o="C:\Steam\steamapps\common\Skyrim Special Edition\Data\Scripts"
pause

 

Is what i have showing and i've been able to compile

 

For reasons unknown the folders are reversed in SE as you have source\script and script\source

Posted

By default Creation Kit SE  installs all script sources in "Skyrim Special Edition\Data\Source\Scripts" O_o What for? Unknown....

After installing CK i always move all scripts to they "natural" folder Skyrim Special Edition\Data\Scripts\Source\ Put there TESV_Papyrus_Flags.flg

 

And then

 

"C:\Steam\steamapps\common\Skyrim Special Edition\Papyrus Compiler\PapyrusCompiler.exe" %1 -f="TESV_Papyrus_Flags.flg" -i="C:\Steam\steamapps\common\Skyrim Special Edition\Data\Scripts\Source" -o="C:\Steam\steamapps\common\Skyrim Special Edition\Data\Scripts"

 

Parameter -i = input files directory for compiler = .psc files

Parameter -o = output files directory = .pex files

Posted
1 hour ago, pinky6225 said:

 

For reasons unknown the folders are reversed in SE as you have source\script and script\source

Oh, I noticed that besides Data\Scripts\Source also Data\Source\Scripts exists and has .psc files in it. I just thought those are duplicates from Data\Scripts\Source and ignored them. Added them to my inputs, and it worked.

 

For anyone wanting the corrected commands for both:

Spoiler

ScriptCompile.bat

"S:\Spiele\Steam\SteamApps\common\Skyrim Special Edition\Papyrus Compiler\PapyrusCompiler.exe" %1 -f="TESV_Papyrus_Flags.flg" -i="S:\Spiele\Steam\SteamApps\common\Skyrim Special Edition\Data\Source\Scripts" -o="S:\Spiele\Steam\SteamApps\common\Skyrim Special Edition\Data\Scripts"
pause

 

Notepad++ Execute F5

"S:\Spiele\Steam\SteamApps\common\Skyrim Special Edition\Papyrus Compiler\ScriptCompile.bat" "$(FILE_NAME)" "$(CURRENT_DIRECTORY)"

 

NppExec execute:

npe_console -- m-
npp_save
set local TES5 = S:\Spiele\Steam\SteamApps\common\Skyrim Special Edition\
set local papyrus = $(TES5)\Papyrus Compiler\PapyrusCompiler.exe
set local scripts = $(TES5)\Data\Scripts
set local source = $(scripts)\Source
set local include = $(source)\user;$(source)\base;$(source);$(TES5)Data\Source\Scripts
"$(papyrus)" "$(CURRENT_DIRECTORY)\$(FILE_NAME)" -f="TESV_Papyrus_Flags.flg" -i="$(include)" -o="$(scripts)"

 

 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...