Changes

→‎Manifest: + optional fields
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]].
  −
These basic fields describe the mod:
      
{| class="wikitable"
 
{| class="wikitable"
 +
|-
 +
!colspan="2"| Basic fields
 
|-
 
|-
 
! field
 
! field
Line 38: Line 38:  
| <tt>EntryDll</tt>
 
| <tt>EntryDll</tt>
 
| The name of the mod's compiled DLL in the mod folder. Example: <source lang="javascript">"EntryDll": "LookupAnything.dll"</source>
 
| The name of the mod's compiled DLL in the mod folder. Example: <source lang="javascript">"EntryDll": "LookupAnything.dll"</source>
 +
|-
 +
!colspan="2"| Optional fields
 +
|-
 +
! field
 +
! description
 +
|-
 +
| <tt>MinimumApiVersion</tt>
 +
| 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": "1.10"</source>
 +
|-
 +
| <tt>Dependencies</tt>
 +
| '''[SMAPI 1.14+ only]''' The other mods required to use this mod. If a player tries to use the mod and the listed mods aren't installed, they'll see a friendly message saying they need to install those. Example:
 +
<source lang="javascript">
 +
"Dependencies": [
 +
  {
 +
      "UniqueID": "Entoarox.Framework"
 +
  }
 +
]
 +
</source>
 +
|-
 +
| ''anything else''
 +
| Any other fields will be stored in the <tt>IManifest.ExtraFields</tt> dictionary, which is available through the [[#Mod registry|mod registry]]. Extra fields are ignored by SMAPI, but may be useful for extended metadata intended for other mods.
 
|}
 
|}
  
translators
8,404

edits