Line 5: |
Line 5: |
| ==Introduction== | | ==Introduction== |
| ===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 <samp>manifest.json</samp>]] 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}}: |
| <syntaxhighlight lang="json">"UpdateKeys": [ "Nexus:2400" ]</syntaxhighlight> | | <syntaxhighlight lang="json">"UpdateKeys": [ "Nexus:2400" ]</syntaxhighlight> |
| | | |
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). <syntaxhighlight lang="javascript">"UpdateKeys": [ "Chucklefish:4250" ]</syntaxhighlight> | + | | '''(Deprecated)''' Make sure you have a mod release page (with a URL containing <samp>/resources/</samp> instead of <samp>/thread/</samp>) 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] |
Line 52: |
Line 52: |
| <syntaxhighlight lang="json">"UpdateKeys": [ "Nexus:2400@GeodeCrusher" ]</syntaxhighlight> | | <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> ('''including <tt>@</tt>''') somewhere in the title or description. | + | When SMAPI fetches available versions from the page, it will only consider files that have <samp>@GeodeCrusher</samp> ('''including <samp>@</samp>''') somewhere in the title or description. |
| | | |
| Caveats: | | Caveats: |
Line 63: |
Line 63: |
| | | |
| To disable update checks... | | To disable update checks... |
− | * For SMAPI and all mods: edit the <tt>smapi-internal/config.json</tt> file and set <tt>CheckForUpdates</tt> to false. You'll no longer be notified about newer versions of SMAPI or installed mods, so this is not recommended. | + | * For SMAPI and all mods: edit the <samp>smapi-internal/config.json</samp> file and set <samp>CheckForUpdates</samp> to false. You'll no longer be notified about newer versions of SMAPI or installed mods, so this is not recommended. |
− | * For a specific mod: edit the <tt>smapi-internal/config.json</tt> file and add the mod ID to the <tt>SuppressUpdateChecks</tt> field. | + | * For a specific mod: edit the <samp>smapi-internal/config.json</samp> file and add the mod ID to the <samp>SuppressUpdateChecks</samp> field. |
| | | |
− | Note that edits to <tt>smapi-internal/config.json</tt> will be lost when you update SMAPI. See the instructions at the top of that file to create a permanent config file. | + | Note that edits to <samp>smapi-internal/config.json</samp> will be lost when you update SMAPI. See the instructions at the top of that file to create a permanent config file. |
| | | |
| ===Update check algorithm=== | | ===Update check algorithm=== |
Line 73: |
Line 73: |
| # Collect update keys: | | # Collect update keys: |
| ## Get the initial [[#Introduction|update keys]] from the mod's [[Modding:Modder Guide/APIs/Manifest|manifest]]. | | ## Get the initial [[#Introduction|update keys]] from the mod's [[Modding:Modder Guide/APIs/Manifest|manifest]]. |
− | ## Match the mod ID with the [[Modding:Mod compatibility|mod compatibility list]] and <tt>smapi-internal/metadata.json</tt> to add any other update keys that aren't in the manifest. | + | ## Match the mod ID with the [[Modding:Mod compatibility|mod compatibility list]] and <samp>smapi-internal/metadata.json</samp> to add any other update keys that aren't in the manifest. |
| ## Apply update key overrides from the mod compatibility list. | | ## Apply update key overrides from the mod compatibility list. |
| # Get the possible updates: | | # Get the possible updates: |
Line 86: |
Line 86: |
| If multiple mod pages have the recommended update, SMAPI links to the first match in this order: | | If multiple mod pages have the recommended update, SMAPI links to the first match in this order: |
| # pages listed in the mod manifest's update keys (in the order listed); | | # pages listed in the mod manifest's update keys (in the order listed); |
− | # the default update key from SMAPI's <tt>smapi-internal/metadata.json</tt>; | + | # the default update key from SMAPI's <samp>smapi-internal/metadata.json</samp>; |
| # update keys from the mod compatibility list (in the order Nexus, ModDrop, CurseForge, and Chucklefish); | | # update keys from the mod compatibility list (in the order Nexus, ModDrop, CurseForge, and Chucklefish); |
| # update key overrides from the mod compatibility list. | | # update key overrides from the mod compatibility list. |