Changes

Jump to navigation Jump to search
update for disabled beta fields
Line 1: Line 1:  +
This module provides the table structure and data for the [[Modding:Mod compatibility]] list.
 +
 
==Examples==
 
==Examples==
 
===Compatible mod===
 
===Compatible mod===
 
<pre>
 
<pre>
 
{{#invoke:SMAPI compatibility|entry
 
{{#invoke:SMAPI compatibility|entry
   |name     = Lookup Anything
+
   |name   = Lookup Anything
   |author   = Pathoschild
+
   |author = Pathoschild
   |id       = Pathoschild.LookupAnything
+
   |id     = Pathoschild.LookupAnything
   |nexus id = 541
+
   |nexus   = 541
   |github   = Pathoschild/StardewMods
+
   |github = Pathoschild/StardewMods
 
}}
 
}}
 
</pre>
 
</pre>
Line 13: Line 15:  
{{#invoke:SMAPI compatibility|header}}
 
{{#invoke:SMAPI compatibility|header}}
 
{{#invoke:SMAPI compatibility|entry
 
{{#invoke:SMAPI compatibility|entry
   |name     = Lookup Anything
+
   |name   = Lookup Anything
   |author   = Pathoschild
+
   |author = Pathoschild
   |id       = Pathoschild.LookupAnything
+
   |id     = Pathoschild.LookupAnything
   |nexus id = 541
+
   |nexus   = 541
   |github   = Pathoschild/StardewMods
+
   |github = Pathoschild/StardewMods
 
}}
 
}}
 
{{#invoke:SMAPI compatibility|footer}}
 
{{#invoke:SMAPI compatibility|footer}}
Line 24: Line 26:  
<pre>
 
<pre>
 
{{#invoke:SMAPI compatibility|entry
 
{{#invoke:SMAPI compatibility|entry
   |name     = Lookup Anything
+
   |name   = Lookup Anything
   |author   = Pathoschild
+
   |author = Pathoschild
   |id       = Pathoschild.LookupAnything
+
   |id     = Pathoschild.LookupAnything
   |nexus id = 541
+
   |nexus   = 541
   |github   = Pathoschild/StardewMods
+
   |github = Pathoschild/StardewMods
 +
 
 
   |summary  =  
 
   |summary  =  
 
   |broke in = Stardew Valley 1.2
 
   |broke in = Stardew Valley 1.2
Line 35: Line 38:  
{{#invoke:SMAPI compatibility|header}}
 
{{#invoke:SMAPI compatibility|header}}
 
{{#invoke:SMAPI compatibility|entry
 
{{#invoke:SMAPI compatibility|entry
   |name     = Lookup Anything
+
   |name   = Lookup Anything
   |author   = Pathoschild
+
   |author = Pathoschild
   |id       = Pathoschild.LookupAnything
+
   |id     = Pathoschild.LookupAnything
   |nexus id = 541
+
   |nexus   = 541
   |github   = Pathoschild/StardewMods
+
   |github = Pathoschild/StardewMods
 +
 
 
   |summary  =  
 
   |summary  =  
 
   |broke in = Stardew Valley 1.2
 
   |broke in = Stardew Valley 1.2
Line 50: Line 54:  
   |unofficial url    = https://community.playstarbound.com/attachments/201345000
 
   |unofficial url    = https://community.playstarbound.com/attachments/201345000
 
   |unofficial version = 1.18.2-unofficial.1-example
 
   |unofficial version = 1.18.2-unofficial.1-example
  |pull request      = https://github.com/Pathoschild/Example/pull/1
   
</pre>
 
</pre>
 
{{#invoke:SMAPI compatibility|header}}
 
{{#invoke:SMAPI compatibility|header}}
 
{{#invoke:SMAPI compatibility|entry
 
{{#invoke:SMAPI compatibility|entry
   |name     = Lookup Anything
+
   |name   = Lookup Anything
   |author   = Pathoschild
+
   |author = Pathoschild
   |id       = Pathoschild.LookupAnything
+
   |id     = Pathoschild.LookupAnything
   |nexus id = 541
+
   |nexus   = 541
   |github   = Pathoschild/StardewMods
+
   |github = Pathoschild/StardewMods
 +
 
 
   |summary  =  
 
   |summary  =  
 
   |broke in = Stardew Valley 1.2
 
   |broke in = Stardew Valley 1.2
 
   |unofficial url    = https://community.playstarbound.com/attachments/201345000
 
   |unofficial url    = https://community.playstarbound.com/attachments/201345000
 
   |unofficial version = 1.18.2-unofficial.1-example
 
   |unofficial version = 1.18.2-unofficial.1-example
  |pull request      = https://github.com/Pathoschild/Example/pull/1
   
}}
 
}}
 
{{#invoke:SMAPI compatibility|footer}}
 
{{#invoke:SMAPI compatibility|footer}}
Line 81: Line 84:  
|-
 
|-
 
| <code>author</code>
 
| <code>author</code>
| The name of the author, as shown on Nexus or in its <tt>manifest.json</tt> file. Delimit alternate names with commas.
+
| The name of the author, as shown on Nexus or in its <samp>manifest.json</samp> file. Delimit alternate names with commas.
 
|-
 
|-
 
| <code>id</code>
 
| <code>id</code>
| The latest unique mod ID, as listed in its <tt>manifest.json</tt> file. Delimit alternate/older IDs with commas (ideally in latest to oldest order). For very old mods with no ID, use <tt>none</tt> to disable validation checks.
+
| The latest unique mod ID, as listed in its <samp>manifest.json</samp> file. Delimit alternate/older IDs with commas (ideally in latest to oldest order). For very old mods with no ID, use <samp>none</samp> to disable validation checks.
 
|-
 
|-
| <code>nexus id</code>
+
| <code>nexus</code>
 
| The mod's unique ID on Nexus (if any). This is the number in the mod page's URL.
 
| The mod's unique ID on Nexus (if any). This is the number in the mod page's URL.
 
|-
 
|-
 
| <code>github</code>
 
| <code>github</code>
| The mod's GitHub repository in the form <tt>owner/repo</tt>.
+
| The mod's GitHub repository in the form <samp>owner/repo</samp>.
 
|-
 
|-
 
| <code>summary</code>
 
| <code>summary</code>
Line 114: Line 117:  
| The unofficial update's version number, if any.
 
| The unofficial update's version number, if any.
 
|-
 
|-
| <code>pull request</code>
+
| <code>chucklefish</code>
| The URL of the pull request which submits changes for an unofficial update to the author, if any.
  −
|-
  −
| <code>cf id</code>
   
| The mod's ID in the [https://community.playstarbound.com/resources/categories/stardew-valley.22/ Chucklefish mod repository].
 
| The mod's ID in the [https://community.playstarbound.com/resources/categories/stardew-valley.22/ Chucklefish mod repository].
 
|-
 
|-
| <code>curseforge id</code>
+
| <code>curse</code>
| The mod's project ID in the [https://www.curseforge.com/stardewvalley CurseForge mod repository]. This is the value shown on the mod page next to "Project ID".
+
| The mod's project ID and key in the [https://www.curseforge.com/stardewvalley CurseForge mod repository]. The ID is shown on the mod page next to "Project ID", and the key is shown in the mod page's URL. This must be in the form <code>id,key</code>.
|-
  −
| <code>curseforge key</code>
  −
| The mod's key in the [https://www.curseforge.com/stardewvalley CurseForge mod repository]. This is the mod key shown in the mod page's URL.
   
|-
 
|-
| <code>moddrop id</code>
+
| <code>moddrop</code>
 
| The mod's ID in the [https://www.moddrop.com/stardew-valley/ ModDrop mod repository].
 
| The mod's ID in the [https://www.moddrop.com/stardew-valley/ ModDrop mod repository].
 
|-
 
|-
Line 134: Line 131:  
| <code>source</code>
 
| <code>source</code>
 
| An arbitrary source code URL, if not on GitHub. Avoid if possible, since this makes crossreferencing more difficult.
 
| An arbitrary source code URL, if not on GitHub. Avoid if possible, since this makes crossreferencing more difficult.
|-
  −
| <code>links</code>
  −
| A comma-delimited list of URLs to add as superscript links. Mainly useful for linking to pull requests.
   
|-
 
|-
 
| <code>warnings</code>
 
| <code>warnings</code>
| Text explaining additional compatibility warnings about the mod (e.g. not compatible with Linux/Mac).
+
| Text explaining additional compatibility warnings about the mod (''e.g.,'' not compatible with Linux/Mac).
 
|-
 
|-
 
| <code>content pack for</code>
 
| <code>content pack for</code>
Line 148: Line 142:  
|}
 
|}
    +
<!-- set 'enableBeta = true' in Lua code to enable these
 
===Beta fields===
 
===Beta fields===
 
When there's a Stardew Valley beta, some mods may have different compatibility statuses for stable vs beta. You can specify these optional fields to specify a different beta status.
 
When there's a Stardew Valley beta, some mods may have different compatibility statuses for stable vs beta. You can specify these optional fields to specify a different beta status.
Line 171: Line 166:  
| The unofficial update's version number, if any.
 
| The unofficial update's version number, if any.
 
|}
 
|}
 
+
-->
===Override fields===
  −
These fields override information provided by the author in the <tt>manifest.json</tt> or mod page, so they should only be used as a last resort.
  −
 
  −
{| class="wikitable"
  −
|-
  −
! field
  −
! purpose
  −
|-
  −
| <code>change update keys</code>
  −
| Overrides the [[Modding:Modder Guide/APIs/Update checks|update keys]] from the <tt>manifest.json</tt> or other compatibility list fields. Remove a key with <code>-</code>, add a key with an optional <code>+</code>, and separate keys with commas. For example:
  −
<pre>
  −
|override update keys = -Nexus:991, +Nexus:991@CFA
  −
</pre>
  −
|-
  −
| <code>map remote version</code>
  −
| When SMAPI performs an update check for the mod, this field overrides the version returned by the server. SMAPI will match the original version using [https://semver.org/ semantic rules] if it's parseable (e.g. <code>1.0</code> and <code>1.0.0</code> are equivalent), else it'll fallback to case-insensitive string comparison (e.g. <code>1.01</code> and <code>1.01.0</code> are ''not'' equivalent). If an invalid format is specified or the new version can't be parsed, the mapping will be ignored.
  −
 
  −
'''This is a specialised field; it's better to correct the mod page if possible.'''
  −
 
  −
Mappings are specified with an arrow, and multiple mappings can be separated by a semi-colon:
  −
<pre>
  −
|map remote versions = 0.01 → 0.0.1; 0.0.1-beta → 0.0.1
  −
</pre>
  −
|-
  −
| <code>map local version</code>
  −
| Equivalent to <code>map remote version</code>, but for the manifest version.
  −
|}
  −
 
   
===Valid statuses===
 
===Valid statuses===
 
{| class="wikitable"
 
{| class="wikitable"
Line 213: Line 180:  
|-
 
|-
 
| <code>unofficial</code>
 
| <code>unofficial</code>
| The mod is compatible using an unofficial update. There's no need to specify this; if you also set <tt>unofficial url</tt> and <tt>unofficial version</tt>, you can remove the status field.
+
| The mod is compatible using an unofficial update. There's no need to specify this; if you also set <samp>unofficial url</samp> and <samp>unofficial version</samp>, you can remove the status field.
 
|-
 
|-
 
| <code>workaround</code>
 
| <code>workaround</code>
| The mod isn't compatible, but the player can fix it or there's a good alternative. A summary should be provided manually. If you also set <tt>unofficial url</tt> and <tt>unofficial version</tt>, you can remove the status field.
+
| The mod isn't compatible, but the player can fix it or there's a good alternative. A summary should be provided manually. If you also set <samp>unofficial url</samp> and <samp>unofficial version</samp>, you can remove the status field.
 
|-
 
|-
 
| <code>broken</code>
 
| <code>broken</code>
Line 228: Line 195:  
|-
 
|-
 
| <code>unknown</code>
 
| <code>unknown</code>
| The mod's compatibility status hasn't been tested. This should only be used as a placeholder (e.g. when adding a new beta), it should never be used long since that defeats the purpose of the compatibility list.
+
| The mod's compatibility status hasn't been tested. This should only be used as a placeholder (''e.g.,'' when adding a new beta), it should never be used long since that defeats the purpose of the compatibility list.
 
|}
 
|}
   −
==Script==
+
[[Category:Modding Modules]]
This script generates the template call when run from a Nexus or Chucklefish mod page.
  −
<syntaxhighlight lang="javascript">
  −
switch(location.host)
  −
{
  −
case "www.nexusmods.com":
  −
var url = location.origin + location.pathname.replace(/\/*$/, '');
  −
var name = $(".header-name").text();
  −
var author = $(".uploader a").text();
  −
var author2 = $(".header-author strong").text();
  −
break;
  −
 
  −
case "community.playstarbound.com":
  −
var url = location.origin + location.pathname.replace(/\/*$/, '');
  −
var name = $.trim($("h1:first").contents().first().text());
  −
var author = $(".primaryContent[data-author]:first").attr("data-author");
  −
break;
  −
 
  −
default:
  −
throw `Unknown domain: ${location.host}`;
  −
}
  −
 
  −
var template = `
  −
{{/entry
  −
  |name    = ${name}
  −
  |author  = ${author}`;
  −
if(author2 && author2 != author)
  −
  template += '\n' + `  |author2 = ${author2}`;
  −
template += `
  −
  |url    = ${url}
  −
  |status  = ok
  −
  |summary =
  −
  |source  =
  −
}}
  −
`;
  −
</syntaxhighlight>
  −
 
  −
[[Category:Modding]]
 
translators
8,445

edits

Navigation menu