• 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

Derxwna Kapsyla

Derxwna "The Badman" Kapsyla
437
Posts
12
Years
  • 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.

    The default ones are working because the value provided for the next quest location is nil; if you set it to a numerical value or a value that isn't nil, when you enter the quest log interface it'll crash with the error I posted above. As it stands, nobody has really posted a fix for the bug.
     
    308
    Posts
    4
    Years
  • Spoiler:


    I worked on the issues with this script in Pokemon Essentials v18.1, to make it compatible. I came up with a solution and I tested it with active Quests. You can find the updated code in the following spoiler section.
    Spoiler:

    The problem was incompatibility with the StageLocation and the new PEv18.1 compiler. Now, it works with something like
    Code:
    StageLocation1 = "nil"
    StageLocation2 = "5"
    but unfortunately it didn't worked with
    Code:
    StageLocation1 ="Route 1"

    UPDATE: I found the reason why
    Code:
    StageLocation1 ="Route 1"
    doesn't work. The reason is the following: Usually, you place a custom script in a new script section above "Main" but below the compiler scripts. Now, in Pokemon Essentials v18.1 there is some compiler code inside the script section called "Main". Hence, the Quest script is activated to early, it is activated before all pbs- and file-data, including the map names are compiled and saved. So, at that time, the quest script still does not know what "Route 1" is.

    To remove that problem, you can do the following:
    1. Remove the first line of code (I mean "pbCompiler") in the script section "Main".
    2. Add a new script section above "Main", call it "Compiling" and copy the code "pbCompiler" into it.
    3. Now you can insert the actual code of this "simple quest System + UI1.0.1" from above in a new script section above "Main" but below "Compiling". Indeed every script from older Pokemon Essentials versions that needs to be placed above "Main" and below "Compiler" need to be placed above "Main" but below "Compiling" now.

    I would be glad if you test it, also with failed and completed quests, and write here if you find any errors.
     
    Last edited:
    232
    Posts
    7
    Years
    • Seen Apr 24, 2024
    Spoiler:


    I worked on the issues with this script in Pokemon Essentials v18.1, to make it compatible. I came up with a solution and I tested it with active Quests. You can find the updated code in the following spoiler section.
    Spoiler:

    The problem was incompatibility with the StageLocation and the new PEv18.1 compiler. Now, it works with something like
    Code:
    StageLocation1 = "nil"
    StageLocation2 = "5"
    but unfortunately it didn't worked with
    Code:
    StageLocation1 ="Route 1"

    UPDATE: I found the reason why
    Code:
    StageLocation1 ="Route 1"
    doesn't work. The reason is the following: Usually, you place a custom script in a new script section above "Main" but below the compiler scripts. Now, in Pokemon Essentials v18.1 there is some compiler code inside the script section called "Main". Hence, the Quest script is activated to early, it is activated before all pbs- and file-data, including the map names are compiled and saved. So, at that time, the quest script still does not know what "Route 1" is.

    To remove that problem, you can do the following:
    1. Remove the first line of code (I mean "pbCompiler") in the script section "Main".
    2. Add a new script section above "Main", call it "Compiling" and copy the code "pbCompiler" into it.
    3. Now you can insert the actual code of this "simple quest System + UI1.0.1" from above in a new script section above "Main" but below "Compiling". Indeed every script from older Pokemon Essentials versions that needs to be placed above "Main" and below "Compiler" need to be placed above "Main" but below "Compiling" now.

    I would be glad if you test it, also with failed and completed quests, and write here if you find any errors.


    would it be possible to support Luka S. J's modular menu? So that you can view a Quests tab in that menu? But in version v18 ...
     
    308
    Posts
    4
    Years
  • would it be possible to support Luka S. J's modular menu? So that you can view a Quests tab in that menu? But in version v18 ...

    There are already posts above that describe how to include the quests inside Luka J.S. Modular Neo Pause Menu. See

    Compatible with Neo Pause menu:
    Spoiler:
    Replace with default neo pause menu script

    and


    These modifications are for Pokemon Essentials v17.2. But you should give it a try for v18.1. As long as Luka's Modular Pause Menu for PEv17.2 still works in PEv18.1, the modifications should also work.
     
    232
    Posts
    7
    Years
    • Seen Apr 24, 2024
    There are already posts above that describe how to include the quests inside Luka J.S. Modular Neo Pause Menu. See



    and



    These modifications are for Pokemon Essentials v17.2. But you should give it a try for v18.1. As long as Luka's Modular Pause Menu for PEv17.2 still works in PEv18.1, the modifications should also work.

    The menu didn't work on v18, could you adapt it? Please...
     
    308
    Posts
    4
    Years
  • The menu didn't work on v18, could you adapt it? Please...

    Follow these steps.
    1.) Install Luka J.S's Modular Pause Menu from Luka. J.S's homepage and follow the instructions carefully there.
    2.) Open the Script Editor and add this code
    Code:
    # Quest Menü
    MenuHandlers.addEntry(:QUESTS,_INTL("Quests"),"menuQuests",proc{|menu|
        scene = QuestScene.new
        screen = QuestScreen.new(scene)
        pbFadeOutIn(99999) { 
          screen.pbStartScreen
      }
    },proc{ return true })
    right above this code snippet
    Code:
    # PokeGear
    in the script section, where you had copied the script of Luka J.S's Modular Pause Menu in step 1.).

    If this didn't worked, then add this code instead
    Spoiler:
     
    Last edited:
    232
    Posts
    7
    Years
    • Seen Apr 24, 2024
    Thanks for the support, remember to specify in the tutorial that the Modular Menu script must be below the Quests Script to work correctly.
     
    308
    Posts
    4
    Years
  • Is money the only reward you can add in this script?

    You can basically set everything as a reward, for example new pokemon, items or even an trainerbattle. You just have to use the right code. If you're not familar with scripting, then you can also skip the reward in the quest pbs and add it in a event on the map instead.
     
    Last edited:

    YashPokeFan123

    #PokeFan
    283
    Posts
    3
    Years
    • Seen Apr 28, 2023
    Spoiler:
    SIMPLE QUEST SYSTEM + UI 1.0.1

    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 90541 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: Remove the first line of code in the script section "Main" (I mean "pbCompiler").
    5. ONLY FOR POKEMON ESSENTIALS 18 AND 18.1: Add a new script section right above "Main", call it "Compiling" and copy the code "pbCompiler" into it.
    6. 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:
    7. If you want to use Luka J.S.'s Modular Pause Menu then follow the instructions in this spoiler section
      Spoiler:
    8. 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.


    In 4 , 5 part of installation I don't understand.
     
    308
    Posts
    4
    Years
  • Spoiler:



    In 4 , 5 part of installation I don't understand.

    Part 4, 5 and 6 in the installation mean that the code of this Simple Quest System script cannot be simply placed as a new script section above "Main" inside the script editor for Pokemon Essentials v18 and v18.1.

    Instead, the code needs to be placed inside the script section Main right below the first line
    Code:
    pbCompiler
    You can do this straight up and you're done. Or (and this is the recommanded way to organize the scripts better) you create 2 new script sections above Main, the first scripts sections contain the line
    Code:
    pbCompiler
    and the second script section, below the first one, contains the actual Simple Quest System script (which you can find in Part 6 of the installation).
    Finally, you should delete the first line
    Code:
    pbCompiler
    in script section "Main" To make sure that there is no code written twice.

    I hope you understand it better.
     
    Last edited:

    YashPokeFan123

    #PokeFan
    283
    Posts
    3
    Years
    • Seen Apr 28, 2023
    It's mean
    )Copy the pbcompiler code of main and delete it then make two new section above main and in first paste pbcompiler code and second the quest system code. Ok
     

    YashPokeFan123

    #PokeFan
    283
    Posts
    3
    Years
    • Seen Apr 28, 2023
    Part 4, 5 and 6 in the installation mean that the code of this Simple Quest System script cannot be simply placed as a new script section above "Main" inside the script editor for Pokemon Essentials v18 and v18.1.

    Instead, the code needs to be placed inside the script section Main right below the first line
    Code:
    pbCompiler
    You can do this straight up and you're done. Or (and this is the recommanded way to organize the scripts better) you create 2 new script sections above Main, the first scripts sections contain the line
    Code:
    pbCompiler
    and the second script section, below the first one, contains the actual Simple Quest System script (which you can find in Part 6 of the installation).
    Finally, you should delete the first line
    Code:
    pbCompiler
    in script section "Main" To make sure that there is no code written twice.

    I hope you understand it better.


    hey i m getting this error when opening pokedex in pause menu
    ---------------------------
    Error
    ---------------------------
    Script '[Quests]' line 1178: NameError occurred.

    uninitialized constant PokemonPauseMenu::DEXDEPENDSONLOCATION

    from 'Quests' line 1178 in `pbStartPokemonMenu'
    from 'Quests' line 1175 in `loop'
    from 'Quests' line 1316 in `pbStartPokemonMenu'
    from 'Scene_Map' line 107 in `call_menu'
    from 'Scene_Map' line 206 in `follow_update'
    from 'Follower_Main' line 1187 in `update'
    from 'Scene_Map' line 229 in `main'
    from 'Scene_Map' line 226 in `loop'
    from 'Scene_Map' line 231 in `main'
    from '' line 1253 in `call'
    from '' line 1253 in `main'
    from 'Main' line 34 in `mainFunctionDebug'
    ---------------------------
    OK
    ---------------------------
     
    308
    Posts
    4
    Years
  • Thank you for reporting the bug. I updated the script for Pokemon Essentials v18.1. This bug is fixed now. You can find the new version of the script in the following spoiler section
    Spoiler:
     

    Derxwna Kapsyla

    Derxwna "The Badman" Kapsyla
    437
    Posts
    12
    Years
  • When opening the quest menu, it doesn't fade in properly like other interfaces do when you open them (example: The Pokedex, the Bag, the Debug Menu). This is an easy enough fix by just adding "pbFadeInAndShow(@sprites) { pbUpdate }" to the end of "def pbStartScene".

    One thing I am curious about; is it possible to delete quests from the Quest UI? Say for example, you have a game where you can play as two different characters, and in that case it wouldn't make sense for one protagonist to share quests with the other protagonist.
     
    Last edited:

    DragonN3xus

    Still looking for the One Piece
    24
    Posts
    4
    Years
  • Due to the necessary edits of the ZUD Plugin in Compiler, the ZUD and Quest UI script are incompatible.
    Here is the errorlog if you try to use both scripts together.
    SIMPLE QUEST SYSTEM + UI 1.0.1
     

    YashPokeFan123

    #PokeFan
    283
    Posts
    3
    Years
    • Seen Apr 28, 2023
    Due to the necessary edits of the ZUD Plugin in Compiler, the ZUD and Quest UI script are incompatible.
    Here is the errorlog if you try to use both scripts together.
    SIMPLE QUEST SYSTEM + UI 1.0.1

    make you sure you put under all zud scripts I do its working
     
    232
    Posts
    7
    Years
    • Seen Apr 24, 2024
    Thank you for reporting the bug. I updated the script for Pokemon Essentials v18.1. This bug is fixed now. You can find the new version of the script in the following spoiler section
    Spoiler:

    This panel is good, but it could improve the question of a transition from one topic to another, everything in this script is solid, it does not have a transition effect. It bothers, does anyone know how to add a modular look?
     
    Back
    Top