Setting Up For Using ContentLib

Before you can get started using ContentLib, there’s a few things you’ll have to set up. Don’t worry, it’s still a lot faster than the full modding environment setup process.

Get a Good Text Editor

Using Windows Notepad, or Notepad++, will actively make editing your scripts more difficult. Don’t use those editors for working on your scripts! They are nice editors, but not for this purpose.

Get a text editor that supports JSON Schemas, or you can use the VSCode web editor if you don’t want to download anything.

If you do this, you will reap the following benefits:

  • The editor will automatically check JSON syntax for you (~50% of errors people have with ContentLib are this)

  • You can hover over any part of the JSON and the editor will explain its purpose for you

  • The editor will provide example values for you as you type

  • You’ll get nice syntax highlighting

Don’t use Notepad or Notepad++ to edit your scripts! Just don’t!

You are consciously, willingly, choosing to make the process take longer if you stick with those editors for no clear benefit.

If you ask for help, my first question will be "does your editor say it matches the JSON Schema?" I (Robb) will not check JSON syntax for you, the schema does that automatically. People (me included) make mistakes, the schema checker doesn’t.

Always Use CRLF Line Endings

If you’re on a Windows computer, you shouldn’t have to worry about this - it should only be an issue if you’re writing scripts from a non-Windows machine or if you’re generating them programatically.

ContentLib will get confused if you use LF line endings instead of CRLF line endings. A telltale sign of this mistake is if you see curly braces showing up in the error log in unexpected places (ex. class names).

In VSCode you can convert whatever the current file’s line endings are into CRLF by using 'Change All End Of Line Sequence' in the Command Pallette (Ctrl+Shift+P).

Alternate Approach: Configs Folder

These steps will walk you through setting up a mini mod to test your scripts with, but you can also just write your scripts inside of the respective ContentLib Config Folders.

If you decide to go this route, all of your scripts will instead go in those folders instead of inside of the plugin folders. The docs are written assuming that your files are in a plugin folder, though.

Download the Example Plugin Skeleton

Download the empty mod plugin skeleton zip here.

Extract this zip to a temporary location; we will be moving the folder in another section.

Before you release a mod from this template, you must switch over some files to use your mod reference instead of the current value of ExampleContentLibMod

You can read more about mod references and what naming format they must follow in the main modding documentation.

It’s okay to leave it as ExampleContentLibMod for now, but it also doesn’t hurt to change it right now if you already have a name in mind for your mod.

Once you have decided on a mod reference, you will have to:

  • Rename the folder (from ExampleContentLibMod to YourModReferenceHere)

  • Rename the .uplugin file inside the folder (from ExampleContentLibMod.uplugin to YourModReferenceHere.uplugin)

  • (Optional) Replace /Resources/Icon128.png with image of your choice for the mod icon

Inside the .uplugin file:

  • Edit the FriendlyName, Description, and CreatedBy fields to your preferences

  • Replace the "SmlVersionReplaceMe" with the latest version number of SML found here, so that it follows the format ^The.Number.Here. Once you’re done, that section will look similar to this:

{
  "Name": "SML",
  "Enabled": true,
  "SemVersion": "^3.5.0"
},
  • Replace the "ContentLibVersionReplaceMe" with the latest version number of ContentLib found here, so that it follows the format ^The.Number.Here. Once you’re done, that section will look similar to this:

{
  "Name": "ContentLib",
  "Enabled": true,
  "SemVersion": "^1.1.0"
},

Setting Up the Plugin Folder

Option 1 - No Unreal Editor

Before you decide to follow this section, I suggest considering Option 2, since it helps if you ever decide to go further in modding.

Put the folder in the Mods folder of your Satisfactory game install.

For example, if your game was installed in the folder D:\Programs\EpicGamesGames\SatisfactoryExperimental\ then the folder path to inside of the folder you moved in should be D:\Programs\EpicGamesGames\SatisfactoryExperimental\FactoryGame\Mods\YourModReferenceHere

Continuing the example, this means that the uplugin file will be located at D:\Programs\EpicGamesGames\SatisfactoryExperimental\FactoryGame\Mods\YourModReferenceHere\YourModReferenceHere.uplugin

Beware that other modding tools (SMM CLI) could accidentally delete it, so keep backups!

Proceed to the Next Steps section.

Option 2 - With Unreal Editor

If you have a copy of the editor, you probably already know what you’re doing, and you can put this in the Plugins folder, after which you can Alpakit like any other mod.

If you don’t have a copy of the editor, you should to follow the normal modding setup docs to get one, and follow the modding starter project set up. This will take some time, but if you ever want to add more advanced functionality to your mod, you will have to do this.

When the docs ask you to create a plugin, you can skip that step, and instead bring in the skeleton plugin folder.

Your script files will go in your modding project’s plugin folder. In order to package your changes for the game, and for distribution as a mod, use Alpakit as described in the main modding docs.

Proceed to the Next Steps section.

Option 3 - Adding ContentLib Scripts to an Existing Mod

If you already have a mod set up, and you want to add ContentLib JSON scripts to it, you will have to modify your mod’s plugin setup slightly to ensure they are packaged with the mod.

Put Scripts in the Plugin Folders

Scripts should be in the following plugin folder locations. See the Folders page for more info.

/ModReferenceGoesHere/ContentLib/Items/
/ModReferenceGoesHere/ContentLib/Icons/
/ModReferenceGoesHere/ContentLib/Recipes/
/ModReferenceGoesHere/ContentLib/RecipePatches/
/ModReferenceGoesHere/ContentLib/ItemPatches/
/ModReferenceGoesHere/ContentLib/Schematics/
/ModReferenceGoesHere/ContentLib/SchematicPatches/
/ModReferenceGoesHere/ContentLib/VisualKits/
/ModReferenceGoesHere/ContentLib/CDOs/

Dependency Configuration

Make sure that you list ContentLib as a required dependency of your own mod, and follow the directions here to be sure that any json files you include in your mod files get packed into your final mod.

Example PluginSettings.ini after following those directions:

[StageSettings]
+AdditionalNonUSFDirectories=Resources
+AdditionalNonUSFDirectories=ContentLib

Proceed to the Next Steps section.

Next Steps

Now that you’ve got your editor and mod set up, it’s time to get started making some content.

A great place to start is the Create an Item tutorial.