SMAPI - Stardew Modding API

SMAPI - Stardew Modding API

971k Downloads

Add support for CurseForge update checks

Pathoschild opened this issue ยท 4 comments

commented

Add support for update-checking mods hosted on CurseForge.

commented

CurseForge doesn't have an official API to fetch mod info, and the unofficial API seems unreliable:

I spoke to a Curse developer about the options. They say webscraping is unwelcome and they'll block malicious webscrapers, but unofficially they'll turn a blind eye since there's no legitimate alternative ("since if the community is doing it to help, that's on us for falling short").

So looks like webscraping the CurseForge web UI is the way to go for now, until they have an official API.

commented

CurseForge doesn't have mod or file versions, it just provides a history of downloads by date. We'd need modders to follow a convention for version numbers in file names, but just a quick search found several cases where that would return incorrect versions (which is worse than simply failing). I'll shelve this for now.

commented

There's an official API which works for SMAPI's purposes. It's internal for the Twitch client so it may have breaking changes at any time, but SMAPI's usage is pretty basic so it should be easy to update if needed.

Curse still doesn't track file versions. I created a file naming convention similar to what most CurseForge mods already follow, and contacted the authors for mods which didn't fit the convention. So far 72% of the 55 Stardew Valley mods on CurseForge now follow the convention.

commented

Done in develop for the upcoming SMAPI 3.0.