RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[XP] Enhanced Queslog

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 83
After looking for long time for a Questlog as I wanted it, I found Caesar's one on a german page.
It hasn't been as specific as I wanted it, but after some enhancements it's working the way I was looking for.

Pres of this Questlog:
  • Quests can be made completely dynamic
  • HTML-like tagging for easy formatting
  • Quests can be categorised - changing categories with LEFT/RIGHT
  • Descriptions of Quests can be (nearly) unlimited long - scrolling with Page UP and Page DOWN
  • Quests can have Child-Quests - open Childview if available with ENTER
  • Rewards may be given directly through the Questlog
  • Quests may be deleted or resolved

Screens:
Spoiler for:




As requested the Demo:

Description of how to implement it is in the PDF attached.
As some mentioned problems with copying the script out of the PDF, I now attached the actual Version of the Questlog as .txt

Please be sure to alway use my actual header with this script: Header
Also you'll need the HTML-Rendering-Engine by Caesar: HTML

As always: If you encounter problems or have some ideas to make this even better, just contact me ^_^

Credits please to Caesar and me if you use it.

Edit: If you encounter problems with copying the scripts (errors of RGSS), just use the .txt-file attached.
« Last Edit: December 15, 2010, 02:19:31 PM by tidloc »
[...]And they feared him.
He understands that cruelty arises from opportunity![...]

**
Rep:
Level 81
?????????????
:lol: :lol: :lol: GREAT SCRIPT!! COOL AND BEAUTIFUL!!  :lol: :lol: :lol:
遠い銀河からのスーパー戦士。
本は、セバスチャンです。
これは強力で、手に負えない。
彼の物理レベルのスキルは驚嘆です。[/b]

**
Rep: +0/-0Level 81
Hey Tidloc, I'm having some issues with the implementing of this script. How exactly am I supposed to insert this into my scripts? I separated the HTML Rendering script and the Quest Log script as it was in the document and gave them both their own sections. There's always all these syntax errors and such when I go to run the game. I'm not sure what the problem is. I also noticed that with this script, all the lines are farthest to the left, I'm not sure if that means anything, its just that i've seen all scripts that had indents and stuff like that. I used "Adobe Reader 9.3". Not sure if that effects anything but oh well.

Pm me if you can help. lol I'm sorry, I'm just a big bother to you here recently.

**
Rep:
Level 83
Spoilers out of date, use thos of the first post :-)

Spoiler for HTML-engine:
Code: [Select]
#///////////////////////HTML-Rendering-Engine/////////////////////////////////
#~~~~~~~~~~~~~~~~by Caesar~~~~~~~~~~~~~~~~~~~
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
class Bitmap
def draw_shadow_text(x, y, width, height, str, align=0)
color = font.color.dup
font.color = Color.new(192, 192, 192, 156)
draw_text(x+2, y+2, width, height, str, align)
font.color = color
draw_text(x, y, width, height, str, align)
end
#----------------
def draw_html(x, y, width, height, str)
# remember string and font variables
str = str.dup
color = font.color.dup
bold = font.bold
italic = font.italic
size = font.size
name = font.name.dup
#::::::::::
shadow = false
underlined = false
opacity = 255
str.gsub!(/<if=([0-9]+)>(.+?)<else>(.+?)<\/if>/) {$game_switches[$1.to_i] ? $2 : $3}
str.gsub!(/<f=([0-9]+)>(.+?)<\/f>/) {$game_switches[$1.to_i] ? $2 : ""}
str.gsub!(/<var=([0-9]+)>/) {$game_variables[$1.to_i].to_s}
str.gsub!(/<eval={(.+?)}>/) {eval $1}
str.gsub!(/<style=([A-Za-z0-9_-]+)>(.+?)<\/style>/) {
STYLES.has_key?($1) ? STYLES[$1].sub("|", $2) : ""
} if defined?(STYLES)
str.gsub!(/<br>/) {"\n"}
str.gsub!(/\\\\/) {"\00"}
str.gsub!(/<b>/) {"\01"}
str.gsub!(/<\/b>/) {"\02"}
str.gsub!(/<i>/) {"\03"}
str.gsub!(/<\/i>/) {"\04"}
str.gsub!(/<color=(#?[0-9a-z_]+)>/) {"\05[#{$1}]"}
str.gsub!(/<\/color>/) {"\06"}
str.gsub!(/<shadow>/) {"\16"}
str.gsub!(/<\/shadow>/) {"\17"}
str.gsub!(/<small>/) {"\20"}
str.gsub!(/<\/small>/) {"\21"}
str.gsub!(/<big>/) {"\23"}
str.gsub!(/<\/big>/) {"\21"}
str.gsub!(/<size=([0-9]+)>/) {"\24[#{$1}]"}
str.gsub!(/<\/size>/) {"\21"}
str.gsub!(/<font=([A-Za-z0-9\s]+)>/) {"\25[#{$1}]"}
str.gsub!(/<\/font>/) {"\26"}
str.gsub!(/<u>/) {"\27"}
str.gsub!(/<\/u>/) {"\30"}
str.gsub!(/<icon=([_A-Za-z0-9-]+)>/) {"\11[#{$1}]"}
str.gsub!(/<image=([_A-Za-z0-9-]+)>/) {"\31[#{$1}]"}
str.gsub!(/<down=([0-9]+)>/) {"\22[#{$1}]"}
str.gsub!(/<space=([0-9]+)>/) {"\100[#{$1}]"}
str.gsub!(/<line>/) {"\07"}
ix = 0
iy = 0
while ((c = str.slice!(/./m)) != nil)
if c == "\00" # \\
c = "\\"
end
if c == "\01" # <b>
font.bold = true
end
if c == "\02" #</b>
font.bold = bold
end
if c == "\03" # <i>
font.italic = true
end
if c == "\04" # </i>
font.italic = false
end
if c == "\05" # <color=xxx>
str.sub!(/\[(#?[0-9a-z_]+)\]/, "")
if $1[0] == 35
col = Color.decode($1)
elsif $1.to_i != 0
col = Window_Base.text_color($1.to_i)
else
col = Color.get($1)
end
font.color = col
end
if c == "\06" # </color>
font.color = color
end
if c == "\16" # <shadow>
shadow = true
end
if c == "\17" # </shadow>
shadow = false
end
if c == "\20" # <small>
font.size -= 5 if font.size > 10
end
if c == "\21" # </small> </big> </size>
font.size = size
end
if c == "\23" # <big>
font.size += 5 if font.size < 92
end
if c == "\24" # <size=xx>
str.sub!(/\[([0-9]+)\]/, "")
newsize = $1.to_i
font.size = newsize if newsize > 5 and newsize < 97
end
if c == "\25" # <font=xxx>
str.sub!(/\[([A-Za-z0-9\s]+)\]/, "")
font.name = $1 if Font.exist?($1)
end
if c == "\26" # </font>
font.name = name
end
if c == "\27" # <u>
underlined = true
end
if c == "\30" # </u>
underlined = false
end
if c == "\11" #<icon=xxx>
str.sub!(/\[([_A-Za-z0-9-]+)\]/, "")
icon = RPG::Cache.icon($1)
blt(ix + 8, iy + LINE_HEIGHT/2 - 12, icon, Rect.new(0, 0, 24, 24))
ix += 24
end
if c == "\31" # <image=xxx>
str.sub!(/\[([_A-Za-z0-9-]+)\]/, "")
image = RPG::Cache.picture($1)
iy += LINE_HEIGHT
blt((width-image.rect.width)/2, iy, image, image.rect)
iy += image.rect.height
ix = 0
end
if c == "\22" # <down=xxx>
str.sub!(/\[([0-9]+)\]/, "")
iy += $1.to_i
ix = 0
end
if c == "\100" # <space=xxx>
str.sub!(/\[([0-9]+)\]/, "")
ix += $1.to_i
c = ""
end
if c == "\07" # <line>
iy += LINE_HEIGHT + 3
fill_rect(16, iy, width-32, 2, font.color)
fill_rect(16, iy, width-32, 2, Color.new(192, 192, 192, 156)) if shadow
iy += 5
ix = 0
end
if c == "\n"
iy += LINE_HEIGHT
ix = 0
end
#:::::::::
if shadow
draw_shadow_text(x+ix+4, y+iy, 40, font.size, c)
else
draw_text(x+ix+4, y+iy, 40, font.size, c)
end
w = text_size(c).width
if underlined
fill_rect(x+ix+4, y+iy+text_size("T").height+3, w, 2, font.color)
end
ix += w
end
#::::::::::
#reset font variables
font.color = color
font.bold = bold
font.italic = italic
font.size = size
font.name = name
#return height of the bitmap
return iy + LINE_HEIGHT
end
end
#==============
class Color
def Color.get(s)
eval "Color.#{s}" rescue Color.white
end
#------------
def Color.decode(hex)
return Color.decode(hex[1..hex.length]) if hex[0] == 35
hex.downcase!
red = hex[0..1].hex
green = hex[2..3].hex
blue = hex[4..5].hex
alpha = hex.length == 8 ? hex[6..7].hex : 255
return Color.new(red, green, blue, alpha)
end
#------------
def Color.normal_color
return Color.new(255, 255, 255, 255)
end
#-----------
def Color.disabled_color
return Color.new(255, 255, 255, 128)
end
#-----------
def Color.system_color
return Color.new(192, 224, 255, 255)
end
#-----------
def Color.crisis_color
return Color.new(255, 255, 64, 255)
end
#-----------
def Color.knockout_color
return Color.new(255, 64, 0)
end
#------------
def Color.white(alpha=255)
return Color.new(255, 255, 255, alpha)
end
#-----------
def Color.black(alpha=255)
return Color.new(0, 0, 0, alpha)
end
#----------
def Color.red(alpha=255)
return Color.new(255, 0, 0, alpha)
end
#----------
def Color.green(alpha=255)
return Color.new(0, 255, 0, alpha)
end
#---------
def Color.blue(alpha=255)
return Color.new(0, 0, 255, alpha)
end
#----------
def Color.yellow(alpha=255)
return Color.new(255, 255, 0, alpha)
end
#----------
def Color.cyan(alpha=255)
return Color.new(0, 255, 255, alpha)
end
#----------
def Color.magenta(alpha=255)
return Color.new(255, 255, 0, alpha)
end
#----------
def Color.light_gray(alpha=255)
return Color.new(192, 192, 192, alpha)
end
#-----------
def Color.gray(alpha=255)
return Color.new(128, 128, 128, alpha)
end
#-----------
def Color.dark_gray(alpha=255)
return Color.new(64, 64, 64, alpha)
end
#-----------
def Color.pink(alpha=255)
return Color.new(255, 175, 175, alpha)
end
#-----------
def Color.orange(alpha=255)
return Color.new(255, 200, 0, alpha)
end
end
#=====================
class Window_Base < Window
# redefine text colors for static context
def self.text_color(n)
case n
when 0
return Color.new(255, 255, 255, 255)
when 1
return Color.new(128, 128, 255, 255)
when 2
return Color.new(255, 128, 128, 255)
when 3
return Color.new(128, 255, 128, 255)
when 4
return Color.new(128, 255, 255, 255)
when 5
return Color.new(255, 128, 255, 255)
when 6
return Color.new(255, 255, 128, 255)
when 7
return Color.new(192, 192, 192, 255)
else
return Color.white
end
end
end
Spoiler for Questlog:
Code: [Select]
################################################################################
#                                                                              #
#     Ceasars Questlog enhanced by Tidloc                                      #
#         I'd say V 4.0 ;-)                                                    #
#==============================================================================#
# This is by far my favourite Questlog out there and because I don't want to   #
# reinvent the wheel, I took and improved it by my means. ^_^                  #
# Because the script-command was way to small for most of descriptions I       #
# wanted to use for my quests I enabled to add text to descriptions with:      #
#   Questlog.addtext(quest, description)                                       #
#------------------------------------------------------------------------------#
# Furthermore Quests don't have to be deleted after completion and can simply  #
# be flagged 'resolved' by using the following command:                        #
#   Questlog.resolve(quest)                                                    #
# if you wish, a custom resolvetext may be added in the top of the quest-      #
# description. (TIDLOC_QUESTLOG_RESOLVED)                                      #
#------------------------------------------------------------------------------#
# Enabled to categorize Quests, you may choose to use any numbers of           #
# categories, but you have to declare them in an array (TIDLOC_QUESTLOG_CAT)   #
# To change the category in the interface press Right or left arrow key        #
#------------------------------------------------------------------------------#
# Quests now may have Child-Quests. Quests with Children will be flagged in    #
# the title (TIDLOC_QUESTLOG_CHILD) to mak it visible, they got Children.      #
################################################################################
TIDLOC_QUESTLOG_RESOLVED = "<size=28><style=system>gelöst</style></size>\n\n"
TIDLOC_QUESTLOG_CAT      = ["Main Quests","Side Quests","Bounty Hunts"]
TIDLOC_QUESTLOG_CHILD    = "||"
TIDLOC_QUESTLOG_REWARD   = "Reward achieved"


#//////////////////////////////////Questlog 3.0/////////////////////////////////
#~~~~~~~~~~~~~~~~~~by Caesar~~~~~~~~~~~~~~~~~
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
#===================Parameter==================
# if true, new Quests will be inserted on the top, false at the bottom
INSERT_AT_TOP = true
# line heigt in descriptions
LINE_HEIGHT = 24
# Windowskin of Questlog (nil = default)
WINDOWSKIN = nil
# Header of the Questlog
HEADER_TEXT = "Questlog"
# speed of scrolling (Pixel / Frame)
SCROLL_SPEED = 7
# staletable for descriptions of quests
STYLES = {
"h1" => "<size=45><font=Cambria><b>|</b></font></size><down=40>",
"h2" => "<big><b><font=Cambria>|</font></b></big><down=32>",
"disabled" => "<color=disabled_color>|</color>",
"highlight" => "<color=#eeee32>|</color>",
"system" => "<color=system_color>|</color>"
}
# this process will be made, when closing the Questlog;
# (Default: back to map)
ON_CLOSE = Proc.new {$scene = Scene_Map.new}
#============================================
class Scene_Questlog
  def main
    temp = []
    @window_header = Window_Help.new
    @window_header.x = 65
    @window_header.y = 28
    @window_header.z = 500
    @window_header.width = 510
    @window_header.windowskin = RPG::Cache.windowskin(WINDOWSKIN) unless WINDOWSKIN.nil?
    @window_header.contents = Bitmap.new(478, 32)
    @window_header.contents.font.size = 30
    @window_header.contents.draw_text(0, 0, 510, 32, HEADER_TEXT, 1)
    @window_titles = Window_Questlog_Titles.new
    temp = @window_titles.refresh
    @window_titles.windowskin = RPG::Cache.windowskin(WINDOWSKIN) unless WINDOWSKIN.nil?
    @window_description = Window_Questlog_Description.new(
           temp.map{|q| q.description})
    @window_description.windowskin = RPG::Cache.windowskin(WINDOWSKIN) unless WINDOWSKIN.nil?
    @window_titles.refresh
    @index = @window_titles.index
    @cat = 0
    @cat_window = Window_Category_Display.new
    @childview  = false
    @childindex = 0
    spriteset = Spriteset_Map.new
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @cat_window.dispose
    @window_header.dispose
    @window_titles.dispose
    @window_description.dispose
    spriteset.dispose
  end
  #----------------
  def update
    @window_titles.update
    @cat_window.update
    if Input.trigger?(Input::B)
      if @childview
        @window_titles.index = @childindex
        @window_titles.refresh
        @window_description.dispose
        @window_description = Window_Questlog_Description.new(
                @window_titles.catquests.map{|q| q.description})
        @window_description.index = @childindex
        @childview = false
        return
      end
      $game_system.se_play($data_system.cancel_se)
      ON_CLOSE.call
      return
    end
    if Input.press?(Input::R)
      @window_description.scroll_down
    elsif Input.press?(Input::L)
      @window_description.scroll_up
    end
    if Input.trigger?(Input::C)
      return if @window_titles.index == -1
      if @childview
        $game_system.se_play($data_system.cursor_se)
        @window_titles.index = @childindex
        @window_titles.refresh
        @window_description.dispose
        @window_description = Window_Questlog_Description.new(
                @window_titles.catquests.map{|q| q.description})
        @window_description.index = @childindex
        @childview = false
        return
      end
      catquests = []
      for i in 0...$game_system.questlog.quests.length
        if $game_system.questlog.quests[i].title == @window_titles.catquests[@window_titles.index].title
          catquests.push $game_system.questlog.quests[i]
          for j in 0...catquests[0].child_count
            catquests.push catquests[0].child[j]
          end
          if catquests.length > 1
            $game_system.se_play($data_system.cursor_se)
            @childindex = @window_description.index
            @window_titles.index = 0
            @window_titles.catquests = catquests
            @window_description.dispose
            @window_description = Window_Questlog_Description.new(
                  catquests.map{|q| q.description})
            temp = @window_titles.cat
            @window_titles.cat = -1
            @window_titles.refresh
            @window_titles.cat = temp
            @childview = true
          end
          return
        end
      end
    end
    if Input.trigger?(Input::RIGHT)
      return if @childview
      $game_system.se_play($data_system.cursor_se)
      @cat += 1
      @cat = 0 if @cat >= TIDLOC_QUESTLOG_CAT.length
      @cat_window._category   = @cat
      @window_titles.cat      = @cat
      @cat_window.refresh
      temp = @window_titles.refresh
      @window_description.dispose
      @window_description = Window_Questlog_Description.new(
               temp.map{|q| q.description})
      return
    end
    if Input.trigger?(Input::LEFT)
      return if @childview
      $game_system.se_play($data_system.cursor_se)
      @window_description.index = 0
      @window_titles.index = 0
      @cat -= 1
      @cat = TIDLOC_QUESTLOG_CAT.length-1 if @cat < 0
      @cat_window._category   = @cat
      @window_titles.cat      = @cat
      @cat_window.refresh
      temp = @window_titles.refresh
      @window_description.dispose
      @window_description = Window_Questlog_Description.new(
               temp.map{|q| q.description})
      return
    end
    if @index != @window_titles.index
      @window_description.index = @index = @window_titles.index
    end
  end
end
#=============
class Quest
  attr_reader   :title
  attr_accessor :description
  attr_reader   :resolved
  attr_reader   :category
  attr_reader   :child_count
  attr_reader   :child
  attr_reader   :reward
  attr_reader   :rewarded
  def initialize(title, category, description)
    @title       = title
    @description = description
    @resolved    = false
    @category    = category
    @child_count = 0
    @child       = []
    @reward      = []
    @rewarded    = false
  end
  def resolve
    @description = TIDLOC_QUESTLOG_RESOLVED + @description
    @resolved = true
  end
  def add_child(title, description)
    for i in 0...@child_count
      if @child[i].title == title
        @child[i].description = description
        return
      end
    end
    @child.push Quest.new(title,0,description)
    @child_count += 1
  end
  def add_child_text(title, description)
    for i in 0...@child_count
      if @child[i].title == title
        @child[i].description += description
        return
      end
    end
  end
  def resolve_child(title)
    for i in 0...@child_count
      if @child[i].title == title
        @child[i].resolve
        return
      end
    end
  end
  def add_reward(cat, id, number)
    @reward = [cat, id, number]
  end
  def gain_reward
    return if @rewarded
    if @reward[0] == 0
      $game_party.gain_item(@reward[1],@reward[2])
    elsif @reward[0] == 1
      $game_party.gain_weapon(@reward[1],@reward[2])
    elsif @reward[0] == 2
      $game_party.gain_armor(@reward[1],@reward[2])
    elsif @reward[0] == 3
      $game_party.gain_gold(@reward[2])
    end
    @rewarded = true
  end
end
#============
class Questlog
  attr_reader :quests
  def initialize
    @quests = []
  end
#-----------
  def add(quest, category = 0, description="")
    return add(Quest.new(quest, category, description)) unless quest.is_a?(Quest)
    i = index(quest.title)
    return @quests[i] = quest if i != nil
    if INSERT_AT_TOP
      # insert quest at top of the list
      @quests.unshift(quest)
    else
      # insert quest at bottom of the list
      @quests.push(quest)
    end
  end
#-----------
  def remove(title)
    @quests.delete_if{ |quest| quest.title == title}
  end
#-----------
  def count
    return @quests.length
  end
#------------
  def index(title)
    for i in 0..@quests.length-1
      return i if @quests[i].title == title
    end
    return nil
  end
#------------
  def Questlog.add(title, category, description="")
    $game_system.questlog.add(title, category, description)
  end
#------------
  def Questlog.remove(title)
    $game_system.questlog.remove(title)
  end
#TIDLOC
  def addtext(questtitle, description="")
    for i in 0...@quests.length
      if @quests[i].title == questtitle
        @quests[i].description += description
        return true
      end
    end
    return false
  end
  def resolve(questtitle)
    for i in 0...@quests.length
      if @quests[i].title == questtitle
        @quests[i].resolve
        return true
      end
    end
    return false
  end
  def add_child(questtitle, title, description)
    for i in 0...@quests.length
      if @quests[i].title == questtitle
        @quests[i].add_child(title, description)
        return true
      end
    end
    return false
  end
  def add_child_text(questtitle, title, description)
    for i in 0...@quests.length
      if @quests[i].title == questtitle
        @quests[i].add_child_text(title, description)
        return true
      end
    end
    return false
  end
  def resolve_child(questtitle, title)
    for i in 0...@quests.length
      if @quests[i].title == questtitle
        @quests[i].resolve_child(title)
        return true
      end
    end
    return false
  end
  def add_reward(questtitle, category, id, number)
    for i in 0...@quests.length
      if @quests[i].title == questtitle
        @quests[i].add_reward(category, id, number)
        return true
      end
    end
    return false
  end
  def gain_reward(questtitle)
    for i in 0...@quests.length
      if @quests[i].title == questtitle
        @quests[i].gain_reward
        return true
      end
    end
    return false
  end
  def Questlog.addtext(title, description="")
    $game_system.questlog.addtext(title, description)
  end
  def Questlog.resolve(title)
    $game_system.questlog.resolve(title)
  end
  def Questlog.child(questtitle, title, description)
    $game_system.questlog.add_child(questtitle, title, description)
  end
  def Questlog.childtext(questtitle, title, description)
    $game_system.questlog.add_child_text(questtitle, title, description)
  end
  def Questlog.childres(questtitle, title)
    $game_system.questlog.resolve_child(questtitle, title)
  end
  def Questlog.reward(questtitle, category, id, number)
    $game_system.questlog.add_reward(questtitle, category, id, number)
  end
  def Questlog.gain(questtitle)
    $game_system.questlog.gain_reward(questtitle)
  end
end
#=============
class Window_Questlog_Description < Window_Base
  attr_reader   :index
  attr_accessor :cat
  attr_accessor :descriptions
#------------------
  def initialize(descriptions)
    super(275, 92, 300, 360)
    @descriptions = descriptions
    @cache = Array.new(descriptions.size)
    self.contents = Bitmap.new(width-32, height-32)
    self.index = 0
    self.z = 500
    self.cat = 0
  end
#-----------
  def index=(index)
    return if index == @index or @descriptions.empty?
    @index = index
    self.oy = 0
# bitmaps are only rendered once and than cached to reach more efficiency
    if @cache[index].nil?
      buffer = Bitmap.new(width-32, 2000)
      docheight = buffer.draw_html(0, 0, 270, 2000, @descriptions[index])
      @cache[index] = self.contents = Bitmap.new(width-32, docheight)
      self.contents.blt(0, 0, buffer, Rect.new(0, 0, self.width-32, docheight))
    else
      self.contents = @cache[index]
    end
  end
#-----------
  def scroll_down
    self.oy += SCROLL_SPEED if self.height + self.oy - 32 < self.contents.height
  end
#------------
  def scroll_up
    self.oy -= SCROLL_SPEED
    self.oy = 0 if self.oy < 0
  end
end
#=============
class Window_Questlog_Titles < Window_Base
  attr_reader   :index
  attr_accessor :cat
  attr_accessor :catquests
  def initialize
    @catquests = []
    @cat = 0
    super(64, 156, 210, 296)
    self.z = 500
    @index = 0
    self.cat = 0
    self.contents = Bitmap.new(width-32, 32)
    refresh
  end
#-------------
  def index=(index)
    @index = index
    update_cursor_rect
  end
#-------------
  def top_row=(row)
    if row < 0
      row = 0
    end
    if row > @item_max - 1
      row = @item_max - 1
    end
    self.oy = row * 32
  end
#-------------
  def page_row_max
    return (self.height - 32) / 32
  end
#-------------
  def page_item_max
    return page_row_max * @column_max
  end
#-------------
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
      return
    end
    row = @index
    top_row = self.oy / 32
    if row < top_row
      self.top_row = row
    end
    if row > top_row + (self.page_row_max - 1)
      self.top_row = row - (self.page_row_max - 1)
    end
    self.cursor_rect.set(0, @index * 32 - self.oy, self.width - 32, 32)
  end
#-------------
  def refresh
    self.contents.clear
    j = 0
    if @cat != -1
      @catquests = []
      for i in 0...$game_system.questlog.quests.length
        if $game_system.questlog.quests[i].category == @cat
          @catquests.push $game_system.questlog.quests[i]
          j += 1
        end
      end
    else
      j = @catquests.length
    end
    @item_max = @catquests.length
    self.contents = Bitmap.new(width-32, @item_max > 0 ? @item_max*32 : 32)
    for i in 0...j
      quest = @catquests[i]
      y = i*32
      if quest.resolved
        self.contents.font.color = disabled_color
      else
        self.contents.font.color = normal_color
      end
      if quest.child_count > 0
        self.contents.draw_html(4, y, 150, 32, TIDLOC_QUESTLOG_CHILD + quest.title)
      else
        self.contents.draw_html(4, y, 150, 32, quest.title)
      end
    end
    if @item_max < 1
      @index = -1
    elsif @item_max <= @index
      @index = @item_max-1
    elsif @index == -1 && @item_max > 0
      @index = 0
    end
    return @catquests
  end
#------------
  def update
    super
    if self.active && @item_max > 0 && @index >= 0
      if Input.repeat?(Input::DOWN) && (Input.trigger?(Input::DOWN) || @index < @item_max - 1)
        $game_system.se_play($data_system.cursor_se)
        @index = (@index + 1) % @item_max
      end
      if Input.repeat?(Input::UP) && (Input.trigger?(Input::UP) || @index > 0)
        $game_system.se_play($data_system.cursor_se)
        @index = (@index - 1 + @item_max) % @item_max
      end
    end
    update_cursor_rect
  end
end
#===========
class Scene_Map
  def call_questlog
    $game_temp.questlog_calling = false
    $game_player.straighten
    $scene = Scene_Questlog.new
  end
end
#===========
class Game_System
  attr_accessor :questlog
  alias questlog_init initialize
  def initialize
    questlog_init
    @questlog = Questlog.new
  end
end
#===========
class Game_Temp
  attr_accessor :questlog_calling
  alias questlog_init initialize
  def initialize
    questlog_init
    @questlog_calling = false
  end
end
#========================
class Scene_Load < Scene_File
# if a game that does not yet contain the questlog is loaded
# a new (empty) questlog instance is created
  alias questlog_read_save_data read_save_data
  def read_save_data(file)
    questlog_read_save_data(file)
    $game_system.questlog = Questlog.new if $game_system.questlog.nil?
  end
end

class Window_Category_Display < Window_Selectable
  attr_accessor :_category
  def initialize(x=64,y=92,xe=210)
    super(x,y,xe, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $defaultfonttype  # "Main" window font
    self.contents.font.size = $defaultfontsize
    self._category = 0
    @align = 2
    refresh
  end
  def refresh
    self.contents.clear
    rect = Rect.new(8, 0, self.width - 16, 32)
    self.contents.font.size = 24
    self.contents.font.color=system_color
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    self.contents.draw_text(rect, TIDLOC_QUESTLOG_CAT[_category])
  end
end

Edit: hope, that clears out any errors, Sasquatch927 ;)
« Last Edit: December 15, 2010, 02:18:44 PM by tidloc »
[...]And they feared him.
He understands that cruelty arises from opportunity![...]

**
Rep: +0/-0Level 81
Thanks. Now the game starts up with no syntax errors at all. Now I'll just read the manual and try to master this script usage... Thanks

**
Rep: +0/-0Level 81
Edit:
I managed to fix the previous error myself but now i get this error when i press F5:

Script: 'QuestLog' line 594: NoMethodError occured
undefined method 'TIDLOC_QUESTLOG_CAT for
#<Window_Category_Display:0x2diffef0>

The weird thing is whenever i do another playtest and open the quest log, the red area is different ???

any thoughts?
« Last Edit: April 29, 2010, 08:51:13 AM by Sonickid132 »

***
Rep:
Level 89
I have attention problems.
I'm having trouble getting your questlog to work...
So far I made a menu button for it, but can't click on the button or I get an error.
"Script 'Quest Log' line 583: TypeError occurred.
no implicit conversion from nil to integer"
I was guessing it was because there wasn't a quest yet, so I tried to make a quest on the log first...
But when I made an event create a quest, I just get another error.
"SyntaxError occurred while runing script"
The script I wrote to make the quest was:
Questlog.add(“Chores”, 0, ”I should go downstairs and see what Mom wants...”)
I've got the Header script above the Questlog script above the HTML script, is that right?
« Last Edit: August 20, 2010, 12:52:51 AM by Tenraah »
"...because, you know, whatever."

**
Rep:
Level 83
OK, if you just copy-pasted the whole script-command:
Questlog.add(“Chores”, 0, ”I should go downstairs and see what Mom wants...”)
I allready know the problem! you see the italic quotes? just replace them with the normal ones:
Questlog.add("Chores", 0, "I should go downstairs and see what Mom wants...")

Maybe that should solve the first problem also, try it and if it doesn't just message me ;)
[...]And they feared him.
He understands that cruelty arises from opportunity![...]

***
Rep:
Level 89
I have attention problems.
That fixed it! :)
Also, fixed the other problem by changing the font size at the line mentioned in the error to a specific number.
Thanks!
I'm gonna have to mess with it to stretch it to the full screen, though.  looks out of place when everything else in the menu goes to a full screen.

edit: I was just curious and changed the value on that line back to $defaultfontsize, and the error was still there.  I'm not really worried about it, since I can just put it back to a set number, though.

edit again: Woah, there's no text in the quest category window =(  Any help for that?
« Last Edit: August 20, 2010, 06:44:37 AM by Tenraah »
"...because, you know, whatever."

**
Rep:
Level 83
allready got PMed, its solved ;)
[...]And they feared him.
He understands that cruelty arises from opportunity![...]