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.
[VX] Given up, moved on

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 67
Eternal Newbie
The sticky said this was the section to ask for help on an existing script. I've been messing around with Omegas7's quest log script to change how it looks. I've managed to move the windows around kind of to my liking, but I'm wondering a few things.

EDIT: TL;DR Version: I want to make "snapshot_for_background" work for this scene. I also want to change the categories from "All Quests, Incomplete, Complete" to "All Quests, Story, Non-Story"


Priorities:
  • Sort Quests by "All Quests, Story Quests, Non-Story Quests" instead of the default "All, Complete, Incomplete"
  • Draw "snapshot_for_background" correctly when the quest scene is called instead of the black background
  • Draw all quest information (Banner, Tasks, etc) In the Description box or at least in the same scene rather than having to select the quest to see it

First, here is what my quest_scene looks like: EDIT: Updated with all of the modifications I've managed to be able to make myself so far


First, there is that black background that I am trying to get rid of. I want the game to show through a little, but I can't figure out which line I need to edit to change or remove that background. I already commented out the lines that draws the background, but it still shows up like that.
EDIT: I know it has something to do with calling 'snapshot_for_background' from the 'Scene_Base' script, but I can't get it to appear correctly. Here is a little snippet of the code that I've modified so far.
Code: [Select]
class Omega_Quest < Scene_Base
  include OMEGAS7::QUEST
  def initialize
    @index = 0
    @mode = 0
    @empty_list = false
    create_background
    create_quest_list
    create_quest_commands
    create_quest_description
    create_category
    create_information
  end
  def create_background
    @background = snapshot_for_background #Sprite_Base.new
#    @background.bitmap = snapshot_for_background #Cache.system(BACKGROUND.to_s)
#    @background.z = 50
#    @hud = Sprite_Base.new
#    @hud.bitmap = snapshot_for_background #Cache.system(HUD.to_s)
#    @hud.z = 60
  end

Second, the formatting for the description box is really strange, as you can see. For this one, I'm pretty sure I know which lines to edit, but i'm not sure how I should edit them. EDIT: FIXED

EDIT: One more thing, I want to change the display categories so that instead of "All Quests, Completed Quests, Incompleted Quests" I want it to show "All quests, Story-Related Quests, Non-Story-Related Quests". Also, I'd like to be able to make this display in reverse order (I noticed it displays in the order of the variables used to control them, I'd just like to reverse it, nothing fancy).

Third, I want to draw the Quest Banner and task list in the same box as the description, or at least in the same screen. I'm having a little trouble getting the task window to draw itself correctly.
EDIT: I kind of understand the variables used to draw the window but I can't seem to get the window to appear correctly on the same scene.

I realize this is quite a bit to ask for, but I hope someone can help me. It would be greatly appreciated.

My current version of the script (as of August 25th):
Code: [Select]
# =============================================================================
#                Omegas7's Ultimate Quest System Script.
# =============================================================================
#   Author: Omegas7.
#   Version: 3.0 (Final).
#   My Site: baseomega.forumer.com
# =============================================================================
#   This final version comes loaded with a better looking layout,
#   a more customizable configuration area, etc...
# =============================================================================
#   Features:
#     > Easy to create quests in the script.
#     > A quest works with a variable, no switches!
#     > Unlimited tasks for each quest! (Scroll Function)
#     > Incomplete and Complete icons.
#     > Set Background and HUD graphics for your own menu style!
#     > You can use pictures for each quest!
#     > Descriptions of each quest.
#     > Variable support! Display variables values for complex quests!
#     > Categories for ALL, COMPLETE, and INCOMPLETE quests.
#     > Automatically adds "Quest Completed" unlike older versions.
#     > Change Font sizes.
#     > Lots of customization options, check below.
# =============================================================================
#   Instructions:             (First time? Better read them)
#
#     Thanks for using this script.
#     It is quite an useful system, take your time reading the next:
#
#     First of all, let's create a new quest for our game.
#     Below, in the configurations area, you will find the
#     [QUEST CREATION AREA]. To create your own quest, you will
#     need to add some code. Here is the basic template:
#
#     QUESTS[ID] = ['Name',VAR,IconA,IconB,'Image']
#     TASKS[ID] = ['Do this','And this','And this']
#     DESCRIPTIONS[ID] = ['This is an awesome','quest for noobs']
#
#     ID will be your quest ID number.
#     So if you got 20 quests, your new quest ID would be 21.
#     'Name' is... The name lol. Make sure it to be inside quotes ' '.
#     VAR is the variable ID which controls this quest.
#     IconA is the incomplete icon index number.
#     IconB ia the complete one.
#     'Image' will be the picture displayed on top of your quest.
#     You can disable it by putting 'nil' (no quotes).
#
#     TASKS will be the array containing all the To-Do stuff of the
#     quest. Each task is a string, inside quotes ' '.
#     Each task, is separated by a comma.
#     You can have unlimited tasks (the window will become scrollable).
#     You can put \v[id] for showing variables in your tasks!
#
#     DESCRIPTIONS is like TASKS. Just that it will be the description
#     being shown in the main menu for the quest.
#     Each element is a text line.
#
#     Look at the demo if you need help.
#     For further help, let me know. My site is:
#     baseomega.forumer.com
# =============================================================================

module OMEGAS7
  module QUEST
    # =========================================================================
    #  Configuration Options.
    # =========================================================================
   
    # Exit returns to MAP or to MENU?
    EXIT_TO = "MENU"
    # If MENU, then, what slot will it appear on? (Counting from 0)
    MENU_RETURN_SLOT = 4
   
    # Background and HUD graphics, both in system folder.
    BACKGROUND = 'QUEST BG'
    HUD = 'QUEST HUD'
   
    # Tasks prefix and icon spacing (spaces before the quest name for the icon).
    TASKS_PREFIX = "- "
    ICON_SPACING = ""
   
    # Main menu quests and task lines font sizes:
    QUESTS_FONT_SIZE = 20
    TASKS_FONT_SIZE = 20
   
    # Category Icon Indexes.
    # [All,Completed,Incompleted]
    CATEGORY_ICONS = [100,101,99]
   
    # =========================================================================
    QUESTS = []               # Don't edit.
    TASKS = []                # Don't edit.
    DESCRIPTIONS = []         # Don't edit.
    STORY = []                # Addition
    # =========================================================================
   
    QUESTS[0] = ['Test the Demo',4,99,101,'StatusHeader']
    TASKS[0] = ['Find any bugs that you can',
    'Report said bugs',
    'Have fun with the demo',
    'Post questions or comments on the forum thread']
    DESCRIPTIONS[0] = ['Many things have been added to this demo. There are',
    'a lot of features to test, whether actively ',
    'or passively. Test as many things as you can.',
    'If an error comes up, please report it to Jon', 'so it can be fixed.']
    STORY[0] = [1]
   
    QUESTS[1] = ['Party Time!',5,99,101,'StatusHeader']
    TASKS[1] = ['Get your first Party Member','Get your second party member',
    'Check out the party arrangement menu option.']
    DESCRIPTIONS[1] = ['Having a party is the key to success. Make',
    'some friends. Gather as many people as you can to ',
    'help you. At the moment there are only two people ',
    'who can join the party: Zack and Chao. There is ',
    'a party management system to play with too, do ',
    'make sure to check that out.']
    STORY[1] = [1]
   
    QUESTS[2] = ['Travel The World',6,99,101,'StatusHeader']
    TASKS[2] = ['Talk to the Travel Agent',
    'Travel to the 4 lands',
    'Find the 4 swords. \v[7] have been found so far.',
    'Show them to Zack']
    DESCRIPTIONS[2] = ['A Travel System has been implemented. Talk to ',
    'the Travel Agent to start moving to a different land.',
    'In each land you will find an artifact. Collect them ',
    'all to complete this mission.']
    STORY[2] = [0]
   
  end
end



class Omega_Quest < Scene_Base
  include OMEGAS7::QUEST
  def initialize
    @index = 0
    @mode = 0
    @empty_list = false
    snapshot_for_background
    create_background
    create_quest_list
    create_quest_commands
    create_quest_description
    create_category
    create_information
  end
  #--------------------------------------------------------------------------
  # * Create Snapshot for Using as Background of Another Screen
  #--------------------------------------------------------------------------
  def snapshot_for_background
    $game_temp.background_bitmap.dispose
    $game_temp.background_bitmap = Graphics.snap_to_bitmap
    $game_temp.background_bitmap.blur
  end
  #------------------------------------------------------------------
  def create_background
    @background = Sprite_Base.new
    @background.bitmap = Cache.system(BACKGROUND.to_s)
    @background.z = -50
    @hud = Sprite_Base.new
    @hud.bitmap = Cache.system(HUD.to_s)
    @hud.z = -60
  end
  def create_quest_list
    @list = []
    @list[0] = []
    @list[1] = []
    @list[2] = []
    for i in 0...QUESTS.size
      if $game_variables[QUESTS[i][1].to_i].to_i > TASKS[i].size
        @list[0][i] = [QUESTS[i][0].to_s,true,i]
        @list[1][i] = [QUESTS[i][0].to_s,true,i]
      elsif $game_variables[QUESTS[i][1].to_i].to_i > 0
        @list[0][i] = [QUESTS[i][0].to_s,false,i]
        @list[2][i] = [QUESTS[i][0].to_s,false,i]
      end
    end
    @list[0].compact!
    @list[1].compact!
    @list[2].compact!
    @list.compact!
    if @list[0].empty?
      @empty_list = true
    end
  end
  def create_quest_commands #Quest List
    create_quest_list
    @command_window = Window_Quest_Command.new(180,@list[@mode])
    @command_window.height = 276
    @command_window.y = 57 #90
    @command_window.x = 0 #12
    @command_window.opacity = 255
    @index = @command_window.index
  end
  def create_quest_description #Description
    @window_description = Window_Base.new (180,0,364,416)
    @window_description.contents.font.size = QUESTS_FONT_SIZE
    @window_description.opacity = 255
    refresh_description
  end
  def refresh_description #Also description
    @window_description.contents.clear
    if @list[@mode][@command_window.index][2] != nil
      for i in 0...DESCRIPTIONS[@list[@mode][@command_window.index][2]].size
        txt = DESCRIPTIONS[@list[@mode][@command_window.index][2]][i].to_s
        @window_description.contents.draw_text(0,18*i,340,18,txt.to_s) #(0,18*i,260,18,txt.to_s)
      end
    end
  end
  def update
    @command_window.update
    @category.update
    if @mode != @category.index
      @mode = @category.index
      @command_window.dispose
      create_quest_commands
      refresh_description
    end
    if @index != @command_window.index
      @index = @command_window.index
      refresh_description
    end
    if Input.trigger?(Input::C) && @list[@mode][@command_window.index][2] != nil
      @background.dispose
      @hud.dispose
      @command_window.dispose
      @window_description.dispose
      @category.dispose
      @information.dispose
      $scene = Omega_Quest_View.new(@list[@mode][@command_window.index][2])
    elsif Input.trigger?(Input::C) && @list[@mode][@command_window.index][2] == nil
      Sound.play_buzzer
    end
    if Input.trigger?(Input::B)
      finish
    end
  end
  def create_category #Category selection
    @category = Window_Categories_Command.new(180)
    @category.opacity = 255
    @category.x = 0 #-6
    @category.y = 0 #40
  end
  def create_information #Mission counter
    @information = Window_Base.new(0,333,180,84) #(pos.x, pos.y, width, height) (544-180,416-100,180,100)
    @information.opacity = 255
    @information.contents.font.size = 16
    if @empty_list == true
      @information.contents.draw_text(0,0,250,24,"Current Missions: 0")
    else
      @information.contents.draw_text(0,0,250,24,"Current Missions: " + @list[0].size.to_s)
    end
    @information.contents.font.color = Color.new(255,167,0)
    @information.contents.draw_text(0,16,250,24,"Complete Missions: " + @list[1].size.to_s)
    @information.contents.font.color = Color.new(160,0,0)
    @information.contents.draw_text(0,32,250,24,"Incomplete Missions: " + @list[2].size.to_s)
  end
  def finish
    @background.dispose
    @hud.dispose
    @command_window.dispose
    @window_description.dispose
    @category.dispose
    @information.dispose
    case EXIT_TO
    when "MENU"
      $scene = Scene_Menu.new(MENU_RETURN_SLOT)
    when "MAP"
      $scene = Scene_Map.new
    end
  end
end

#=========Task List==============
class Omega_Quest_View < Scene_Base
  include OMEGAS7::QUEST
  def initialize(id)
    @font_size = 20
    @line_height = 25
    @id = id
    @limit_y = 0
    draw_picture if QUESTS[@id][4] != nil
    set_tasks
    create_window
    refresh_window
  end
  def draw_picture
    @picture = Sprite_Base.new
    @picture.bitmap = Cache.system(QUESTS[@id][4].to_s)
    @picture.x = (544/2) - (@picture.width/2)
    @picture.z = 250
  end
  def set_tasks
    @tasks = []
    for i in 0...TASKS[@id].size
      if $game_variables[QUESTS[@id][1]].to_i >= i + 1
        @tasks[i] = TASKS[@id][i].to_s
      end
    end
    if $game_variables[QUESTS[@id][1]].to_i > TASKS[@id].size
      @tasks.push('Mission Complete') #Quest Completed!
    end
  end
  def create_window
    height = @line_height * @tasks.size + 32
    y = 0
    if @picture != nil
      y += @picture.height
      @limit_y = @picture.height
    end
    @window = Window_Base.new(0,y,544,height)
  end
  def refresh_window
    @window.contents.clear
    @window.contents.font.size = @font_size
    @display = []
    for i in 0...@tasks.size
      @display[i] = @tasks[i].clone
      @display[i].to_s.gsub!(/\\V\[([0-9]+)\]/i) { $game_variables[$1.to_i] }
      @display[i].to_s.gsub!(/\\V\[([0-9]+)\]/i) { $game_variables[$1.to_i] }
      @window.contents.draw_text(0,i * @line_height,500,@line_height,TASKS_PREFIX.to_s + @display[i].to_s)
    end
  end
  def update
    if Input.press?(Input::DOWN) && ((@window.y + @window.height) > 416)
      @window.y -= 3
    elsif Input.press?(Input::UP) && (@window.y < @limit_y)
      @window.y += 3
    end
    if Input.trigger?(Input::B)
      @picture.dispose if @picture != nil
      @window.dispose
      $scene = Omega_Quest.new
    end
  end
end

#=============Selectable============

class Window_Quest_Command < Window_Selectable
  include OMEGAS7::QUEST

  attr_reader   :commands

  def initialize(width, commands, column_max = 1, row_max = 0, spacing = 32)
    @commands = commands
    @empty = false
    if @commands.empty?
      @commands[0] = ["No Missions",false]
      @empty = true
    end   
    if row_max == 0
      row_max = (@commands.size + column_max - 1) / column_max
    end
    super(0, 0, width, row_max * WLH + 32, spacing)
    @item_max = commands.size
    @column_max = column_max
    self.contents.font.size = TASKS_FONT_SIZE
    refresh
    self.index = 0
  end

  def refresh
    self.contents.clear
    for i in 0...@item_max
      draw_item(i)
    end
  end

  def draw_item(index, enabled = true)
    spacing = ICON_SPACING.to_s
    rect = item_rect(index)
    rect.x += 4
    rect.width -= 8
    self.contents.clear_rect(rect)
    self.contents.font.color = Color.new(255,0,0)
    self.contents.font.color.alpha = enabled ? 255 : 128
    if @empty == false
      if @commands[index][1] == true #quest complete
        self.contents.font.color = Color.new(255,167,0)
#        draw_icon(QUESTS[@commands[index][2]][3].to_i,rect.x,rect.y)
      else
        self.contents.font.color = Color.new(255,255,255) #quest incomplete
#        draw_icon(QUESTS[@commands[index][2]][2].to_i,rect.x,rect.y)
      end
    elsif @empty == true
      spacing = ""
    end
    self.contents.draw_text(rect, spacing + @commands[index][0].to_s)
  end
end

class Window_Categories_Command < Window_Selectable
  include OMEGAS7::QUEST

  attr_reader   :commands

  def initialize(width, column_max = 3, row_max = 1, spacing = 32)
    super(0, 0, width, row_max * WLH + 32, spacing)
    @commands = ['','','']
    @item_max = commands.size
    @column_max = column_max
    @icons = CATEGORY_ICONS
    refresh
    self.index = 0
  end

  def refresh
    self.contents.clear
    for i in 0...@item_max
      draw_item(i)
    end
  end

  def draw_item(index, enabled = true)
    rect = item_rect(index)
    rect.x += 4
    rect.width -= 8
    self.contents.clear_rect(rect)
    draw_icon(@icons[index],rect.x,rect.y)
  end
end
« Last Edit: August 27, 2011, 04:28:34 AM by JonFawkes »

**
Rep:
Level 67
Eternal Newbie
Log: Day 4, I still haven't got any help. I've been continually messing with the script with little success. Here is what I have so far.
Code: [Select]
# =============================================================================
#                Omegas7's Ultimate Quest System Script.
# =============================================================================
#   Author: Omegas7.
#   Version: 3.0 (Final).
#   My Site: baseomega.forumer.com
# =============================================================================
#   This final version comes loaded with a better looking layout,
#   a more customizable configuration area, etc...
# =============================================================================
#   Features:
#     > Easy to create quests in the script.
#     > A quest works with a variable, no switches!
#     > Unlimited tasks for each quest! (Scroll Function)
#     > Incomplete and Complete icons.
#     > Set Background and HUD graphics for your own menu style!
#     > You can use pictures for each quest!
#     > Descriptions of each quest.
#     > Variable support! Display variables values for complex quests!
#     > Categories for ALL, COMPLETE, and INCOMPLETE quests.
#     > Automatically adds "Quest Completed" unlike older versions.
#     > Change Font sizes.
#     > Lots of customization options, check below.
# =============================================================================
#   Instructions:             (First time? Better read them)
#
#     Thanks for using this script.
#     It is quite an useful system, take your time reading the next:
#
#     First of all, let's create a new quest for our game.
#     Below, in the configurations area, you will find the
#     [QUEST CREATION AREA]. To create your own quest, you will
#     need to add some code. Here is the basic template:
#
#     QUESTS[ID] = ['Name',VAR,IconA,IconB,'Image']
#     TASKS[ID] = ['Do this','And this','And this']
#     DESCRIPTIONS[ID] = ['This is an awesome','quest for noobs']
#
#     ID will be your quest ID number.
#     So if you got 20 quests, your new quest ID would be 21.
#     'Name' is... The name lol. Make sure it to be inside quotes ' '.
#     VAR is the variable ID which controls this quest.
#     IconA is the incomplete icon index number.
#     IconB ia the complete one.
#     'Image' will be the picture displayed on top of your quest.
#     You can disable it by putting 'nil' (no quotes).
#
#     TASKS will be the array containing all the To-Do stuff of the
#     quest. Each task is a string, inside quotes ' '.
#     Each task, is separated by a comma.
#     You can have unlimited tasks (the window will become scrollable).
#     You can put \v[id] for showing variables in your tasks!
#
#     DESCRIPTIONS is like TASKS. Just that it will be the description
#     being shown in the main menu for the quest.
#     Each element is a text line.
#
#     Look at the demo if you need help.
#     For further help, let me know. My site is:
#     baseomega.forumer.com
# =============================================================================

module OMEGAS7
  module QUEST
    # =========================================================================
    #  Configuration Options.
    # =========================================================================
   
    # Exit returns to MAP or to MENU?
    EXIT_TO = "MENU"
    # If MENU, then, what slot will it appear on? (Counting from 0)
    MENU_RETURN_SLOT = 4
   
    # Background and HUD graphics, both in system folder.
    BACKGROUND = 'QUEST BG'
    HUD = 'QUEST HUD'
   
    # Tasks prefix and icon spacing (spaces before the quest name for the icon).
    TASKS_PREFIX = "- "
    ICON_SPACING = ""
   
    # Main menu quests and task lines font sizes:
    QUESTS_FONT_SIZE = 20
    TASKS_FONT_SIZE = 20
   
    # Category Icon Indexes.
    # [All,Completed,Incompleted]
    CATEGORY_ICONS = [100,101,99]
   
    # =========================================================================
    QUESTS = []               # Don't edit.
    TASKS = []                # Don't edit.
    DESCRIPTIONS = []         # Don't edit.
    STORY = []                # Addition
    # =========================================================================
   
    QUESTS[0] = ['Test the Demo',4,99,101,'StatusHeader']
    TASKS[0] = ['Find any bugs that you can',
    'Report said bugs',
    'Have fun with the demo',
    'Post questions or comments on the forum thread']
    DESCRIPTIONS[0] = ['Many things have been added to this demo. There are',
    'a lot of features to test, whether actively ',
    'or passively. Test as many things as you can.',
    'If an error comes up, please report it to Jon', 'so it can be fixed.']
    STORY[0] = true
   
    QUESTS[1] = ['Party Time!',5,99,101,'StatusHeader']
    TASKS[1] = ['Get your first Party Member','Get your second party member',
    'Check out the party arrangement menu option.']
    DESCRIPTIONS[1] = ['Having a party is the key to success. Make',
    'some friends. Gather as many people as you can to ',
    'help you. At the moment there are only two people ',
    'who can join the party: Zack and Chao. There is ',
    'a party management system to play with too, do ',
    'make sure to check that out.']
    STORY[1] = true
   
    QUESTS[2] = ['Travel The World',6,99,101,'StatusHeader']
    TASKS[2] = ['Talk to the Travel Agent',
    'Travel to the 4 lands',
    'Find the 4 swords. \v[7] have been found so far.',
    'Show them to Zack']
    DESCRIPTIONS[2] = ['A Travel System has been implemented. Talk to ',
    'the Travel Agent to start moving to a different land.',
    'In each land you will find an artifact. Collect them ',
    'all to complete this mission.']
    STORY[2] = false
   
  end
end



class Omega_Quest < Scene_Base
  include OMEGAS7::QUEST
  def initialize
    @index = 0
    @mode = 0
    @empty_list = false
    snapshot_for_background
    create_background
    create_quest_list
    create_quest_commands
    create_quest_description
    create_category
    create_information
  end
  #--------------------------------------------------------------------------
  # * Create Snapshot for Using as Background of Another Screen
  #--------------------------------------------------------------------------
  def snapshot_for_background
    $game_temp.background_bitmap.dispose
    $game_temp.background_bitmap = Graphics.snap_to_bitmap
    $game_temp.background_bitmap.blur
  end
  #------------------------------------------------------------------
  def create_background
    @background = Sprite_Base.new
    @background.bitmap = Cache.system(BACKGROUND.to_s)
    @background.z = -50
    @hud = Sprite_Base.new
    @hud.bitmap = Cache.system(HUD.to_s)
    @hud.z = -60
  end
  def create_quest_list
    @list = []
    @list[0] = []
    @list[1] = []
    @list[2] = []
    for i in 0...QUESTS.size
      if $game_variables[QUESTS[i][1].to_i].to_i > TASKS[i].size
        @list[0][i] = [QUESTS[i][0].to_s,true,i]
        @list[1][i] = [QUESTS[i][0].to_s,true,i]
      elsif $game_variables[QUESTS[i][1].to_i].to_i > 0
        @list[0][i] = [QUESTS[i][0].to_s,false,i]
        @list[2][i] = [QUESTS[i][0].to_s,false,i]
      end
    end
    @list[0].compact!
    @list[1].compact!
    @list[2].compact!
    @list.compact!
    if @list[0].empty?
      @empty_list = true
    end
  end
  def create_quest_commands #Quest List
    create_quest_list
    @command_window = Window_Quest_Command.new(180,@list[@mode])
    @command_window.height = 276
    @command_window.y = 57 #90
    @command_window.x = 0 #12
    @command_window.opacity = 255
    @index = @command_window.index
  end
  def create_quest_description #Description
    @window_description = Window_Base.new (180,0,364,416)
    @window_description.contents.font.size = QUESTS_FONT_SIZE
    @window_description.opacity = 255
    refresh_description
  end
  def refresh_description #Also description
    @window_description.contents.clear
    if @list[@mode][@command_window.index][2] != nil
      for i in 0...DESCRIPTIONS[@list[@mode][@command_window.index][2]].size
        txt = DESCRIPTIONS[@list[@mode][@command_window.index][2]][i].to_s
        @window_description.contents.draw_text(0,18*i,340,18,txt.to_s) #(0,18*i,260,18,txt.to_s)
      end
    end
  end
  def update
    @command_window.update
    @category.update
    if @mode != @category.index
      @mode = @category.index
      @command_window.dispose
      create_quest_commands
      refresh_description
    end
    if @index != @command_window.index
      @index = @command_window.index
      refresh_description
    end
    if Input.trigger?(Input::C) && @list[@mode][@command_window.index][2] != nil
      @background.dispose
      @hud.dispose
      @command_window.dispose
      @window_description.dispose
      @category.dispose
      @information.dispose
      $scene = Omega_Quest_View.new(@list[@mode][@command_window.index][2])
    elsif Input.trigger?(Input::C) && @list[@mode][@command_window.index][2] == nil
      Sound.play_buzzer
    end
    if Input.trigger?(Input::B)
      finish
    end
  end
  def create_category #Category selection
    @category = Window_Categories_Command.new(180)
    @category.opacity = 255
    @category.x = 0 #-6
    @category.y = 0 #40
  end
  def create_information #Mission counter
    @information = Window_Base.new(0,333,180,84) #(pos.x, pos.y, width, height) (544-180,416-100,180,100)
    @information.opacity = 255
    @information.contents.font.size = 16
    if @empty_list == true
      @information.contents.draw_text(0,0,250,24,"Current Missions: 0")
    else
      @information.contents.draw_text(0,0,250,24,"Current Missions: " + @list[0].size.to_s)
    end
    @information.contents.font.color = Color.new(255,167,0)
    @information.contents.draw_text(0,16,250,24,"Complete Missions: " + @list[1].size.to_s)
    @information.contents.font.color = Color.new(160,0,0)
    @information.contents.draw_text(0,32,250,24,"Incomplete Missions: " + @list[2].size.to_s)
  end
  def finish
    @background.dispose
    @hud.dispose
    @command_window.dispose
    @window_description.dispose
    @category.dispose
    @information.dispose
    case EXIT_TO
    when "MENU"
      $scene = Scene_Menu.new(MENU_RETURN_SLOT)
    when "MAP"
      $scene = Scene_Map.new
    end
  end
end

#=========Task List==============
class Omega_Quest_View < Scene_Base
  include OMEGAS7::QUEST
  def initialize(id)
    @font_size = 20
    @line_height = 25
    @id = id
    @limit_y = 0
    draw_picture if QUESTS[@id][4] != nil
    set_tasks
    create_window
    refresh_window
  end
  def draw_picture
    @picture = Sprite_Base.new
    @picture.bitmap = Cache.system(QUESTS[@id][4].to_s)
    @picture.x = (544/2) - (@picture.width/2)
    @picture.z = 250
  end
  def set_tasks
    @tasks = []
    for i in 0...TASKS[@id].size
      if $game_variables[QUESTS[@id][1]].to_i >= i + 1
        @tasks[i] = TASKS[@id][i].to_s
      end
    end
    if $game_variables[QUESTS[@id][1]].to_i > TASKS[@id].size
      @tasks.push('Mission Complete') #Quest Completed!
    end
  end
  def create_window
    height = @line_height * @tasks.size + 32
    y = 0
    if @picture != nil
      y += @picture.height
      @limit_y = @picture.height
    end
    @window = Window_Base.new(0,y,544,height)
  end
  def refresh_window
    @window.contents.clear
    @window.contents.font.size = @font_size
    @display = []
    for i in 0...@tasks.size
      @display[i] = @tasks[i].clone
      @display[i].to_s.gsub!(/\\V\[([0-9]+)\]/i) { $game_variables[$1.to_i] }
      @display[i].to_s.gsub!(/\\V\[([0-9]+)\]/i) { $game_variables[$1.to_i] }
      @window.contents.draw_text(0,i * @line_height,500,@line_height,TASKS_PREFIX.to_s + @display[i].to_s)
    end
  end
  def update
    if Input.press?(Input::DOWN) && ((@window.y + @window.height) > 416)
      @window.y -= 3
    elsif Input.press?(Input::UP) && (@window.y < @limit_y)
      @window.y += 3
    end
    if Input.trigger?(Input::B)
      @picture.dispose if @picture != nil
      @window.dispose
      $scene = Omega_Quest.new
    end
  end
end

#=============Selectable============

class Window_Quest_Command < Window_Selectable
  include OMEGAS7::QUEST

  attr_reader   :commands

  def initialize(width, commands, column_max = 1, row_max = 0, spacing = 32)
    @commands = commands
    @empty = false
    if @commands.empty?
      @commands[0] = ["No Missions",false]
      @empty = true
    end   
    if row_max == 0
      row_max = (@commands.size + column_max - 1) / column_max
    end
    super(0, 0, width, row_max * WLH + 32, spacing)
    @item_max = commands.size
    @column_max = column_max
    self.contents.font.size = TASKS_FONT_SIZE
    refresh
    self.index = 0
  end

  def refresh
    self.contents.clear
    for i in 0...@item_max
      draw_item(i)
    end
  end

  def draw_item(index, enabled = true)
    spacing = ICON_SPACING.to_s
    rect = item_rect(index)
    rect.x += 4
    rect.width -= 8
    self.contents.clear_rect(rect)
    self.contents.font.color = Color.new(255,0,0)
    self.contents.font.color.alpha = enabled ? 255 : 128
    if @empty == false
      if @commands[index][1] == true #quest complete
        self.contents.font.color = Color.new(255,167,0)
#        draw_icon(QUESTS[@commands[index][2]][3].to_i,rect.x,rect.y)
      else
        self.contents.font.color = Color.new(255,255,255) #quest incomplete
#        draw_icon(QUESTS[@commands[index][2]][2].to_i,rect.x,rect.y)
      end
    elsif @empty == true
      spacing = ""
    end
    self.contents.draw_text(rect, spacing + @commands[index][0].to_s)
  end
end

class Window_Categories_Command < Window_Selectable
  include OMEGAS7::QUEST

  attr_reader   :commands

  def initialize(width, column_max = 3, row_max = 1, spacing = 32)
    super(0, 0, width, row_max * WLH + 32, spacing)
    @commands = ['','','']
    @item_max = commands.size
    @column_max = column_max
    @icons = CATEGORY_ICONS
    refresh
    self.index = 0
  end

  def refresh
    self.contents.clear
    for i in 0...@item_max
      draw_item(i)
    end
  end

  def draw_item(index, enabled = true)
    rect = item_rect(index)
    rect.x += 4
    rect.width -= 8
    self.contents.clear_rect(rect)
    draw_icon(@icons[index],rect.x,rect.y)
  end
end
As you can see in the first part of the configuration I have established a "STORY(i) = true/false" variable. Now onto this next part
Code: [Select]
  def create_quest_list
    @list = []
    @list[0] = []
    @list[1] = []
    @list[2] = []
    for i in 0...QUESTS.size
      if $game_variables[QUESTS[i][1].to_i].to_i > TASKS[i].size
        @list[0][i] = [QUESTS[i][0].to_s,true,i]
        @list[1][i] = [QUESTS[i][0].to_s,true,i]
      elsif $game_variables[QUESTS[i][1].to_i].to_i > 0
        @list[0][i] = [QUESTS[i][0].to_s,false,i]
        @list[2][i] = [QUESTS[i][0].to_s,false,i]
      end
    end
    @list[0].compact!
    @list[1].compact!
    @list[2].compact!
    @list.compact!
    if @list[0].empty?
      @empty_list = true
    end
  end
I'm pretty sure it's a matter of editing the definition of "for i in 0...QUESTS.size" to something. I know the logic behind it, I just don't know the syntax. I also don't quite understand what this section entirely means.

So I know the logic is something like
Code: [Select]
if STORY[i] = true
       Show in Story Category
else if STORY[i] = false
       Show in Non-story category
Which means I have to redefine the categories too. Now, I know these lines define the little box that show the category selection:
Code: [Select]
  def create_category #Category selection
    @category = Window_Categories_Command.new(180)
    @category.opacity = 255
    @category.x = 0 #-6
    @category.y = 0 #40
  end
And then these lines make the categories selectable
Code: [Select]
  def initialize(width, column_max = 3, row_max = 1, spacing = 32)
    super(0, 0, width, row_max * WLH + 32, spacing)
    @commands = ['','','']
    @item_max = commands.size
    @column_max = column_max
    @icons = CATEGORY_ICONS
    refresh
    self.index = 0
  end
But I can't identify the lines that define the categories. Maybe I have to write them myself?

Still looking for help if anyone can help.
« Last Edit: August 25, 2011, 07:43:06 PM by JonFawkes »

**
Rep:
Level 67
Eternal Newbie
Sorry to bump, but I really need to update.

So I figured out how to get the snapshot for background working. It was just a matter of putting the create_menu_background class under the "start" definition. I commented out the lines that drew the bitmaps that originally made up the HUD and Background. I'll post my modified version for everyone so they can use it.

I've given up on Omega's script though and moved on to Sky Valentine's script, which I have also customized similar to this script, but I hope some other newbie will learn from my little adventure.

Code: [Select]
# =============================================================================
#                Omegas7's Ultimate Quest System Script.
# =============================================================================
#   Author: Omegas7.
#   Version: 3.0 (Final).
#   My Site: baseomega.forumer.com
# =============================================================================
#   This final version comes loaded with a better looking layout,
#   a more customizable configuration area, etc...
# =============================================================================
#   Features:
#     > Easy to create quests in the script.
#     > A quest works with a variable, no switches!
#     > Unlimited tasks for each quest! (Scroll Function)
#     > Incomplete and Complete icons.
#     > Set Background and HUD graphics for your own menu style!
#     > You can use pictures for each quest!
#     > Descriptions of each quest.
#     > Variable support! Display variables values for complex quests!
#     > Categories for ALL, COMPLETE, and INCOMPLETE quests.
#     > Automatically adds "Quest Completed" unlike older versions.
#     > Change Font sizes.
#     > Lots of customization options, check below.
# =============================================================================
#   Instructions:             (First time? Better read them)
#
#     Thanks for using this script.
#     It is quite an useful system, take your time reading the next:
#
#     First of all, let's create a new quest for our game.
#     Below, in the configurations area, you will find the
#     [QUEST CREATION AREA]. To create your own quest, you will
#     need to add some code. Here is the basic template:
#
#     QUESTS[ID] = ['Name',VAR,IconA,IconB,'Image']
#     TASKS[ID] = ['Do this','And this','And this']
#     DESCRIPTIONS[ID] = ['This is an awesome','quest for noobs']
#
#     ID will be your quest ID number.
#     So if you got 20 quests, your new quest ID would be 21.
#     'Name' is... The name lol. Make sure it to be inside quotes ' '.
#     VAR is the variable ID which controls this quest.
#     IconA is the incomplete icon index number.
#     IconB ia the complete one.
#     'Image' will be the picture displayed on top of your quest.
#     You can disable it by putting 'nil' (no quotes).
#
#     TASKS will be the array containing all the To-Do stuff of the
#     quest. Each task is a string, inside quotes ' '.
#     Each task, is separated by a comma.
#     You can have unlimited tasks (the window will become scrollable).
#     You can put \v[id] for showing variables in your tasks!
#
#     DESCRIPTIONS is like TASKS. Just that it will be the description
#     being shown in the main menu for the quest.
#     Each element is a text line.
#
#     Look at the demo if you need help.
#     For further help, let me know. My site is:
#     baseomega.forumer.com
# =============================================================================

module OMEGAS7
  module QUEST
    # =========================================================================
    #  Configuration Options.
    # =========================================================================
   
    # Exit returns to MAP or to MENU?
    EXIT_TO = "MENU"
    # If MENU, then, what slot will it appear on? (Counting from 0)
    MENU_RETURN_SLOT = 4
   
    # Background and HUD graphics, both in system folder.
    BACKGROUND = 'QUEST BG'
    HUD = 'QUEST HUD'
   
    # Tasks prefix and icon spacing (spaces before the quest name for the icon).
    TASKS_PREFIX = "- "
    ICON_SPACING = ""
   
    # Main menu quests and task lines font sizes:
    QUESTS_FONT_SIZE = 20
    TASKS_FONT_SIZE = 20
   
    # Category Icon Indexes.
    # [All,Completed,Incompleted]
    CATEGORY_ICONS = [100,101,99]
   
    # =========================================================================
    QUESTS = []               # Don't edit.
    TASKS = []                # Don't edit.
    DESCRIPTIONS = []         # Don't edit.
    STORY = []                # Addition
    # =========================================================================
   
    QUESTS[0] = ['Test the Demo',4,99,101,'StatusHeader']
    TASKS[0] = ['Find any bugs that you can',
    'Report said bugs',
    'Have fun with the demo',
    'Post questions or comments on the forum thread']
    DESCRIPTIONS[0] = ['Many things have been added to this demo. There are',
    'a lot of features to test, whether actively ',
    'or passively. Test as many things as you can.',
    'If an error comes up, please report it to Jon', 'so it can be fixed.']
    STORY[0] = true
   
    QUESTS[1] = ['Party Time!',5,99,101,'StatusHeader']
    TASKS[1] = ['Get your first Party Member','Get your second party member',
    'Check out the party arrangement menu option.']
    DESCRIPTIONS[1] = ['Having a party is the key to success. Make',
    'some friends. Gather as many people as you can to ',
    'help you. At the moment there are only two people ',
    'who can join the party: Zack and Chao. There is ',
    'a party management system to play with too, do ',
    'make sure to check that out.']
    STORY[1] = true
   
    QUESTS[2] = ['Travel The World',6,99,101,'StatusHeader']
    TASKS[2] = ['Talk to the Travel Agent',
    'Travel to the 4 lands',
    'Find the 4 swords. \v[7] have been found so far.',
    'Show them to Zack']
    DESCRIPTIONS[2] = ['A Travel System has been implemented. Talk to ',
    'the Travel Agent to start moving to a different land.',
    'In each land you will find an artifact. Collect them ',
    'all to complete this mission.']
    STORY[2] = false
   
  end
end



class Omega_Quest < Scene_Base
  include OMEGAS7::QUEST
  def initialize
    @index = 0
    @mode = 0
    @empty_list = false
    create_menu_background
    create_background
    create_quest_list
    create_quest_commands
    create_quest_description
    create_category
    create_information
  end
  def create_background
    @background = Sprite_Base.new
    @background.bitmap = Cache.system(BACKGROUND.to_s)
    @background.z = -50
    @hud = Sprite_Base.new
    @hud.bitmap = Cache.system(HUD.to_s)
    @hud.z = -60
  end
  def create_quest_list
    @list = []
    @list[0] = []
    @list[1] = []
    @list[2] = []
    for i in 0...QUESTS.size
      if $game_variables[QUESTS[i][1].to_i].to_i > TASKS[i].size
        @list[0][i] = [QUESTS[i][0].to_s,true,i]
        @list[1][i] = [QUESTS[i][0].to_s,true,i]
      elsif $game_variables[QUESTS[i][1].to_i].to_i > 0
        @list[0][i] = [QUESTS[i][0].to_s,false,i]
        @list[2][i] = [QUESTS[i][0].to_s,false,i]
      end
    end
    @list[0].compact!
    @list[1].compact!
    @list[2].compact!
    @list.compact!
    if @list[0].empty?
      @empty_list = true
    end
  end
  def create_quest_commands #Quest List
    create_quest_list
    @command_window = Window_Quest_Command.new(180,@list[@mode])
    @command_window.height = 276
    @command_window.y = 57 #90
    @command_window.x = 0 #12
    @command_window.opacity = 255
    @index = @command_window.index
  end
  def create_quest_description #Description
    @window_description = Window_Base.new (180,0,364,416)
    @window_description.contents.font.size = QUESTS_FONT_SIZE
    @window_description.opacity = 255
    refresh_description
  end
  def refresh_description #Also description
    @window_description.contents.clear
    if @list[@mode][@command_window.index][2] != nil
      for i in 0...DESCRIPTIONS[@list[@mode][@command_window.index][2]].size
        txt = DESCRIPTIONS[@list[@mode][@command_window.index][2]][i].to_s
        @window_description.contents.draw_text(0,18*i,340,18,txt.to_s) #(0,18*i,260,18,txt.to_s)
      end
    end
  end
  def update
    @command_window.update
    @category.update
    if @mode != @category.index
      @mode = @category.index
      @command_window.dispose
      create_quest_commands
      refresh_description
    end
    if @index != @command_window.index
      @index = @command_window.index
      refresh_description
    end
    if Input.trigger?(Input::C) && @list[@mode][@command_window.index][2] != nil
      @background.dispose
      @hud.dispose
      @command_window.dispose
      @window_description.dispose
      @category.dispose
      @information.dispose
      $scene = Omega_Quest_View.new(@list[@mode][@command_window.index][2])
    elsif Input.trigger?(Input::C) && @list[@mode][@command_window.index][2] == nil
      Sound.play_buzzer
    end
    if Input.trigger?(Input::B)
      finish
    end
  end
  def create_category #Category selection
    @category = Window_Categories_Command.new(180)
    @category.opacity = 255
    @category.x = 0 #-6
    @category.y = 0 #40
  end
  def create_information #Mission counter
    @information = Window_Base.new(0,333,180,84) #(pos.x, pos.y, width, height) (544-180,416-100,180,100)
    @information.opacity = 255
    @information.contents.font.size = 16
    if @empty_list == true
      @information.contents.draw_text(0,0,250,24,"Current Missions: 0")
    else
      @information.contents.draw_text(0,0,250,24,"Current Missions: " + @list[0].size.to_s)
    end
    @information.contents.font.color = Color.new(255,167,0)
    @information.contents.draw_text(0,16,250,24,"Complete Missions: " + @list[1].size.to_s)
    @information.contents.font.color = Color.new(160,0,0)
    @information.contents.draw_text(0,32,250,24,"Incomplete Missions: " + @list[2].size.to_s)
  end
  def finish
    @background.dispose
    @hud.dispose
    @command_window.dispose
    @window_description.dispose
    @category.dispose
    @information.dispose
    case EXIT_TO
    when "MENU"
      $scene = Scene_Menu.new(MENU_RETURN_SLOT)
    when "MAP"
      $scene = Scene_Map.new
    end
  end
end

#=========Task List==============
class Omega_Quest_View < Scene_Base
  include OMEGAS7::QUEST
  def initialize(id)
    @font_size = 20
    @line_height = 25
    @id = id
    @limit_y = 0
    draw_picture if QUESTS[@id][4] != nil
    set_tasks
    create_window
    refresh_window
  end
  def draw_picture
    @picture = Sprite_Base.new
    @picture.bitmap = Cache.system(QUESTS[@id][4].to_s)
    @picture.x = (544/2) - (@picture.width/2)
    @picture.z = 250
  end
  def set_tasks
    @tasks = []
    for i in 0...TASKS[@id].size
      if $game_variables[QUESTS[@id][1]].to_i >= i + 1
        @tasks[i] = TASKS[@id][i].to_s
      end
    end
    if $game_variables[QUESTS[@id][1]].to_i > TASKS[@id].size
      @tasks.push('Mission Complete') #Quest Completed!
    end
  end
  def create_window
    height = @line_height * @tasks.size + 32
    y = 0
    if @picture != nil
      y += @picture.height
      @limit_y = @picture.height
    end
    @window = Window_Base.new(0,y,544,height)
  end
  def refresh_window
    @window.contents.clear
    @window.contents.font.size = @font_size
    @display = []
    for i in 0...@tasks.size
      @display[i] = @tasks[i].clone
      @display[i].to_s.gsub!(/\\V\[([0-9]+)\]/i) { $game_variables[$1.to_i] }
      @display[i].to_s.gsub!(/\\V\[([0-9]+)\]/i) { $game_variables[$1.to_i] }
      @window.contents.draw_text(0,i * @line_height,500,@line_height,TASKS_PREFIX.to_s + @display[i].to_s)
    end
  end
  def update
    if Input.press?(Input::DOWN) && ((@window.y + @window.height) > 416)
      @window.y -= 3
    elsif Input.press?(Input::UP) && (@window.y < @limit_y)
      @window.y += 3
    end
    if Input.trigger?(Input::B)
      @picture.dispose if @picture != nil
      @window.dispose
      $scene = Omega_Quest.new
    end
  end
end

#=============Selectable============

class Window_Quest_Command < Window_Selectable
  include OMEGAS7::QUEST

  attr_reader   :commands

  def initialize(width, commands, column_max = 1, row_max = 0, spacing = 32)
    @commands = commands
    @empty = false
    if @commands.empty?
      @commands[0] = ["No Missions",false]
      @empty = true
    end   
    if row_max == 0
      row_max = (@commands.size + column_max - 1) / column_max
    end
    super(0, 0, width, row_max * WLH + 32, spacing)
    @item_max = commands.size
    @column_max = column_max
    self.contents.font.size = TASKS_FONT_SIZE
    refresh
    self.index = 0
  end

  def refresh
    self.contents.clear
    for i in 0...@item_max
      draw_item(i)
    end
  end

  def draw_item(index, enabled = true)
    spacing = ICON_SPACING.to_s
    rect = item_rect(index)
    rect.x += 4
    rect.width -= 8
    self.contents.clear_rect(rect)
    self.contents.font.color = Color.new(255,0,0)
    self.contents.font.color.alpha = enabled ? 255 : 128
    if @empty == false
      if @commands[index][1] == true #quest complete
        self.contents.font.color = Color.new(255,167,0)
#        draw_icon(QUESTS[@commands[index][2]][3].to_i,rect.x,rect.y)
      else
        self.contents.font.color = Color.new(255,255,255) #quest incomplete
#        draw_icon(QUESTS[@commands[index][2]][2].to_i,rect.x,rect.y)
      end
    elsif @empty == true
      spacing = ""
    end
    self.contents.draw_text(rect, spacing + @commands[index][0].to_s)
  end
end

class Window_Categories_Command < Window_Selectable
  include OMEGAS7::QUEST

  attr_reader   :commands

  def initialize(width, column_max = 3, row_max = 1, spacing = 32)
    super(0, 0, width, row_max * WLH + 32, spacing)
    @commands = ['','','']
    @item_max = commands.size
    @column_max = column_max
    @icons = CATEGORY_ICONS
    refresh
    self.index = 0
  end

  def refresh
    self.contents.clear
    for i in 0...@item_max
      draw_item(i)
    end
  end

  def draw_item(index, enabled = true)
    rect = item_rect(index)
    rect.x += 4
    rect.width -= 8
    self.contents.clear_rect(rect)
    draw_icon(@icons[index],rect.x,rect.y)
  end
end