Changes

m
Replace deprecated <source> tags with <syntaxhighlight> tags
Line 10: Line 10:  
! For a content pack
 
! For a content pack
 
|-
 
|-
| <source lang="javascript">
+
| <syntaxhighlight lang="javascript">
 
{
 
{
 
   "Name": "Your Project Name",
 
   "Name": "Your Project Name",
Line 21: Line 21:  
   "UpdateKeys": []
 
   "UpdateKeys": []
 
}
 
}
</source>
+
</syntaxhighlight>
| <source lang="javascript">
+
| <syntaxhighlight lang="javascript">
 
{
 
{
 
   "Name": "Your Project Name",
 
   "Name": "Your Project Name",
Line 34: Line 34:  
   }
 
   }
 
}
 
}
</source>
+
</syntaxhighlight>
 
|}
 
|}
   Line 47: Line 47:  
|-
 
|-
 
| <tt>Name</tt>
 
| <tt>Name</tt>
| The mod name. SMAPI uses this in player messages, logs, and errors. Example: <source lang="javascript">"Name": "Lookup Anything"</source>
+
| The mod name. SMAPI uses this in player messages, logs, and errors. Example: <syntaxhighlight lang="javascript">"Name": "Lookup Anything"</syntaxhighlight>
 
|-
 
|-
 
| <tt>Author</tt>
 
| <tt>Author</tt>
| The name of the person who created the mod. Ideally this should include the username used to publish mods. Example: <source lang="javascript">"Author": "Pathoschild"</source>
+
| The name of the person who created the mod. Ideally this should include the username used to publish mods. Example: <syntaxhighlight lang="javascript">"Author": "Pathoschild"</syntaxhighlight>
 
|-
 
|-
 
| <tt>Version</tt>
 
| <tt>Version</tt>
 
| The mod's [http://semver.org/ semantic version]. Make sure you update this for each release! SMAPI uses this for update checks, mod dependencies, and compatibility blacklists (if the mod breaks in a future version of the game). Examples:
 
| The mod's [http://semver.org/ semantic version]. Make sure you update this for each release! SMAPI uses this for update checks, mod dependencies, and compatibility blacklists (if the mod breaks in a future version of the game). Examples:
<source lang="javascript">
+
<syntaxhighlight lang="javascript">
 
"Version": "1.0.0"
 
"Version": "1.0.0"
</source>
+
</syntaxhighlight>
<source lang="javascript">
+
<syntaxhighlight lang="javascript">
 
"Version": "1.0.1-beta.2"
 
"Version": "1.0.1-beta.2"
</source>
+
</syntaxhighlight>
 
|-
 
|-
 
| <tt>Description</tt>
 
| <tt>Description</tt>
| A short explanation of what your mod does (one or two sentences), shown in the SMAPI log. Example: <source lang="javascript">"Description": "View metadata about anything by pressing a button."</source>
+
| A short explanation of what your mod does (one or two sentences), shown in the SMAPI log. Example: <syntaxhighlight lang="javascript">"Description": "View metadata about anything by pressing a button."</syntaxhighlight>
 
|-
 
|-
 
| <tt>UniqueID</tt>
 
| <tt>UniqueID</tt>
| 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: <syntaxhighlight lang="javascript">"UniqueID": "Pathoschild.LookupAnything"</syntaxhighlight>
 
|-
 
|-
 
| <tt>EntryDll</tt> '''or''' <tt>ContentPackFor</tt>
 
| <tt>EntryDll</tt> '''or''' <tt>ContentPackFor</tt>
 
| <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>
 
| <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>
+
For a SMAPI mod, <tt>EntryDll</tt> is the mod's compiled DLL filename in its mod folder. Example: <syntaxhighlight lang="javascript">"EntryDll": "LookupAnything.dll"</syntaxhighlight>
    
For a content pack, <tt>ContentPackFor</tt> specifies which mod can read it. The <tt>MinimumVersion</tt> is optional. Example:
 
For a content pack, <tt>ContentPackFor</tt> specifies which mod can read it. The <tt>MinimumVersion</tt> is optional. Example:
<source lang="javascript">
+
<syntaxhighlight lang="javascript">
 
"ContentPackFor": {
 
"ContentPackFor": {
 
   "UniqueID": "Pathoschild.ContentPatcher",
 
   "UniqueID": "Pathoschild.ContentPatcher",
 
   "MinimumVersion": "1.0.0"
 
   "MinimumVersion": "1.0.0"
 
}
 
}
</source>
+
</syntaxhighlight>
 
|}
 
|}
    
===Minimum SMAPI version===
 
===Minimum SMAPI version===
The <tt>MinimumApiVersion</tt> fields sets the minimum SMAPI version needed to use this mod. If a player tries to use the mod with an older SMAPI version, they'll see a friendly message saying they need to update SMAPI. This also serves as a proxy for the minimum game version, since SMAPI itself enforces a minimum game version. Example: <source lang="javascript">"MinimumApiVersion": "3.8.0"</source>
+
The <tt>MinimumApiVersion</tt> fields sets the minimum SMAPI version needed to use this mod. If a player tries to use the mod with an older SMAPI version, they'll see a friendly message saying they need to update SMAPI. This also serves as a proxy for the minimum game version, since SMAPI itself enforces a minimum game version. Example: <syntaxhighlight lang="javascript">"MinimumApiVersion": "3.8.0"</syntaxhighlight>
    
===Dependencies===
 
===Dependencies===
 
The <tt>Dependencies</tt> field specifies other mods required to use this mod. If a player tries to use the mod and the dependencies aren't installed, the mod won't be loaded and they'll see a friendly message saying they need to install those. For example:
 
The <tt>Dependencies</tt> field specifies other mods required to use this mod. If a player tries to use the mod and the dependencies aren't installed, the mod won't be loaded and they'll see a friendly message saying they need to install those. For example:
<source lang="javascript">
+
<syntaxhighlight lang="javascript">
 
"Dependencies": [
 
"Dependencies": [
 
   {
 
   {
Line 93: Line 93:  
   }
 
   }
 
]
 
]
</source>
+
</syntaxhighlight>
    
You can mark a dependency as optional. It will be loaded first if it's installed, otherwise it'll be ignored.
 
You can mark a dependency as optional. It will be loaded first if it's installed, otherwise it'll be ignored.
<source lang="javascript">
+
<syntaxhighlight lang="javascript">
 
"Dependencies": [
 
"Dependencies": [
 
   {
 
   {
Line 103: Line 103:  
   }
 
   }
 
]
 
]
</source>
+
</syntaxhighlight>
    
===Update checks===
 
===Update checks===
114

edits