Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

RMXP Quest Menu

I've been looking for a quest menu that is compatible with the Ring Menu. Basically I want an option, "Quests" to appear in the Menu, and when you select it, a window pops up. Here's a scenario:

I have talked to the guard and gained knowledge on a quest where he wants me to go kill a goblin. When I accept the quest, "Goblin Hunting" will appear in the quest menu, and next to it, it'll say "Active". Once I kill the goblin and take his weapon (proof of killing) back to the Guard, he will reward me and the quest on the menu will then change from "Active" to "Complete!". I also want a description to appear for the quest, telling you what to do and where to go.

http://i125.photobucket.com/albums/p76/ ... illing.jpg[/img]

That's basically what I want, if possible I want the background to be transparent so you can see the map in the background.

If anyone can do this for me, it would be great! Credit will be given, of course! :)
 
You want to use the arrow keys to cycle through all of the active & completed quests?
Do you want to show active quests first, then completed quests?  Or just show them in the order they are defined?

Did you take a look at Jaberwocky's quest system? It's similar, but has a list of the quests on the left, and description & objectives for the selected quest on the right.

Be Well
 
I think it'd be more efficient if it was just the order they were defined, please. And yes, I want to use the down and up arrows to search through the quests. Jaberwocky's system isn't exactly what I'm looking for, though.
 
Try this one out

Code:
#==============================================================================
# ** Journal
#------------------------------------------------------------------------------
#  This window displays a journal.
#==============================================================================

class Window_Journal < Window_Base
# ------------------------

attr_accessor :index
attr_accessor :quest_size

def initialize
  
   # Offset - enter the offset to the first variable you are using
   # This is one less than the variable number.
   
   @offset = 0
   
   # populate your journal with entries. Each entry must match its variable number!
   @quest = []
   @description = []
   @quest[0] = "Quest Log"
   @description[0] = "You have no active or completed quests"
   @quest[1] = "Help Man"
   @description[1] = "Help out the man."
   @quest[2] = "Kill Chicken"
   @description[2] = "Kill a chicken & return it to Helga."
   @quest[3] = "Make cow eat"
   @description[3] = "Find an emaciated cow & feed it."
   @quest[4] = "Sniff the Glove"
   @description[4] = "Bark like a dog."
   @quest[5] = "Jump off a bridge after your friends"
   @description[5] = "Just to show long text: Funny story reverting back to \
                      childhood cliche, and a camping trip with my friends. \
                      Did they jump off a bridge? Yes, they did. Did I follow \
                      them? Of course I did!"
   
   super(0, 32, 460, 330) 
   @index = 0 
   @quest_size = @quest.size
   # draw the bitmap. the text will appear on this bitmap
   self.contents = Bitmap.new(width - 32, height - 32)
   refresh
### to change the windowskin for the journal
#   self.windowskin = RPG::Cache.windowskin("RMXP4life_Wood.png")
###
 end


#--------------------------------------------------------------------------
# * Draw the contents of the item window
#--------------------------------------------------------------------------
  def refresh
   
    self.contents.clear

    for i in @index..@quest.size - 1
      if $game_variables[i + @offset] > 0
        self.contents.draw_text(4, 0, 300, 32, @quest[i])
        if $game_variables[i + @offset] == 1
          self.contents.font.color = Color.new(255,0,0,255)
          self.contents.draw_text(304, 0, 120, 32, "Active", 2)
        else
          self.contents.font.color = Color.new(0,255,0,255)
          self.contents.draw_text(304, 0, 120, 32, "Complete", 2)
        end
        self.contents.font.color = normal_color
        # draw paragraph
        self.contents.draw_wrap_text(4, 64, 428, 32, @description[i])
        @index = i
        break
      end
    end  
    if @index == 0
      self.contents.draw_text(4, 0, 300, 32, @quest[0])
      self.contents.draw_wrap_text(4, 64, 428, 32, @description[0])
    end
  end
end

#==============================================================================
# ** Bitmap Class Add-ons from MACL 2.1
# NOTE: If you have the MACL, don't delete this.
# Make sure this is below the MACL
#------------------------------------------------------------------------------
class Bitmap
  #--------------------------------------------------------------------------
  # * Dummy Bitmap  
  #--------------------------------------------------------------------------
  @@dummy = Bitmap.new(32, 32)
  attr_accessor :dummy
  #--------------------------------------------------------------------------
  #   Name      : Text Size
  #   Info      : Gets text size based off dummy bitmap
  #   Author    : SephirothSpawn
  #   Call Info : One Argument, a String
  #--------------------------------------------------------------------------
  def Bitmap.text_size(text)
    return @@dummy.text_size(text)
  end
  #-------------------------------------------------------------------------
  #   Name      : Draw Wrapped Text
  #   Info      : Draws Text with Text Wrap
  #   Author    : Trickster
  #   Call Info : Five Arguments
  #               Integer X and Y, Define Position
  #               Integer Width, defines the width of the text rectangle
  #               Integer Height, defines the height of the text
  #               String Text, Text to be drawn
  #   Modified  : Brew.  Add 'p' for line breaks
  #-------------------------------------------------------------------------
  def draw_wrap_text(x, y, width, height, text)
    # Get Array of Text
    strings = text.split
    # Run Through Array of Strings
    strings.each do |string|
      # Get Word
      word = string + ' '
      # If p, move to next line
      if string == "p"
        x = 0
        y += height
        next
      end
      # Get Word Width
      word_width = text_size(word).width
      # If Can't Fit on Line move to next one
      x, y = 0, y + height if x + word_width > width
      # Draw Text Memory
      self.draw_text(x, y, word_width, height, word)
      # Add To X
      x += word_width
    end
  end

end
Code:
#==============================================================================
# â–  Scene_Journal
#------------------------------------------------------------------------------
#  This class contains the windows for the quest menu 
#  To access from the menu, insert $scene = Scene_Journal.new in your menu
#
#  Brewmeister - V10MAR08
#  Props to Lambchop (original creator) & Trickster (draw_wrap_text method)
#==============================================================================

class Scene_Journal
  #--------------------------------------------------------------------------
  # â—
 
How exactly do you get this working? It kept saying: "You have no active or completed quests."
How do you activate the variables? I tried first activating a switch that corresponded to the @quest number, then I tried to activate the variable that corresponded to it, but nothing seems to work.
 
If you don't change @offset, then it should be the same as the @quest number.
Set the variable to 1 for "Active", and > 1 for "Complete"

If you changed @offset, the variable is @offset + @quest number.

I used...

Control Variables: [0001..0003] = 1
Control Variables: [0004..0005] = 2

in an event to test the script. (Use the Batch option to set a range of variables)
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top