Difference between revisions of "Modding:Mod compatibility/entry"

From Stardew Valley Wiki
Jump to navigation Jump to search
(→‎Other fields: clarify version mapping)
(update for Stardew Valley 1.4 and SMAPI 3.0 releases)
Line 13: Line 13:
 
   {{#arrayindex:has_source|0}}    = set if a GitHub project name or custom source URL is set, else blank
 
   {{#arrayindex:has_source|0}}    = set if a GitHub project name or custom source URL is set, else blank
 
   {{#arrayindex:status|0}}        = compatibility status for the stable SMAPI/SDV release
 
   {{#arrayindex:status|0}}        = compatibility status for the stable SMAPI/SDV release
  {{#arrayindex:beta_status|0}}    = compatibility status for the beta SMAPI/SDV release
 
  {{#arrayindex:status_compare|0}} = whether the compatibility info is equivalent between main and beta ('same' or 'different'). If both statuses are 'unofficial', they match if their unofficial URLs do; else they match if their statuses do.
 
  
 
-->{{#arraydefine:has_source|{{#if:{{{github|}}}{{{source|}}}|1}}}}<!--
 
-->{{#arraydefine:has_source|{{#if:{{{github|}}}{{{source|}}}|1}}}}<!--
Line 27: Line 25:
 
     }}
 
     }}
 
   }}
 
   }}
}}}}<!--
 
 
-->{{#arraydefine:beta_status|{{#if:{{{beta status|}}}
 
  |{{{beta status}}}
 
  |{{#if:{{{beta unofficial url|}}}
 
    |unofficial
 
    |{{#if:{{{beta broke in|}}}
 
      |broken
 
      |{{#arrayindex:status|0}}
 
    }}
 
  }}
 
}}}}<!--
 
 
-->{{#arraydefine:status_compare|{{#switch:{{#arrayindex:status|0}},{{#arrayindex:beta_status|0}}
 
  |unofficial,unofficial = {{#ifeq:{{{unofficial url|}}}|{{#if:{{{beta unofficial url|}}}|{{{beta unofficial url}}}|{{{unofficial url|}}}}}|same|different}}
 
  |#default = {{#ifeq:{{#arrayindex:status|0}}|{{#arrayindex:beta_status|0}}|same|different}}
 
 
}}}}<!--
 
}}}}<!--
  
Line 72: Line 54:
 
-->{{#if:{{{unofficial version|}}}|data-unofficial-version="{{{unofficial version}}}"}} <!--
 
-->{{#if:{{{unofficial version|}}}|data-unofficial-version="{{{unofficial version}}}"}} <!--
 
-->{{#if:{{{unofficial url|}}}|data-unofficial-url="{{#tag:nowiki|{{{unofficial url}}}}}"}} <!--
 
-->{{#if:{{{unofficial url|}}}|data-unofficial-url="{{#tag:nowiki|{{{unofficial url}}}}}"}} <!--
-->{{#ifeq:{{#arrayindex:status_compare|0}}|different|<!--
 
  -->data-beta-status="{{#arrayindex:beta_status|0}}" <!--
 
  -->{{#if:{{{beta broke in|}}}|data-beta-broke-in="{{{beta broke in}}}"}} <!--
 
  -->{{#if:{{{beta unofficial version|}}}|data-beta-unofficial-version="{{{beta unofficial version}}}"}} <!--
 
  -->{{#if:{{{beta unofficial url|}}}|data-beta-unofficial-url="{{#tag:nowiki|{{{beta unofficial url}}}}}"}}<!--
 
-->}} <!--
 
 
-->{{#ifexpr:{{#arraysize:warnings}} > 0|data-warnings="{{#arrayprint:warnings|, |@@@|@@@}}"}} <!--
 
-->{{#ifexpr:{{#arraysize:warnings}} > 0|data-warnings="{{#arrayprint:warnings|, |@@@|@@@}}"}} <!--
 
-->{{#if:{{{content pack for|}}}|data-content-pack-for="{{{content pack for}}}"}} <!--
 
-->{{#if:{{{content pack for|}}}|data-content-pack-for="{{{content pack for}}}"}} <!--
Line 98: Line 74:
 
  |abandoned  = ✖ {{#if:{{{summary|}}}|{{{summary}}}|remove this mod (no longer maintained).}}
 
  |abandoned  = ✖ {{#if:{{{summary|}}}|{{{summary}}}|remove this mod (no longer maintained).}}
 
}}</span>{{#ifeq:{{#arrayindex:status|0}}|optional|<ref name="optional-update" />}}<!--
 
}}</span>{{#ifeq:{{#arrayindex:status|0}}|optional|<ref name="optional-update" />}}<!--
 
beta summary (if different)-->{{#ifeq:{{#arrayindex:status_compare|0}}|different|<br />'''1.4 (upcoming)<!--{{version|beta|link=0}}-beta-->:'''&#32;<span class="mod-beta-summary">{{#switch:{{#arrayindex:beta_status|0}}
 
|ok        = ✓ {{#if:{{{beta summary|}}}|{{{beta summary}}}|use latest version.}}
 
|optional  = ✓ {{#if:{{{beta summary|}}}|{{{beta summary}}}|use optional download.}}
 
|unofficial = ⚠ broken{{#if:{{{beta unofficial url|}}}|, use [{{{beta unofficial url}}} unofficial update]{{#if:{{{beta unofficial version|}}}|&#32;(<small>{{{beta unofficial version}}}</small>)}}|{{{beta unofficial url}}}}}.
 
|workaround = ⚠ broken, {{{beta summary}}}
 
|broken    = ↻ broken, {{#if:{{{beta summary|}}}|{{{beta summary}}}|{{#if:{{#arrayindex:has_source|0}}|not updated yet.|not open-source.}}}}
 
|obsolete  = ✖ {{#if:{{{beta summary|}}}|{{{beta summary}}}|remove this mod (obsolete).}}
 
|abandoned  = ✖ {{#if:{{{beta summary|}}}|{{{beta summary}}}|remove this mod (no longer maintained).}}
 
}}</span>{{#ifeq:{{#arrayindex:beta_status|0}}|optional|<ref name="optional-update" />}}}}<!--
 
  
 
warnings-->{{#if:{{{warnings|}}}|<br />⚠&#32;{{#arrayprint:warnings|<br />⚠&#32;}}}}
 
warnings-->{{#if:{{{warnings|}}}|<br />⚠&#32;{{#arrayprint:warnings|<br />⚠&#32;}}}}
| <small>{{#if:{{{beta broke in|}}}|{{{beta broke in}}}|{{{broke in|}}}}}</small>
+
| <small>{{{broke in|}}}</small>
 
| {{#if:{{{github|}}}|[https://github.com/{{{github}}} source]|{{#if:{{{source|}}}|[{{{source}}} source]|<span style="color: red; font-size: 0.85em; opacity: 0.5;">closed source</span>}}}}
 
| {{#if:{{{github|}}}|[https://github.com/{{{github}}} source]|{{#if:{{{source|}}}|[{{{source}}} source]|<span style="color: red; font-size: 0.85em; opacity: 0.5;">closed source</span>}}}}
 
| class="no-wrap"|<small><!--
 
| class="no-wrap"|<small><!--
Line 209: Line 175:
 
   |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
}}
 
|}
 
 
===Different beta status===
 
<pre>
 
{{Modding:Mod compatibility/entry
 
  |name    = Lookup Anything
 
  |author  = Pathoschild
 
  |id      = Pathoschild.LookupAnything
 
  |nexus id = 541
 
  |github  = Pathoschild/StardewMods
 
  |summary  =
 
  |broke in = Stardew Valley 1.2
 
  |unofficial url    = https://community.playstarbound.com/attachments/201345000
 
  |unofficial version = 1.18.2-unofficial.1-example
 
 
  |beta broke in = Stardew Valley 1.3
 
}}
 
</pre>
 
 
{| class="wikitable plainlinks"
 
|-
 
! mod name
 
! author
 
! compatibility
 
! broke in
 
! source
 
! &nbsp;
 
{{Modding:Mod compatibility/entry
 
  |name    = Lookup Anything
 
  |author  = Pathoschild
 
  |id      = Pathoschild.LookupAnything
 
  |nexus id = 541
 
  |github  = Pathoschild/StardewMods
 
  |summary  =
 
  |broke in = Stardew Valley 1.2
 
  |unofficial url    = https://community.playstarbound.com/attachments/201345000
 
  |unofficial version = 1.18.2-unofficial.1-example
 
 
  |beta broke in = Stardew Valley 1.3
 
 
}}
 
}}
 
|}
 
|}
Line 334: Line 260:
 
|-
 
|-
 
| <code>map remote version</code>
 
| <code>map remote version</code>
| {{SMAPI upcoming|3.0|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.
+
| 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.'''
 
'''This is a specialised field; it's better to correct the mod page if possible.'''
Line 341: Line 267:
 
<pre>
 
<pre>
 
|map remote versions = 0.01 → 0.0.1; 0.0.1-beta → 0.0.1
 
|map remote versions = 0.01 → 0.0.1; 0.0.1-beta → 0.0.1
</pre>}}
+
</pre>
 
|-
 
|-
 
| <code>map local version</code>
 
| <code>map local version</code>
| {{SMAPI upcoming|3.0|Equivalent to <code>map remote version</code>, but for the manifest version.}}
+
| Equivalent to <code>map remote version</code>, but for the manifest version.
|}
 
 
 
===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.
 
 
 
{| class="wikitable"
 
|-
 
! field
 
! purpose
 
|-
 
| <code>beta summary</code>
 
| Specify custom notes or instructions about the mod's compatibility. Should usually be blank.
 
|-
 
| <code>beta broke in</code>
 
| The SMAPI or Stardew Valley update which broke this mod (if applicable).
 
|-
 
| <code>beta status</code>
 
| Whether the mod is compatible with the latest versions of Stardew Valley and SMAPI (see [[#Valid statuses]]). If not specified, it defaults to <code>unofficial</code> if an unofficial URL is given, else <code>broken</code> if <code>broke in</code> is specified, else <code>ok</code>.
 
|-
 
| <code>beta unofficial url</code>
 
| A page URL where the player can download an unofficial update, if any.
 
|-
 
| <code>beta unofficial version</code>
 
| The unofficial update's version number, if any.
 
 
|}
 
|}
  

Revision as of 20:48, 26 November 2019

Examples

Compatible mod

{{/entry
  |name     = Lookup Anything
  |author   = Pathoschild
  |id       = Pathoschild.LookupAnything
  |nexus id = 541
  |github   = Pathoschild/StardewMods
}}

Broken mod

{{/entry
  |name     = Lookup Anything
  |author   = Pathoschild
  |id       = Pathoschild.LookupAnything
  |nexus id = 541
  |github   = Pathoschild/StardewMods
  |summary  = 
  |broke in = Stardew Valley 1.2
  |links    = https://github.com/Pathoschild/SMAPI/issues
  |link labels = PR
}}

Unofficial update

For an unofficial update, use the broken-mod template and add these under the other fields:

  |unofficial url     = https://community.playstarbound.com/attachments/201345000
  |unofficial version = 1.18.2-unofficial.1-example

Usage

Limitations

  • Avoid using quotes (") in argument values; use &quot; instead.
  • The name, author, and id arguments are comma-separated. If the actual value contains a comma, use &#44; instead.

Main fields (shown above)

field purpose
name The normalised display name for the mod. Delimit alternate names with commas.
author The name of the author, as shown on Nexus or in its manifest.json file. Delimit alternate names with commas.
id The unique mod ID, as listed in its manifest.json file. Delimit alternate/older IDs with commas (ideally in latest to oldest order). For very old mods with no ID, use none to disable validation checks.
nexus id The mod's unique ID on Nexus (if any). This is the number in the mod page's URL.
github The mod's GitHub repository in the form owner/repo.
summary Specify custom notes or instructions about the mod's compatibility. Should usually be blank.
broke in The SMAPI or Stardew Valley update which broke this mod (if applicable).

Other fields

field purpose
status Whether the mod is compatible with the latest versions of Stardew Valley and SMAPI (see #Valid statuses). If not specified, it defaults to unofficial if an unofficial URL is given, else broken if broke in is specified, else ok.
unofficial url A page URL where the player can download an unofficial update, if any.
unofficial version The unofficial update's version number, if any.
chucklefish id The mod's ID in the Chucklefish mod repository.
curseforge id The mod's project ID in the CurseForge mod repository. This is the value shown on the mod page next to "Project ID".
curseforge key The mod's key in the CurseForge mod repository. This is the mod key shown in the mod page's URL.
moddrop id The mod's ID in the ModDrop mod repository.
url The arbitrary mod URL, if not on a known mod site. Avoid if possible, since this makes crossreferencing more difficult.
source An arbitrary source code URL, if not on GitHub. Avoid if possible, since this makes crossreferencing more difficult.
links A comma-delimited list of URLs to add as links in the metadata column. Mainly useful for linking to pull requests.
link labels A comma-delimited list of link labels for the links URLs. If omitted, the links will be numbered instead.
warnings Text explaining additional compatibility warnings about the mod (e.g. not compatible with Linux/Mac).
content pack for The name of the mod which loads this content pack.
dev note Special notes intended for developers who maintain unofficial updates or submit pull requests.
map remote version 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 semantic rules if it's parseable (e.g. 1.0 and 1.0.0 are equivalent), else it'll fallback to case-insensitive string comparison (e.g. 1.01 and 1.01.0 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:

|map remote versions = 0.01 → 0.0.1; 0.0.1-beta → 0.0.1
map local version Equivalent to map remote version, but for the manifest version.

Valid statuses

status description
ok The mod is compatible. This is the default and doesn't need to be specified.
Default summary: use latest version.
optional The mod is compatible, if you use an optional download on the mod page.
Default summary: use optional download.[1]
unofficial The mod is compatible using an unofficial update. There's no need to specify this; if you also set unofficial url and unofficial version, you can remove the status field.
workaround 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 unofficial url and unofficial version, you can remove the status field.
broken The mod isn't compatible. The message depends on whether the source link is set.
Default summary: broken, not updated yet or broken, not open-source.
abandoned The mod is no longer maintained by the author, and an unofficial update or continuation is unlikely. This should only be used when the author has definitively abandoned the mod (either explicitly, or by removing the mod page or downloads).
Default summary: no longer maintained.
obsolete The mod is no longer needed and should be removed.