Changes

Jump to navigation Jump to search
m
Replace deprecated <source> tags with <syntaxhighlight> tags
Line 6: Line 6:  
===Enable update checks===
 
===Enable update checks===
 
You can add ''update keys'' to [[../Manifest|your <tt>manifest.json</tt>]] to enable update checks. An update key tells SMAPI where the mod page is. For example, <code>Nexus:2400</code> means {{Nexus mod|2400|mod ID 2400 on Nexus}}:
 
You can add ''update keys'' to [[../Manifest|your <tt>manifest.json</tt>]] to enable update checks. An update key tells SMAPI where the mod page is. For example, <code>Nexus:2400</code> means {{Nexus mod|2400|mod ID 2400 on Nexus}}:
<source lang="json">"UpdateKeys": [ "Nexus:2400" ]</source>
+
<syntaxhighlight lang="json">"UpdateKeys": [ "Nexus:2400" ]</syntaxhighlight>
    
If you have multiple update keys, SMAPI will check them all and show an alert for the latest version it finds. (If multiple sites have the latest version, it will link to the earlier one in the list.)
 
If you have multiple update keys, SMAPI will check them all and show an alert for the latest version it finds. (If multiple sites have the latest version, it will link to the earlier one in the list.)
<source lang="javascript">"UpdateKeys": [ "Chucklefish:4250", "Nexus:541", "GitHub:Pathoschild/LookupAnything" ]</source>
+
<syntaxhighlight lang="javascript">"UpdateKeys": [ "Chucklefish:4250", "Nexus:541", "GitHub:Pathoschild/LookupAnything" ]</syntaxhighlight>
    
(SMAPI also fetches mod info from the [[Modding:Mod compatibility|mod compatibility list]], so mods on that page may get update checks even without update keys. You should still add update keys to your manifest in case that changes, and to support mod managers and other tools.)
 
(SMAPI also fetches mod info from the [[Modding:Mod compatibility|mod compatibility list]], so mods on that page may get update checks even without update keys. You should still add update keys to your manifest in case that changes, and to support mod managers and other tools.)
Line 21: Line 21:  
|- valign="top"
 
|- valign="top"
 
| [https://community.playstarbound.com/resources/categories/stardew-valley.22/ Chucklefish]
 
| [https://community.playstarbound.com/resources/categories/stardew-valley.22/ Chucklefish]
| '''(Deprecated)''' Make sure you have a mod release page (with a URL containing <tt>/resources/</tt> instead of <tt>/thread/</tt>) and it has a [http://semver.org/ semantic version], then specify the mod ID (the number in the mod page URL). <source lang="javascript">"UpdateKeys": [ "Chucklefish:4250" ]</source>
+
| '''(Deprecated)''' Make sure you have a mod release page (with a URL containing <tt>/resources/</tt> instead of <tt>/thread/</tt>) and it has a [http://semver.org/ semantic version], then specify the mod ID (the number in the mod page URL). <syntaxhighlight lang="javascript">"UpdateKeys": [ "Chucklefish:4250" ]</syntaxhighlight>
 
|- valign="top"
 
|- valign="top"
 
| [https://www.curseforge.com/stardewvalley CurseForge]
 
| [https://www.curseforge.com/stardewvalley CurseForge]
| Make sure the latest file's display name contains a [http://semver.org/ semantic version] at the end, with a space before the version and optional file extension. For example, SMAPI will recognise the version in these display names: <code>1.3.0</code>, <code>Example Mod 1.10</code>, <code>Example Mod 1.10.0-prerelease.zip</code>. <source lang="javascript">"UpdateKeys": [ "CurseForge:309243" ]</source>
+
| Make sure the latest file's display name contains a [http://semver.org/ semantic version] at the end, with a space before the version and optional file extension. For example, SMAPI will recognise the version in these display names: <code>1.3.0</code>, <code>Example Mod 1.10</code>, <code>Example Mod 1.10.0-prerelease.zip</code>. <syntaxhighlight lang="javascript">"UpdateKeys": [ "CurseForge:309243" ]</syntaxhighlight>
 
|- valign="top"
 
|- valign="top"
 
| [https://github.com/ GitHub]
 
| [https://github.com/ GitHub]
| Make sure your [https://help.github.com/articles/creating-releases/ GitHub project has at least one release] and the latest release's tag is a [http://semver.org/ semantic version], then specify your GitHub username and project name. <source lang="javascript">"UpdateKeys": [ "GitHub:Pathoschild/LookupAnything" ]</source> SMAPI will get the version from the release tag.
+
| Make sure your [https://help.github.com/articles/creating-releases/ GitHub project has at least one release] and the latest release's tag is a [http://semver.org/ semantic version], then specify your GitHub username and project name. <syntaxhighlight lang="javascript">"UpdateKeys": [ "GitHub:Pathoschild/LookupAnything" ]</syntaxhighlight> SMAPI will get the version from the release tag.
 
|- valign="top"
 
|- valign="top"
 
| [https://www.moddrop.com/stardew-valley/ ModDrop]
 
| [https://www.moddrop.com/stardew-valley/ ModDrop]
| Make sure the mod page has a [http://semver.org/ semantic version], then specify the mod ID (the number in the mod page URL). <source lang="javascript">"UpdateKeys": [ "ModDrop:123338" ]</source> SMAPI will get the version from files under 'Main Versions'.
+
| Make sure the mod page has a [http://semver.org/ semantic version], then specify the mod ID (the number in the mod page URL). <syntaxhighlight lang="javascript">"UpdateKeys": [ "ModDrop:123338" ]</syntaxhighlight> SMAPI will get the version from files under 'Main Versions'.
 
|- valign="top"
 
|- valign="top"
 
| [https://www.nexusmods.com/stardewvalley Nexus Mods]
 
| [https://www.nexusmods.com/stardewvalley Nexus Mods]
| Make sure the Nexus mod has a [http://semver.org/ semantic version], then specify the mod ID (the number in the mod page URL). When creating a new mod on Nexus, the ID is added to the URL after the first step, before you need to upload the file. <source lang="javascript">"UpdateKeys": [ "Nexus:541" ]</source> SMAPI will get the version from the mod, 'main files' downloads, or 'optional files' downloads (whichever is higher).
+
| Make sure the Nexus mod has a [http://semver.org/ semantic version], then specify the mod ID (the number in the mod page URL). When creating a new mod on Nexus, the ID is added to the URL after the first step, before you need to upload the file. <syntaxhighlight lang="javascript">"UpdateKeys": [ "Nexus:541" ]</syntaxhighlight> SMAPI will get the version from the mod, 'main files' downloads, or 'optional files' downloads (whichever is higher).
 
|}
 
|}
   Line 50: Line 50:     
You can add an ''update subkey'' at the end of your normal update key after <code>@</code>:
 
You can add an ''update subkey'' at the end of your normal update key after <code>@</code>:
<source lang="json">"UpdateKeys": [ "Nexus:2400@GeodeCrusher" ]</source>
+
<syntaxhighlight lang="json">"UpdateKeys": [ "Nexus:2400@GeodeCrusher" ]</syntaxhighlight>
    
When SMAPI fetches available versions from the page, it will only consider files that have <tt>@GeodeCrusher</tt> somewhere in the title or description.
 
When SMAPI fetches available versions from the page, it will only consider files that have <tt>@GeodeCrusher</tt> somewhere in the title or description.
114

edits

Navigation menu