Line 4: |
Line 4: |
| | | |
| ==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]].
| + | Every SMAPI mod or content pack has a <tt>manifest.json</tt> file with info about it. That info is available in that's mod code (using <tt>this.ModManifest</tt>) and to other mods (using the [[#Mod registry|mod registry]]). |
| | | |
− | Here's the basic format for a mod: | + | Here's the basic format (see below for details on each field): |
− | <source lang="javascript"> | + | {| class="wikitable" |
| + | |- |
| + | ! For a SMAPI mod |
| + | ! For a content pack |
| + | |- |
| + | | <source lang="javascript"> |
| { | | { |
− | "Name": "<your project name>", | + | "Name": "YourProjectName", |
− | "Author": "<your name>", | + | "Author": "your name", |
| "Version": "1.0.0", | | "Version": "1.0.0", |
− | "Description": "<One or two sentences about the mod>", | + | "Description": "One or two sentences about the mod.", |
− | "UniqueID": "<your name>.<your project name>", | + | "UniqueID": "YourName.YourProjectName", |
− | "EntryDll": "<your project name>.dll", | + | "EntryDll": "YourDllFileName.dll", |
| "MinimumApiVersion": "2.0", | | "MinimumApiVersion": "2.0", |
| "UpdateKeys": [] | | "UpdateKeys": [] |
| } | | } |
| </source> | | </source> |
| + | | <source lang="javascript"> |
| + | { |
| + | "Name": "YourProjectName", |
| + | "Author": "your name", |
| + | "Version": "1.0.0", |
| + | "Description": "One or two sentences about the mod.", |
| + | "UniqueID": "YourName.YourProjectName", |
| + | "MinimumApiVersion": "2.0", |
| + | "UpdateKeys": [], |
| + | "ContentPackFor": { |
| + | "UniqueID": "Pathoschild.ContentPatcher", // the ID of required mod |
| + | "MinimumVersion": "1.0.0" // optional |
| + | } |
| + | } |
| + | </source> |
| + | |} |
| | | |
| ===Basic fields=== | | ===Basic fields=== |
Line 54: |
Line 75: |
| 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> | | 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
| + | For a content pack, <tt>ContentPackFor</tt> specifies which mod can read it. The <tt>MinimumVersion</tt> is optional. Example: |
− | |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"> | | <source lang="javascript"> |
| "ContentPackFor": { | | "ContentPackFor": { |
Line 62: |
Line 81: |
| "MinimumVersion": "1.0.0" | | "MinimumVersion": "1.0.0" |
| } | | } |
− | </source>}} | + | </source> |
| |} | | |} |
| | | |