Jump to content

Setting Notepad++ to compile scripts


kitcat81

Recommended Posts

Guys, help me please. I can't make it work. Spent 2 hours trying to do this ,no idea what it wants from me. Getting the error :

D:\Steam\steamapps\common\Fallout 4\Papyrus Compiler>echo off
"====> DEBUG BUILD"
Papyrus Compiler Version 2.8.0.4 for Fallout 4
Copyright (C) ZeniMax Media. All rights reserved.
Starting 1 compile threads for 1 files...
Compiling "-f=Institute_Papyrus_Flags.flg"...
<unknown>(0,0): unable to locate script -f=Institute_Papyrus_Flags.flg
No output generated for -f=Institute_Papyrus_Flags.flg, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on -f=Institute_Papyrus_Flags.flg

This is the .bat file I run :

echo off
:: ---------------------------------------------
:: NotePad++ Run:
::   "D:\Steam\steamapps\common\Fallout 4\Papyrus Compiler\NppScriptCompile_debug.bat" "$(FULL_CURRENT_PATH)"
:: ---------------------------------------------
 
set "F4HOME=D:\Steam\steamapps\common\Fallout 4"
set "F4Compile=%F4HOME%\Papyrus Compiler\PapyrusCompiler.exe"
set "F4SRC=%F4HOME%\Data\Scripts\Source"

:: ---------------------------------------------
:: INCLUDES
:: ---------------------------------------------
 
set "F4INCLUDE=%F4SRC%\Base"
if exist "%F4SRC%\DLC01" set "F4INCLUDE=%F4SRC%\DLC01;%F4INCLUDE%"
if exist "%F4SRC%\DLC02" set "F4INCLUDE=%F4SRC%\DLC02;%F4INCLUDE%"
if exist "%F4SRC%\DLC03" set "F4INCLUDE=%F4SRC%\DLC03;%F4INCLUDE%"
if exist "%F4SRC%\DLC04" set "F4INCLUDE=%F4SRC%\DLC04;%F4INCLUDE%"
if exist "%F4SRC%\DLC05" set "F4INCLUDE=%F4SRC%\DLC05;%F4INCLUDE%"
 
set "F4INCLUDE=%F4SRC%\User;%F4INCLUDE%"
if exist "%F4SRC%\User\Fragments" set "F4INCLUDE=%F4SRC%\User\Fragments;%F4INCLUDE%"
if exist "%F4SRC%\User\Fragments\Quests" set "F4INCLUDE=%F4SRC%\User\Fragments\Quests;%F4INCLUDE%"
if exist "%F4SRC%\User\Fragments\Terminals" set "F4INCLUDE=%F4SRC%\User\Fragments\Terminals;%F4INCLUDE%"

:: ---------------------------------------------
:: DEBUG
:: ---------------------------------------------
echo "====> DEBUG BUILD"
"%F4Compile%" %1 -f="Institute_Papyrus_Flags.flg" -i="%F4INCLUDE%" -o="%F4HOME%\Data\Scripts\Source\Base"
 
pause

I set it all as it was described in the CK wiki. Just changed paths to real file paths on my PC. The Institute_Papyrus_Flags.flg is located in Base folder, so had to add "\Source\Base" to the path. But it gives me the same error without this addition too.

Edited by kitcat81
Link to comment
Share on other sites

I was just trying to follow the example in the FO4 CK wiki ("Notepapad ++ setup" article). Copypasted the code and changed paths. And still getting the error even though the path to the flag file is correct. I'm better with Papyrus than batch files.

The problem was that the CK compiler did not let me to add any text after 1200+ lines of code. It seems to have some character limit. But I have found another way around: editted the .PSC in Notepad and them compiled in the CK.

 

Stillwould like to know how to set the Notepad for compiling.

Link to comment
Share on other sites

I could be wrong. But, I think it's possible that further edits are supposed to be made to that debug file and they just didn't clarify it in the wiki.

 

It is painful for me to imagine coding through the CK!

 

I highly, highly recommend that you switch to Sublime Text. I think they list it as not being free. But, there is a free version that simply has an occasional nag window.

Link to comment
Share on other sites

Arrgh... I remember trying to set it all up. Indeed, ingame editor is good only for writing short scripts under 33k of symbols. But once you've tried a nice editor, you can't get enough. It is so much better.

 

I must say, the info on the setup on CK.com was not helpful to me neither. It seems quite outdated too. But I found another way around it, so now I'm happily married to Notepad))

 

Let's talk over the fresh installation of it. Re-Intall the newest version of Notepad++.

 

1. Then go here https://www.nexusmods.com/skyrim/mods/64895 and download it. It only has a .dll and an .xml files, you need to put them in the right folder (somewhere in Notepad++ directory, think Notepad++/Plugins). Don't remember exactly, but we'll come back to this stage later if you can't figure it out. It should be intuitively clear, though not around the computer right now.

 

2. In Notepad itself you now should be able to see papyrus and manually set the path to its compiler. And again, don't remember if it's in the 'Settings' or the 'Language' section, but I'll take a look later today, when at home. Image of the window you need: https://m.imgur.com/a/ZAcg2

 

P.s. That's it. Now you can change syntax highlight. Compilation by default is set to ctrl + shift + c.

Edited by werr92
Link to comment
Share on other sites

Notepad is just a text editor, it doesn't care about what game you use. It can colorize some words or compounds of your choice (you define what words and in what colors it highlights). And it can send a command to the 'compiler', it really knows nothing about too.

When you download .dll file you tell notepad that you would like to use a new highlight style and associate .psc, .pex with papyrus. For that you show notepad da wae to the compiler and a place to look for libraries our papyrus uses (basic scripts).

After you register papyrus there, you can set colors in built-in GUI, no need to edit .xml manually.

Edited by werr92
Link to comment
Share on other sites

Hey , thank you Werr92. I created some xml document following the tutorial in the CK , that was supposed to highlight Papyrus in notepad. But as I never managed to make the compiler work , I gave up on the idea with the tutorial. I think I understand now, will try to use the mod the next time I have a long script to compile.

Edited by kitcat81
Link to comment
Share on other sites

  • Recently Browsing   0 members

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