Modlist UI


Adds a button that shows a window listing active mods and versions.

Utilities
7 hours ago
2.0 - 2.1
272

FAQ

Latest --- Startup crash: missing thumbnail / wrong dimensions / out of bounds

  1. Manually download the latest Factorio 2.1 version of Modlist UI, and extract its [portal-blob.lua] file.
  2. Manually download the latest version of the problematic mod mentioned in the crash-error, and extract its [thumbnail.jpg]
  3. Manually replace both files in their respective installed mods' folders with the extracted ones. Repeat step 2 and 3 as necessary.

Latest --- What is this “blob” / [portal_blob.lua], and why should I trust it?

A user's current active modlist only provides a list of slug/name, i.e. [modlist-ui], and version. Anything more requires external provision.
In Modlist UI's folder, you will find [portal_blob.lua]. It is a large metadata file generated by scraping all 18,000+ mods' metadata on the Factorio Mod Portal, providing Modlist UI richer information: titles, authors, descriptions, and crucially: thumbnail availability and dimensions.

Displaying thumbnails requires writing a graphic to the spritesheet during game-startup and then referencing it in game. Resizing/cropping/centering sprites requires knowing its dimensions. Not every mod has a thumbnail and no dimension size is standardized/agreed upon, except their filename: [thumbnail.jpg].

The game will crash during startup/runtime if we:
- Attempt to reference a thumbnail/file that does not exist. Some mods just don't have a thumbnail. Boo.
- Attempt to resize/crop an image outside of its native dimensions.
Since we cannot read/query the metadata of a file on a user's PC directly via Lua we provide this information via the [portal_blob.lua] and are trusting it to be up-to-date.

If you do not want any startup risk from thumbnails, use the default startup mod-setting: [No thumbnails]
Modlist UI will still use the blob’s text metadata, just without the pretty pictures.


Latest --- Weren’t you going to upload the scraper? Why are blob updates only periodic?

The Mod Portal has 18,000+ mods. Initial scrapes pinged each mod's endpoint to harvest metadata. Nowadays, scrapes are cached and lighter, pinging only those mods which are updated/new, saving 95% of the work. In the wrong hands however, the scraper is a DDOS tool.

Those fluent with HTTP capable scripting like Javascript can easily build their own, hopefully polite, scrapers and keep [portal_blob.lua] up to date. Instructing beginners how to script, install node, setup environment vars, and use a command line interface is outside the scope of this mod.

Update frequency is a compromise. Mods generally don't change their title, description or thumbnail very often, but 10+ new mods appear every day. Weekly-ish updates with an up-to-date scraped blob are boring, polite, and good enough.


Deprecated --- 3rd Party Mod Featuring (Metadata Hook)

After a lot of trial and error, now all required data such as author, title, description, and thmbnail.png fields can be directly pulled from a mod-portal scrape data blob, and from all installed mods themselves during data/prototyping, without any input/special code from the 3rd party mods.

If you created a data-updates.lua, and or other code specifically to cater for Modlist UI, you can safely remove it/that code. Apologies for any confusion or jumping the gun.