Jump to content

How do I compile scripts?


Recommended Posts

Posted (edited)

Hello, 

I'm an absolute noob to scripting and stuff, but I made a few changes in scripts of a Loverslab-mod I use to better fit in my game and (hopefully) resolve a problem. I tried to compile it using a tool called Papyrus Compiler App, but it looks like when I try to do it that way the compiler doesn't find references and variables from mods the mod depends on (sexlab for example).

Now, how do I compile it? Do I have to use the CK and load all the dependent plugins? I remember all my experiences with the CK to be shit, so I've been avoiding that ^^

Edited by Gwentag
Posted (edited)

There's probably tutorials for this available, but I suppose the short version goes something like this:

 

The official way to compile scripts is with the CK I'd assume:

Gameplay -> Compile Papyrus Scripts...

 

This most likely uses the PapyrusCompiler.exe found in ...\Papyrus Compiler. This exe can also be used directly, and gives you more control over things.

 

Right now there's some confusion in what folder the script sources should be, so about half the mods you download will have them in the "wrong" directory. The 2 candidates are ...\source\scripts (>=se) and ...\scripts\source (<se). Whichever you end up using, you'll have to normalize all mods that are "wrong" yourself. Which one you use can be set in the CreationKit.ini file under the Papyrus section; key name sScriptSourceFolder.

 

The papyrus compiler is not capable of reading bsa/bs2 archives, meaning any mod that has its sources archived will have to be extracted before you can modify its scripts, or scripts based on them.

 

Edit: There's also the TESV_Papyrus_Flags.flg file which I recall is in a Scripts.* archive which I think is bundled with the CK, however it's been too long I can't remember the details on that anymore. If it's not that then it might be one of the vanilla bsa archives. Regardless of where you find it, that one needs to be in the script source folder along with all psc files.

 

Edit2: You never have to load any plugins to compile scripts. You can compile in the CK without even loading Skyrim.esm, just like you can compile directly with the PapryusCompiler.exe and no CK.

Edited by traison
Posted
1 hour ago, traison said:

There's probably tutorials for this available, but I suppose the short version goes something like this:

 

The official way to compile scripts is with the CK I'd assume:

Gameplay -> Compile Papyrus Scripts...

 

This most likely uses the PapyrusCompiler.exe found in ...\Papyrus Compiler. This exe can also be used directly, and gives you more control over things.

 

Right now there's some confusion in what folder the script sources should be, so about half the mods you download will have them in the "wrong" directory. The 2 candidates are ...\source\scripts (>=se) and ...\scripts\source (<se). Whichever you end up using, you'll have to normalize all mods that are "wrong" yourself. Which one you use can be set in the CreationKit.ini file under the Papyrus section; key name sScriptSourceFolder.

 

The papyrus compiler is not capable of reading bsa/bs2 archives, meaning any mod that has its sources archived will have to be extracted before you can modify its scripts, or scripts based on them.

 

Edit: There's also the TESV_Papyrus_Flags.flg file which I recall is in a Scripts.* archive which I think is bundled with the CK, however it's been too long I can't remember the details on that anymore. If it's not that then it might be one of the vanilla bsa archives. Regardless of where you find it, that one needs to be in the script source folder along with all psc files.

 

Edit2: You never have to load any plugins to compile scripts. You can compile in the CK without even loading Skyrim.esm, just like you can compile directly with the PapryusCompiler.exe and no CK.

Thanks for your help! But I went back to using Skyrim Script CompilerPro. It does all the stuff you need to do and fix to start compiling for you without having to use the CK. I remembered using it in the past and it works like a charm

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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