Difference between revisions of "Modding:Mod compatibility/entry"
Jump to navigation
Jump to search
Pathoschild (talk | contribs) (add anchor for direct links) |
Pathoschild (talk | contribs) (reword 'not open-source' if status is 'broken' but source URL is specified) |
||
Line 9: | Line 9: | ||
| {{#if:{{{url|}}}|[{{{url}}} {{{name}}}]|{{{name}}}}}{{#if:{{{name2|}}}|<br /><small style="font-size:0.75em;">(aka {{{name2}}})</small>}} | | {{#if:{{{url|}}}|[{{{url}}} {{{name}}}]|{{{name}}}}}{{#if:{{{name2|}}}|<br /><small style="font-size:0.75em;">(aka {{{name2}}})</small>}} | ||
| {{{author}}}{{#if:{{{author2|}}}|<br /><small style="font-size:0.75em;">(aka {{{author2}}})</small>}} | | {{{author}}}{{#if:{{{author2|}}}|<br /><small style="font-size:0.75em;">(aka {{{author2}}})</small>}} | ||
− | | {{#switch:{{{status}}} |ok=✓ |workaround=⚠ |soon|soon-official=↻ |broken|obsolete=✖}} {{#if:{{{summary|}}}|{{{summary}}}|{{#switch:{{{status}}}|ok=use latest version. |broken=broken, not open-source. |soon=update coming soon. |soon-official=author will update it soon. }}}} | + | | {{#switch:{{{status}}} |ok=✓ |workaround=⚠ |soon|soon-official=↻ |broken|obsolete=✖}} {{#if:{{{summary|}}}|{{{summary}}}|{{#switch:{{{status}}}|ok=use latest version. |broken=broken{{#if:{{{source|}}}|, needs update from the author|, not open-source}}. |soon=update coming soon. |soon-official=author will update it soon. }}}} |
| {{#if:{{{source|}}}|[{{{source}}} source]}}{{#if:{{{hide-url|}}}| [{{{hide-url}}} <sup>o</sup>]}}{{#if:{{{links|}}}| {{#arraydefine:linkArray|{{{links}}}}}{{#arrayprint:linkArray| |@@@@|<sup>[@@@@ {{#expr:{{#arraysearch:linkArray|@@@@}} + 1}}]</sup>}}}}<noinclude> | | {{#if:{{{source|}}}|[{{{source}}} source]}}{{#if:{{{hide-url|}}}| [{{{hide-url}}} <sup>o</sup>]}}{{#if:{{{links|}}}| {{#arraydefine:linkArray|{{{links}}}}}{{#arrayprint:linkArray| |@@@@|<sup>[@@@@ {{#expr:{{#arraysearch:linkArray|@@@@}} + 1}}]</sup>}}}}<noinclude> | ||
|} | |} | ||
Line 50: | Line 50: | ||
|- | |- | ||
| <code>broken</code> | | <code>broken</code> | ||
− | | The mod isn't compatible with SMAPI 2.0, isn't open-source, and there's no indication that the author will update it yet. | + | | The mod isn't compatible with SMAPI 2.0, isn't open-source (or requires significant refactoring from the author), and there's no indication that the author will update it yet. |
− | | ''broken, not open-source.'' | + | | ''broken, not open-source.''<br />''broken, needs update from the author.'' |
|- | |- | ||
| <code>obsolete</code> | | <code>obsolete</code> |
Revision as of 00:27, 7 October 2017
mod name | author | compatibility | |
---|---|---|---|
{{{name}}} | {{{author}}} |
Usage
Basic fields:
{{/entry |name = Lookup Anything |author = Pathoschild |url = http://www.nexusmods.com/stardewvalley/mods/541 |status = ok |summary = |source = https://github.com/Pathoschild/StardewMods }}
Valid statuses:
status | meaning | default summary |
---|---|---|
ok
|
The mod is compatible with SMAPI 2.0. | use latest version. |
workaround
|
The mod isn't compatible with SMAPI 2.0, but the player can fix it or there's a good alternative. | |
soon
|
The mod isn't compatible with SMAPI 2.0, but it's open-source so an unofficial update will be prepared soon (if the author doesn't update it first). | update coming soon. |
soon-official
|
The mod isn't compatible with SMAPI 2.0, but the author has said they'll update it. | author will update it soon. |
broken
|
The mod isn't compatible with SMAPI 2.0, isn't open-source (or requires significant refactoring from the author), and there's no indication that the author will update it yet. | broken, not open-source. broken, needs update from the author. |
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 =
}}
`;