Modding:Mod compatibility/entry: Difference between revisions
Appearance
imported>Pathoschild m fix |
imported>Pathoschild tweak text |
||
| Line 12: | Line 12: | ||
| {{#switch:{{{status|ok}}} |ok=✓ |workaround=⚠ |soon-official=↻ |broken={{#if:{{{source|}}}|↻|✖}}|obsolete=✖}} {{#switch:{{{status|ok}}} | | {{#switch:{{{status|ok}}} |ok=✓ |workaround=⚠ |soon-official=↻ |broken={{#if:{{{source|}}}|↻|✖}}|obsolete=✖}} {{#switch:{{{status|ok}}} | ||
|ok = {{#if:{{{summary|}}}|{{{summary}}}|use latest version.}} | |ok = {{#if:{{{summary|}}}|{{{summary}}}|use latest version.}} | ||
|#default = {{#ifeq:{{{status|}}}|obsolete|obsolete|broken}}{{#if:{{{summary|}}}|, {{{summary}}}|{{#switch:{{{status|ok}}}|broken={{#if:{{{source|}}}|, not updated yet|, not open-source}}|soon-official=, author will update it soon}}.}} | |obsolete = {{#if:{{{summary|}}}|{{{summary}}}|obsolete.}} | ||
|#default = broken{{#ifeq:{{{status|}}}|obsolete|obsolete|broken}}{{#if:{{{summary|}}}|, {{{summary}}}|{{#switch:{{{status|ok}}}|broken={{#if:{{{source|}}}|, not updated yet|, not open-source}}|soon-official=, author will update it soon}}.}} | |||
}} | }} | ||
| <small>{{{broke in|}}}</small> | | <small>{{{broke in|}}}</small> | ||
Revision as of 04:20, 26 April 2018
| mod name | author | compatibility | broke in | |
|---|---|---|---|---|
| {{{name}}} | {{{author}}} | ✓ use latest version. |
Usage
For a compatible mod:
{{/entry
|name = Lookup Anything
|author = Pathoschild
|url = http://www.nexusmods.com/stardewvalley/mods/541
|source = https://github.com/Pathoschild/StardewMods
}}
For a mod with a non-OK status:
{{/entry
|name = Lookup Anything
|author = Pathoschild
|url = http://www.nexusmods.com/stardewvalley/mods/541
|source = https://github.com/Pathoschild/StardewMods
|status = broken
|summary =
|broke in = Stardew Valley 1.2
|links = <!-- any comma-separated URLs to pull requests, discussions, etc -->
}}
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. |
workaround
|
The mod isn't compatible, but the player can fix it or there's a good alternative. | |
soon-official
|
The mod isn't compatible, but the author has said they'll update it. | author will update it soon. |
broken
|
The mod isn't compatible. The message depends on whether the source link is set.
|
broken, not updated yet. broken, not open-source. |
obsolete
|
The mod is no longer needed and should be removed. |
Other fields:
|name2=nameand|author2=nameadd 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=URLsadds 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 =
}}
`;