Making a quest system

Hello, I’m making a quest system for my game using Dialogs and DataStore2. The idea is that each NPC has a set amount of quests and once all of them are complete, said NPC will give you a completion token. Ideally the quest line musn’t have branches, but every quest will have helpful tips if you get stuck.

Note that this post is more about the idea of my technique than a specific scripting error

I iterated the system in two different ways:
The first one was with table datastore having “IsCompleted” (bool, determines whether all of NPC’s quests are finished), “CanComplete” (bool, determines whether you’ve fulfilled all current quest requirements), “IsRead” (bool, determines whether to tell you the quest or hints about it), “QuestNumber” (integer, determines which quest is currently in progress).
I used a folder in ReplicatedStorage storing all dialogs and I checked which dialog to put in the NPC’s head when any of the datastores above were changed. On paper it looked well, but in practice if statemens consumed lots of space and the dialogs didn’t move properly.

The second iteration is very similar, except I have only “IsActive” (bool, “IsRead”, but renamed to better suit it’s purpose) and “QuestNumber”. I’m managing the dialogs client-side by having the text in one array with many sub-folders and the “Dialog” instance is staying fixed in the NPC’s head. Once it’s been read to the end, the client sends a remote for said NPC to make it’s “IsActive” true on the server. Once activated you can revoke the quest or complete it by checking whether quest-specific requirements are met every time their value changes.

And now, the question

I feel like this system is going to be a lot of text and if some of it changes lots of case-specific checks can be shaved. Should I change my approach? If so what needs to be different?

Your approach could be better. With how it is the only way to tell if a quest is done is if you have a higher quest number and you can only have one quest at a time. I recommend you save quests when they start in a normal data store (datastore2 doesn’t have advantages anymore) and then have an “isCompleted” so you can have multiple quests open and can store wether a quest is done.