- Pokémon Essentials Version
- v16.2 ➖
This is a fairly comprehensive, yet easy to use system + UI for managing quests in your fangame
Features
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)
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
What the default UI looks like
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:
activateQuest(id)
completeQuest(id)
failQuest(id)
advanceQuestToStage(questID, stageNum)
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
- Credits
- mej71
[quote]The 'stageNum' refers to the desired stage number of that quest[/quote]