Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

S-Quest: quest/mission builder

Discussion in 'Assets and Asset Store' started by OussamaB, Jan 17, 2014.

  1. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    I've been trying many things for the new saving/loading system and I ended up removing the quest order entirely. The quests now rely on the quest code only to save and load their stats. Therefore, each quest must have a unique quest code. To avoid any issue with having multiple quests with the same quest code, I've added a button in the quest manager editor that will look through all the quests in one scene then print a message if there's more than one quest with the same quest code.

    As for linking quests to each other, you will have to assign the "ParentQuest" for the quest if you wish that it's only unlocked/available only when the parent quest is completed. If not, you can leave the "ParentQuest" field empty in the inspector.

    This and more changes will be available in the next update!
     
  2. seldom

    seldom

    Joined:
    Dec 4, 2013
    Posts:
    118
    Hi everyone!

    For the last few weeks I've been working on an extension for S-Quest: a node-based editor for quests and their dependencies. Today it's time to introduce it to you.

    This is what it looks like:


    And this is what you can do with it:
    • get an overview of the dependencies between all Quests
    • add and remove Quests
    • change the connections between Quests
    • open Quest components in the Inspector
    Basically you can now do all your Quest editing in a single window. I hope you guys find it useful, please let me know what you think of it.
    For installation instructions, read this.

    Thanks to @SoumiDelRio for all the help and feedback!
     
    OussamaB likes this.
  3. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    Hi @SoumiDelRio , I've just discovered this great asset and have some questions if you don't mind.

    1) Is it possible to use a custom reward once a quest is complete? Eg. call a custom function
    2) Is it possible to add a time limit to a quest? And as a result set what happens upon failure?
    3) I would like to use a quest as a part of the in game tutorial, for example to teach a player the default controls. Would it be possible to set a quest condition such as when a specific button is pressed? So for example when the player is being taught how to jump, pressing the jump button would make them complete the quest.
    4) In the demo, the quests are manually accepted by the player after talking with an NPC. Is it possible to auto assign a quest to a player at runtime which cannot be abandoned, for example after a cutscene has completed or when the player has reached a specific level?
    5) What is the process for adding a custom quest type? For example I will most likely need to create a follow NPC type quest.

    I look forward to your reply. This asset looks great! :)
     
  4. arcdragon1

    arcdragon1

    Joined:
    Oct 15, 2012
    Posts:
    116
    hi developer.
    Does S-Quest have a localization function?
     
  5. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    1) Yes, you can use the custom quest events. "OnPlayerCompleteQuest (string QuestCode)" for example, is called whenever a quest has been completed, so you could use that to call a custom function.
    2) Added to my to-do list. It will be in the next update.
    3) Added to my to-do list. A new "Press a button" quest type will be added in the next update.
    4) There's an option in the quest's inspector called "ActivateOnStart", you can tick that so that the quest is added to the player when the game starts. So in your case, you should spawn an object that has the quest component with the "ActivateOnStart" enabled so that you can add a quest to the player.
    5) This requires some code modification so it might get kind of tricky for you when you're trying to add a custom quest type. However, I like the idea of a "Follow an object" quest type which will require the player to stay within a range from a target object. I added it to my to-do list as well.

    Hopefully the update will be published by next Friday or before.
    Thanks for the awesome suggestions.
     
    Hamesh81 likes this.
  6. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Not currently, but it's planned as well.
     
  7. arcdragon1

    arcdragon1

    Joined:
    Oct 15, 2012
    Posts:
    116
    Thanks SoumiDelRio.
    it's good news!
     
  8. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    Wow, that's fantastic SoumiDelRio. Thank you very much, if I have any other suggestions I will post them here.
     
  9. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    The first part of the update have just been submitted, here's the update list:

    - Fixed the demo scene.
    - Fixed the bug when the player is required to stay at an objective's target position for a certain amount of time.
    - Code modification to avoid useless calls and improve performance.
    - Added the option to save each quests' progress (in objectives) even after abandoning it.
    - Added the option to assign a time limit to each objective of a quest, which triggers a custom event when the time is over.
    - Added the option to abandon the quest automatically after the time limit of one of its objectives is over.
    - Added the option to make a quest non abandonable by the player.

    The next will follow soon after this one and will include the two new quest types and few UI changes.
     
    Hamesh81 likes this.
  10. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    Awesome! Can't wait to try out these new features and the upcoming ones. Great work @SoumiDelRio :)
     
  11. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    The new updated is now available on the asset store. The next update, which contains the new quest types, will be submitted this weekend.
     
    Hamesh81 likes this.
  12. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    A new update has just been submitted, here's the update list:

    - Fixed a bug in the quest's timer.
    - Fixed a bug in the objective's bar UI.
    - Added a new quest type: "Press A Key" quest type, where the player has to press a key once or hold it for a certain amount of time.
    - Added a new quest type: "Follow Object" quest type, where the player has to follow a moving object for a certain amount of time and stay within a minimal and maximal distance from the moving object.

    It would be awesome if you give me feedback about the demo scene and how I can improve in order to show all the features of S-Quest.
     
    Hamesh81 likes this.
  13. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    I just tried out the demo and this is brilliant stuff! Well done :D

    Here are some demo scene suggestions. I think it would be helpful if the demo showed if the following are possible, this way the full capabilities of the system are shown:
    • Is it possible to keep finishing/repeating the same quest to continue to earn XP? Eg. each time the player completes a race to a specific location within a certain time they receive XP every time, not only once
    • A side quest NPC would be a good example, since at the moment all of the quests must be completed in sequence which is great for main quests, but side quests should be possible at any point during the main game irrespective of which main quests have been completed already
    • When clicking on Freddy the first time, is it possible for the second dialogue to appear automatically? At the moment the player needs to click on Freddy twice for the one set of instructions
    • Is it possible to trigger the quest dialogue popup in ways other than clicking on the NPC? For example pressing an interact button or even having it appear without key press when within a certain distance (useful for gamepad controls)
    • Is it possible to set a facing direction variable, to check if the player must be facing towards the NPC before they can start interacting with them, at the moment you can interact while being back turned
    • Is it possible for a completed quest to trigger a custom event in the world eg. a door opens after a quest is finished
    Hope this helps
     
    Last edited: Dec 5, 2016
    OussamaB likes this.
  14. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    As always, great suggestions! I'll get to work ASAP!
     
    Hamesh81 likes this.
  15. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    The latest S-Quest update is now available on the asset store by the way. More updates will come ASAP.
     
  16. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Just submitted a small update:

    - Improved the objectives bar UI.
    - Quests can now be repeatable.
    - Fixed a bug in the quest log buttons.
     
    Hamesh81 likes this.
  17. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    @OussamaB ,

    Any plans for Playmaker support for this and S-Inventory... ?
     
  18. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Hello. Unfortunately, I can't promise Playmaker support any time soon.
     
  19. jtok4j

    jtok4j

    Joined:
    Dec 6, 2013
    Posts:
    321
    Greetings,
    Nice Asset. Online Documentation/Setup instructions should be updated to reflect this latest version, to get people started and out the gate into their Mission/Quest creation.
    I do have a question. Is it possible to modify or script the "collection" mission type to collect objects by running the character right into them, instead of having to click on them? It's easier to run through the object when playing on a phone, than to click on it, in order to pick it up.
    Thanks and good work on the Asset. :)
     
  20. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Hello,

    The online documentation is a bit updated out-dated and will be updated ASAP.
    Yes it possible to modify the "Collection" script to your needs. Just PM me me your e-mail and invoice number and I will send you the modified version of the script.
     
  21. daviddickball

    daviddickball

    Joined:
    May 26, 2014
    Posts:
    10
    Hello I'm having lots of fun with your asset, which I think is great! To use on my next project though, I would prefer if the quest panel opens by pressing an onscreen button, instead of clicking on the quest-giver. Is that possible? I don't see an option, so I assume it would require custom code. How would I achieve this?
     
  22. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Yeah that is actually possible. When the player is in range of the quest giver, a button should appear allowing the player to click it and show the quest's panel. You can PM me your e-mail and invoice number and I'll send you the modified script to achieve this.
     
  23. daviddickball

    daviddickball

    Joined:
    May 26, 2014
    Posts:
    10
    Thanks very much, I've received your modification and it helps me greatly! I've given a review because I think this was great customer service!

    I do have a slight problem though (or maybe it's a quirk of the system?). If I make changes to an existing quest script, the changes are undone when I hit play (see the GIF). This doesn't seem to be the case when I add a new Quest script.
     

    Attached Files:

  24. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    To fix that you need to hit "Apply" at the top of the inspector menu so that it applies the changes to the prefab. Or you can you simply remove the link between the quest instance in the scene and the prefab to apply changes intermediately. It's pretty annoying, yes, but that's how the custom editor work.
     
  25. daviddickball

    daviddickball

    Joined:
    May 26, 2014
    Posts:
    10
    Oh I see! Fair enough :)

    I'm using both S-Inventory and S-Quest, and I would like a quest to be completed when you go back to the questgiver with a specific amount of one type of items in your inventory, and for those items to then be removed from the inventory.

    I know from your documentation you ay you've given an example script for collection quests, but not for use with S-Inventory. I've tried doing this myself by copying the lines of code below from CollectionItemC into AddItem() in S-Inventory > InventoryManager - but it complains about namespace. Is what I'm attempting possible?

    Code (CSharp):
    1. Quest[] Quests;
    2. Quests = FindObjectsOfType (typeof(Quest)) as Quest[];
    3. //Loop through all the quests.
    4. foreach (Quest i in Quests) { .. }
     
  26. jtok4j

    jtok4j

    Joined:
    Dec 6, 2013
    Posts:
    321
    Just wanting to send a quick "THANK-YOU!" to OussamaB for the great, timely support he's given, and the modified script he provided, which worked fantastically!
    This Asset is a good buy!
     
    OussamaB likes this.
  27. hdav

    hdav

    Joined:
    Aug 4, 2016
    Posts:
    1
    How would I trigger a quest in C# through a dialoug system?
     
  28. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    860
    Hello OussamaB,

    I am interested in you asset but I am working on a Game for Xbox One. I wonder how difficult would be to change the inputs on your system to controller's input.

    Regards,
    Carlos
     
  29. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    It's possible to interact with the quest using the controller's input, yes.
     
  30. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    The S-Quest asset is currently not integrated with the Dialogue system.
     
  31. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    Hi @OussamaB , is it possible for you to upload a version of the asset for Unity 5.6 please. I wanted to update S-Quest recently and cannot download the latest version, only the import button is visible.
     
  32. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    As the asset was submitted with Unity 5.4.3. You should be able to import it in Unity 5.6.
    Is it giving you errors when you do so?
     
  33. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    All working now. Not sure why that was happening :cool:
     
  34. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I just started using this and I've found a major performance flaw in your system. I was getting a frame rate drop of 20 fps when I added the quest components/UI to my scene. I did a quick profiling and found that you are calling a RefreshObjectives() function every single frame, which in turn calls FindObjectsOfType. This will cause the quest system to search the entire scene hierarchy every single frame. Not a good idea. For a quick hack I converted RefreshObjectives in a co-routine and call it in a Start function. And I limit it from doing the FindObjectsOfType only once every second. This is not what the final solution should be, but at least it fixes the performance issue for now. You should reconsider this part of your code and come up with a way to cache objectives in a scene so it doesn't have to find them.
     
  35. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    Hi @OussamaB , I have been using S-Quest and I am really happy with it, but there is one type of quest/condition type which would be really useful. That is a variable value based condition/quest. For example, if the player has an XP value of 40 or greater the quest giver will allow them to start the quest, if they do not the quest giver will not give the quest to them. This could be used for a number of different conditions such as stat values, number of items held etc.

    I'm not sure how difficult this would be to implement, but as a part of the condition, I imagine it working by having a public component variable onto which the script with the variable is dragged onto in the inspector. Then the name of the variable to check for will be entered, and finally the value that the variable needs to meet will be entered. This would allow for a lot of flexibility, but again I'm not sure if this would be straight forward to implement or not.
     
  36. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Sorry for the inconvenience. The asset is a bit outdated in regards to new Unity versions. I have working a lot on the RTS Engine asset as it was recently released and will do my best to keep this one up to date as well.
     
  37. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I'm re-working the code myself, but you should consider making your quest manager a singleton and having the quests register with the quest manager so that there never has to be a case where you are having to find quests in a scene. Avoid any FindObject type calls at runtime at all costs. You may not notice the impact in a small demo scene, but real game scenes contain lots of objects and the performance impact is enormous.
     
    jtok4j likes this.
  38. Dionysos1111

    Dionysos1111

    Joined:
    Feb 14, 2016
    Posts:
    39
    Hi,

    I just start using S-Quest for mobile and everything works fine now only when i build it and play it on the phone the quest-ui and quest-log are outside of the screen instead of left-under.

    How can i fix this?

    Thx
     
  39. jtok4j

    jtok4j

    Joined:
    Dec 6, 2013
    Posts:
    321
    I would second that the performance hits also appear to drop my current project's framerates by 10-15 fps, when testing on Android phones/tablets, experiencing the same thing Magique mentioned.
    Excellent Asset though... I am currently trying to get my project playable again, and would be interested to see the work-around from Magique.
     
  40. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Hello guys, this package has been deprecated.

    I'm re-writing the code from scratch and will be bringing new features to asset (including a built-in node based editor for quests, better custom inspectors, better saving and loading of quest states, performance improvement, built-in mobile support and much more!).
     
  41. greene_tea92

    greene_tea92

    Joined:
    Jun 26, 2017
    Posts:
    22
    Any idea when it should be back on the asset store? I bought this awhile ago and wanted to use it only to find the package no longer available...