- Pokémon Essentials Version
- v16.2 ➖
As you can probably tell by the title, I've made an easy-to-use - in my opinion - Questing Interface for Essentials. I tried to make it as user-friendly as possible in terms of creating quests, but you'll have to go into the scripts for that as the event page likes to break lines. I know you can work around this, but I thought doing it in the code would be better in the first place.
First of all, these download graphics and put them in Graphics/Pictures.
On to the scripting part: Two new functions for drawing text I didn't think came with Stock Essentials. These should go anywhere in the "DrawText" script. Click here for the script.
Now for the main script, you want to paste this whole script ABOVE THE PSCREEN SCRIPTS, NOT ABOVE MAIN!
Click here for the main script.
Last, I've set up a tutorial map on how to use this script. You can also have this interface accessible via the Pokegear if you want. Note: This is an interface script, not a system. This means the script doesn't complete the quest for you, but you can set them to completed with "pbSetQuest(id, true/false)" in an event or another script. Here is the actual map.
On to the scripting part: Two new functions for drawing text I didn't think came with Stock Essentials. These should go anywhere in the "DrawText" script. Click here for the script.
Now for the main script, you want to paste this whole script ABOVE THE PSCREEN SCRIPTS, NOT ABOVE MAIN!
Click here for the main script.
Last, I've set up a tutorial map on how to use this script. You can also have this interface accessible via the Pokegear if you want. Note: This is an interface script, not a system. This means the script doesn't complete the quest for you, but you can set them to completed with "pbSetQuest(id, true/false)" in an event or another script. Here is the actual map.
This script contains a bunch of handy things as you might see, that will make it very easy to check/change a quest. I'll explain those here.
- pbColor. This is a method that returns a color based on the parameter passed in (color). You can mix your own colors at this website. I use this myself too.
- QUESTS, line 71. This is where you create your quests. I chose to do this in the scripts because events break lines, which looks horrible in the description for the quest. You create a quest as follows:
A more detailed explanation of this is at the top of the script.
- pbCompletedQuest?(id). You have to be able to check if a quest is completed or not. This method does that. If you want to test quest id 0 for if it's completed, you would do
This returns true if it's completed and false if it's not. If the quest doesn't exist or isn't yet given to the player, it will return false as well.
- pbAddQuest(id). This is a method that adds every quest with the id you give it. This is why you should never use duplicate IDs.
- pbDeleteQuest(id). This deletes every quest (from ongoing AND/OR completed) with the id you give it.
- pbSetQuest(id, completed). This sets every quest with the id you gave it to "true" or "false". completed should be true if you want it to be set to completed.
if you want it to be set to completed.
- pbSetQuestName(id, name). Sets every quest with the id you give it the name you give it.
- pbSetQuestDesc(id, desc). Almost same story as above.
- pbSetQuestNPC(id, npc). Almost same story as above.
- pbSetQuestNPCSprite(id, sprite). Almost same story as above.
- pbSetQuestLocation(id, location). Almost same story as above.
- pbSetQuestColor(id, color). Sets every quest with the id you give it to the color you give it. The color should be a Symbol (these start with ':'). If the color exists in "def pbColor", it will be set to that. If it doesn't, it'll be white. An example of this is:
- pbQuestlog. The actual method for starting a quest log screen. You can put this anywhere you want: in the pokegear, in the overworld, on an item, etc.
- pbColor. This is a method that returns a color based on the parameter passed in (color). You can mix your own colors at this website. I use this myself too.
- QUESTS, line 71. This is where you create your quests. I chose to do this in the scripts because events break lines, which looks horrible in the description for the quest. You create a quest as follows:
Code:
Quest.new(id, name, description, npc, sprite, location, color, time, completed),
- pbCompletedQuest?(id). You have to be able to check if a quest is completed or not. This method does that. If you want to test quest id 0 for if it's completed, you would do
Code:
pbCompletedQuest?(0)
- pbAddQuest(id). This is a method that adds every quest with the id you give it. This is why you should never use duplicate IDs.
- pbDeleteQuest(id). This deletes every quest (from ongoing AND/OR completed) with the id you give it.
- pbSetQuest(id, completed). This sets every quest with the id you gave it to "true" or "false". completed should be true if you want it to be set to completed.
if you want it to be set to completed.
- pbSetQuestName(id, name). Sets every quest with the id you give it the name you give it.
- pbSetQuestDesc(id, desc). Almost same story as above.
- pbSetQuestNPC(id, npc). Almost same story as above.
- pbSetQuestNPCSprite(id, sprite). Almost same story as above.
- pbSetQuestLocation(id, location). Almost same story as above.
- pbSetQuestColor(id, color). Sets every quest with the id you give it to the color you give it. The color should be a Symbol (these start with ':'). If the color exists in "def pbColor", it will be set to that. If it doesn't, it'll be white. An example of this is:
Code:
pbSetQuestColor(0, :GREEN)
- pbQuestlog. The actual method for starting a quest log screen. You can put this anywhere you want: in the pokegear, in the overworld, on an item, etc.
For the Pokégear, you'll have to start off by creating a command for the questlog. This is done by putting this line:
@cmdQueslog=-1
along with the other @cmd's. Right underneath, you will have to give it a name. Do this by pasting this:
commands[@cmdQuestlog=commands.length]=_INTL("Questlog")
underneath. Questlog is the name of this command. The graphic for this button will go in Graphics/Pictures/pokegearQuestlog.
In the update_command method, add this somewhere:
To make this work with Luka's Modular Pause Menu, you can simply use this template:
The graphic will be the Save menu's graphic. Change this by changing the "menuSave" into whatever icon in Graphics/Icons.
@cmdQueslog=-1
along with the other @cmd's. Right underneath, you will have to give it a name. Do this by pasting this:
commands[@cmdQuestlog=commands.length]=_INTL("Questlog")
underneath. Questlog is the name of this command. The graphic for this button will go in Graphics/Pictures/pokegearQuestlog.
In the update_command method, add this somewhere:
Code:
if @cmdQuestlog>=0 && @sprites["command_window"].index==@cmdQuestlog
pbQuestlog
end
To make this work with Luka's Modular Pause Menu, you can simply use this template:
Code:
MenuHandlers.addEntry(:QUESTLOG,"Quest Log","menuSave",proc{|menu|
pbQuestlog
},proc{ return true })
- Credits
- Marin