SMAPI - Stardew Modding API

SMAPI - Stardew Modding API

971k Downloads

Add optional MinimumApiVersion to manifest.json

Pathoschild opened this issue ยท 4 comments

commented

Consider letting mods have an optional MinimumApiVersion field in their manifest.json.

SMAPI releases can introduce new features, but some players will still have an old version of SMAPI. If they try to use mods written for a newer version, they'll get cryptic errors like ReflectionTypeLoadException. SMAPI would validate this field before trying to load the DLL, so players would get a friendly "XXX mod requires a newer version of SMAPI, please update" error instead.

commented

Is it possible (in addition) to catch such exceptions and convert them into a more friendly error?

commented

Discussed on both Discord servers, and the idea was well-received. I'll add this to the 1.1 release.

commented

Done in the upcoming 1.1 release.

commented

@StefanOssendorf We can catch such exceptions, but we won't know why they happened. (Maybe they're written for a newer version of SMAPI, or an older version of SMAPI, or they require another mod, etc.) So the friendly error would basically just be "something went wrong loading the mod".