In case it helps someone else, I thought I'd post directions on how I installed this app and configured it. This is just an example in case it helps someone.
Spoiler:
Show
BE SURE THE CK IS LOADED AND YOU CAN START IT WITHIN MO2 BEFORE PROCEEDING. THIS IS BASED ON VERSION 4.5.0 SO SOME THINGS MAY BE A BIT DIFFERENT.
1. Create an empty mod at the very end of your modlist called "Papyrus Compiler OUTPUT" and enable it.
2. Create the following directories in Papyrus Compiler Output: \Scripts \Source\Scripts\OUTPUT
3. Download PCA here. Note that I'm using version 4.5.0; use that if the latest version doesn't work for you. Extract the download to your utilities location somewhere outside of MO2, Mine is here: D:\Games\Utilities\Papyrus Compiler App\
4. Set up the PCA executable in MO2 with these properties (change "Start in" path where necessary below): --Title: PCA --Start in: D:\Games\Steam\steamapps\common\Skyrim Special Edition\Data\Source --Create files in mod instead of overwrite: Papyrus Compiler OUTPUT
5. Start PCA from inside MO2
6. Go into PCA's Settings:
--Choose "Skyrim Special Edition"
--SSE folder (where SSE is on your hard drive): D:\Games\Steam\steamapps\common\Skyrim Special Edition
--PapyrusCompiler.exe location (where the compiler executable is located on your PC): D:\Games\Steam\steamapps\common\Skyrim Special Edition\Papyrus Compiler\PapyrusCompiler.exe
--Mod Organizer 2: NOT CHECKED
7. Open the json file here (change this to reflect your own user path): C:\Users\Glanzer\AppData\Roaming\PCA\config.json
8. Use the following values in the json file (CHANGE THE 2 PATHS BEGINNING WITH "D:" BELOW AS NECESSARY, and the version number of PCA):
1. COPY (not move) a psc file from a mod and put it in the \Source\Scripts\ directory inside the "Papyrus Compiler OUTPUT" mod. Make any changes to it there. 2. Start PCA inside MO2 and click the Search Scripts option to navigate to the .psc file and open it. 3. When you compile the script, the .pex compiled file (if successful) will go into the \Source\Scripts\OUTPUT folder inside the "Papyrus Compiler OUTPUT" mod. 4. Copy or move the .pex file from the \Source\Scripts\OUTPUT folder to the \Scripts\ folder in the "Papyrus Compiler OUTPUT" mod. Since this mod is LAST in your load order, it will therefore be the "winner" and the compiled script will therefore be active when you start your game. This will preserve the original script, allowing you to delete the compiled version to go back to the original if you want, or you can make more changes and put in another compiled version without touching the original.
Thanks for making a great program even better. Wish I could endorse more than once! Once this app is set up and working, it's so easy to use and reliable.
Here's a hint to help others... The vast majority of compilation problems occur when supporting scripts are missing. This happens frequently when you're making edits to a script from someone else's mod. Be sure to extract all the scripts from the mod's BSA if it has one. Then only work on the first compilation error in the log. It's a good idea to collect some of the most common source files (*.psc files) that mods use and put them into separate mods at the end of your MO2 modlist, and enable them whenever you compile scripts. The two most common you'll need are the SkyUI SDK source files and VRIK source files.
Hi all, thought I'd ask a question in case anyone is experiencing this. Just a few days ago the compiles started failing immediately and the error log was totally empty. I have to reboot my whole computer, then it works again, but soon afterward fails again forcing another reboot. Very strange. There's probably something going on in my OS I suppose, but I thought I'd throw it out there in case someone else has experienced this and knows what's going on. Thanks!
EDIT: Of course we always solve the problem 60 seconds after posting. hahahaha Seems it is my antivirus conflicting in some way. I'm using Avast, and I just paused Avast and tried it again without rebooting and it worked. Looks like Avast started doing something and I'll need to find the exclusion to add.
Fallout 4 support does not seem to work very well. The generated command needs to import Scripts/Source/Base and Scripts/Source/User instead of just Scripts/Source (for MO2 support, it needs to import Scripts/Source/User for every mod).
This can be worked around by copying Institute_Papyrus_Flags.flg from Scripts/Source/Base to Scripts/Source and any script you wish to compile from Scripts/Source/User/[namespace] to Scripts/Source/[namespace]
I'm having serious trouble finding the .pex output, even though it says it compiles all right.
- I have enabled the MO2 support - I have created PCA_Output and set MO2 to write there - I have extracted the scripts from the ZIP to the data/scripts - I have placed the source of the script I want to compile instide data/script - I can't find .pex in PCA_Output - I can't find .pex in Overwrite/Scripts
Sometimes, but not all the times, the compiled script seems to appear IN PLACE of a mod folder which script I am modifying, but only if I delete it beforehand.
check using mo2 data tab. its overwriting .pex files in your active mods. check which one just recently got date modified. at least that what happened to me lmao. fk it at least it work.
Where is this json file located? I followed your steps up until 7. Then you say "open the json file here". Is this supposed to be in the same window as step 6? The only things remaining in that window are Theme and Telemetry. The only json file I see in the folder is vk_swiftshader_icd.json
i tried to change the output folder to something outside of skyrim install to the folder where PCA is located in another drive, but it keeps saying format not supported...
The lastest version of PCA does not support absolute path in `compiler.output` nor in `mo2.output`. You have to use the same drive as the `compilation.compilerPath`
I'm getting errors when trying to compile a source script from a mod, and I've added the required scripts to Skyrim\Data\Source\Scripts. Then I drag the script I want to edit from that folder to PCA, but still getting errors that come from missing SkyUI source scripts, according to Chat GPT. Where does PCA look for source scripts?
I don't know why, but when I drop a script into the compiler and I start compiling it opens a second window of the app but it never finishes to compile, and if I close the new window the app stops compiling and it shows it failed to compile the psc file Edit: I fixed my issue, for some reason the old config file from a past version I had was still on my PC with an invalid output folder.
Yes, but Fallout source code has a different file structure, so we have to copy files back and forth, like described in one of the sticky comments:
“ Fallout 4 support does not seem to work very well. The generated command needs to import Scripts/Source/Base and Scripts/Source/User instead of just Scripts/Source (for MO2 support, it needs to import Scripts/Source/User for every mod). This can be worked around by copying Institute_Papyrus_Flags.flg from Scripts/Source/Base to Scripts/Source and any script you wish to compile from Scripts/Source/User/[namespace] to Scripts/Source/[namespace]”
It would be great if PCA automatically handles the special file structure in Fallout, and we could just compile the source in-place. e.g. Drag Scripts/Source/User/[mod_name]/[script_name].psc to PCA, press compile, and PCA puts the compiled file to Scripts/Source/[mod_name]/[script_name].pex (Currently it would report error as it does not import Scripts/Source/Base and User, and it also complains the Filename declaration in the psc file: “Filename mod_name:Script_name” )
psc -> pex location mapping In Fallout as I tested in CK:
I understand now. I mainly have experience with Skyrim, and everything is in Source… I first saw the namespace feature when searching for Starfield Papyrus, was kind of surprised.
I'd recommended updating the pinned directions. The current PCA version is 5.8 and well past the 4.5 from the instructions. The instructions don't work anymore.
Since it is instructed to disable MO2 in app, the MO2 config below doesn't do anything. The output entry: "output": "mods\\Papyrus Compiler OUTPUT\\Source\\Scripts\\OUTPUT" does not affect anything.
The "output" under compilerPath: "output": "Data\\Source\\Scripts\\OUTPUT" will send the .pex files to that subfolder off your game folder, not the "Mods\\Papyrus Compiler Output\\Source\\Scripts\\Output" MO2 mod folder that you created for this if following the instructions.
In case anyone can't find your files and followed the instructions at the top of this thread, look in your game folder. I have not figured out how to get the files to the mod folder. I'm also trying to figure out why its recommended to disable in-app MO2 support.
`mo2.output` is the folder when you're using mo2 in-app integration (when `mo2.use` is true) `output` is the folder when you're NOT using mo2 in-app integration.
Choose either, but I recommend using MO2 VFS instead by disabling in-app integration, it's more stable.
Hello, if you run [21128:0413/185312.988:ERROR:cache_util_win.cc(20)] Unable to move the cache: ������ �źϵǾ����ϴ�. (0x5) [21128:0413/185312.988:ERROR:cache_util.cc(146)] Unable to move cache folder C:\Users\이제호\AppData\Roaming\PCA SE\GPUCache to C:\Users\이제호\AppData\Roaming\PCA SE\old_GPUCache_001 [21128:0413/185312.988:ERROR:disk_cache.cc(186)] Unable to create cache [21128:0413/185312.988:ERROR:shader_disk_cache.cc(612)] Shader Cache Creation failed: -2 What did I do wrong that this log is being generated??
Hey, sorry about that. You're not the first person to encounter this issue, and so far I haven’t found a solution. It’s an error coming from the framework I use to run the app.
By any chance, did you run the app multiple times simultaneously? That could be related.
Check if any PCA processes are running, kill them if there are, and try again.
I'm a total idiot. Maybe I have poor reading skills. I set the papyrus compiler path in settings to Skyrim Special Edition\Papyrus Compiler\papyruscompiler.exe instead of "PCA.exe" and it worked fine. I'm a total idiot. Sorry for bothering you.
Yeah, in some other comments, I mentioned that if there is no `.pex` equivalent before running from MO2, the scripts will end up in the overwrite folder.
Hi. I've been getting this error, trying to compile scripts. It's my first time compiling scripts, if I'm being honest, and I'm not really sure what went wrong. A Pastebin of the logs.
502 comments
In case it helps someone else, I thought I'd post directions on how I installed this app and configured it. This is just an example in case it helps someone.
BE SURE THE CK IS LOADED AND YOU CAN START IT WITHIN MO2 BEFORE PROCEEDING. THIS IS BASED ON VERSION 4.5.0 SO SOME THINGS MAY BE A BIT DIFFERENT.
1. Create an empty mod at the very end of your modlist called "Papyrus Compiler OUTPUT" and enable it.
2. Create the following directories in Papyrus Compiler Output:
\Scripts
\Source\Scripts\OUTPUT
3. Download PCA here. Note that I'm using version 4.5.0; use that if the latest version doesn't work for you. Extract the download to your utilities location somewhere outside of MO2, Mine is here: D:\Games\Utilities\Papyrus Compiler App\
4. Set up the PCA executable in MO2 with these properties (change "Start in" path where necessary below):
--Title: PCA
--Start in: D:\Games\Steam\steamapps\common\Skyrim Special Edition\Data\Source
--Create files in mod instead of overwrite: Papyrus Compiler OUTPUT
5. Start PCA from inside MO2
6. Go into PCA's Settings:
--Choose "Skyrim Special Edition"
--SSE folder (where SSE is on your hard drive):
D:\Games\Steam\steamapps\common\Skyrim Special Edition
--PapyrusCompiler.exe location (where the compiler executable is located on your PC):
D:\Games\Steam\steamapps\common\Skyrim Special Edition\Papyrus Compiler\PapyrusCompiler.exe
--Mod Organizer 2: NOT CHECKED
7. Open the json file here (change this to reflect your own user path):
C:\Users\Glanzer\AppData\Roaming\PCA\config.json
8. Use the following values in the json file (CHANGE THE 2 PATHS BEGINNING WITH "D:" BELOW AS NECESSARY, and the version number of PCA):
{
"mo2": {
"use": false,
"output": "mods\\Papyrus Compiler OUTPUT\\Source\\Scripts\\OUTPUT",
"mods": "mods"
},
"gameType": "Skyrim Special Edition",
"gamePath": "D:\\Games\\Steam\\steamapps\\common\\Skyrim Special Edition",
"flag": "TESV_Papyrus_Flags.flg",
"compilerPath": "D:\\Games\\Steam\\steamapps\\common\\Skyrim Special Edition\\Papyrus Compiler\\PapyrusCompiler.exe",
"output": "Data\\Source\\Scripts\\OUTPUT",
"groups": [],
"__internal__": {
"migrations": {
"version": "4.5.0"
}
}
}
============
To compile a script:
1. COPY (not move) a psc file from a mod and put it in the \Source\Scripts\ directory inside the "Papyrus Compiler OUTPUT" mod. Make any changes to it there.
2. Start PCA inside MO2 and click the Search Scripts option to navigate to the .psc file and open it.
3. When you compile the script, the .pex compiled file (if successful) will go into the \Source\Scripts\OUTPUT folder inside the "Papyrus Compiler OUTPUT" mod.
4. Copy or move the .pex file from the \Source\Scripts\OUTPUT folder to the \Scripts\ folder in the "Papyrus Compiler OUTPUT" mod. Since this mod is LAST in your load order, it will therefore be the "winner" and the compiled script will therefore be active when you start your game. This will preserve the original script, allowing you to delete the compiled version to go back to the original if you want, or you can make more changes and put in another compiled version without touching the original.
Papyrus Compiler errors
Papyrus Runtime errors
FAQ: My Script Doesn't Work!
Go here for more information for this issue: https://pca.kiyozz.com/docs/troubleshooting/command-line-too-long
Here's a hint to help others... The vast majority of compilation problems occur when supporting scripts are missing. This happens frequently when you're making edits to a script from someone else's mod. Be sure to extract all the scripts from the mod's BSA if it has one. Then only work on the first compilation error in the log. It's a good idea to collect some of the most common source files (*.psc files) that mods use and put them into separate mods at the end of your MO2 modlist, and enable them whenever you compile scripts. The two most common you'll need are the SkyUI SDK source files and VRIK source files.
EDIT: Of course we always solve the problem 60 seconds after posting. hahahaha Seems it is my antivirus conflicting in some way. I'm using Avast, and I just paused Avast and tried it again without rebooting and it worked. Looks like Avast started doing something and I'll need to find the exclusion to add.
This can be worked around by copying Institute_Papyrus_Flags.flg from Scripts/Source/Base to Scripts/Source and any script you wish to compile from Scripts/Source/User/[namespace] to Scripts/Source/[namespace]
- I have enabled the MO2 support
- I have created PCA_Output and set MO2 to write there
- I have extracted the scripts from the ZIP to the data/scripts
- I have placed the source of the script I want to compile instide data/script
- I can't find .pex in PCA_Output
- I can't find .pex in Overwrite/Scripts
Sometimes, but not all the times, the compiled script seems to appear IN PLACE of a mod folder which script I am modifying, but only if I delete it beforehand.
its overwriting .pex files in your active mods.
check which one just recently got date modified.
at least that what happened to me lmao.
fk it at least it work.
{
"game": {
"path": "D:\\Games\\Steam\\steamapps\\common\\Skyrim Special Edition",
"type": "Skyrim SE"
},
"compilation": {
"concurrentScripts": 15,
"compilerPath": "D:\\Games\\Steam\\steamapps\\common\\Skyrim Special Edition\\Papyrus Compiler\\PapyrusCompiler.exe",
"flag": "TESV_Papyrus_Flags.flg",
"output": "Data\\Scripts\\Source\\OUTPUT"
},
"tutorials": {
"settings": false,
"telemetry": false
},
"mo2": {
"use": false,
"output": "mods\\Papyrus Compiler OUTPUT\\Scripts\\Source\\OUTPUT",
"mods": "mods"
},
"groups": [],
"telemetry": {
"active": false
},
"theme": "system",
"locale": "en-US",
"__internal__": {
"migrations": {
"version": "5.8.0"
}
}
}
is my line wrong?
"output": "C:\\Skyrim Modding Tools\\PCA 2022.1-23852-2022-1-1651831763\\Output"
i DO NOT want the output script to be in the install folder, it causes a lot of confusion when editing scripts for a number of mods.
edit: great, now i cant even open the program anymore. Just throws up javascript error.
"output": "..\\..\\..\\..\\..\\Skyrim Modding Tools\\ScriptsCompiled"
yes the dots are not error, i literally copied and pasted that into the json.
edit: the folder is outside the game and mod folders.
I don't know why, but when I drop a script into the compiler and I start compiling it opens a second window of the app but it never finishes to compile, and if I close the new window the app stops compiling and it shows it failed to compile the psc file
Edit: I fixed my issue, for some reason the old config file from a past version I had was still on my PC with an invalid output folder.The app should be compatible with Fallout 4.
“ Fallout 4 support does not seem to work very well. The generated command needs to import Scripts/Source/Base and Scripts/Source/User instead of just Scripts/Source (for MO2 support, it needs to import Scripts/Source/User for every mod).
This can be worked around by copying Institute_Papyrus_Flags.flg from Scripts/Source/Base to Scripts/Source and any script you wish to compile from Scripts/Source/User/[namespace] to Scripts/Source/[namespace]”
It would be great if PCA automatically handles the special file structure in Fallout, and we could just compile the source in-place. e.g. Drag
Scripts/Source/User/[mod_name]/[script_name].psc
to PCA, press compile, and PCA puts the compiled file to
Scripts/Source/[mod_name]/[script_name].pex
(Currently it would report error as it does not import Scripts/Source/Base and User, and it also complains the Filename declaration in the psc file: “Filename mod_name:Script_name” )
psc -> pex location mapping In Fallout as I tested in CK:
No namespace: Scripts/Source/Base/ -> Scripts/
DLC: Scripts/Source/DLC_name/ -> Scripts/DLC_name/ (Scriptname DLC_name:Script_name)
mod: Scripts/Source/User/mod_name/ -> Scripts/mod_name/ (Scriptname mod_name:Script_name)
I’ll have to add this on my list.
Thank for your feedback and examples!
Since it is instructed to disable MO2 in app, the MO2 config below doesn't do anything. The output entry: "output": "mods\\Papyrus Compiler OUTPUT\\Source\\Scripts\\OUTPUT" does not affect anything.
The "output" under compilerPath: "output": "Data\\Source\\Scripts\\OUTPUT" will send the .pex files to that subfolder off your game folder, not the "Mods\\Papyrus Compiler Output\\Source\\Scripts\\Output" MO2 mod folder that you created for this if following the instructions.
{
"mo2": {
"use": false,
"output": "mods\\Papyrus Compiler OUTPUT\\Source\\Scripts\\OUTPUT",
"mods": "mods"
},
"gameType": "Skyrim Special Edition",
"gamePath": "D:\\Games\\Steam\\steamapps\\common\\Skyrim Special Edition",
"flag": "TESV_Papyrus_Flags.flg",
"compilerPath": "D:\\Games\\Steam\\steamapps\\common\\Skyrim Special Edition\\Papyrus Compiler\\PapyrusCompiler.exe",
"output": "Data\\Source\\Scripts\\OUTPUT",
"groups": [],
"__internal__": {
"migrations": {
"version": "4.5.0"
}
}
}
In case anyone can't find your files and followed the instructions at the top of this thread, look in your game folder. I have not figured out how to get the files to the mod folder. I'm also trying to figure out why its recommended to disable in-app MO2 support.
{
"mo2": {
"use": false,
"output": "mods\\Papyrus Compiler OUTPUT\\Source\\Scripts\\OUTPUT",
"mods": "mods"
},
"gameType": "Skyrim Special Edition",
"gamePath": "D:\\Games\\Steam\\steamapps\\common\\Skyrim Special Edition",
"flag": "TESV_Papyrus_Flags.flg",
"compilerPath": "D:\\Games\\Steam\\steamapps\\common\\Skyrim Special Edition\\Papyrus Compiler\\PapyrusCompiler.exe",
"output": "Data\\Source\\Scripts\\OUTPUT",
"groups": [],
"__internal__": {
"migrations": {
"version": "4.5.0"
}
}
}
`mo2.output` is the folder when you're using mo2 in-app integration (when `mo2.use` is true)
`output` is the folder when you're NOT using mo2 in-app integration.
Choose either, but I recommend using MO2 VFS instead by disabling in-app integration, it's more stable.
Do I missed something?
[21128:0413/185312.988:ERROR:cache_util_win.cc(20)] Unable to move the cache: ������ �źϵǾ����ϴ�. (0x5)
[21128:0413/185312.988:ERROR:cache_util.cc(146)] Unable to move cache folder C:\Users\이제호\AppData\Roaming\PCA SE\GPUCache to C:\Users\이제호\AppData\Roaming\PCA SE\old_GPUCache_001
[21128:0413/185312.988:ERROR:disk_cache.cc(186)] Unable to create cache
[21128:0413/185312.988:ERROR:shader_disk_cache.cc(612)] Shader Cache Creation failed: -2
What did I do wrong that this log is being generated??
By any chance, did you run the app multiple times simultaneously? That could be related.
Check if any PCA processes are running, kill them if there are, and try again.
I set the papyrus compiler path in settings to Skyrim Special Edition\Papyrus Compiler\papyruscompiler.exe instead of "PCA.exe" and it worked fine.
I'm a total idiot. Sorry for bothering you.
Compilation is successfull but I don't find the output files in my folder for some reason.
EDIT 2: Found it in the: "\MO2\overwrite\scripts" after I enabled Mod Organizer 2 in settings. Without it there is no output at all.
A Pastebin of the logs.
Edit: Got all the missing sources, and now it works. Nice!
Thank you! Thank you! Thank you!
Someone told me that what was missing was SKSE resources.
在MO2中为Sexlab和SLA设置脚本环境的步骤指南 - 框架和资源 - LoversLab