Changes

Jump to navigation Jump to search
→‎Manifest: add content pack field in SMAPI 2.5, and example manifest
Line 5: Line 5:  
==Manifest==
 
==Manifest==
 
Each SMAPI mod has a <tt>manifest.json</tt> file with metadata about it. The mod can read its own metadata using <tt>this.ModManifest</tt>, and read metadata for loaded mods using the [[#Mod registry|mod registry]].
 
Each SMAPI mod has a <tt>manifest.json</tt> file with metadata about it. The mod can read its own metadata using <tt>this.ModManifest</tt>, and read metadata for loaded mods using the [[#Mod registry|mod registry]].
 +
 +
Here's the basic format for a mod:
 +
<source lang="javascript">
 +
{
 +
  "Name": "<your project name>",
 +
  "Author": "<your name>",
 +
  "Version": "1.0.0",
 +
  "Description": "<One or two sentences about the mod>",
 +
  "UniqueID": "<your name>.<your project name>",
 +
  "EntryDll": "<your project name>.dll",
 +
  "MinimumApiVersion": "2.0",
 +
  "UpdateKeys": []
 +
}
 +
</source>
    
===Basic fields===
 
===Basic fields===
Line 35: Line 49:  
| A unique identifier for your mod. The recommended format is <tt>&lt;your name&gt;.&lt;mod name&gt;</tt>, with no spaces or special characters. SMAPI uses this for update checks, mod dependencies, and compatibility blacklists (if the mod breaks in a future version of the game). When another mod needs to reference this mod, it uses the unique ID. Example: <source lang="javascript">"UniqueID": "Pathoschild.LookupAnything"</source>
 
| A unique identifier for your mod. The recommended format is <tt>&lt;your name&gt;.&lt;mod name&gt;</tt>, with no spaces or special characters. SMAPI uses this for update checks, mod dependencies, and compatibility blacklists (if the mod breaks in a future version of the game). When another mod needs to reference this mod, it uses the unique ID. Example: <source lang="javascript">"UniqueID": "Pathoschild.LookupAnything"</source>
 
|-
 
|-
| <tt>EntryDll</tt>
+
| <tt>EntryDll</tt> '''or''' <tt>ContentPackFor</tt>
| The name of the mod's compiled DLL in the mod folder. Example: <source lang="javascript">"EntryDll": "LookupAnything.dll"</source>
+
| <p>All mods must specify either <tt>EntryDll</tt> (for a SMAPI mod) or <tt>ContentPackFor</tt> (for a [[Modding:Content packs|content pack]]). These are mutually exclusive — you can't specify both.</p>
 +
 
 +
For a SMAPI mod, <tt>EntryDll</tt> is the mod's compiled DLL filename in its mod folder. Example: <source lang="javascript">"EntryDll": "LookupAnything.dll"</source>
 +
 
 +
{{SMAPI upcoming
 +
|version = 2.5
 +
|content = For a content pack, <tt>ContentPackFor</tt> specifies which mod can read it. The <tt>MinimumVersion</tt> is optional. Example:
 +
<source lang="javascript">
 +
"ContentPackFor": {
 +
  "UniqueID": "Pathoschild.ContentPatcher",
 +
  "MinimumVersion": "1.0.0"
 +
}
 +
</source>}}
 
|}
 
|}
  
translators
8,446

edits

Navigation menu