Difference between revisions of "Modding:Content packs"

From Stardew Valley Wiki
Jump to navigation Jump to search
(update for SMAPI 2.5)
(update links)
Line 4: Line 4:
  
 
==For players==
 
==For players==
If you want to use a content pack, install it just like a SMAPI mod (see [[Modding:Player FAQs|player FAQs]]). Make sure you install the mod it needs too.
+
If you want to use a content pack, install it just like a SMAPI mod (see [[Modding:Player Guide|player guide]]). Make sure you install the mod it needs too.
  
 
==For modders==
 
==For modders==
 
===Create a content pack===
 
===Create a content pack===
 
# [[Modding:Installing SMAPI|Install SMAPI]].
 
# [[Modding:Installing SMAPI|Install SMAPI]].
# Open your game's <tt>Mods</tt> folder (located in [[Modding:Player FAQs#Game folder|your game folder]]).
+
# Open your game's <tt>Mods</tt> folder (located in [[Modding:Game folder|your game folder]]).
 
# Add a subfolder with the name you want (usually camelcase like <tt>YourModName</tt>).
 
# Add a subfolder with the name you want (usually camelcase like <tt>YourModName</tt>).
 
# Inside the subfolder:
 
# Inside the subfolder:
#* Add a <tt>manifest.json</tt> file with the <tt>ContentPackFor</tt> field (see [[Modding:SMAPI APIs#Manifest|manifest format]]).
+
#* Add a <tt>manifest.json</tt> file with the <tt>ContentPackFor</tt> field (see [[Modding:Modder Guide/APIs/Manifest|manifest format]]).
 
#* Add the files needed by the mod that will read it. (See the instructions for the mod for which you're creating the content pack.)
 
#* Add the files needed by the mod that will read it. (See the instructions for the mod for which you're creating the content pack.)
 
# Launch the game, and make sure your new content pack appears under "Loaded X content packs" in the SMAPI console.
 
# Launch the game, and make sure your new content pack appears under "Loaded X content packs" in the SMAPI console.
  
 
===Release your content pack===
 
===Release your content pack===
# Add an [[Modding:SMAPI APIs#Update checks|update key]] to your manifest (if you haven't already).
+
# Add an [[Modding:Modder Guide/APIs/Manifest#Update checks|update key]] to your manifest (if you haven't already).
 
# Update the <tt>Version</tt> field in the manifest. (Increase it for each release! SMAPI will use it for update and compatibility checks.)
 
# Update the <tt>Version</tt> field in the manifest. (Increase it for each release! SMAPI will use it for update and compatibility checks.)
 
# Create a <tt>.zip</tt> file containing the content pack's folder.
 
# Create a <tt>.zip</tt> file containing the content pack's folder.
Line 34: Line 34:
  
 
===Consume a content pack===
 
===Consume a content pack===
If you're writing a SMAPI mod which will read content packs, see [[Modding:SMAPI APIs#Content packs]].
+
If you're writing a SMAPI mod which will read content packs, see [[Modding:Modder Guide/APIs/Content Packs]].
  
 
[[Category:Modding]]
 
[[Category:Modding]]

Revision as of 23:02, 26 June 2018

Index

A content pack is a collection of files for a specific SMAPI mod to read (essentially a sub-mod). Content packs can contain any files, but usually consist of JSON files and images.

For players

If you want to use a content pack, install it just like a SMAPI mod (see player guide). Make sure you install the mod it needs too.

For modders

Create a content pack

  1. Install SMAPI.
  2. Open your game's Mods folder (located in your game folder).
  3. Add a subfolder with the name you want (usually camelcase like YourModName).
  4. Inside the subfolder:
    • Add a manifest.json file with the ContentPackFor field (see manifest format).
    • Add the files needed by the mod that will read it. (See the instructions for the mod for which you're creating the content pack.)
  5. Launch the game, and make sure your new content pack appears under "Loaded X content packs" in the SMAPI console.

Release your content pack

  1. Add an update key to your manifest (if you haven't already).
  2. Update the Version field in the manifest. (Increase it for each release! SMAPI will use it for update and compatibility checks.)
  3. Create a .zip file containing the content pack's folder.
  4. Upload that file to Nexus Mods.

In your mod description, providing clear install steps will help reduce support questions. Example BBCode:

[size=5]Install[/size]
[list=1]
[*][url=https://smapi.io]Install the latest version of SMAPI[/url].
[*][url=<url of required mod>]Install <name of required mod>[/url].
[*]Download this mod and unzip it into [font=Courier New]Stardew Valley/Mods[/font].
[*]Run the game using SMAPI.
[/list]

Consume a content pack

If you're writing a SMAPI mod which will read content packs, see Modding:Modder Guide/APIs/Content Packs.