Quest log edit [fixed]

Started by Jackolas, June 14, 2009, 12:22:23 pm

Previous topic - Next topic

Jackolas

June 14, 2009, 12:22:23 pm Last Edit: June 14, 2009, 03:40:39 pm by Jackolas
got a quest log from somewhere that works very well. (dunno any more from where, also heavy edited myself)
but to make it more clear and look nicer I wane change a couple of things.
most I manage to fix myself without breaking the script  :^_^':

but I can't get the top bar fixed (6 hours and counting). think I can explain better with pictures.

this is how it looks now:
Spoiler: ShowHide

(if you press left ore right you switch to side quest ore main quests)

and this is what it should be:
Spoiler: ShowHide

(again if you press left ore right you will switch between main quest and side quest)

everything is already made in there. so the quests will switch from main to side etc. only the top bar where it is displayed is not working.

So my request is if someone could build a working top bar into this script.
(or if someone could point me in the right direction)

Spoiler: ShowHide
class Bitmap
 # Draws an outline around the text,
 # both the outline color and the color of the
 # text inside can be anything.
 def draw_text_outline_custom(x, y, wid, hei, text, align, outlinecolor, insidecolor)
  if $qdata.useoutlines == true
    self.font.color = outlinecolor
     draw_text(x + 1,y + 1,wid,hei,text, align)
     draw_text(x + 1,y - 1,wid,hei,text, align)
     draw_text(x - 1,y - 1,wid,hei,text, align)
     draw_text(x - 1,y + 1,wid,hei,text, align)
  end
  self.font.color = insidecolor
  draw_text(x,y,wid,hei,text, align)
 end
end

class Scene_Quests
 attr_accessor  :questids
 attr_accessor  :command_window
 attr_accessor  :questswitches
 # QSETUP This is the initialize method.
 # It's where you set up which list will load:
 def initialize(list = 1)
    @quest_index = 0
  @currentlist = list
  # Right here. The format is:
  # when A
  #   $qdata = B.new
  #   @questswitches = $game_temp.C
  #
  # A is the number called in $scene = Scene_Quests.new(Number)
  # B is the class name for the list.
  # C is the variable name for the quest list. Don't put the @ part with it here.
  case list
  when 1
     $qdata = Quest_Data.new
    @questswitches = $game_temp.qupdate
  when 2
    $qdata = Quest_Data2.new
    @questswitches = $game_temp.qupdate2
  end
 end

 def main
    # Displays the map as background:
    @backpic = Spriteset_Map.new
    # Creates the quest list based on how many quests are active on that list:
    questwin = []
  @questids = []
        # QSETUP This is one of the for branches that will need changing once your game is complete.
        # More about that later.
  for i in 1...10000
    if @questswitches[i][0] == true
     questwin.push($qdata.questname[i])
     @questids.push(i)
    end
  end
  if questwin.size == 0
    questwin.push($qdata.questname[0])
    @questids.push(0)
  end
  @command_window = Window_Qmand.new(182, questwin)
    @command_window.index = @quest_index
    @command_window.opacity = 200
    @command_window.z = 1100
    @command_window.opacity = 200  
  # This makes the window for the description text and objectives:
    @status_window = Quest.new
    @status_window.x = 184
    @status_window.y = 64
    @status_window.z = 1100
    @status_window.opacity = 200
    Graphics.transition
    loop do
     Graphics.update
     Input.update
     update_command
     if $scene != self
        break
     end
    end
    Graphics.freeze
  @command_window.contents.clear
    @command_window.dispose
  @status_window.contents.clear
    @status_window.dispose
  end
end
#-------------------------------------------------------------------------------
# Updates the quest data, and switches between lists:
#-------------------------------------------------------------------------------
 def update_command
     if Input.repeat?(Input::UP)
    if @command_window.index == 0
     @command_window.index = @questids.size - 1
    else
     @command_window.index -= 1
    end
    unless @questids.size == 1
     $game_system.se_play($data_system.cursor_se) unless @questids.size == 1
     @status_window.refresh
    end
    end
    if Input.repeat?(Input::DOWN)
    if @command_window.index == @questids.size - 1
     @command_window.index = 0
    else
     @command_window.index += 1
    end
    unless @questids.size == 1
     $game_system.se_play($data_system.cursor_se)
     @status_window.refresh
    end
    end
  if Input.trigger?(Input::B)
    $game_system.se_play($data_system.cancel_se)
    $scene = Scene_Menu.new(5)
    return
  end
 # QSETUP This is where you set up how it switches between lists.
 # If you want to have say, 2 parties, each with different lists,
 # this is where you would set up how it switches between lists.
 # The format is simple:
 # when listnumber
 #   $scene = Scene_Quests.new(list number to switch to)
 #
 # So if lists 1/2 are for the first party, and you want lists 3/4 to be for the second party,
 # You'd just set up list 3 to switch to list 4 and list 4 to switch to list 3.
  if Input.trigger?(Input::LEFT)
  $game_system.se_play($data_system.cursor_se)
  case @currentlist
  when 1
     $scene = Scene_Quests.new(2)
  when 2
     $scene = Scene_Quests.new(1)
  end
  end
  if Input.trigger?(Input::RIGHT)
  $game_system.se_play($data_system.cursor_se)
    case @currentlist
  when 1
     $scene = Scene_Quests.new(2)
  when 2
     $scene = Scene_Quests.new(1)
  end
 end
end
#-------------------------------------------------------------------------------
# This creates the description text and the objectives
# for the the quests in progress. Objectives change colors
# and have an icon next to them.
#-------------------------------------------------------------------------------
class Quest < Window_Base
 def initialize
  super(0, 0, 456, 416)
  self.contents = Bitmap.new(width - 32, height - 32)
    refresh
 end

 def refresh
  self.contents.clear
  y = 0
  for i in 0...$qdata.description[$scene.questids[$scene.command_window.index]].size
    self.contents.draw_text_outline_custom(2, 24 * y, 480, 32, $qdata.description[$scene.questids[$scene.command_window.index]][i],0, $qdata.descoutline, $qdata.desctext)
    y += 1
  end
  for i in 0...$qdata.objectives[$scene.questids[$scene.command_window.index]].size
    y += 1
    if $scene.questswitches[$scene.questids[$scene.command_window.index]][i + 1] == true
     bitmap = RPG::Cache.icon("CompletedIcon")
     self.contents.blt(0, 4 + ( y * 24) , bitmap, Rect.new(0, 0, 18, 18))
     self.contents.draw_text_outline_custom(24, 0 + (y * 24), 456, 24, $qdata.objectives[$scene.questids[$scene.command_window.index]][i], 0, $qdata.compoutline, $qdata.comptext)
    else
     bitmap = RPG::Cache.icon("InProgressIcon")
     self.contents.blt(0, 4 + ( y * 24) , bitmap, Rect.new(0, 0, 18, 18))
     self.contents.draw_text_outline_custom(24, 0 + (y * 24), 456, 24, $qdata.objectives[$scene.questids[$scene.command_window.index]][i], 0, $qdata.incompoutline, $qdata.incomptext)
    end
  end
 end
end

#-------------------------------------------------------------------------------
# This is for the list of quests on the left:
#-------------------------------------------------------------------------------
class Window_Qmand < Window_Selectable
 def initialize(width, commands)
    super(0, 64, width, 416)
  self.contents = Bitmap.new(width - 32, commands.size * 32)
    @commands = commands
  @item_max = @commands.size
  self.index = 0
    refresh
 end

 def refresh
    self.contents.clear
    for i in 0...@commands.size
     self.contents.draw_text_outline_custom(0, 32 * i, self.contents.width, 32,@commands[i],1, $qdata.menuoutline, $qdata.menutext)
    end
 end
end
   
#    (self.width-32, self.height-32)
#    @title_window.contents = Bitmap.new(640 - 32 , 64 - 32)
#    @title_window.contents.draw_text(0, 0, 288, 32, "Main Quests in Progress", 1)
#    @title_window.contents.draw_text(288, 0, 288, 32, "Side Quests in Progress", 1)

class Game_Temp
 # QSETUP This is where you add the variables that control the quests on the lists.
 attr_accessor :qupdate
 attr_accessor :qupdate2
 # You'll need one of these for every list. The script is setup by default to
 # use qupdate for the first list and qupdate2 for the second.
 #You can change these if you want.
 alias asdfghjkl initialize
 def initialize
  asdfghjkl
  # You'll need to add any new quest variables here, like this:
  @qupdate = []
  @qupdate2 = []
  for i in 0...10000
    # And here, too, like this:
    @qupdate[i] = []
    @qupdate2[i] = []
  end
  # That 10000 there is the maximum number of quests per list.
  # Once your game is completely finished, count the number of quests on each list.
  # There'll be a for loop like this in each of the quest lists.
  # Replace the 10000 there with the number of quests on the list.
  # This will lower the amount of time it takes to read the list.
  # Do the same to the 10000 both here and in the main method up at the top,
        # with the highest number of quests your lists have.
 end
end

class Scene_Save < Scene_File

 alias qwertyuiop write_save_data
 def write_save_data(file)
  qwertyuiop(file)
  # QSETUP You'll need to add any new quest variables here, too, like this:
  Marshal.dump($game_temp.qupdate, file)
  Marshal.dump($game_temp.qupdate2, file)
 end
end

class Scene_Load < Scene_File

 alias zxcvbnm read_save_data
 def read_save_data(file)
  zxcvbnm(file)
  # QSETUP Also need to add any new quest variable here, like this:
  $game_temp.qupdate = Marshal.load(file)
  $game_temp.qupdate2 = Marshal.load(file)
 end
end

side note: the script needs 2 data scripts to work. but those are not really required for this request.
if you do need them plzz ask.


Ryex

well at far as I can tell you never created the top window! there's the @command_window that's the side bar, and then there's @status_window which is the quest window but you haven't made any other windows so its no wonder it doesn't show up. i'll need the full script if i'm to help you more
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Jackolas

June 14, 2009, 01:44:34 pm #2 Last Edit: June 14, 2009, 01:46:24 pm by Jackolas
Spoiler: ShowHide
#-------------------------------------------------------------------------------
# This class holds all the data for the quests.
# If you want a new quest, add it in here.
# This is the class name. If you add another list, you need a different class name.
# It's a good idea to just use Quest_Data2/3/4/5/6/etc...
class Quest_Data
 attr_accessor :description, :questname, :objectives,
           :useoutlines, :descoutline, :desctext, :incompoutline,
           :incomptext, :compoutline, :comptext, :menuoutline,
           :menutext
 def initialize
  @questname = []
  @description = []
  @objectives = []
  for i in 0...10000
    @description[i] = []
    @objectives[i] = []
  end
# These are options you can change:
# These control the colors of the text.
# The code for this is:
# Color.new(Amount of Red, Amount of Green, Amount of Blue, Opacity)
# Each of these can be set from 0-255, 255 being the highest.
@useoutlines = true# Set to false if you don't want the text to have an outline
@descoutline = Color.new (0, 0, 0, 255)# Outline color for description text
@desctext = Color.new (255, 255, 255, 255)# Text color for description text
@incompoutline = Color.new(0, 0, 0, 255)# Outline color for incomplete objectives
@incomptext = Color.new(255, 0, 0, 255)# Text color for incomplete objectives
@compoutline = Color.new(0, 0, 0, 255)# Outline color for completed objectives
@comptext = Color.new(0, 255, 0, 255)# Text color for completed objectives
@menuoutline = Color.new(0, 0, 0, 255)# Outline color the in progress list
@menutext = Color.new(255, 255, 255, 255)# Text color for the in progress list
#-------------------------------------------------------------------------------
# This is the data that is displayed when there are no quests active.
# I'll be using it to explain how to set up a quest, too:
  @questname[0] = "No Quests" # This will be the name of your quest.
#   This is the description for the quest. The format is:
#   @description[quest number] = ["line 1", "line 2", "line 3", "etc..."]
#   Note that if you have too many lines of description you can run out of room
#   for objectives.
  @description[0] = ["I am not currently on any quests."]
#   The format is the same for @objectives if the quest has any.
#-------------------------------------------------------------------------------
  # Quest 1
  @questname[1] = "Get trained!"
  @description[1] = ["Yesterday my village was attackt.",
                 "If I wanne help protect it than i need",
                 "proper training. And the only way to get",
                 "that is to sign up for the Pandion Knights.",
                 "I wonder if they will take me.",]
  @objectives[1] = ["-Get entrance to the PK Castle",
                "-Get yourself some training"]

  @questname[2] = "Get trained2"
  @description[2] = ["Yesterday my village was attackt.",
                 "If I wanne help protect it than i need",
                 "proper training. And the only way to get",
                 "that is to sign up for the Pandion Knights.",
                 "I wonder if they will take me.",]
  @objectives[2] = ["-Get entrance to the PK Castle",
                "-Get yourself some training"]
 end
end

data 1

Spoiler: ShowHide
#-------------------------------------------------------------------------------
# This class holds all the data for the quests.
# If you want a new quest, add it in here.
# This is the class name. If you add another list, you need a different class name.
# It's a good idea to just use Quest_Data2/3/4/5/6/etc...
class Quest_Data2
 attr_accessor :description, :questname, :objectives,
           :useoutlines, :descoutline, :desctext, :incompoutline,
           :incomptext, :compoutline, :comptext, :menuoutline,
           :menutext
 def initialize
  @questname = []
  @description = []
  @objectives = []
  for i in 0...10000
    @description[i] = []
    @objectives[i] = []
  end
# These are options you can change:
# These control the colors of the text.
# The code for this is:
# Color.new(Amount of Red, Amount of Green, Amount of Blue, Opacity)
# Each of these can be set from 0-255, 255 being the highest.
@useoutlines = true# Set to false if you don't want the text to have an outline
@descoutline = Color.new (0, 0, 0, 255)# Outline color for description text
@desctext = Color.new (255, 255, 255, 255)# Text color for description text
@incompoutline = Color.new(0, 0, 0, 255)# Outline color for incomplete objectives
@incomptext = Color.new(255, 0, 0, 255)# Text color for incomplete objectives
@compoutline = Color.new(0, 0, 0, 255)# Outline color for completed objectives
@comptext = Color.new(0, 255, 0, 255)# Text color for completed objectives
@menuoutline = Color.new(0, 0, 0, 255)# Outline color the in progress list
@menutext = Color.new(255, 255, 255, 255)# Text color for the in progress list
#-------------------------------------------------------------------------------
# This is the data that is displayed when there are no quests active.
# I'll be using it to explain how to set up a quest, too:
  @questname[0] = "No Quests" # This will be the name of your quest.
#   This is the description for the quest. The format is:
#   @description[quest number] = ["line 1", "line 2", "line 3", "etc..."]
#   Note that if you have too many lines of description you can run out of room
#   for objectives.
  @description[0] = ["I am not currently on any quests."]
#   The format is the same for @objectives if the quest has any.
#-------------------------------------------------------------------------------
  # Quest 1
  @questname[1] = "Get trained!"
  @description[1] = ["Yesterday my village was attackt.",
                 "If I wanne help protect it than i need",
                 "proper training. And the only way to get",
                 "that is to sign up for the Pandion Knights.",
                 "I wonder if they will take me.",]
  @objectives[1] = ["-Get entrance to the PK Castle",
                "-Get yourself some training"]

  @questname[2] = "Get trained2"
  @description[2] = ["Yesterday my village was attackt.",
                 "If I wanne help protect it than i need",
                 "proper training. And the only way to get",
                 "that is to sign up for the Pandion Knights.",
                 "I wonder if they will take me.",]
  @objectives[2] = ["-Get entrance to the PK Castle",
                "-Get yourself some training"]
 end
end

and thats data 2.

I'm aware that there's no other window... I removed all the crap I added.
this is what I had:
Spoiler: ShowHide
class Bitmap
 # Draws an outline around the text,
 # both the outline color and the color of the
 # text inside can be anything.
 def draw_text_outline_custom(x, y, wid, hei, text, align, outlinecolor, insidecolor)
  if $qdata.useoutlines == true
    self.font.color = outlinecolor
     draw_text(x + 1,y + 1,wid,hei,text, align)
     draw_text(x + 1,y - 1,wid,hei,text, align)
     draw_text(x - 1,y - 1,wid,hei,text, align)
     draw_text(x - 1,y + 1,wid,hei,text, align)
  end
  self.font.color = insidecolor
  draw_text(x,y,wid,hei,text, align)
 end
end

class Scene_Quests
 attr_accessor  :questids
 attr_accessor  :command_window
 attr_accessor  :questswitches
 # QSETUP This is the initialize method.
 # It's where you set up which list will load:
 def initialize(list = 1)
    @quest_index = 0
  @currentlist = list
  # Right here. The format is:
  # when A
  #   $qdata = B.new
  #   @questswitches = $game_temp.C
  #
  # A is the number called in $scene = Scene_Quests.new(Number)
  # B is the class name for the list.
  # C is the variable name for the quest list. Don't put the @ part with it here.
  case list
  when 1
     $qdata = Quest_Data.new
    @questswitches = $game_temp.qupdate
  when 2
    $qdata = Quest_Data2.new
    @questswitches = $game_temp.qupdate2
  end
 end

 def main
    # Displays the map as background:
    @backpic = Spriteset_Map.new
    # Creates the quest list based on how many quests are active on that list:
    questwin = []
  @questids = []
        # QSETUP This is one of the for branches that will need changing once your game is complete.
        # More about that later.
  for i in 1...10000
    if @questswitches[i][0] == true
     questwin.push($qdata.questname[i])
     @questids.push(i)
    end
  end
  if questwin.size == 0
    questwin.push($qdata.questname[0])
    @questids.push(0)
  end
  @command_window = Window_Qmand.new(182, questwin)
    @command_window.index = @quest_index
    @command_window.opacity = 200
    @command_window.z = 1100
    @command_window.opacity = 200  
  # This creates the title window
    @top_window = Window_top.new
    @top_window.x = 0
    @top_window.y = 0
    @top_window.opacity = 200
  # This makes the window for the description text and objectives:
    @status_window = Quest.new
    @status_window.x = 184
    @status_window.y = 64
    @status_window.z = 1100
    @status_window.opacity = 200
    Graphics.transition
    loop do
     Graphics.update
     Input.update
     update_command
     if $scene != self
        break
     end
    end
    Graphics.freeze
  @command_window.contents.clear
    @command_window.dispose
  @top_window.contents.clear
    @top_window.dispose
  @status_window.contents.clear
    @status_window.dispose
 end

 end
#-------------------------------------------------------------------------------
# Updates the quest data, and switches between lists:
#-------------------------------------------------------------------------------
 def update_command
     if Input.repeat?(Input::UP)
    if @command_window.index == 0
     @command_window.index = @questids.size - 1
    else
     @command_window.index -= 1
    end
    unless @questids.size == 1
     $game_system.se_play($data_system.cursor_se) unless @questids.size == 1
     @status_window.refresh
    end
    end
    if Input.repeat?(Input::DOWN)
    if @command_window.index == @questids.size - 1
     @command_window.index = 0
    else
     @command_window.index += 1
    end
    unless @questids.size == 1
     $game_system.se_play($data_system.cursor_se)
     @status_window.refresh
    end
    end
  if Input.trigger?(Input::B)
    $game_system.se_play($data_system.cancel_se)
    $scene = Scene_Menu.new(5)
    return
  end
 # QSETUP This is where you set up how it switches between lists.
 # If you want to have say, 2 parties, each with different lists,
 # this is where you would set up how it switches between lists.
 # The format is simple:
 # when listnumber
 #   $scene = Scene_Quests.new(list number to switch to)
 #
 # So if lists 1/2 are for the first party, and you want lists 3/4 to be for the second party,
 # You'd just set up list 3 to switch to list 4 and list 4 to switch to list 3.
  if Input.trigger?(Input::LEFT)
  $game_system.se_play($data_system.cursor_se)
  case @currentlist
  when 1
     $scene = Scene_Quests.new(2)
  when 2
     $scene = Scene_Quests.new(1)
  end
  end
  if Input.trigger?(Input::RIGHT)
  $game_system.se_play($data_system.cursor_se)
    case @currentlist
  when 1
     $scene = Scene_Quests.new(2)
  when 2
     $scene = Scene_Quests.new(1)
  end
  end
end
#-------------------------------------------------------------------------------
# This creates the description text and the objectives
# for the the quests in progress. Objectives change colors
# and have an icon next to them.
#-------------------------------------------------------------------------------
class Quest < Window_Base
 def initialize
  super(0, 0, 456, 416)
  self.contents = Bitmap.new(width - 32, height - 32)
    refresh
 end

 def refresh
  self.contents.clear
  y = 0
  for i in 0...$qdata.description[$scene.questids[$scene.command_window.index]].size
    self.contents.draw_text_outline_custom(2, 24 * y, 480, 32, $qdata.description[$scene.questids[$scene.command_window.index]][i],0, $qdata.descoutline, $qdata.desctext)
    y += 1
  end
  for i in 0...$qdata.objectives[$scene.questids[$scene.command_window.index]].size
    y += 1
    if $scene.questswitches[$scene.questids[$scene.command_window.index]][i + 1] == true
     bitmap = RPG::Cache.icon("CompletedIcon")
     self.contents.blt(0, 4 + ( y * 24) , bitmap, Rect.new(0, 0, 18, 18))
     self.contents.draw_text_outline_custom(24, 0 + (y * 24), 456, 24, $qdata.objectives[$scene.questids[$scene.command_window.index]][i], 0, $qdata.compoutline, $qdata.comptext)
    else
     bitmap = RPG::Cache.icon("InProgressIcon")
     self.contents.blt(0, 4 + ( y * 24) , bitmap, Rect.new(0, 0, 18, 18))
     self.contents.draw_text_outline_custom(24, 0 + (y * 24), 456, 24, $qdata.objectives[$scene.questids[$scene.command_window.index]][i], 0, $qdata.incompoutline, $qdata.incomptext)
    end
  end
 end

end

#-------------------------------------------------------------------------------
# This is for the list of quests on the left:
#-------------------------------------------------------------------------------
class Window_Qmand < Window_Selectable
 def initialize(width, commands)
    super(0, 64, width, 416)
  self.contents = Bitmap.new(width - 32, commands.size * 32)
    @commands = commands
  @item_max = @commands.size
  self.index = 0
    refresh
 end

 def refresh
    self.contents.clear
    for i in 0...@commands.size
     self.contents.draw_text_outline_custom(0, 32 * i, self.contents.width, 32,@commands[i],1, $qdata.menuoutline, $qdata.menutext)
    end
 end
end


#-------------------- working-------------------------------
class Window_top < Window_Selectable
 def initialize
    super(0, 0, 640, 64)
    self.contents = Bitmap.new(640 - 32, 64 - 32)
    refresh
 end

 def refresh
   self.contents.clear
   self.cursor_rect.set(0 + 288 * 1, 0, 288, 32)
   self.contents.draw_text(0, 0, 288, 32, "Main Quests in Progress", 1)
   self.contents.draw_text(288, 0, 288, 32, "Side Quests in Progress", 1)
 end
end


   
#    (self.width-32, self.height-32)
#    @title_window.contents = Bitmap.new(640 - 32 , 64 - 32)
#    @title_window.contents.draw_text(0, 0, 288, 32, "Main Quests in Progress", 1)
#    @title_window.contents.draw_text(288, 0, 288, 32, "Side Quests in Progress", 1)

class Game_Temp
 # QSETUP This is where you add the variables that control the quests on the lists.
 attr_accessor :qupdate
 attr_accessor :qupdate2
 # You'll need one of these for every list. The script is setup by default to
 # use qupdate for the first list and qupdate2 for the second.
 #You can change these if you want.
 alias asdfghjkl initialize
 def initialize
  asdfghjkl
  # You'll need to add any new quest variables here, like this:
  @qupdate = []
  @qupdate2 = []
  for i in 0...10000
    # And here, too, like this:
    @qupdate[i] = []
    @qupdate2[i] = []
  end
  # That 10000 there is the maximum number of quests per list.
  # Once your game is completely finished, count the number of quests on each list.
  # There'll be a for loop like this in each of the quest lists.
  # Replace the 10000 there with the number of quests on the list.
  # This will lower the amount of time it takes to read the list.
  # Do the same to the 10000 both here and in the main method up at the top,
        # with the highest number of quests your lists have.
 end

end

class Scene_Save < Scene_File

 alias qwertyuiop write_save_data
 def write_save_data(file)
  qwertyuiop(file)
  # QSETUP You'll need to add any new quest variables here, too, like this:
  Marshal.dump($game_temp.qupdate, file)
  Marshal.dump($game_temp.qupdate2, file)
 end

end

class Scene_Load < Scene_File

 alias zxcvbnm read_save_data
 def read_save_data(file)
  zxcvbnm(file)
  # QSETUP Also need to add any new quest variable here, like this:
  $game_temp.qupdate = Marshal.load(file)
  $game_temp.qupdate2 = Marshal.load(file)
 end
end

this will create the top window. add the cursor. but can't get the cursor to work.
so its kinda stays still no mater what I change

Ryex

June 14, 2009, 01:53:42 pm #3 Last Edit: June 14, 2009, 01:56:10 pm by Ryexander
#-------------------- working-------------------------------
class Window_top < Window_Selectable
 def initialize
    super(0, 0, 640, 64)
    self.contents = Bitmap.new(640 - 32, 64 - 32)
    refresh
 end

 def refresh
   self.contents.clear
   self.cursor_rect.set(0 + 288 * self.index, 0, 288, 32)
   self.contents.draw_text(0, 0, 288, 32, "Main Quests in Progress", 1)
   self.contents.draw_text(288, 0, 288, 32, "Side Quests in Progress", 1)
 end
end


and this should create it in working order

    @command_window.active = true
# This creates the title window
    @top_window = Window_top.new
    @top_window.x = 0
    @top_window.y = 0
    @top_window.opacity = 200
    @top_window.active = true
    @top_window.index = @currentlist - 1

and yes you need the @command_window.active = true
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Jackolas

its further than I had before... and love you for getting me this far  :naughty:

but.... :???:
the cursor is going up and down
and not from left to right

Ryex

June 14, 2009, 02:20:46 pm #5 Last Edit: June 14, 2009, 02:23:34 pm by Ryexander

#-------------------- working-------------------------------
class Window_top < Window_Selectable
 def initialize
    super(0, 0, 640, 64)
    self.contents = Bitmap.new(640 - 32, 64 - 32)
    refresh
 end

 def refresh
   self.contents.clear
   self.contents.draw_text(0, 0, 288, 32, "Main Quests in Progress", 1)
   self.contents.draw_text(288, 0, 288, 32, "Side Quests in Progress", 1)
 end
def update_cursor_rect
   if @index < 0
     self.cursor_rect.empty
   else
    self.cursor_rect.set(0 + 288 * @index, 0, 288, 32)
   end
 end
end


sorry that should work

oh and @top_window.active = false is what i meant to put sorry
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Jackolas

omg, omg, omg... it works, it works, it works.  :D
ty ty ty ty ty ty ty ty ty ty SOOOOOOOO much Ryexander

Ryex

remember to add [Resolved] to the topic title never mind you did :P
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Jackolas

June 14, 2009, 02:43:41 pm #8 Last Edit: June 14, 2009, 02:58:16 pm by Jackolas
oke..

new problem  :'(

when I change room (like in change map)
and I open the quest log and close it again... whole rmxp player crashes with no error displayed.
probably something with cache or something

edit: probably messing with other scripts... looking true them as i type

Ryex

Quote from: Jackolas on June 14, 2009, 02:43:41 pm
oke..

new problem  :'(

when I change room (like in change map)
and I open the quest log and close it again... whole rmxp player crashes with no error displayed.
probably something with cache or something

edit: probably messing with other scripts... looking true them as i type



dose the whole window close?
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Jackolas

June 14, 2009, 03:25:59 pm #10 Last Edit: June 14, 2009, 03:27:24 pm by Jackolas
yeah... kinda says:  game.exe has run into an error jada jada jada

tried to remove 1 script at the time..
with no customs scripts left it still crashed.
loaded it into a new project and it seems to work :S
now adding scripts 1 by 1 to see where it crashes :S

Ryex

that's nothing to do with the script that's a program side error by the sound of it
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Jackolas

k. reloaded the original script without any edits and it seems to work.
retracing my steps atm.

Ryex

also if you put print commands like
 p 'hello1' p 'hello2'
in the methods that control exiting then you might be able to figure out where game.exe 'encountered an error and needs to close'
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Jackolas

June 14, 2009, 03:39:56 pm #14 Last Edit: June 14, 2009, 03:41:07 pm by Jackolas
found it... my big dumb noob mistake :^_^':

i added on line 53
     @backpic = Spriteset_Map.new

to get the map as bacground

and i had line 97 till 105
     Graphics.freeze
  @command_window.contents.clear
    @command_window.dispose
  @top_window.contents.clear
    @top_window.dispose
  @status_window.contents.clear
    @status_window.dispose
 end


forgot to add
    @backpic.dispose

ojp2010

So do this work like WoW Quest system? Kind of neat. You should up load so it can go into the database