• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

SIMPLE QUEST SYSTEM + UI 1.0.1

308
Posts
4
Years
  • SIMPLE QUEST SYSTEM + UI 1.0.1

    Use https://www.pokecommunity.com/showthread.php?p=10371854#post10371854 for Pokemon Essentials V19

    Now, it is UPDATED FOR POKEMON ESSENTIALS 17.2 and 18.1. There are some bug fixes and I included the integration to pause menu.

    for managing quests in your fangame. This script is based on SIMPLE QUEST SYSTEM + UI 1.0 by mej 71, which was a fairly comprehensive, yet easy to use system + UI

    Features, Installation and How to Use is as in the original version SIMPLE QUEST SYSTEM + UI 1.0. So I just cite mej 71:

    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

    Installation
    1. Download View attachment quests.zip and unzip.
    2. Add quests.txt to your PBS folder.
      Spoiler:

    3. Add the 'Quest UI' folder to Graphics/Pictures (be sure to include the folder itself, not just the contents)
    4. ONLY FOR POKEMON ESSENTIALS 18 AND 18.1: Create a new script section (denoted by "Compiling") right above "Main". Then cut and paste the first line "pbCompiler" from the script section "Main" into "Complining".
    5. Add the following code into a new script section (called "Quest UI") above "Main" but below "Compiler" for Pokemon Essentials v17.2 or "Compiling" for Pokemon Essentials v18/18.1 respectively.
      FOR POKEMON ESSENTIALS 17.2
      Spoiler:

      FOR POKEMON ESSENTIALS V18.1
      Spoiler:
    6. If you want to use Luka J.S.'s Modular Pause Menu then follow the instructions in this spoiler section
      Spoiler:
    7. And that's all there is to the installation. You can start modifying the quests.txt and your fan game for your preferences.

    How to Use
    Start of a new game is not required,
    should integrate into old saves files

    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

    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.
     
    Last edited:

    #Not Important

    All hail the wishmaker
    910
    Posts
    4
    Years
  • Compatible with Neo Pause menu:
    Spoiler:
    Replace with default neo pause menu script
     

    NoNoNever

    Creator from Pokemon Illuison, Pokemon Arcadia, Po
    89
    Posts
    5
    Years
  • Found a little bug game crashing with NoMethodeerror after closing the Quest Ui (after adding Neo Pause Menu fix)

    Fix: Search in the new Neo PauseMenu (for v17.x) Script for MenuHandlers.addEntry(:QUESTS,_INTL("Quests"),"menuQuests",proc{|menu|

    and replace

    MenuHandlers.addEntry(:QUESTS,_INTL("Quests"),"menuQuests",proc{|menu|
    pbFadeOutIn(99999){
    scene = QuestScene.new
    screen = QuestScreen.new(scene)
    screen.pbStartScreen
    @scene.pbRefresh
    }
    },proc{ return true })

    with

    # Quest Menu
    MenuHandlers.addEntry(:QUESTS,_INTL("Quests"),"menuQuests",proc{|menu|
    scene = QuestScene.new
    screen = QuestScreen.new(scene)
    pbFadeOutIn(99999) {
    screen.pbStartScreen
    }
    },proc{ return true })
     

    #Not Important

    All hail the wishmaker
    910
    Posts
    4
    Years
  • Found a little bug game crashing with NoMethodeerror after closing the Quest Ui (after adding Neo Pause Menu fix)

    Fix: Search in the new Neo PauseMenu (for v17.x) Script for MenuHandlers.addEntry(:QUESTS,_INTL("Quests"),"menuQuests",proc{|menu|

    and replace

    MenuHandlers.addEntry(:QUESTS,_INTL("Quests"),"menuQuests",proc{|menu|
    pbFadeOutIn(99999){
    scene = QuestScene.new
    screen = QuestScreen.new(scene)
    screen.pbStartScreen
    @scene.pbRefresh
    }
    },proc{ return true })

    with

    # Quest Menu
    MenuHandlers.addEntry(:QUESTS,_INTL("Quests"),"menuQuests",proc{|menu|
    scene = QuestScene.new
    screen = QuestScreen.new(scene)
    pbFadeOutIn(99999) {
    screen.pbStartScreen
    }
    },proc{ return true })

    Thanks , fixed
     
    4
    Posts
    4
    Years
    • Seen Dec 27, 2020
    For me its just giving an error the instant I try and access the pause menu, with both fixes above put into the neo pause menu. It gives this error below:
    Spoiler:

    Im gonna try and figure out whats causing this, but if anyone off the bat knows lmk. If I find the fix, ill edit this post
     
    6
    Posts
    5
    Years
    • Seen Oct 28, 2022
    Hey, I recently update my project to Essentials V.18.1, and the quest script has broken.

    Gives me a Syntax Error at line 631.
    Which reads: QUEST_GRAPHICS_PATH = "Graphics/Pictures/Quest UI/"

    Which is weird, cause it only defines the path.

    Was hoping you could shine a light on the situation, as I can' t seem to solve it myself.
     
    308
    Posts
    4
    Years
  • Hey, I recently update my project to Essentials V.18.1, and the quest script has broken.

    Gives me a Syntax Error at line 631.
    Which reads: QUEST_GRAPHICS_PATH = "Graphics/Pictures/Quest UI/"

    Which is weird, cause it only defines the path.

    Was hoping you could shine a light on the situation, as I can' t seem to solve it myself.

    I tested it myself, but there was no syntax error. Maybe you should remove the script and copy the code and original script pbs from above again.
     
    295
    Posts
    6
    Years
    • Seen Aug 15, 2022
    Hey, I recently update my project to Essentials V.18.1, and the quest script has broken.

    Gives me a Syntax Error at line 631.
    Which reads: QUEST_GRAPHICS_PATH = "Graphics/Pictures/Quest UI/"

    Which is weird, cause it only defines the path.

    Was hoping you could shine a light on the situation, as I can' t seem to solve it myself.

    maybe, you missed the graphics, you don't put them in this folder.
     
    6
    Posts
    5
    Years
    • Seen Oct 28, 2022
    I tested it myself, but there was no syntax error. Maybe you should remove the script and copy the code and original script pbs from above again.

    Hey I seem to have fixed it, but with a slightly different approach.

    I initially copied the script from quests.zip, which gave me the syntax error, so I thought, hell, perhaps if I copy it from the thread under "the script", it might function differently. And well, it did. It now fuctions as before. Many thanks.
     
    308
    Posts
    4
    Years
  • Hey I seem to have fixed it, but with a slightly different approach.

    I initially copied the script from quests.zip, which gave me the syntax error, so I thought, hell, perhaps if I copy it from the thread under "the script", it might function differently. And well, it did. It now fuctions as before. Many thanks.

    Thank you for letting me know that the code in questScript.txt contains an error. I updated the main post, so that new users will also know your remark.
     
    1
    Posts
    3
    Years
    • Seen Nov 22, 2020
    I am getting this error whenever I try and open the quest menu after accepting a quest. Does any of you know how to solve it??

    ---------------------------
    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
    ---------------------------
     
    308
    Posts
    4
    Years
  • I am getting this error whenever I try and open the quest menu after accepting a quest. Does any of you know how to solve it??
    Spoiler:

    Unfortunately, I can not reproduce your error message. We need more informations to help you. What Pokemon Essentials Version do you use? And did you copied the latest version of this script from the spoiler section in the instructions above?

    Have you changed the quests pbs file? What happens if you use the original quests pbs file, which you can download above?

    What Quests are active while testing? Please make also sure that you did not activate a quest with an id that does not exist.
    Have you tried to view the quest with "pbViewQuests" while there are no quests active? What happens then? It should show the message "You haven't discovered any quests yet".

    I personally would guess that you activated a quest with an quest id, where there is no entry in quest.txt for.
     
    1
    Posts
    3
    Years
    • Seen Nov 19, 2022
    Hi, thanks a lot for this script.
    I have the exact same error as the previous person. I'm using Essentials 18.1, with the latest version of this script.

    This is my quests pbs file:
    Spoiler:


    I trigger an event in game that starts the quest, then I open the quest log and this error shows up:
    Spoiler:


    The quest log has just opened when the error happens, and I can see my quest in it.
    Using pbViewQuests() without any active quest gives me the correct message that I don't have any quest yet.

    I hope it's not just incompatibility between the script and 18.1 :<

    Thanks in advance

    Edit1: I've completed the quest then opened the log, it works fine. I have it in the completed quests section, with all its infos displayed. The issue seems to be with active quests..?

    Edit2: it's because of the StageLocation. I changed them to "nil" and it works fine. I can't get them to work with either the ID or the name of the map, I get various errors.
    So far it doesn't work with StageLocation1=33, StageLocation1="33", StageLocation1=Valley, StageLocation1="Valley".

    Edit3: OK, I've made a good step forward by making the quest advance to stage 1 right after being activated. I assumed it would begin at stage 1 by default, but it doesn't seem to be the case. Now the last thing I'm struggling with is locations: "nil" is valid, but StageLocation1="Valley" is incorrect and StageLocation1=33 gives me the "no implicit conversion from nil to integer" error again. I don't really know what to do, is my "Valley" not defined properly despite being an existing map of my game?
     
    Last edited:

    Derxwna Kapsyla

    Derxwna "The Badman" Kapsyla
    437
    Posts
    12
    Years
  • I can confirm that v18.1 is bugged on my end as well. I can't seem to figure out what the bug is myself, but I'm getting the same error as the above.
    TCaAN5r.png

    The only thing that works is setting the "StageLocation1=" value to "nil". I've tried various numerical values (including numbers both present and not present in my game as maps) and map names (eg. Pallet Town, New Bark Town, Coolsville, etc), but none of it worked.
     
    308
    Posts
    4
    Years
  • I can confirm that v18.1 is bugged on my end as well. I can't seem to figure out what the bug is myself, but I'm getting the same error as the above.
    TCaAN5r.png

    The only thing that works is setting the "StageLocation1=" value to "nil". I've tried various numerical values (including numbers both present and not present in my game as maps) and map names (eg. Pallet Town, New Bark Town, Coolsville, etc), but none of it worked.

    Is it possible for this to work in Essentials V18.1?

    Hi, thanks a lot for this script.
    I have the exact same error as the previous person. I'm using Essentials 18.1, with the latest version of this script.

    This is my quests pbs file:
    Spoiler:


    I trigger an event in game that starts the quest, then I open the quest log and this error shows up:
    Spoiler:


    The quest log has just opened when the error happens, and I can see my quest in it.
    Using pbViewQuests() without any active quest gives me the correct message that I don't have any quest yet.

    I hope it's not just incompatibility between the script and 18.1 :<

    Thanks in advance

    Edit1: I've completed the quest then opened the log, it works fine. I have it in the completed quests section, with all its infos displayed. The issue seems to be with active quests..?

    Edit2: it's because of the StageLocation. I changed them to "nil" and it works fine. I can't get them to work with either the ID or the name of the map, I get various errors.
    So far it doesn't work with StageLocation1=33, StageLocation1="33", StageLocation1=Valley, StageLocation1="Valley".

    Edit3: OK, I've made a good step forward by making the quest advance to stage 1 right after being activated. I assumed it would begin at stage 1 by default, but it doesn't seem to be the case. Now the last thing I'm struggling with is locations: "nil" is valid, but StageLocation1="Valley" is incorrect and StageLocation1=33 gives me the "no implicit conversion from nil to integer" error again. I don't really know what to do, is my "Valley" not defined properly despite being an existing map of my game?

    I am getting this error whenever I try and open the quest menu after accepting a quest. Does any of you know how to solve it??

    Hey I seem to have fixed it, but with a slightly different approach.

    I initially copied the script from quests.zip, which gave me the syntax error, so I thought, hell, perhaps if I copy it from the thread under "the script", it might function differently. And well, it did. It now fuctions as before. Many thanks.

    maybe, you missed the graphics, you don't put them in this folder.

    XVR is also working on the Simple Quest System. He wants to update it for Pokemon Essentials v18.1. So, I would say, you can contact him to work together, he also needs help.

    His Pokecommunity profile is XVR, see https://www.pokecommunity.com/member.php?u=868386
    He is also on the pokecommunity discord channel. Unfortunately, I don't know his discord account. But I maybe his name is also XVR.
     

    danimalm

    Guest
    0
    Posts
    I haven't tested things extensively yet, but I'm happy to look into the issues people are having in v18.1. So far I've followed the instructions at the top (albeit I had to make a small change on line 1174 of the script from 'DEXDEPENDSONLOCATION' to 'USE_CURRENT_REGION_DEX') and it seems to be working fine. I can get the Quests option onto my menu and I can activate the basic quests defined in the quests.txt without a problem, so happy to play around with this more as my game develops and see if I can help others down the line.
     
    Back
    Top