0
\$\begingroup\$

In my quest object (the yellow container for the quest logic), when I open it, on the right side, I see in my fragment window:

"Code not loaded"

What does it mean, and how do I fix it?

I'm using the Creation Kit 64bit and Skyrim Special Edition/Anniversary Edition 2021

\$\endgroup\$
1
  • 2
    \$\begingroup\$ Hello, and welcome to GameDev. I can see you want to share your knowledge in a Q&A fashion. However, the actual question seems to lack additional information which you may have instead included as part of their answer. Questions should be complete and exhaustive, and answers contain the solution to issues encountered. Do you think your question may benefit from this kind of improvements? \$\endgroup\$
    – liggiorgio
    Commented Apr 29, 2022 at 14:04

1 Answer 1

1
\$\begingroup\$

This question&answer is a cross-post from one of my posts on Reddit.


It means that the compiler built into CK cannot access the source scripts (psc) as a resource. Also, it might be possible that you are unable to compile new scripts which the game can use (pex files). Both of these issues are addressed below:

  1. In your "SkyrimSpecialEdition\Data\" directory, delete "source" and "scripts" folders (if existing).
    Careful! if you have these, you want to make backup folders so you can keep your contents and paste them back in later. Copy them somewhere else. They have been added by mods or by you before for a reason.
  2. In your "SkyrimSpecialEdition\Data\" directory, unpack "\Data\scripts.rar".
  3. In your "SkyrimSpecialEdition\Data\" directory, check the new structure:
    1. it should be "Data\Scripts\Source" containing all psc code files and
    2. "Data\Scripts" which should contain all pex code files.
    3. Additionally, in your "Data\Scripts\Source" there should be a single file called "TESV_Papyrus_Flags.flg". It helps the compiler to see that these are actually the psc scripts to work with (papyrus source files). So if you have your papyrus source files somewhere else, this little friend has to join them.
    4. Now, we should check if your initialization is unmodified (as vanilla /downloaded) so that your compiler really looks into these paths we prepared above. Go back one level above in the file hierarchy to "SkyrimSpecialEdition\" and look for the two files that tell Creation Kit where to look for the source scripts and where to place the compiled scripts.
      1. creationkit.ini (ini file format extensions might be hidden for you, cosmetics)
      2. creationkitcustom.ini (this one you can add yourself and it overwrites 1. automatically)
      3. creationkitcustom.ini (if you have it), else creationkit.ini should contain:
        [Papyrus]
        sScriptSourceFolder = "Data\Scripts\Source"
        sScriptCompiledFolder = "Data\Scripts"
        in the Papyrus section. This will make sure, the CK is looking at the right spot.
      4. Control it one last time:
Folder File type inside declaration and appearance
"Data\Scripts" pex formate files "compiled scripts" (binary)
"Data\Scripts\Source" psc formate files "source scripts" (readable logic)

Run CK and check if your code is finally loaded! Best of luck! :)

This is the first challenge you have to overcome when you want to make mods, and perhaps the steepest step to get your own mod/conversion done, overall. This is the most challenging part of setting up your environment, so it potentially multiplies access to hobby devs if this is well documented. And overall, I hope more people can realize their ideas and see what great formate games are for art, creativity, challenge, and entertainment. Even writers for videos and games greatly profit from this experience.


Disclaimer:

  1. I do not take any responsibility for missing files or broken games, I just share the approach in best faith, with the goal of helping you to find the solution yourself, at your own risk.
  2. I assume that you have not changed your ini file for Creation Kit, hence a vanilla installation.
  3. You only have pex files if you copied them in manually, compiled them already, or pasted a mod inside. By vanilla setup, the game uses the pex files compressed in a BSA archive, not in the folders you see below, so no sweat if you do not have pex files at all yet. The compiler however needs the input folder and the psc as source files, and the output folder where to place the pex files.
  4. If you changed your ini and look for different folders, then of course, you must place your files in these new locations.
  5. Thank you to everyone working with me on Creation Kit contents, especially Elscrux, Woni, and Tascani.
\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .