Devlog 26: Quest System


Hi! Today's devlog will be about the updated quest system for my games. This devlog will be more about game design than actual code, so here's something that will be in the updated base version.
I've generally mentioned in past posts that development of the quest system is underway. And the development of this system dragged on for quite a long time.
What's the problem with a quest system? Generally it looks fairly simple, since countless games have quest systems, so there should also be countless examples of how to create them. And that's actually true, but all these systems either don't have what I need, or they're overloaded with all kinds of features.
So, as always, I started doing everything myself, in order to better understand how to create these quests and how to properly control events through quests. Why does that matter? Well, let me give an example of how quests used to be done in "Life with the Tribe!":
  • Every NPC that a quest was assigned to (for example, collecting dirty clothes) always checked for themselves whether the quest was complete, whether the quest was started, whether the quest was in the right phase, whether the quest was finished.
  • Objects tied to a quest (like the dirty clothes) became active because they checked for themselves whether the quest had advanced a phase or had started.
  • The Quest Manager itself was more of a container for storing the quest's current state than any real checking of and acting on the quest (things like: quest progress, checking the completion conditions, finishing or starting it).
  • Editing the objectives was horrible (I'm attaching a screenshot of the editing)
  • It was impossible to control or influence states/actions inside the game world through a quest (so, for example, moving or spawning an NPC depended entirely on whether the NPC itself checked the conditions written inside it)

As you can see, it worked, and it could have been developed further if I were only trying to increase that kind of content in the game. That is, without coming up with new types of objectives or conditions (because in the old quest system that was very hard to do). So for a long time I was thinking about improving how the quest system would work. As a model to follow, I decided to use a quest system similar to the one in the game TES V: Skyrim.
Why Skyrim specifically? The sheer volume of quests available to play through in that game is enormous, and somehow, when a quest is activated, the NPCs you need are always in the right places, and you'll never run into them somewhere else until the quest is finished or its stage changes. That's exactly what I want to do with the quest system in my games, and not only in "Life with the tribe!". So I started development, and I can say that I've finally reached results.

In the screenshots above you can see that quests will now be more understandable compared to how it was before. Even though this is a test quest, it already has new things in it that allow more to be done than before. But since that's only a graphical improvement — what's the difference between the old and the new quest system?
Well, let me give a few examples:
  • Quest actions: in the old system, the quest participants themselves performed the actions — for example, giving the player a coin for completing the quest. In the new system the quest now has separate actions, and it can perform actions when all the conditions are met (example: collected 10 wood, received 50 gold).
  • Quest objectives: the old system had objectives (collect the clothes, talk to an NPC), but as before, the dialogue choice and the checking depended exclusively on the NPC. The new system hooks into global signals, and if a dialogue takes place with an NPC who is a participant in the quest, the system will know that this action has happened and will complete the objective automatically.
  • Aliases: the old system didn't have this at all. In the new system it's a data type that will let me create dynamic quests and daily quests. It's data that's generated/set during the creation of the quest, and it can affect NPC behaviour — to change an NPC's position in the world, change an NPC's daily routine, and so on. That way it'll be possible to create conditions where some girl from the tribe, for some reason, very often gets into trouble with tentacles…

As you can see, this simplifies my work drastically: by specifying the participants of an objective, I'll be able to control where exactly those participants should be and what they should do depending on what's needed. And although the base version won't have big changes in its objectives, this quest system will be used to the fullest in the DLC. Though now I'll have to create a new UI for tracking which quests are active, but that will be added later.

Thank you for your support!