File information

Last updated

Original upload

Created by

WushuLate

Uploaded by

WushuLate

Virus scan

Safe to use

502 comments

  1. Glanzer
    Glanzer
    • premium
    • 261 kudos
    Locked
    Sticky
    Great mod, and great author support. ENDORSED.

    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):

    {
    "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.
  2. hazardass
    hazardass
    • premium
    • 18 kudos
    Locked
    Sticky
    Here is a reference for the most common Papyrus errors users keep asking about here.  You can also search the Creation Kit wiki for your error.
    Papyrus Compiler errors
    Papyrus Runtime errors
    FAQ: My Script Doesn't Work!
  3. Dracolegend
    Dracolegend
    • member
    • 0 kudos
    Locked
    Sticky
    So if i use mo2 and get the command line to long error does that mean I have no way to compile scripts? 
    1. WushuLate
      WushuLate
      • premium
      • 31 kudos
      Instead, open PCA from MO2 itself and remove the in app MO2 settings. Configure all paths to MO2 Virtual folder (uselly skyrim game path)
    2. WushuLate
      WushuLate
      • premium
      • 31 kudos
      Version 2022.1 (5.8.0) should handle this issue better.

      Go here for more information for this issue: https://pca.kiyozz.com/docs/troubleshooting/command-line-too-long
  4. Glanzer
    Glanzer
    • premium
    • 261 kudos
    Locked
    Sticky
    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.
  5. Glanzer
    Glanzer
    • premium
    • 261 kudos
    Locked
    Sticky
    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.
  6. edinburg86
    edinburg86
    • member
    • 0 kudos
    Locked
    Sticky
    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]
    1. WushuLate
      WushuLate
      • premium
      • 31 kudos
      Yeah I know, Fallout 4 has a different script structure and namespace support. Because I didn't play Fallout 4, I didn't know.
  7. n7magistrate
    n7magistrate
    • premium
    • 68 kudos
    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.
    1. WushuLate
      WushuLate
      • premium
      • 31 kudos
      Try disabling MO2 support in the app and retry without it. It should then go to PCA_Output, as you configured MO2 that way.
    2. darkblackbad
      darkblackbad
      • member
      • 2 kudos
      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.
    3. n7magistrate
      n7magistrate
      • premium
      • 68 kudos
      Thank you, that could be an idea. I wish you could specify an output folder though.
    4. Glanzer
      Glanzer
      • premium
      • 261 kudos
      You CAN specify an output folder. it's defined in the json file. In case it helps you can compare yours to mine:

      Spoiler:  
      Show

      {
          "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"
              }
          }
      }
    5. MageMaglor
      MageMaglor
      • member
      • 11 kudos
      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
    6. WushuLate
      WushuLate
      • premium
      • 31 kudos
      You have shortcuts to open it. Click on the PCA icon top left, File then you should see a section about Settings. There is a button to open the json.
    7. Incantation666
      Incantation666
      • supporter
      • 3 kudos
      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... 

      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.
    8. WushuLate
      WushuLate
      • premium
      • 31 kudos
      In which section did you wrote this output?
    9. WushuLate
      WushuLate
      • premium
      • 31 kudos
      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`
    10. Incantation666
      Incantation666
      • supporter
      • 3 kudos
      hi, i fixed it after asking chatgpt. Took some back and forth but it gave me the following line which i copied and pasted, and it works perfectly now.

      "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.
    11. WushuLate
      WushuLate
      • premium
      • 31 kudos
      Yeah this solution works only in the same drive. This is a relative path
  8. Dastantis
    Dastantis
    • member
    • 5 kudos
    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?
    1. WushuLate
      WushuLate
      • premium
      • 31 kudos
      SkyUI sources are not bundled with SkyUI on NexusMods, you need to download them in the SkyUI's GitHub repository. 
  9. TheDarkDragon7
    TheDarkDragon7
    • member
    • 38 kudos
    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.
  10. nonamexxpp
    nonamexxpp
    • member
    • 3 kudos
    Possible to create a special version for Fallout4?  It would be great if we could use this app without manual workaround
    1. WushuLate
      WushuLate
      • premium
      • 31 kudos
      What do you mean by Workaround? Do using “Fallout 4” in the options is working?
      The app should be compatible with Fallout 4.
    2. nonamexxpp
      nonamexxpp
      • member
      • 3 kudos
      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:

      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)
    3. WushuLate
      WushuLate
      • premium
      • 31 kudos
      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’ll have to add this on my list.

      Thank for your feedback and examples!
    4. nonamexxpp
      nonamexxpp
      • member
      • 3 kudos
      Thank you!
  11. TennesseeTuxedo
    TennesseeTuxedo
    • premium
    • 4 kudos
    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.

    {
    "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.
    1. WushuLate
      WushuLate
      • premium
      • 31 kudos
      {
        "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?
  12. dlwpghek2
    dlwpghek2
    • member
    • 9 kudos
    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??
    1. WushuLate
      WushuLate
      • premium
      • 31 kudos
      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.
    2. dlwpghek2
      dlwpghek2
      • member
      • 9 kudos
      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.
  13. Luxembroom
    Luxembroom
    • member
    • 0 kudos
    EDIT: Sorry, was an error on my end!

    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.
    1. WushuLate
      WushuLate
      • premium
      • 31 kudos
      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.
  14. sincerity2103
    sincerity2103
    • premium
    • 90 kudos
    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.
    1. WushuLate
      WushuLate
      • premium
      • 31 kudos
      You're missing third party scripts. SKSE sources, McmHelper sources and more
    2. sincerity2103
      sincerity2103
      • premium
      • 90 kudos
      Other than missing scripts, anything else I should look out for?

      Edit: Got all the missing sources, and now it works. Nice!
  15. moiianxiv
    moiianxiv
    • premium
    • 35 kudos
    Working perfect!
    Thank you! Thank you! Thank you!
    1. WushuLate
      WushuLate
      • premium
      • 31 kudos
      I'm glad you like it!
  16. Afeiteng
    Afeiteng
    • member
    • 0 kudos
    I keep getting almost the same error when compiling the script, can anyone help me?

    Someone told me that what was missing was  SKSE resources.

    在MO2中为Sexlab和SLA设置脚本环境的步骤指南 - 框架和资源 - LoversLab
    1. WushuLate
      WushuLate
      • premium
      • 31 kudos
      Can you share what error you got please