Modding:Mod compatibility/barchart

From Stardew Valley Wiki
Jump to navigation Jump to search
 
0% are compatible or have a working alternative.
 
0% have an update coming soon.
 
0% are broken and not open-source.¹

¹ Many of these broke due to a Stardew Valley update. Some may be updated by their authors later.

Usage

List the counts for each group:

{{/barchart
  |ok         = 135
  |workaround = 33
  |soon       = 56
  |broken     = 33
  |total      = 257
}}

Script

This tiny script generates the template call when run from the parent page.

var entries = $("#mod-list .mod:not([data-beta-status='abandoned'], [data-beta-status='obsolete'])");
var ok = entries.filter("[data-beta-status='ok'], [data-beta-status='optional']").length;
var workaround = entries.filter("[data-beta-status='workaround'], [data-beta-status='unofficial']").length;
var soon = entries.filter("[data-beta-status='broken'][data-github], [data-beta-status='broken'][data-custom-source]").length;
var broken = entries.filter("[data-beta-status='broken']:not([data-github], [data-custom-source])").length;
var total = ok + workaround + soon + broken;

if (total != entries.length) {
  var unknown = entries.filter(":not([data-beta-status='ok'], [data-beta-status='optional'], [data-beta-status='workaround'], [data-beta-status='unofficial'], [data-beta-status='obsolete'], [data-beta-status='broken'], [data-beta-status='abandoned'])");
  console.log("found entries with unknown status:", unknown);
  throw 'script failed';
}

`
{{/barchart
  |ok         = ${ok}
  |workaround = ${workaround}
  |soon       = ${soon}
  |broken     = ${broken}
  |total      = ${total}
}}
`