Skip to content

Skyrim Creation Kit SE and MO2

steve962 edited this page Apr 12, 2020 · 1 revision

One of the hidden gotchas you might run into with Skyrim SE Creation Kit is that any script you create which references another mod that's not part of the base game fails to compile, and you have no idea why? It's because the Skyrim SE Creation Kit changes the default location of it's script source files, but all of the mods out there put their sources somewhere else, so Creation Kit can't find them. The game doesn't care about the source scripts, only the compiled scripts, so this doesn't hurt the game at all - but is a real pain for people who want to write mods. Fortunately, it's easy to fix.

Requirements

We assume you already have Skyrim SE installed, have set it up to use MO2 as a Mod Manager and probably installed SKSE and SkyUI already. You must also have installed the Creation Kit SE from the Bethesda Launcher. If you haven't done this yet, the instructions are elsewhere. Go do it.

If you're following MO2 best practices, your real Skyrim data folder should be mostly empty - just Skyrim files and maybe an SKSE file or two, and a Scripts.zip file, but no Source or Script folders. If you've run Creation Kit once already, it may have made the Source folder for you, in which case it's safe to either leave it there or delete it -- what we're doing will overwrite it with MO2 in any case. If you've been mucking around in there and have been making other changes in those folders (like creating a Mod outside MO2), you may want to clean things up and copy your mod elsewhere first.

The Scripts.zip file

The first thing you need to do is deal with Scripts.zip in your Data folder. You could extract it there and deal with it there, but that's not the MO2 way. Lets fix it and install it as a mod instead:

  • Extract Scripts.zip somewhere else. Your Documents folder, perhaps. Rename the resulting folder CKScripts so you know it's for creation kit. When you're done, you'll have a filetree in the form:

     CKScripts
     	DialogueViews
     		[a lot of .xml files]
     	Source
     		Scripts
     			[a lot of .psc files]
    
  • Rename the Source\Scripts subfolder to Source\Source, which makes your filetree look like:

     CKScripts
     	DialogueViews
     		[a lot of .xml files]
     	Source
     		Source
     			[a lot of .psc files]
    
  • Rename the top level Source subfolder to Scripts, which makes your filetree look like:

     CKScripts
     	DialogueViews
     		[a lot of .xml files]
     	Scripts
     		Source
     			[a lot of .psc files]
    
  • Now Archive the CKScripts folder into CKScripts.zip or CKScripts.7z

Fixing Creation Kit to Look in the Right Place

Next, you have to tell Creation Kit to look for it's scripts in the right place. You do this by editing the CreationKit.ini file (or, if you have it, CreationKitCustom.ini) in the root of your Skyrim install folder. MO2 doesn't support this directly, so you'll have to edit it with Notepad++ or something.

  • Look for the [Papyrus] section, or make one if it's not there.
  • Add the line sScriptSourceFolder = ".\Data\Scripts\Source"
  • You should end up with a Papyrus section which looks something like this:
     [Papyrus]
     sScriptSourceFolder = ".\Data\Scripts\Source"
    

Installing CKScripts in MO2

You've done the hard parts. Now, the easy part

  • Run MO2 and navigate to the Downloads tab.

  • Drag CKScripts.zip into your MO2 Downloads section, and install like you would any mod. (If your archive includes the top level CKScripts folder, you may want to install manually, right click on CKScripts and set it as the Data folder.)

  • Place CKScripts at the start of your load order, before any other mods, and Enable.

  • If Creation Kit isn't already in your applications list, add it to the applications list

Using Creation Kit to make Mods

As you're using Creation Kit to edit your mods, they will, by default, end up in your Overwrite area. To make this easier, you can, after you create a new mod in Creation Kit, right click on the Overwrite section at the bottom and select Create Mod.

After that, when you change your mod, you can either right click on Overwrite every time and say Add to Mod to update the version you have, or instead, before you edit your mod, you can go into the Application settings for Creation Kit and tell it to Create Files in the Mod instead of Overwrite.

SkyUI MCM

I ran into this issue trying to work on a SkyUI MCM script, so I close this out with a few tips on that... If you're trying to write an MCM menu for SkyUI, you'll need the SkyUI sources which aren't part of the mod. You can find these at: https://github.com/schlangster/skyui/wiki/ -- go ahead and download the latest version, even if it doesn't match your version of SkyUI. You can take this zip and install it as a mod in MO2 to use it, but make sure it follows CKScripts, SKSE, and (probably) the SkyUI mod itself. Beyond that, the MCM Quickstart at https://github.com/schlangster/skyui/wiki/MCM-Quickstart is an excellent tutorial.