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

From Stardew Valley Wiki
Jump to navigation Jump to search
(+ GitHub data attribute)
(→‎Usage: tweaks)
Line 24: Line 24:
  
 
==Usage==
 
==Usage==
 +
===Templates===
 
For a compatible mod:
 
For a compatible mod:
 
<pre>
 
<pre>
Line 34: Line 35:
 
</pre>
 
</pre>
  
For a broken mod (if there's no unofficial update, keep the fields but leave them empty):
+
For a broken mod:
 
<pre>
 
<pre>
 
{{/entry
 
{{/entry
Line 45: Line 46:
 
   |broke in = Stardew Valley 1.2
 
   |broke in = Stardew Valley 1.2
 
   |links    = <!-- any comma-separated URLs to pull requests, discussions, etc -->
 
   |links    = <!-- any comma-separated URLs to pull requests, discussions, etc -->
 +
}}
 +
</pre>
 +
 +
For an unofficial update, use the broken-mod template and add these under the other fields:
 +
<pre>
 
   |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
}}
 
 
</pre>
 
</pre>
  
Valid statuses:
+
===Valid statuses===
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
 
! status
 
! status
! meaning
+
! description
! default summary
 
 
|-
 
|-
 
| <code>ok</code>
 
| <code>ok</code>
| The mod is compatible. This is the default and doesn't need to be specified.
+
| The mod is compatible. This is the default and doesn't need to be specified.<br />Default summary: ''use latest version.''
| ''use latest version.''
 
 
|-
 
|-
 
| <code>optional</code>
 
| <code>optional</code>
| The mod is compatible, if you use an optional download on the mod page.
+
| The mod is compatible, if you use an optional download on the mod page.<br />Default summary: ''use optional download.<sup>[[#footnote|[1]]]</sup>''
| ''use optional download.<sup>[[#footnote|[1]]]</sup>''
 
 
|-
 
|-
 
| <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 set this to broken instead.
 
| 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 set this to broken instead.
|
 
 
|-
 
|-
 
| <code>broken</code>
 
| <code>broken</code>
| The mod isn't compatible. The message depends on whether the <code>source</code> link is set.
+
| The mod isn't compatible. The message depends on whether the <code>source</code> link is set.<br />Default summary: ''broken, not updated yet'' or ''broken, not open-source.''
| ''broken, not updated yet.''<br />''broken, not open-source.''
 
 
|-
 
|-
 
| <code>abandoned</code>
 
| <code>abandoned</code>
| 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).
+
| 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).<br />Default summary: ''no longer maintained.''
| ''no longer maintained.''
 
 
|-
 
|-
 
| <code>obsolete</code>
 
| <code>obsolete</code>
 
| The mod is no longer needed and should be removed.
 
| The mod is no longer needed and should be removed.
|
 
 
|}
 
|}
  
Other fields:
+
===Other fields===
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-

Revision as of 21:16, 18 May 2018

Usage

Templates

For a compatible mod:

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

For a broken mod:

{{/entry
  |name     = Lookup Anything
  |author   = Pathoschild
  |nexus id = 541
  |github   = Pathoschild/StardewMods
  |status   = broken
  |summary  = 
  |broke in = Stardew Valley 1.2
  |links    = <!-- any comma-separated URLs to pull requests, discussions, etc -->
}}

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

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]
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 set this to broken instead.
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.

Other fields

field purpose
cf id The mod's ID in the Chucklefish mod repository.
url The arbitrary mod URL, if not on Nexus or Chucklefish. Avoid if possible, since this makes crossreferencing more difficult.
source url An arbitrary source code URL, if not on GitHub. Avoid if possible, since this makes crossreferencing more difficult.
name2
author2
Adds alternate mod and author names.
hide-url Use this instead of (url) to move it into a superscript link. Mainly useful for broken mods with a workaround, so players don't automatically click through to the old mod.
links A comma-delimited list of URLs to add as superscript links. Mainly useful for linking to pull requests.

Script

This script generates the template call when run from a Nexus or Chucklefish mod page.

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  = 
}}
`;