SMAPI - Stardew Modding API

SMAPI - Stardew Modding API

971k Downloads

Add quest API

purrplingcat opened this issue ยท 5 comments

commented

As a modder
I want standardized quest API
I should work with quests in the right way and not to be in conflict with other mods.

Some mods which uses quests do it in individual ways there are not compatible with other ways. Missing standard API for work with them.

What standardized API should to do basically?

  • Register quest in one quest registry
  • Resolve quest id
  • Add active quest to quest log
  • Handle quest progress like completed check and objective update
  • Allow to create own inherited quest class and quest types (and allow it to serialize it to save in compatible and safe way)
  • Player can view active custom quest added by mod in quest log and after click to them view quest details

Sorry for I add feature quest here, I am not on redit and on discord can be lost this thread. Thank you for your patience.

commented

Thanks for the suggestion! Unfortunately that's out of scope for SMAPI itself.

SMAPI is the base layer to enable mods and handle low-level stuff like events, content intercepting, error handling, asset propagation, content pack loading, etc. Other modders can then create framework mods to handle specific higher-level APIs (like Json Assets for crops/trees/etc). That keeps SMAPI itself maintainable for one developer, while balancing the work for higher-level APIs across many modders who can each focus on their particular part of the ecosystem.

You can suggest a framework mod at StardewModders/mod-ideas though!

commented

PyTK, FeTK, Entoarox Framework, Mail framework and etc. Okay, it's a very usefull mods, but I think it's a time to unit them and build one standardized API. It's very hard to maintain all dependencies on all mods when you create more complex mod.
This mods do lot of things and some do very similar things on custom way; installation of your mod not so easy; dependency hell and etc. Maybe to hallow creation of this one API mod? Modding community grow up and more complex mods arise. Maybe it's not so good idea, I can to contribute, but my experiences are not so good to lead it.

commented

PyTK, FeTK, Entoarox Framework, Mail framework and etc. Okay, it's a very usefull mods, but I think it's a time to unit them and build one standardized API. It's very hard to maintain all dependencies on all mods when you create more complex mod.
This mods do lot of things and some do very similar things on custom way; installation of your mod not so easy; dependency hell and etc. Maybe to hallow creation of this one API mod? Modding community grow up and more complex mods arise. Maybe it's not so good idea, I can to contribute, but my experiences are not so good to lead it.

I agree with @Pathoschild that it is out of scope for SMAPI. I also think that because @Pathoschild has done an amazing job of maintaining SMAPI which I guess is pretty time-consuming, and maintenance effort for SMAPI would be enormous for having more than the current basic API.

What you could do is to is to talk with other framework authors to combine the efforts (StardewStdLib maybe? ;)). Be aware of that such a centralized approach requires agreement on the API design itself, as well as a somewhat well-written API documentation to spread the word amongst developers.

I have looked at PyTK, FeTK and Entoarox Framework and all of them don't provide an API documentation at all. Developers have to guess what the classes and methods might do, since there's often not even a single comment in the source code. If you have a look at the SMAPI source code, you'll find that almost all methods and members have documentation. From experience, describing what each method and member does is quite an effort.

I would very much appreciate if you'd go on with a community-maintained API and I'm sure others would, too.

commented

I wrote it as concept here. I don't want lead it and create an architecture of API, I am not good architect. I think this requires a strong person to lead it and create architecture. I can contribute with code, but not be a leader of this project. I am unknown person in this community. But I agree, talk about this idea woth community is a good idea for start.

commented

That moment when everyone talks about frameworks but forgets about poor SpaceCore :'( :P
(Not that it's super well documented either, besides some comments about the events, but nobody has ever asked me about it.)