• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • Eevee Expo's webhost has been having technical issues since Nov. 20th and you might be unable to connect to our site. Staff are also facing issues connecting, so please send a DM to Cat on-site or through Discord directly for faster service!
Modern Quest System + UI

Resource Modern Quest System + UI 1.1.0

Black24

Pokemon Fellowship in Kanto
Member
Joined
Jul 29, 2022
Posts
70
hello and thanks for the great script.
I have noticed that I cant get the player name when using \PN, I was wondering if I am doing something wrong.
 

ThatWelshOne_

Champion
Member
yes, if that is possible it would be great
I don't think we can specify \PN directly in 004_Quest_Data.rb without it being interpreted literally as text, but there is a way around this because we can overwrite any quest data on the fly. For example, I created a new method for testing this that overwrites the description for Quest1.
Ruby:
Expand Collapse Copy
def overwriteQuestDesc(quest)
  case quest
  when :Quest1
    QuestModule.const_get(quest)[:QuestDescription] = _I("Hello, World! My name is {1}.", $player.name)
  end
end
I put this at the bottom of 001_Quest_Config.rb but it could go anywhere outside of a class/module. Then, when I activate the quest, I do this:
Ruby:
Expand Collapse Copy
activateQuest(:Quest1)
overwriteQuestDesc(:Quest1)
No matter what the original quest description was, the one we see on the UI is "Hello, World! My name is Red." (or whatever the player's name is). It's clunky but I hope it helps.
 

Black24

Pokemon Fellowship in Kanto
Member
Joined
Jul 29, 2022
Posts
70
I don't think we can specify \PN directly in 004_Quest_Data.rb without it being interpreted literally as text, but there is a way around this because we can overwrite any quest data on the fly. For example, I created a new method for testing this that overwrites the description for Quest1.
Ruby:
Expand Collapse Copy
def overwriteQuestDesc(quest)
  case quest
  when :Quest1
    QuestModule.const_get(quest)[:QuestDescription] = _I("Hello, World! My name is {1}.", $player.name)
  end
end
I put this at the bottom of 001_Quest_Config.rb but it could go anywhere outside of a class/module. Then, when I activate the quest, I do this:
Ruby:
Expand Collapse Copy
activateQuest(:Quest1)
overwriteQuestDesc(:Quest1)
No matter what the original quest description was, the one we see on the UI is "Hello, World! My name is Red." (or whatever the player's name is). It's clunky but I hope it helps.
It worked like magic, thanks man😁
 

DerxwnaKapsyla

Overseer of the Abyss
Member
Joined
Apr 24, 2017
Posts
152
With some experimentation, this can be used to make dynamically updating quest descriptions... with some finagling.
I feel like there has to be an easier way to do this, and I haven't tested to see if this has any... unforeseen consequences, but... It does work!
Ruby:
Expand Collapse Copy
def overwriteQuestDesc(quest)
  case quest
  when :Quest3
    if $game_variables[1] == 1
        QuestModule.const_get(quest)[:QuestDescription] = _I("A note attached to Professor Hawthorn's Lab says that he's at the Library assisting with Storytime with the Lorekeepers. I haven't been to one of those in years... I wonder if it's changed any. Let's find out!")
    elsif $game_variables[1] == 2
        QuestModule.const_get(quest)[:QuestDescription] = _I("Now that I've returned to the lab with Professor Hawthorn, I can finally choose my very first Pokémon! This is such an exciting moment, I need to think it over very carefully... When I'm done with that, I should talk to the professor again.")
    end
  end
end
 

Calzard

Rookie
Member
Joined
May 25, 2023
Posts
1
Hey, I don't really know what I'm doing because I have looked over the meta data a lot and still don't know how it works. I put activateQuest(quest) with the colon on Quest with the id. So, can you please explain how this works, or where I put this? Thanks.
 

Nandthesword

Cooltrainer
Member
Joined
Jan 4, 2022
Posts
115
hey man! Was wondering if there's a way to add multiple quests at once without having mutliple new quest messages appear (I'm trying to add like. 13 quests at once lol). There's probably a way to, but I'm pretty unfamiliar with working in scripts so I can't see an obvious way.
 

Sweb

Rookie
Member
Joined
Aug 1, 2023
Posts
1
The quest option doesn't show up in the pause menu, even though I successfully activated a quest (the "New quest discovered" message showed up). Is there anyway using v21 of Essentials could cause some issues?
 

ThatWelshOne_

Champion
Member
hey man! Was wondering if there's a way to add multiple quests at once without having mutliple new quest messages appear (I'm trying to add like. 13 quests at once lol). There's probably a way to, but I'm pretty unfamiliar with working in scripts so I can't see an obvious way.
Sorry, I forgot to reply to you about this! I think we could do this in a somewhat clunky way. Open 002_Quest_Main.rb and find this line:
Ruby:
Expand Collapse Copy
pbMessage(_INTL("\\se[{1}]<ac><c2=#{colorQuest("red")}>New quest discovered!</c2>\nCheck your quest log for more details!</ac>",QUEST_JINGLE))
Change it to something like:
Ruby:
Expand Collapse Copy
pbMessage(_INTL("\\se[{1}]<ac><c2=#{colorQuest("red")}>New quest discovered!</c2>\nCheck your quest log for more details!</ac>",QUEST_JINGLE)) if !$game_switches[123]
This way, the notification only appears when switch 123 is off. You could use a variable instead , if you prefer.
Then, just before you go to activate your 13 quests, turn switch 123 on. I'm not sure if the pbMessage code will work in a script command to display the "new quest" message. Try it and see. Otherwise, you might need to recreate the notification box referring to this Wiki page: https://essentialsdocs.fandom.com/wiki/Messages
Don't forget to turn switch 123 off after you're done.

The quest option doesn't show up in the pause menu, even though I successfully activated a quest (the "New quest discovered" message showed up). Is there anyway using v21 of Essentials could cause some issues?
I haven't included any code in the resource to make the quest option appear in the pause menu. You'll need to add that yourself. Unless v21 has changed this, you can just copy/paste this code into the relevant place in the scripts:
Ruby:
Expand Collapse Copy
MenuHandlers.add(:pause_menu, :quests, {
  "name"      =>  _INTL("Quests"),
  "order"     => 50,
  "condition" => proc { next hasAnyQuests? },
  "effect"    => proc { |menu|
    pbPlayDecisionSE
    pbFadeOutIn {
      scene = QuestList_Scene.new
      screen = QuestList_Screen.new(scene)
      screen.pbStartScreen
      menu.pbRefresh
    }
    next false
  }
})
 

Shadow56bomb

Cooltrainer
Member
Joined
Oct 15, 2022
Posts
220
Default RMXP (Which is what I am using) doesn't give very useful error messages. It says "NameError occurred while running script. Uninitialized constant Interpreter::Quest1"
 
Default RMXP (Which is what I am using) doesn't give very useful error messages. It says "NameError occurred while running script. Uninitialized constant Interpreter::Quest1"
This is still a lot more useful than just "an error message". This says that you put the quest name in as a constant, when it should be a symbol, with the : in front - :Quest1, not just Quest1.

This is actually the same error you got a few months ago.
I get this error when starting a quest now
[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.7]

Script error in event 3 (coords 24,18), map 266 (Dolerite Town)
Exception: NameError
Message: uninitialized constant Interpreter::Quest14

***Full script:
activateQuest(Quest14, "yellow", false)

Backtrace:
(eval):1:in `execute_script'
033:Interpreter:143:in `eval'
033:Interpreter:143:in `execute_script'
034:Interpreter_Commands:1112:in `command_355'
034:Interpreter_Commands:116:in `execute_command'
033:Interpreter:133:in `block in update'
033:Interpreter:90:in `loop'
033:Interpreter:90:in `update'
032:Scene_Map:160:in `block in update'
032:Scene_Map:159:in `loop'

Do I just have to change the name to what the quest's name is?

You need to format it like in this comment. https://eeveeexpo.com/threads/3982/post-49253

I would really recommend brushing up on Ruby syntax, it seems to be tripping you up a lot with this resource.
 

Shadow56bomb

Cooltrainer
Member
Joined
Oct 15, 2022
Posts
220
I forgot that I had tested it once because I hardly ever test my games.

How would I make it so that the quest menu pops up from using an item?
 
Last edited by a moderator:
How would I make it so that the quest menu pops up from using an item?
Hi!
I haven't thought about this too much, but you should be able to adapt the code for something like the Town Map.
Copy the PBS data for Town Map and rename it to Journal, as you say. Then, put this code in Item_Effects:
Ruby:
Expand Collapse Copy
ItemHandlers::UseInField.add(:JOURNAL,proc { |item|
  pbViewQuests
  next 1
})
Make sure you have this bit of code somewhere (I have it at the bottom of 003_Quest_UI.rb - can't remember if I've added this since posting the resource):
Ruby:
Expand Collapse Copy
# Utility method for calling UI
def pbViewQuests
  scene = QuestList_Scene.new
  screen = QuestList_Screen.new(scene)
  screen.pbStartScreen
end
See if that works for you.
 

Shadow56bomb

Cooltrainer
Member
Joined
Oct 15, 2022
Posts
220
I don't think that would work for me; the game I'm currently making doesn't have pbs files because it isn't using essentials.
 
Back
Top