Modding:Mod compatibility/entry

From Stardew Valley Wiki
< Modding:Mod compatibility
Revision as of 18:09, 18 May 2018 by Pathoschild (talk | contribs) (+ unofficial url & version fields)
Jump to navigation Jump to search

Usage

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 -->
  |unofficial url     = 
  |unofficial version = 
}}

For a broken mod with an unofficial update:

{{/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 -->
  |unofficial url     = https://community.playstarbound.com/attachments/201345000
  |unofficial version = 1.18.2-unofficial.1-example
}}

Alternative options:

  • can replace nexus id with chucklefish id or url;
  • can replace github with source url.

Valid statuses:

status meaning default summary
ok The mod is compatible. This is the default and doesn't need to be specified. use latest version.
optional The mod is compatible, if you use an optional download on the mod page. 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. broken, not updated yet.
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). no longer maintained.
obsolete The mod is no longer needed and should be removed.

Other fields:

  • |name2=name and |author2=name add also-known-as lines for the mod name & author respectively.
  • |hide-url=URL (replacing |url=) moves the URL into a superscript link. Mainly useful for broken mods with a workaround, so players don't automatically click through to the old mod.
  • |links=URLs adds superscript links (comma-separated). 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  = 
}}
`;