Search Unity

[RELEASED]EasyQuest - A Solution for Any Quest!

Discussion in 'Assets and Asset Store' started by christides11, Aug 3, 2014.

  1. christides11

    christides11

    Joined:
    May 19, 2012
    Posts:
    672


    EasyQuest is a solution to create quest with some need for coding, but in turn for that gives access to the source code and features a few things to make it worth it. It's useful for RPG-like quest, or just mission objectives in something like a FPS. Updates for the system will be based on the communities suggestions, and will regularly come out when needed. Anything you want (or any bugs I missed), just tell me here and I'll see what I can do! The system features:
    • Four Quest Types: Allows you to make 4 quest types (GoTo, Collect, Defeat, Move object to position), with more coming from suggestions!
    • Save and Load!: Quest are able to save and load, giving players the ability to quit without losing progress!
    • Multiple Objectives:One quest is able to have multiple objectives, combining any quest type you want.
    • Linking Quest: Ability to have story-like missions, where they have to go in order.
    • Multiple Quest: Have multiple quest in a list (Borderlands style) that can be activated later!
    • Example Scene: Includes a example, with different scripts you can use and take parts from.
    • Source code included!
    • NOTE: This asset needs some coding experience to make a script based off of the 'QuestGiver' script I provide to make the questgiver do what you want it to do.
    Currently the webplayer is not able to save, as webplayer is not able to save to the system from my understanding. I'll be finding a way around this soon.
    Reviews are appreciated!
    Asset Store: https://www.assetstore.unity3d.com/en/#!/content/20470
    Docs: Below 2.0.0 Documentation, 2.0.0+ Documentation
    Webplayer: Webplayer

    PICTURES:

    11.jpg 22.jpg
     
    Last edited: Jul 8, 2018
    Hamesh81, GibTreaty and ManAmazin like this.
  2. christides11

    christides11

    Joined:
    May 19, 2012
    Posts:
    672
    Hey all, EasyQuest has been accepted on the asset store! Expect a video on usage soon. Even then there is a manual and a small update also coming soon that has comments on almost everything so you know what each part of the scripts do what (variables also have easy renegotiable names in the current build for this). Thanks to anyone that plans to buy it, and I really want to know what people would want out of a solution like this.
    https://www.assetstore.unity3d.com/en/#!/content/20470
     
    ManAmazin likes this.
  3. christides11

    christides11

    Joined:
    May 19, 2012
    Posts:
    672
    Alright, small update. Just submitted version 1.1 which makes sure most scripts are commented on so you know what part of each function does, and fixes move object to position quest so that they actually work. Expect it to come in a few days.
     
  4. ManAmazin

    ManAmazin

    Joined:
    Aug 7, 2013
    Posts:
    242
    Congrats on your release brah I will give it a look soon i promise keep up the great work broham!
     
  5. christides11

    christides11

    Joined:
    May 19, 2012
    Posts:
    672
    Thanks, I appreciate it.
     
  6. christides11

    christides11

    Joined:
    May 19, 2012
    Posts:
    672
    Update 1.1 has been sent to the asset store, fixes a few things.
     
    Last edited: Jun 15, 2017
  7. christides11

    christides11

    Joined:
    May 19, 2012
    Posts:
    672
    Hey all. The system will be updated for 4.6 once it's out of beta. For now it's a simple fix if you want it working in that version.
     
    Last edited: Jun 15, 2017
    ManAmazin likes this.
  8. arrested_games

    arrested_games

    Joined:
    Mar 17, 2013
    Posts:
    296
    id love that 4.6 update :)
     
  9. christides11

    christides11

    Joined:
    May 19, 2012
    Posts:
    672
    You can expect the 4.6 update soon, putting the last touches on it.
     
    Last edited: Jun 15, 2017
  10. christides11

    christides11

    Joined:
    May 19, 2012
    Posts:
    672
    Alright, cleaning up a few things today before I send it off to the asset store. You can expect:
    • Example for new UI system
    • Progression ID, so that you can have side quest that progress in their own line
    • Controller support example for new UI and legacy UI
    • Small changes and fixes.
    (For Legacy/new UI I would recommend replacing it's scripting to work with InControl, so that it works with
    multiple controllers).
    Anything else you guys would like to see?
     
  11. christides11

    christides11

    Joined:
    May 19, 2012
    Posts:
    672
    Alright, the update has been submitted. In this update I have also made Quest work in webplayer, so it should be working on all platforms now (haven't tested them all, but I cover both methods of saving). :)
     
  12. christides11

    christides11

    Joined:
    May 19, 2012
    Posts:
    672
    Alright, the 4.6 update has been accepted! Comes with:
    • An example scene for implementing the new UI
    • A better way to track quest and side quest
    • Controller support example for legacy and new UI
    • Bug fixes that caused quest to sometimes save wrongly.
    • Small changes to code & more documentation in-code
    • Quest now save/load in webplayer.
    Webplayer save/loading is in testing, so report any problems with it to me. Happy questing!
     
  13. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,517
    This looks like a good base solution. I'll be picking this up tonight and giving it a try. I'll probably have a few suggestions for features and/or improvements as well.

    Do you have a roadmap of future enhancements and a timeline?
     
  14. christides11

    christides11

    Joined:
    May 19, 2012
    Posts:
    672
    Thanks, recently I've been working on updating it with a better example project to show off the types of quest that can be done (also adding a dialogue example), some changes to make variables more understandable, and a few bug fixes. I'm open to any suggestions you might have.
     
  15. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,517
    I got it up and running with the samples, but haven't gotten deep into it yet. I definitely think the samples can be improved. There are some issues with the UI. One of them is partially off screen and with blurry text that is almost unreadable. Also, I didn't see what the door was supposed to do. I assumed you would walk up to the door and it would take you to the next area, but that never happened.

    One thing I would like to know is how to reset the samples so you can try them again. Once you complete the quest, the data is saved and you can no longer do it.
     
  16. christides11

    christides11

    Joined:
    May 19, 2012
    Posts:
    672
    On anything but webplayer/webgl(dunno if I can save files with webgl or not), the file is saved to:
    Code (csharp):
    1. Application.persistentDataPath + "/" + GameName + "." + GameAbbreviation
    GameName and GameAbbreviation are defined on the "QuestSaver" script on the "QuestManager" game object.
    For webplayer/webgl(?), it'll save to playerprefs. I haven't added any functionality to delete the information yet, but you currently can using http://docs.unity3d.com/ScriptReference/PlayerPrefs.DeleteAll.html

    I've fixed the UI recently, and I'll be making the samples much better/much clearer.
    EDIT: Also, might want to check the docs in the OP instead of the one included with the asset atm, as I'm updating it to make more sense.
     
    Last edited: Jan 10, 2016
  17. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,517
    Thanks for the info. I look forward to the update.
     
  18. christides11

    christides11

    Joined:
    May 19, 2012
    Posts:
    672
    Alright, along with the new tutorial stuff, the next version will include:
    -A new quest objective that makes you have to talk to the quest giver (or anyone you assign really) to finish the quest.
    -Ability to delete quest save data from in the editor http://puu.sh/mOGFf.png
    -Ability to have multiple quest for one quest giver http://puu.sh/mOGVX.png

    The final feature I want to add is the ability to have quest only be able to done if certain objectives are done, but don't know how exactly I would go implementing this, since different projects are going to handle how they store this stuff differently. Probably just end up putting that in a later update if I can't figure it out. Expect this update by sometime next month.
     
  19. christides11

    christides11

    Joined:
    May 19, 2012
    Posts:
    672
    Small update, minimum version is being bumped up to 4.6.9 (from 4.6.1). Hopefully this won't affect many people.
     
  20. christides11

    christides11

    Joined:
    May 19, 2012
    Posts:
    672
    So I was planning on finishing up the update and uploading it last weekend, but on Friday my desktop's power supply died, so until I can replace it (probably gonna RMA it) I can't finish the update. It's still coming (hopefully) soon though.
     
  21. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,517
    I tried to use this again in my project and have issues in Unity 5. I thought I posted a message here about it, but it seems to be missing. Anyway, I got lots of script errors in .js files for the ExampleScenes. Even if I delete the entire ExampleScenes folder, I was getting other errors preventing it from working. Can you test in Unity 5.2 and fix for issues found?

    EDIT: Actually, I sent a support e-mail, but have not received a response. Did you get my e-mail?
     
    Last edited: Mar 2, 2016
  22. christides11

    christides11

    Joined:
    May 19, 2012
    Posts:
    672
    Found it & sent a reply. I'll check out the errors tonight.
    EDIT: Sent a updated package (although it's not the WIP version of the asset), anyone else having problems with Unity 5 compatibility can contact me and I'll send it to you.
     
    Last edited: Mar 5, 2016
  23. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,517
    Thanks for looking at this. I'd still like to give this a try for my project.
     
  24. workingman247

    workingman247

    Joined:
    Jul 25, 2015
    Posts:
    11
    purchased easyquest, could not find the QuestGiver script referenced in the documentation....HELP !!!!
     
  25. christides11

    christides11

    Joined:
    May 19, 2012
    Posts:
    672
    It's under Scripts>Examples>Legacy, or for the 4.6 UI example it's under Scripts>Examples>NewUI.
    Fixed my desktop recently, so expect the update to be published soon.
     
  26. workingman247

    workingman247

    Joined:
    Jul 25, 2015
    Posts:
    11
    ty....found it, now where can I find the script that completes a GoThere! quest ???
     
  27. christides11

    christides11

    Joined:
    May 19, 2012
    Posts:
    672
    "Go To" quest (and all quest types) are detected automatically by the "EasyQuest" script (which contain your quest and are put on gameobjects as children of QuestManager. You can find the "EasyQuest" script in the scripts folder.
     
  28. christides11

    christides11

    Joined:
    May 19, 2012
    Posts:
    672
    Alright, I'm sending the update tommorow. You can expect:
    • "talk to" quest type, which needs you to talk to a quest giver to complete the objective.
    • Quest givers can have multiple quest.
    • Ability to delete all quest data in the inspector (via EasyQuestManager)
    • Example scenes show using the system with first person and third person.
    • Along with that, each scene shows how to have the each quest giver either give a list of quest for the player to pick from or how to only allow one quest at a time.
    • Bug fixes, and uploading different versions for better Unity4.6/5 compatibility.
     
    Last edited: Apr 9, 2016
  29. christides11

    christides11

    Joined:
    May 19, 2012
    Posts:
    672
    Update is out now, you can expect all the features I noted above.
     
  30. IndexOutOfRangeException

    IndexOutOfRangeException

    Joined:
    Apr 16, 2015
    Posts:
    5
    Hi,
    In EasyQuest script in the inspector, there is only one objective by default. I want to add more objectives, so I click "Add Objective" button and one more objective is added and this way I can add many objectives as I want. This works just fine but when I start the game, the objectives I added just disappear and there only remains the first objective. I can add objectives when the game is running and it works fine but the changes made when the game is running are lost when the game is closed as you know. So how can I make the objectives I added not disappear?
    Waiting for your answer, have a nice day.
     
  31. christides11

    christides11

    Joined:
    May 19, 2012
    Posts:
    672
    I assume you still have the prefab connection for QuestManager, so after you make changes you'll have to "Apply" the prefabs changes on the root object (QuestManager).
     
  32. IndexOutOfRangeException

    IndexOutOfRangeException

    Joined:
    Apr 16, 2015
    Posts:
    5
    I did it now but the problem still remains. Actually when I try to add objectives in the example scenes, same thing happens there too.
     
  33. christides11

    christides11

    Joined:
    May 19, 2012
    Posts:
    672
    Didn't catch this while testing the solution, I'll upload the fix this weekend. For now try pressing the "Delete quest saves" button too.
     
    Last edited: Jun 28, 2017
  34. christides11

    christides11

    Joined:
    May 19, 2012
    Posts:
    672
    The update is out, fixes a few of the issues that came up in the previous update.
     
    Last edited: Jun 15, 2017
  35. christides11

    christides11

    Joined:
    May 19, 2012
    Posts:
    672
    Recently started using this in another project, and saw a few issues with it that could be a bit confusing, and that it would be weird to do a few things with how the system is setup currently. Because of this, I'll be updating it to better suit the needs of people.

    First off, you don't have to create quest object anymore. Instead, all quest are stored in a .asset file that is used by the QuestManager.

    And to edit this database, I've made a editor (Work In Progress).


    I've gotten rid of ProgressID and OverallID (now only have QuestID, which is defined by the order). Should make things much less confusing. I've also added a new QuestType called "TalkTo", which can be completed with a function so can be used in anyway you want really (after a dialogue option/sound/etc.).

    If you have any old quest, I haven't touched the "EasyQuest" script, so updating then bringing over the data should be fine. I'll made sure of that before I release it though.
     
    Last edited: Sep 26, 2016
  36. christides11

    christides11

    Joined:
    May 19, 2012
    Posts:
    672
    Spent a few days finishing the new update, and today update 2.0.0 has been accepted to the asset store. This update has al the features above, along with a few fixes to the issues with how the previous version worked. This version should offer more performance gains, but if you have any issues with it contact me and I'll work on fixing them.

    Change Log:
    -Redesigned the system by saving quest into a .asset file.
    -Tracking quest progress is now done via a event system (except for positon-based objectives), meaning performance gains compared to before.
    -Added a way to set the max times a quest can be completed.
    -Started implementation of time-based quest.
    -Properly implemented "quest Need Finished"/questline.
    -Fixed "return to" objective.
    -Added updater for those who used EasyQuest before 2.0.0.
    -Entirely new example scene.
    -Bug fixes.

    https://www.assetstore.unity3d.com/en/#!/content/20470
     
  37. christides11

    christides11

    Joined:
    May 19, 2012
    Posts:
    672
    Released 2.0.1, small update.
    -Cleaned up EasyQuestManager code.
    -Updated documentation to better example how to use the events.

    Hopefully the documentation changes help a little more than before in how quest should be handled, and cleaned up code should make the main class' readability better.
     
  38. archor

    archor

    Joined:
    Sep 18, 2015
    Posts:
    9
    Using Easy Quest ...

    Would like to replace 'Mouse' clicks with joystick/keyboard inputs.

    Hints / Tips / Sample Code ?

    ???

    Thanks.
     
  39. Alkanov

    Alkanov

    Joined:
    May 15, 2017
    Posts:
    46
    Hi,

    Is there a way of implementing this on a dedicated server-client architecture?

    Can the quests progression be saved on a per-client basis? (User ID->save progress->load progress on player login->send progress to client-->show progress and info on client)

    Thanks.
     
  40. christides11

    christides11

    Joined:
    May 19, 2012
    Posts:
    672
    What you can do is call EventSystem.current.SetSelectedGameObject() once you open a menu, and if the controller is properly configured you should be able to traverse the menus. Make sure your joystick buttons/axis match what's on the EventSystem object in the scene.

    This wasn't built with networking in mind so you might have to make changes to the code, but progress is already saved locally and calling the save function via RPC shouldn't be too hard. All the quest data should be able to be sent over the network. If you do end up buying and/or still have questions let me know.
     
    Last edited: Mar 16, 2018
  41. christides11

    christides11

    Joined:
    May 19, 2012
    Posts:
    672
    Version 2.1.0 is up on the asset store. This update includes:
    • Added optional objectives
    • Added ability to fail quest
    • Added QuestProgressTracker and QuestProgressSetter
    • Timer option implemented (Currently in-game time, real world time soon)
    • Improved Quest Editor UI
    • Example code cleaned up
    • Revamped documentation
    • Bug fixes
    Hopefully the new documentation does a much better job than before describing how to get things working and how to properly use EasyQuest. I'm still adding a few things to the docs, but it should be fine for now.
     
  42. Imillionaire

    Imillionaire

    Joined:
    Dec 14, 2012
    Posts:
    44
    Hello im having trouble setting up a quest objective where they have to "talk to" another NPC, could you provide an example or explanation on how to do that? I also dont see how to setup a conversation without making it into a quest (which is fine, but again it doesnt update that the objective is completed once the player talks to or interacts with the object)
     
  43. christides11

    christides11

    Joined:
    May 19, 2012
    Posts:
    672
    How you handle the actual conversation is up to your implementation, but to set things up you would do something like:

    1. Call "EasyQuestManager.Current.RequestTalkObjCompletionStatus(questID, ConversationName);" to see if the "talk to" objective is even active for the quest. This returns true if the objective is the current one for the quest.
    2. If you get true back, handle the conversation however you like.
    3. Once done, call "EasyQuestManager.Current.CheckTalkObj(ConversationName);" This will update the objective properly.
     
  44. christides11

    christides11

    Joined:
    May 19, 2012
    Posts:
    672
    Soon I'll be pushing a update to make the names of the methods more a bit more clear, clean up a few variables, and update the documentation. I'll also be updating the minimum version to 2017 LTS.
     
    Last edited: Nov 22, 2018
  45. Imillionaire

    Imillionaire

    Joined:
    Dec 14, 2012
    Posts:
    44
    (SOLVED)
    Hey im having another issue. When i change scenes, and load back into my original, the player is no longer able to "accept" quests i get this error:

    It seems to be telling me that it cant find the "State" text located above the NPC that shows a "!" "?" or "..." but its still correctly referenced in the inspector so im not sure what the issue is.

    MissingReferenceException: The object of type 'QuestGiver' has been destroyed but you are still trying to access it.
    Your script should either check if it is null or you should not destroy the object.
    UnityEngine.Component.GetComponentInChildren (System.Type t, Boolean includeInactive) (at C:/buildslave/unity/build/artifacts/generated/common/runtime/ComponentBindings.gen.cs:63)
    UnityEngine.Component.GetComponentInChildren[Text] (Boolean includeInactive) (at C:/buildslave/unity/build/artifacts/generated/common/runtime/ComponentBindings.gen.cs:81)
    UnityEngine.Component.GetComponentInChildren[Text] () (at C:/buildslave/unity/build/artifacts/generated/common/runtime/ComponentBindings.gen.cs:76)
    EQ.Example.QuestGiver.UpdateIcon (Int32 QuestID) (at Assets/EasyQuest/ExampleProject/Scripts/QuestGiver.cs:39)
    EasyQuestManager.AcceptQuest (Int32 _QID) (at Assets/EasyQuest/Scripts/EasyQuestManager.cs:192)
    EQ.Example.ExampleUI+<OpenQuestInfoWindow>c__AnonStorey3.<>m__0 () (at Assets/EasyQuest/ExampleProject/Scripts/UI/ExampleUI.cs:168)
    UnityEngine.Events.InvokableCall.Invoke () (at C:/buildslave/unity/build/Runtime/Export/UnityEvent.cs:165)
    UnityEngine.Events.UnityEvent.Invoke () (at C:/buildslave/unity/build/Runtime/Export/UnityEvent_0.cs:58)
    UnityEngine.UI.Button.Press () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Button.cs:36)
    UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Button.cs:45)
    UnityEngine.EventSystems.ExecuteEvents.Execute (IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/EventSystem/ExecuteEvents.cs:50)
    UnityEngine.EventSystems.ExecuteEvents.Execute[IPointerClickHandler] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.EventFunction`1 functor) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/EventSystem/ExecuteEvents.cs:261)
    UnityEngine.EventSystems.EventSystem:Update()
     
    Last edited: Nov 29, 2018
  46. Imillionaire

    Imillionaire

    Joined:
    Dec 14, 2012
    Posts:
    44
    I added an
    if(State){

    }

    to those lines of code which seems to have fixed that, but now im getting this error and im not sure if the EasyQuestData
    is losing its reference or something, it happens AFTER i accept a quest in the newly loaded scene, and then walk within range of another quest giver? here's the error:


    MissingReferenceException: The object of type 'Text' has been destroyed but you are still trying to access it.
    Your script should either check if it is null or you should not destroy the object.
    UnityEngine.EventSystems.UIBehaviour.IsActive () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/EventSystem/UIBehaviour.cs:22)
    UnityEngine.UI.Graphic.SetVerticesDirty () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Graphic.cs:100)
    UnityEngine.UI.Text.set_text (System.String value) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Text.cs:138)
    EQ.Example.ExampleUI.UpdateCurrentQuestInfo () (at Assets/EasyQuest/ExampleProject/Scripts/UI/ExampleUI.cs:258)
    EQ.Example.ExampleUI.UpdateCurrentQuestInfo (Int32 QID) (at Assets/EasyQuest/ExampleProject/Scripts/UI/ExampleUI.cs:242)
    EasyQuestManager.CheckAllObjectivesComplete (Int32 QuestID) (at Assets/EasyQuest/Scripts/EasyQuestManager.cs:434)
    EasyQuestManager.CompleteObjective (.ObjectiveT questObjective, .EasyQuestData quest) (at Assets/EasyQuest/Scripts/EasyQuestManager.cs:425)
    EasyQuestManager.CheckObjective (System.String objectiveName, QuestType questType, Int32 QuestID, Int32 objectAmount) (at Assets/EasyQuest/Scripts/EasyQuestManager.cs:409)
    EasyQuestManager.CheckTalkObj (System.String convoName) (at Assets/EasyQuest/Scripts/EasyQuestManager.cs:353)
    QuestProgressSetter.HandleProgress () (at Assets/EasyQuest/Scripts/QuestProgressSetter.cs:67)
    QuestProgressSetter.OnTriggerEnter (UnityEngine.Collider other) (at Assets/EasyQuest/Scripts/QuestProgressSetter.cs:34)
     
  47. christides11

    christides11

    Joined:
    May 19, 2012
    Posts:
    672
    I assume this error comes from this object (Quest Obj T) on the Example UI being lost for whatever reason:
    upload_2018-11-29_21-25-35.png

    I'll look into this and see if it's a issue with the scripts themselves, but I also don't really recommend using any of the example scripts themselves. I recommend using them as a reference to write your own version, especially ExampleUI as in the current build it's a bit messy.
     
  48. Imillionaire

    Imillionaire

    Joined:
    Dec 14, 2012
    Posts:
    44
    adding this fixed it, it was trying to reference events from the previous scene load.

    private void OnDestroy()
    {
    QIH.BackB.onClick.RemoveAllListeners();
    EasyQuestManager.Current.OnCTQChanged -= UpdateCurrentQuestInfo;
    EasyQuestManager.Current.OnCollectedObj -= UpdateCurrentQuestInfo;
    EasyQuestManager.Current.OnQuestProgress -= UpdateCurrentQuestInfo;
    EasyQuestManager.Current.OnQuestFinish -= UpdateCurrentQuestInfo;
    EasyQuestManager.Current.OnQuestFail -= UpdateCurrentQuestInfo;
    EasyQuestManager.Current.OnQuestsDataLoaded -= UpdateCurrentQuestInfo;

    EasyQuestManager.Current.OnQuestFinish -= QuestFinishedSound;
    EasyQuestManager.Current.OnQuestFail -= QuestFailedSound;
    }
     
  49. christides11

    christides11

    Joined:
    May 19, 2012
    Posts:
    672
    Ah ok, I'll be sure to include that fix. Thanks!

    Initially for the next patch all I wanted to do was clean up variables a bit, but I decided to redo the workflow of making quest to a node editor, as making quest in the linear way it is right now is a bit awkward. I might possibly have to make it a separate free upgrade package due to the change is structure, but once I get closer to getting done with it I'll see what I should do.
     
  50. f1chris

    f1chris

    Joined:
    Sep 21, 2013
    Posts:
    251
    Any update coming soon ?