SMAPI - Stardew Modding API

SMAPI - Stardew Modding API

971k Downloads

Allow string versions in manifest.json

Pathoschild opened this issue ยท 1 comments

commented

Mods specify their version as an object in manifest.json:

{
  "Name": "LookupAnything",
  "Author": "Pathoschild",
  "Version": {
    "MajorVersion": 1,
    "MinorVersion": 14,
    "PatchVersion": 0,
    "Build": "alpha"
  },
  "Description": "View metadata about anything by pressing a button.",
  "UniqueID": "Pathoschild.LookupAnything",
  "EntryDll": "LookupAnything.dll"
}

Let them set a version string instead:

{
  "Name": "LookupAnything",
  "Author": "Pathoschild",
  "Version": "1.14-alpha",
  "Description": "View metadata about anything by pressing a button.",
  "UniqueID": "Pathoschild.LookupAnything",
  "EntryDll": "LookupAnything.dll"
}
commented

Backward compatibility is tricky. It's easy to support both formats in new SMAPI releases, but older releases will crash when given a version string.

I added support in the upcoming 1.15 release, but won't document it anywhere until SMAPI 2.0. That addresses backward compatibility from two angles:

  1. Most players will support string versions by the time mods start using them, even if they don't have the latest SMAPI 2.0.
  2. SMAPI 2.0 will likely release after the next game update, at which point players will need to update anyway to continue playing with mods.