Skip to content

Teh's Core Mod: Content Packs

TehPers edited this page Jan 26, 2019 · 2 revisions

Creating a content pack for Teh's Core Mod is a relatively simple process. First, create a folder for your content pack in the "Mods" folder. Your folder's name should start with [TCM] to make it easier for players to recognize that it is a content pack (though this is not necessary). Inside of that folder, you will first want to create a manifest for your mod.

Creating the manifest

Note: The information here is provided for convenience, but may not be accurate. Visit the SMAPI manifest wiki page for the official documentation.

In your content pack folder, create a file called manifest.json. It is used to provide information about your content pack to SMAPI so it knows how to load it. The file should look like the following:

{
   "Name": "YourProjectName",
   "Author": "your name",
   "Version": "1.0.0",
   "Description": "One or two sentences about the mod.",
   "UniqueID": "YourName.YourProjectName",
   "MinimumApiVersion": "2.9.0",
   "UpdateKeys": [ ],
   "ContentPackFor": {
      "UniqueID": "TehPers.CoreMod"
   }
}

Mod content

All content packs for Teh's Core Mod must contain a content.json file. Create one, and this will be your root content file. Your content file will contain information about all the items, machines, and other content your mod will be adding to the game. Creating a content pack for Teh's Core Mod is similar to creating a content pack for Content Patcher, Json Assets, Custom Farming Redux, and other similar mods.

Understanding the documentation

In each of the subsections in the sidebar, you will see an example which may look similar to this:

{
    "include": [ "your/path/here" ]
}

Merge the example with your content file to add that section to your mod. For example, if this was your content file before:

{
    "objects": { }
}

you could merge the "include" information into your content file as such:

{
    "objects": { },
    "include": [ "your/path/here" ]
}

Note that the comma is important. Each item in your content file must be separated by commas.

Releasing your mod

Once your mod is complete and ready to be released, you should put your update key into the "UpdateKeys" section of your manifest. For more information on update keys, visit the official documentation.