QuestService
~ Easy to use Quest System~
Testing Place (Open Source): QuestService Testing Place - Roblox
Model Link: QuestService | EASY Quest System - Roblox
As we all know, quests help keep player’s interest, giving them clear goals and motivation when the gameplay may lack.
This quest system makes it easy to implement quests within your game. It allows you to create new quests WHENEVER, add quests to a player, change how those quests are obtained, and reward for quest completion, to mention a few features.
This questing system is modular. It supports LEVEL quests - when the player earns new levels, you can reward the correlating quests!
Note
This system is made to be adaptable, whether you are a noob or pro at scripting. Feel free to message with any questions.
How To Add New Quests
You should see the following within the module:
To add a new quest, just clone one of the templates in the “QuestInfo” table. Change it’s features to your liking.
Note
If you change the “ProgressType” key, you must make sure to fire the “ProgressType” string when you use module.CheckUpdate(plr,string)
Example:
Now, in “AllQuests”, add a new key. Name this EXACTLY THE SAME as what you named the QuestInfo template.
Do you want this quest to be automatically given when the player joins for the first time? Copy the key in “AllQuests”, and paste it into “FirstQuests”.
Note
If you have a level system in your game, and want this new quest to be awarded when the player gets a new level, change the “Level” variable of the QuestInfo key (to the level which they must be to obtain it).
Then, you’ll have to fire QuestModule.UpdateLevelQuests(plr,plrlevel) when the player’s level changes, so the module can check it.
Functions API
QuestModule.SetupPlr(plr)
--Sets up the player. Fire when the player joins. You need to hook up a datastore. Otherwise, the player will have the "FirstTime" quests when they join.
QuestModule.AddQuest(plr,quest)
--Gives players quests. The "quest" variable must correlate with the quest name, which can be edited within the quest tables.
QuestModule.CheckUpdate(plr,eventtype,value)
-- Fire this every time you want to check if a quest should be incremented. The "eventtype" should correlate with "ProgressType" in QuestInfo
QuestModule.UpdateLevelQuests(plr,plrlevel)
--This is if your game has a level system. Use this function whenever the level changes - it will automatically assign new quests, based off the "Level" in QuestInfo
QuestModule.SetQuestValue(plr,quest,value)
-- This is if you want to change a SPECIFIC quest's value. Include quest name, and the value you want to add/subtract.
QuestModule.FetchPlrQuests(plr)
-- Returns what quests the player CURRENTLY has.
QuestModule.AllQuests()
-- Returns all the possible quests the player can have.
Testing Place (Open Source): QuestService Testing Place - Roblox
Model Link: QuestService | EASY Quest System - Roblox
If you have any question, comments, bugs, or concerns, I’d love to hear them.
I always appreciate a a follow, https://twitter.com/Infinit19247144, and a subscribe for my work
Thanks, chau