• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
Resource icon

Simple Quest System + UI 1.0

Pokémon Essentials Version
v16.2 ➖
This is a fairly comprehensive, yet easy to use system + UI for managing quests in your fangame

Features


  • Support for up to 10 stages per quest
  • Complex rewards
  • Very detailed compiler errors, tells you exactly what you've messed up
  • Doesn't save quest data for player (similar to how other objects are handled in Essentials, non-specific data is stored in a separate data file so that quest info is updated for old saves)
  • Plug and play
  • Won't break old save files by adding this script
  • Easy to edit and create new quests


How to Use


Download .rar file
Add quests.txt to your PBS folder
Add the 'Quest UI' folder to Graphics/Pictures (be sure to include the folder itself, not just the contents)
Add the text from questScript.txt into a new section above the Main but below the Compiler section
And that's all there is to the installation

There's a few methods you will need to know to use the quest system (you will activate/complete/fail quests within your events, only you know in which context to do so)
Code:
Expand Collapse Copy
activateQuest(id)
completeQuest(id)
failQuest(id)
advanceQuestToStage(questID, stageNum)
In all of these, 'id' and 'questID' refer to the ID of the desired quest, which is defined in quests.txt, the file you added to your PBS folder. The name of the quest can also be used in as the 'id' for these methods, since quest names are unique. The 'stageNum' refers to the desired stage number of that quest. Be sure the id you input exists, as there is currently no check against it


Editing the Quest PBS file


There's only 8 types of lines in the PBS that you need to know
  • Name - This is the name of the quest that will be displayed. Names must be unique (two quests cannot share a name)
  • Stage1 - This is the description of the current task of the quests. Each quest can have up to 10 stages (so Stage2, Stage9, etc are also valid). Stages must be listed in order, no skipping numbers.
  • Reward - This is the reward given to the player upon completion. When completion is triggered, it will read the string assigned and evaluate it as code. So if you make your reward "Kernel.pbMessage('Hello')", upon completion it will display a message saying "Hello". This reward is fairly simple, but keep in mind any type of code can be run here, so you can give items, set variables, or pretty much anything else you can code. Note that this code is not tested, so test all your rewards to ensure you didn't make errors. (Pro tip: semi-colons can be used to separate multiple instructions in a single line of code)
  • RewardDescription - A description of the reward, so they player may determine whether or not to pursue
  • QuestDescription - A description of the quest
  • StageLocation1 - Same as with Stage1, there are up to 10 locations supported. This tells the player where to go for the next task. Can either be the desired map name or map id. These are checked upon compile time to ensure the map exists. "nil" can be used if you don't want to specify a map
  • CompleteMessage - The "Result" description displayed in the UI for a completed quest.
  • FailedMessage - The "Result" description displayed in the UI for a failed quest.


What the default UI looks like


971fcad7c9752a6f7759a41082445925.gif
Credits
mej71
Author
mej71
Downloads
1,480
Views
3,597
First release
Last update

Ratings

4.25 star(s) 4 ratings

More resources from mej71

Latest reviews

Useful. Actually Is compatible in v17.2, however:
1. There is a syntax error (you'll be notified when you add it to your game, there's a double close parentheses somewhere)
2. Unless you're an intermediate user, it is not immediately obvious how to add this to the pause menu (which I have managed to do)
3. advanceQuestToStage is no longer working and I cannot see how to fix it. Otherwise quests work as intended
4. If you have NO active quests, the game breaks. so you'll need to restrict its access in the pause menu on the basis of hasAnyQuests? , and never let the player complete all active quests - should always be one ongoing quest.
This is a really good quest system, only thing is: you should explain the How to Use section in more detail, like how do I set up "advanceQuestToStage(questID, stagenum)" <- questID the name of the quest, but what do I write on stagenum? that kind of explanation would be neat!
mej71
mej71
From the 'How to Use' Section
[quote]The 'stageNum' refers to the desired stage number of that quest[/quote]
awsome feature bringing some changes and effects to the game
Good quest system and easy to use though I haven't tested all feature yet it's not giving any error.
Back
Top