Changes

Jump to navigation Jump to search
Add a section on Dummy Update Keys, as it can be very useful to a number of modders.
Line 45: Line 45:     
For example, let's say your mod has two current versions: <code>1.7.0</code> and <code>2.0.0-beta</code>. A player who has <code>1.6.0</code> installed would see an update alert for <code>1.7.0</code>, and a player with <code>1.6.1-beta</code> would see an update alert for <code>2.0.0-beta</code>.
 
For example, let's say your mod has two current versions: <code>1.7.0</code> and <code>2.0.0-beta</code>. A player who has <code>1.6.0</code> installed would see an update alert for <code>1.7.0</code>, and a player with <code>1.6.1-beta</code> would see an update alert for <code>2.0.0-beta</code>.
   
===Update subkeys===
 
===Update subkeys===
 
SMAPI assumes each mod page is about a single mod, so the highest file version is the latest one. That means having multiple mods on the same page can cause false update alerts. For example, let's say you have one Nexus page with two different mods in the downloads: ''Geode Crusher'' (version <code>1.0.5</code>) and ''Diamond Crusher'' (version <code>2.1.0</code>). If a player has the latest version of ''Geode Crusher'' installed, they would always get update alerts for version <code>2.1.0</code> even though that's a different mod.
 
SMAPI assumes each mod page is about a single mod, so the highest file version is the latest one. That means having multiple mods on the same page can cause false update alerts. For example, let's say you have one Nexus page with two different mods in the downloads: ''Geode Crusher'' (version <code>1.0.5</code>) and ''Diamond Crusher'' (version <code>2.1.0</code>). If a player has the latest version of ''Geode Crusher'' installed, they would always get update alerts for version <code>2.1.0</code> even though that's a different mod.
Line 57: Line 56:  
* If no files match the subkey, SMAPI will ignore the subkey and perform a normal update check.
 
* If no files match the subkey, SMAPI will ignore the subkey and perform a normal update check.
 
* For mods on CurseForge, SMAPI won't see subkeys in the file description since that's not available through the API.
 
* For mods on CurseForge, SMAPI won't see subkeys in the file description since that's not available through the API.
 +
 +
===Dummy Update Keys===
 +
 +
You can add Dummy Update Keys to [[../Manifest|your <tt>manifest.json</tt>]] to suppress the 'No Update Keys' warning given by SMAPI like so: <syntaxhighlight lang="json">"UpdateKeys": [ "Nexus:???" ]</syntaxhighlight>
 +
 +
This is useful to minimize manifest.json maintenance for a unified mod package that contains sub-mods, as it is satisfying SMAPI's desire for UpdateKeys to be defined but does no actual update check, meaning that only the main mod with tracked <code>UpdateKeys</code> will affect whether SMAPI believes there is an update.
    
===Disable update checks locally===
 
===Disable update checks locally===
5

edits

Navigation menu