• 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

Could someone help me with this error.

I'm on v19.1 and downloaded the correct version of the resource and followed the instructions.
What i think is happening is that for some reason my game doesnt reconize the MenuHandlers command.
The same thing happens with the Encouter List UI resource.

View attachment 13994

View attachment 13995
MenuHandlers aren't a thing in v19.
 

Gardenette

Cooltrainer
Member
Joined
May 30, 2022
Posts
156
Trying to put spaces between the quest titles like so:
1670264013800.png


And currently stuck with this:
1670264075086.png


I cannot for the life of me figure it out. I'm certain I have to change something in this bit of code in UI.rb
Changing the height of rect does nothing seemingly...

UI.rb:
Expand Collapse Copy
def drawItem(index,_count,rect)
    return if index>=self.top_row+self.page_item_max
    #changing the rectangle height doesn't do anything for some reason
    rect = Rect.new(rect.x+16,rect.y,rect.width-16,rect.height)
    #name = $quest_data.getName(@quests[index].id)
    name = $quest_data.getName(@quests[index].id)
    name = "<b>" + "#{name}" + "</b>" if @quests[index].story
    base = self.baseColor
    #shadow = self.shadowColor
    col = @quests[index].color
    #drawFormattedTextEx(self.contents,rect.x,rect.y+4,
      #436,"<c2=#{col}>#{name}</c2>",base,shadow)
    drawFormattedTextEx(self.contents,rect.x,rect.y+4,
      436,"<c2=#{col}>#{name}</c2>",base)
    #pbDrawImagePositions(self.contents,[[sprintf("Graphics/Pictures/QuestUI/new"),rect.width-16,rect.y+2]]) if @quests[index].new
    #this draws the exclamation icon named "new" when there is new activity on an objective
    pbDrawImagePositions(self.contents,[[sprintf("Graphics/Pictures/QuestUI/new"),rect.width-80,rect.y+8]]) if @quests[index].new
  end

  def refresh
    #this is the number of quests that are in the list currently showing
    @item_max = itemCount
    #the width and height of the entire box that displays all the quest names
    dwidth  = self.width-self.borderX
    dheight = self.height-self.borderY
    self.contents = pbDoEnsureBitmap(self.contents,dwidth,dheight)
    self.contents.clear
    for i in 0...@item_max
      next if i<self.top_item || i>self.top_item+self.page_item_max
      drawItem(i,@item_max,itemRect(i))
    end
    drawCursor(self.index,itemRect(self.index)) if itemCount >0
  end
 

ThatWelshOne_

Champion
Member
Trying to put spaces between the quest titles like so:
View attachment 14161

And currently stuck with this:
View attachment 14162

I cannot for the life of me figure it out. I'm certain I have to change something in this bit of code in UI.rb
Changing the height of rect does nothing seemingly...

UI.rb:
Expand Collapse Copy
def drawItem(index,_count,rect)
    return if index>=self.top_row+self.page_item_max
    #changing the rectangle height doesn't do anything for some reason
    rect = Rect.new(rect.x+16,rect.y,rect.width-16,rect.height)
    #name = $quest_data.getName(@quests[index].id)
    name = $quest_data.getName(@quests[index].id)
    name = "<b>" + "#{name}" + "</b>" if @quests[index].story
    base = self.baseColor
    #shadow = self.shadowColor
    col = @quests[index].color
    #drawFormattedTextEx(self.contents,rect.x,rect.y+4,
      #436,"<c2=#{col}>#{name}</c2>",base,shadow)
    drawFormattedTextEx(self.contents,rect.x,rect.y+4,
      436,"<c2=#{col}>#{name}</c2>",base)
    #pbDrawImagePositions(self.contents,[[sprintf("Graphics/Pictures/QuestUI/new"),rect.width-16,rect.y+2]]) if @quests[index].new
    #this draws the exclamation icon named "new" when there is new activity on an objective
    pbDrawImagePositions(self.contents,[[sprintf("Graphics/Pictures/QuestUI/new"),rect.width-80,rect.y+8]]) if @quests[index].new
  end

  def refresh
    #this is the number of quests that are in the list currently showing
    @item_max = itemCount
    #the width and height of the entire box that displays all the quest names
    dwidth  = self.width-self.borderX
    dheight = self.height-self.borderY
    self.contents = pbDoEnsureBitmap(self.contents,dwidth,dheight)
    self.contents.clear
    for i in 0...@item_max
      next if i<self.top_item || i>self.top_item+self.page_item_max
      drawItem(i,@item_max,itemRect(i))
    end
    drawCursor(self.index,itemRect(self.index)) if itemCount >0
  end
The rect object doesn't specifically control the text itself; it's an invisible rectangle that the text is drawn on. Increasing the height just makes the invisible rectangle longer.
I believe the text is controlled by the drawFormattedTextEx line. If you look for def drawFormattedTextEx, you'll see there's a lineheight argument that defaults to 32. You could try increasing that number. For example:
drawFormattedTextEx(self.contents,rect.x,rect.y+4,436,"<c2=#{col}>#{name}</c2>",base,nil,48)
 

Gardenette

Cooltrainer
Member
Joined
May 30, 2022
Posts
156
The rect object doesn't specifically control the text itself; it's an invisible rectangle that the text is drawn on. Increasing the height just makes the invisible rectangle longer. I believe the text is controlled by the drawFormattedTextEx line. If you look for def drawFormattedTextEx, you'll see there's a lineheight argument that defaults to 32. You could try increasing that number. For example: drawFormattedTextEx(self.contents,rect.x,rect.y+4,436,"#{name}",base,nil,48)

Appreciate the response! I tried that as well. Forgot to say that. I put a line height of 64 since the default is 32, but maybe I formatted it wrong. I'll try your example!
 

Gardenette

Cooltrainer
Member
Joined
May 30, 2022
Posts
156
The rect object doesn't specifically control the text itself; it's an invisible rectangle that the text is drawn on. Increasing the height just makes the invisible rectangle longer.
I believe the text is controlled by the drawFormattedTextEx line. If you look for def drawFormattedTextEx, you'll see there's a lineheight argument that defaults to 32. You could try increasing that number. For example:
drawFormattedTextEx(self.contents,rect.x,rect.y+4,436,"<c2=#{col}>#{name}</c2>",base,nil,48)
Unfortunately that didn't change the space between the text :(
At first I thought maybe it just didn't increase much and I didn't notice a difference, but then I exaggerated the line height to 80, and still no change.
 

Semolous

Novice
Member
Joined
Jun 5, 2022
Posts
31
I'm using the v19 version of this script and have come across an error when pasting in UI_PauseMenu. I pasted it at the bottom as instructed, but the error I get is 'Exception `NameError' at 268:UI_PauseMenu:288 - uninitialized constant MenuHandlers
268:UI_PauseMenu:288:in `<main>': uninitialized constant MenuHandlers (NameError)'
 

ThatWelshOne_

Champion
Member
Unfortunately that didn't change the space between the text :(
At first I thought maybe it just didn't increase much and I didn't notice a difference, but then I exaggerated the line height to 80, and still no change.
I'm really not sure then, unfortunately. You could try looking at other uses of Window_DrawableCommand to see if that sheds any light. Or you could use a method other than drawFormattedTextEx to draw the text.

I'm using the v19 version of this script and have come across an error when pasting in UI_PauseMenu. I pasted it at the bottom as instructed, but the error I get is 'Exception `NameError' at 268:UI_PauseMenu:288 - uninitialized constant MenuHandlers
268:UI_PauseMenu:288:in `<main>': uninitialized constant MenuHandlers (NameError)'
You need the v19 instructions! Look in the "Old instructions" spoiler at the bottom of the Overview page.
 

Milow

Rookie
Member
Joined
Dec 15, 2022
Posts
4
Hi! I would like to know if there's any way of showing the Quest name in the New Quest message you get after receiving it.
 

ThatWelshOne_

Champion
Member
Hi! I would like to know if there's any way of showing the Quest name in the New Quest message you get after receiving it.
Hi! In 002_Quest_Main.rb, there are a few lines like this that play when you activate/fail/complete/advance a quest:
pbMessage(_INTL("\\se[{1}]<ac><c2=#{colorQuest("red")}>New quest discovered!</c2>\nCheck your quest log for more details!</ac>",QUEST_JINGLE))
Inside these methods (def activateQuest, def failQuest, def completeQuest and def advanceQuestToStage) I believe you can access the quest name by using $quest_data.getName(quest).

I'm not sure what you want this to look like, but that snippet of code should give you what you need to access the quest name at least.
 

Milow

Rookie
Member
Joined
Dec 15, 2022
Posts
4
Hi! In 002_Quest_Main.rb, there are a few lines like this that play when you activate/fail/complete/advance a quest:
pbMessage(_INTL("\\se[{1}]<ac><c2=#{colorQuest("red")}>New quest discovered!</c2>\nCheck your quest log for more details!</ac>",QUEST_JINGLE))
Inside these methods (def activateQuest, def failQuest, def completeQuest and def advanceQuestToStage) I believe you can access the quest name by using $quest_data.getName(quest).

I'm not sure what you want this to look like, but that snippet of code should give you what you need to access the quest name at least.

Hi! Thanks for the response! What I wanted to do is to add the Quest Name to that lines that play when you call the script, I already edited them the way I wanted to, but I wanted to do something like this example:
Capa 2.png

I tried adding "$quest_data.getName(quest)" this way:
Ruby:
Expand Collapse Copy
pbMessage(_INTL("\\wu\\op\\se[{1}]\\c[1]\\ts[]\\w[]\\b<ac>¡NUEVA MISIÓN! {$quest_data.getName(quest)}</c2>\\cl\\wtnp[30]\n</ac>",QUEST_JINGLE))
But it didn't work.

Sorry if it's a nooby problem!
Thanks!
 

Semolous

Novice
Member
Joined
Jun 5, 2022
Posts
31
I'm really not sure then, unfortunately. You could try looking at other uses of Window_DrawableCommand to see if that sheds any light. Or you could use a method other than drawFormattedTextEx to draw the text.


You need the v19 instructions! Look in the "Old instructions" spoiler at the bottom of the Overview page.
I did that, now I get this error

Exception `NameError' at 000:Settings:1 - undefined local variable or method `u' for nil:NilClass
000:Settings:1:in `<main>': undefined local variable or method `u' for nil:NilClass (NameError)
 

ThatWelshOne_

Champion
Member
Hi! Thanks for the response! What I wanted to do is to add the Quest Name to that lines that play when you call the script, I already edited them the way I wanted to, but I wanted to do something like this example:
View attachment 14398
I tried adding "$quest_data.getName(quest)" this way:
Ruby:
Expand Collapse Copy
pbMessage(_INTL("\\wu\\op\\se[{1}]\\c[1]\\ts[]\\w[]\\b<ac>¡NUEVA MISIÓN! {$quest_data.getName(quest)}</c2>\\cl\\wtnp[30]\n</ac>",QUEST_JINGLE))
But it didn't work.

Sorry if it's a nooby problem!
Thanks!
Try:
Ruby:
Expand Collapse Copy
pbMessage(_INTL("\\wu\\op\\se[{1}]\\c[1]\\ts[]\\w[]\\b<ac>¡NUEVA MISIÓN! {2}</c2>\\cl\\wtnp[30]\n</ac>",QUEST_JINGLE,$quest_data.getName(quest)))

I did that, now I get this error

Exception `NameError' at 000:Settings:1 - undefined local variable or method `u' for nil:NilClass
000:Settings:1:in `<main>': undefined local variable or method `u' for nil:NilClass (NameError)
This is an unrelated error to this plugin. It looks like you added a random letter 'u' to the top of your Settings script or something.
 

Milow

Rookie
Member
Joined
Dec 15, 2022
Posts
4
Try:
Ruby:
Expand Collapse Copy
pbMessage(_INTL("\\wu\\op\\se[{1}]\\c[1]\\ts[]\\w[]\\b<ac>¡NUEVA MISIÓN! {2}</c2>\\cl\\wtnp[30]\n</ac>",QUEST_JINGLE,$quest_data.getName(quest)))


This is an unrelated error to this plugin. It looks like you added a random letter 'u' to the top of your Settings script or something.
Hi! It did work!
Thank you so much!
 

Gardenette

Cooltrainer
Member
Joined
May 30, 2022
Posts
156
I'm really not sure then, unfortunately. You could try looking at other uses of Window_DrawableCommand to see if that sheds any light. Or you could use a method other than drawFormattedTextEx to draw the text.


You need the v19 instructions! Look in the "Old instructions" spoiler at the bottom of the Overview page.
I think it might be this bit here, specifically the itemRect:

for i in 0...@item_max
next if i<self.top_item || i>self.top_item+self.page_item_max
drawItem(i,@item_max,itemRect(i))
end

But I can't figure it out. I'll keep messing with it, but if you have any ideas, let me know.
 

Semolous

Novice
Member
Joined
Jun 5, 2022
Posts
31
I get this error when trying to activate a quest. I copied activateQuest(quest) and changed (quest) to (1). Did I do it right?
 

Attachments

  • problem2.png
    problem2.png
    488.6 KB · Views: 91

ThatWelshOne_

Champion
Member
I get this error when trying to activate a quest. I copied activateQuest(quest) and changed (quest) to (1). Did I do it right?
Not quite. In your 004_Quest_Data.rb file, you should have something like this:
Ruby:
Expand Collapse Copy
Quest1 = {
STUFF
}
The thing you need to provide to activateQuest is the Quest1 bit with a colon in front. For example, activateQuest(:Quest1). Does that make sense?
 

Semolous

Novice
Member
Joined
Jun 5, 2022
Posts
31
Not quite. In your 004_Quest_Data.rb file, you should have something like this:
Ruby:
Expand Collapse Copy
Quest1 = {
STUFF
}
The thing you need to provide to activateQuest is the Quest1 bit with a colon in front. For example, activateQuest(:Quest1). Does that make sense?
It does. Thank you! How do I define rewards?
 
Back
Top