Male
Omnipresence
Seen 14 Hours Ago
Posted 4 Weeks Ago
1,222 posts
6.7 Years

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
  1. Download .rar file
  2. Add quests.txt to your PBS folder
  3. Add the 'Quest UI' folder to Graphics/Pictures (be sure to include the folder itself, not just the contents)
  4. Add the text from questScript.txt into a new section above the Main but below the Compiler section
  5. 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)
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

To open the quest menu, use the script
pbViewQuests

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



FAQ
  • Can you use '\b', images, or other text formatting?: No, these are currently not supported
  • More questions will appear as they are asked

Marin

Age 18
Male
Seen 1 Week Ago
Posted 4 Weeks Ago
959 posts
4 Years
Looks very interesting! I especially like the "next stage" feature.

JustKenneth

Developer Pokemon The Kingdom of Meralas

Male
Belgium
Seen June 21st, 2017
Posted June 14th, 2017
8 posts
11.2 Years
this looks a lot like Mobius' Quest Journal (maker).
I tried to implement something like this in Essentials some time ago.
I added this to the start menu:
http://provenk.deviantart.com/art/Pausemenu-620214364
http://provenk.deviantart.com/art/Quest-log-620214370

it was quite buggy and not as complete as yours though.

nice work!
"And as the sails arrived, the forest vanished and the city fell. Meralas is king now."
- Xhicco - Pokemon: The Kingdom of Meralas
Male
Omnipresence
Seen 14 Hours Ago
Posted 4 Weeks Ago
1,222 posts
6.7 Years
this looks a lot like Mobius' Quest Journal (maker).
I tried to implement something like this in Essentials some time ago.
I added this to the start menu:
http://provenk.deviantart.com/art/Pausemenu-620214364
http://provenk.deviantart.com/art/Quest-log-620214370

it was quite buggy and not as complete as yours though.

nice work!
I originally did a small edit of that script for Essentials, it's in this section somewhere. This script was from scratch, but I kept a similar format of the text files, and tried to make it more complete and easy to use.
Seen March 30th, 2018
Posted March 28th, 2018
15 posts
3.8 Years
Thanks for this! I really wanted to use this but I keep getting this error after installing it. I really wanted to check it out and I followed all the directions but this error keeps popping up. I hope you are still willing to help on this thread.

Script 'mej71 Quest System' line 402: RuntimeError
occured.

Invalid map id for quest , at stage 0

Thats all it gave me, I can screenshot if necessary, however. Hope you can help. Thanks.

Marin

Age 18
Male
Seen 1 Week Ago
Posted 4 Weeks Ago
959 posts
4 Years
Attachment 82398

How come it tells me that?
Do you have any quests?

dgeneratio

Dgeneratio

Age 32
Male
Seen November 22nd, 2017
Posted July 8th, 2017
4 posts
8.2 Years
Hi Mej, where do these lines of code go? Sorry i'm new to Scripting so don't want to do an error.

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:
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

To open the quest menu, use the script
Code:
pbViewQuests

Cheers :)
Female
Seen 5 Days Ago
Posted June 14th, 2020
226 posts
5.2 Years
Thank you for this! It works just fine. Some small remarks:

1. I believe there is a small mistake in the script at line 523 that will prevent you from running the game (just remove a parenthesis):

def getMaxStagesForQuest(questID))

2. I had a "Invalid map id for quest" error message on first launch and fixed it by clearing the quests.txt file;

3. There are two different "quest_bg" files in the graphics package, you may want to replace the first one (in Quest UI folder) by the second one (which is in Quest UI\Quest UI)
Male
Seen September 8th, 2018
Posted December 30th, 2017
9 posts
5.2 Years
---------------------------
Pokemon Essentials
---------------------------
Exception: RuntimeError

Message: Script error within event 3, map 33 (M's House):

Exception: TypeError

Message: Section041:559:in `[]'no implicit conversion from nil to integer

***Full script:

pbViewQuests


Interpreter:243:in `pbExecuteScript'

Intl_Messages:559:in `get'

Intl_Messages:670:in `get'

Intl_Messages:707:in `pbGetMessage'

Quests:792:in `pbDrawQuestInfo'

Quests:751:in `each'

Quests:751:in `pbDrawQuestInfo'

Quests:735:in `pbDrawQuestsList'

Quests:681:in `pbDrawSections'

Quests:625:in `pbStartScene'



Interpreter:276:in `pbExecuteScript'

Interpreter:1606:in `command_355'

Interpreter:494:in `execute_command'

Interpreter:193:in `update'

Interpreter:106:in `loop'

Interpreter:198:in `update'

Scene_Map:103:in `follow_update'

Scene_Map:101:in `loop'

Scene_Map:114:in `follow_update'

PokemonFollowing:1551:in `update'



This exception was logged in

C:\Users\Michael\Saved Games/Pokemon Essentials/errorlog.txt.

Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK
---------------------------

I am getting this error when ever I try and open the quest menu after accepting a quest.
Seen 2 Days Ago
Posted September 27th, 2020
151 posts
3.3 Years
And, the quest is just go to a map and nothing else? How can I put a quest where we have to go to a map, and pick an Hidden Object in a certain time and if you can't pick the object you just fail the mission?
Male
Omnipresence
Seen 14 Hours Ago
Posted 4 Weeks Ago
1,222 posts
6.7 Years
And, the quest is just go to a map and nothing else? How can I put a quest where we have to go to a map, and pick an Hidden Object in a certain time and if you can't pick the object you just fail the mission?
No quest objectives get completed automatically, you add the completion of quest stages programmatically in your events or in the code. So in the event where you have the hidden object, just use a conditional branch.
Can I add something catch a pokemon in the quests?
You'd need to add a check in the code that triggers after battle. I'm pretty sure there are a few examples already in Essentials
Seen February 4th, 2018
Posted January 14th, 2018
2 posts
4.4 Years
I have a problem. I can not select the quest section, that is, I can not see completed or failed missions. Help me please!

Edit: In the version of Essentials 17.2 the commands X, Y and Z were deactivated, that is, the keys A, S and D. (PSystem_Controls, lines 91, 92 and 93).
I solved it by replacing the following Quest script commands
line 823 approximately ---> (Input :: X) by (Input :: LEFT)
and Line 838 -----> (Input :: Y) by (Input :: RIGHT)

I hope it helps someone else this correction :)

Bowlstir

Media Arts and Game Development

Male
USA
Seen 2 Days Ago
Posted 2 Weeks Ago
201 posts
12.6 Years
This is great!

Could anyone help me work this into the default menu? Like under a new menu option "Quests?"
I'd like help with this too. Right now I'm just using a button input to bring up the script, but i forgot how to add another option to the pause menu.

Side note: This mod does not work with v13. I'm running Essentials GS on that version and I get a quests screen with unaligned text and graphics.