GrimGrim31 Posted March 21, 2021 Share Posted March 21, 2021 Does anyone have a compiler for Papyrus that is more convenient than the one in the Creation Kit? I use Notepad ++ v.7.9.2 (with the syntax highlighting for Papyrus) to write my scripts for FO4. Link to comment Share on other sites More sharing options...
niston Posted March 21, 2021 Share Posted March 21, 2021 Well, there's caprica: https://github.com/Orvid/Caprica But I suspect you're referring to the IDE rather than the compiler, perhaps?If so, you can use Visual Studio Code with the PapyrusLang plugin. It has Intellisense for Papyrus and even offers live debugging of scripts within the running game, you can set breakpoints and inspect variables and such. I recently converted from Notepad++ to this. It's really sleek, even tho sometimes a little bit rough around some edges. Re the actual Papyrus compiler from CK, I'd suggest applying the struct patch. It'll allow you to nest structs within structs - really, really useful. Link to comment Share on other sites More sharing options...
SKKmods Posted March 21, 2021 Share Posted March 21, 2021 Why not just compile direct from Notepad++ ? Run Command menuRunPaste in your compiler batch file like C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Papyrus Compiler\ScriptCompile.BatSave Link to comment Share on other sites More sharing options...
scrivener07 Posted March 21, 2021 Share Posted March 21, 2021 There is Pyro too, which in integrated into the PapyrusLang VS Code extension. https://github.com/fireundubh/pyro > Paste in your compiler batch file like C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Papyrus Compiler\ScriptCompile.BatThat would be the same one included with the Creation Kit and he is already scripting outside the CK. If OP is opening the CK just to compile a script then learning of the PapyrusCompiler.exe works is a good place to start.https://www.creationkit.com/fallout4/index.php?title=Papyrus_Compiler Link to comment Share on other sites More sharing options...
GrimGrim31 Posted March 21, 2021 Author Share Posted March 21, 2021 Thank you for all of the quick responses. I will take a look though the options. Why not just compile direct from Notepad++ ? Run Command menuRunPaste in your compiler batch file like C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Papyrus Compiler\ScriptCompile.BatSaveI have the same path to that batch file but when I run it, I get a file not found error. Link to comment Share on other sites More sharing options...
SKKmods Posted March 21, 2021 Share Posted March 21, 2021 Best to open the BAT file and check each path is correct for your system. Probaby missing your working script file directory from the -i include path. Link to comment Share on other sites More sharing options...
GrimGrim31 Posted March 22, 2021 Author Share Posted March 22, 2021 Best to open the BAT file and check each path is correct for your system. Probaby missing your working script file directory from the -i include path. Wow, every single path was wrong in my BAT file. I corrected them and added my folder address so the compiler knows what files to compile. However, I must be doing something wrong because I keep getting an error when I try to run the BAT. This is my new BAT file. "C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Papyrus Compiler\PapyrusCompiler.exe" %1 -all="C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Data\Scripts\Source\User\GrimGrim31" -f="C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Data\Scripts\Source\Base\Institute_Papyrus_Flags.flg" -i="C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Data\Scripts\Source" -o="C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Data\Scripts\GrimGrim31"pause It is unhappy with -all="C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Data\Scripts\Source\User\GrimGrim31" as the folder address where my .PSC files are located that need to be compiled. The error message says <unknown>(0,0): unable to locate script -all=C::Program Files (x86):Steam:steamapps:common:Fallout 4:Data:Scripts:Source:User:GrimGrim31 Have I given it the wrong form so that it is looking for a single file to compile instead of a folder full of files? Link to comment Share on other sites More sharing options...
SKKmods Posted March 22, 2021 Share Posted March 22, 2021 I got bored trying to get unique folders and namespaces working in a *maintainable* fashion so just use the defaults for simplicity because low patience levels. Maybe get that working before adding cleverness ? Broken down by category for clarity, need to concatinate back into one massive line: "C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Papyrus Compiler\PapyrusCompiler.exe" %1 -f= "C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Data\Scripts\Source\Base\Institute_Papyrus_Flags.flg" -i= "C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Data\Scripts\Source\Base; C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Data\Scripts\Source\User" -o= "C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Data\Scripts" Link to comment Share on other sites More sharing options...
GrimGrim31 Posted March 22, 2021 Author Share Posted March 22, 2021 I got bored trying to get unique folders and namespaces working in a *maintainable* fashion so just use the defaults for simplicity because low patience levels. Maybe get that working before adding cleverness ? Broken down by category for clarity, need to concatinate back into one massive line: "C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Papyrus Compiler\PapyrusCompiler.exe" %1 -f= "C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Data\Scripts\Source\Base\Institute_Papyrus_Flags.flg" -i= "C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Data\Scripts\Source\Base; C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Data\Scripts\Source\User" -o= "C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Data\Scripts" The problem with your BAT is that it has no direction to the compiler to tell it what file or folder of files to compile. scrivener07 posted the link to the CK page and it said, "The very first thing you pass to the compiler is the name of the script (or folder, if you're using the -all flag) to compile." So the 2nd string in the BAT (after the Compiler.exe string) has to have the path to the file or folder to compile. If not, the compiler tries to compile whatever is in the 2nd string which would be the -f= string in your example. That is what happens when I try to use your recommended BAT. I discovered that the -all tag has to follow the 2nd string. I was putting it in front. "C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Papyrus Compiler\PapyrusCompiler.exe" %1 "C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Data\Scripts\Source\User\GrimGrim31" -all -f="C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Data\Scripts\Source\Base\Institute_Papyrus_Flags.flg" -i="C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Data\Scripts\Source\Base; C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Data\Scripts\Source" -o="C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Data\Scripts" pause Now the compiler will run and begin compiling the nine PSC files that I have in my folder. However, after the screen shows "Starting 9 compile threads for 9 files" followed by a list of the files, it says "<unknown>(0,0) unable to locate script "scriptname" and then "no output generated for "scriptname.psc", compilation failed. I don't know why it cannot find the scripts. I also tried pointing the compiler to the User folder instead of my specific folder. That resulted in 837 PSC files getting compiled including mine. While successful, it takes longer to compile that many files than it does to simply open CK and use the compiler there. Link to comment Share on other sites More sharing options...
SKKmods Posted March 22, 2021 Share Posted March 22, 2021 That file works. On multiple systems. For multiple users. If using default install paths. If using F4SE ofcourse add that include. And any other dependent script paths if your getting complicated. %1 represents the pased in file name, just add the line echo %1 and then pause at the top of the file to see that. **********************************************Papyrus debug compiler passed in parameter is:"SKK_COVIDQuestScript.psc"********************************************** Papyrus Compiler Version 2.8.0.4 for Fallout 4Copyright © ZeniMax Media. All rights reserved.Starting 1 compile threads for 1 files...Compiling "SKK_COVIDQuestScript.psc"...Compilation succeeded. Batch compile of 1 files finished. 1 succeeded, 0 failed.Press any key to continue . . . -i is where it looks to find the %1 passed in PSC and dependencies like F4SE -o is where it puts the compiled PEX It really is just that simple. Link to comment Share on other sites More sharing options...
Recommended Posts