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.
Quest Journal v. 2.1

0 Members and 3 Guests are viewing this topic.

**
Rep:
Level 88
Are you alternating single quotes and double quotes (' and ")? They are counted seperately in RGSS2... you'll want to stick to jusy double quotes, usually, since apostrophes and single quotes are the same keyboard character!

If changing all the quotation marks to double quotes (or if you've already done that) doesn't work, let me know and I'll fiddle around with this tomorrow.

**
Rep:
Level 87
Okay, I see. The rest of the script was using apostrophes, but I used the double quotes like you did. It works now that I use apostrophes. Thanks.

**
Rep: +0/-0Level 84
can somebody please write a tutorial on how to use this? on how exactly step by step how to set up quests? because those instructions are def not noob friendly lol. but i really wanna use this script i have it installed and i can see it in my game but no idea on how to set them up. i can make quests in the game no problem like get a key open chest blah blah come to me get reward etc.

even the most basic tutorial will do because im completely lost. thx in advance and great great script btw


Code: [Select]
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Instructions:
#      Basically, set up all of your quests in the module below. The Constants
#    section is annotated, so read the comments near them to determine what you
#    should set these constants to. As you can see, they are filled in with
#    default values currently, and so that should give you an idea of what to
#    do.
#
#      Setting up quests can be a little bit harder. You will have to set one
#    of these up for every quest that you want represented in the scene. Refer
#    to the editable region inside the class Quest for further instructions
#
#      Once they are setup, you can activate them at any time in the game by
#    this code:
#
#      $game_party.quests[quest_id]
#
#    There are several methods you can call that are of relevance. Namely:
#
#        $game_party.quests[quest_id].reveal_objective (objective_id)
#        $game_party.quests[quest_id].conceal_objective (objective_id)
#        $game_party.quests[quest_id].complete_objective (objective_id)
#        $game_party.quests[quest_id].uncomplete_objective (objective_id)
#        $game_party.quests[quest_id].fail_objective (objective_id)
#        $game_party.quests[quest_id].unfail_objective (objective_id)
#        $game_party.quests[quest_id].complete?
#        $game_party.quests[quest_id].failed?
#        $game_party.quests[quest_id].reward_given = true/false
#        $game_party.quests[quest_id].concealed = true/false
#        $game_party.quests.remove (quest_id)
#
#    There are other methods that you can access, but they are irrelevant for
#    the purposes of controlling quest progress. These are fairly self-
#    explanatory methods, but in case they aren't, reveal_objective naturally
#    allows the specified objective to appear in the Quest Journal for browsing
#    by the user. complete_objective notes when an objective is complete, and
#    fail_objective notes when the player has done something that fails this
#    objective. complete? returns true if all primary objectives have been
#    completed and failed? returns true if any primary objective has been
#    failed. reward_given serves the function of a switch. You should
#    essentially make the reward event look like this:
#
#      @> Conditional Branch: Script: $game_party.quests[quest_id].complete?
#        @> Conditional Branch: Script: $game_party.quests[quest_id].reward_given
#          @> ...Thank you or whatever you want the event to say once the reward has been given
#        @> Else
#          @> ...Give Reward
#          @> Script: $game_party.quests[quest_id].reward_given = true
#        @> Branch End
#      @> Branch End
#
#     Later versions of this script will have an auto-reward system and also a
#     Journal to which the player can write notes.
#
#     You can also disable access to the Quest Log at any time with the code:
#       $game_system.quest_disabled = true
#
#     And you can change how it is accessed with the codes:
#     
#       $game_system.quest_keyaccess = true / false  # ON MAP
#       $game_system.quest_menuaccess = true / false # IN MENU
#
#     Also, in a message, \nq[quest_id] will retrieve the name of a quest and
#     print it in a message
#================================================================================
# *** Quest Data
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  This is the configuration class for the Quest Journal
#================================================================================

module ModAlg_QuestData
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Constants
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Editable Region
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  QUESTS_LABEL = 'Quests'        # What you want Quests to be called (eg. 'Missions')
  ACTIVE_QUEST_ICON = 149        # What icon signifies a quest is active
  COMPLETE_QUEST_ICON = 150      # What icon signifies a quest is complete
  FAILED_QUEST_ICON = 179        # What icon signifies a quest is failed
  BULLET_CHARACTER = '?'         # The character used for listing objectives
  ACTIVE_COLOUR = 0              # The colour of a quest that is active
  COMPLETE_COLOUR = 11           # The colour of a quest that is complete
  FAILED_COLOUR = 18             # The colour of a quest that is failed
  MENU_ACCESS = true             # Can the script be accessed through the menu?
  MENU_INDEX = 4                 # If above is true, where in the command window?
  KEY_ACCESS = false             # Can the quest log be accessed by a key         
  MAPKEY_BUTTON = Input::L       # If above is true, which button?
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Quest Data
  #----------------------------------------------------------------------------
  #  Returns skeleton data for the quesr
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def self.quest_data (id)
    # Set class variables to corresponding arguments
    objectives = []
    name = '??????'
    description = '??????????'
    icon_index = 0
    case id
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * EDITABLE REGION
    #------------------------------------------------------------------------
    #  To set up a quest, first identify it with an ID - this can be anything
    #  as long as it is not the same as another quest, but it is important to
    #  remember this ID as it is the only way to access your quest.
    #    In any case, the format for setting up a quest is:
    #
    #      when <quest_id> # Give the quest an ID number
    #        name = '<quest_name>'
    #        description = '<quest_description>'
    #        objectives[0] = '<first_objective>'
    #        ...
    #        objectives[n] = '<nth objective>'
    #        prime = [<objective_id>, ..., <objective_id>]
    #        icon_index = <quest_icon_index>
    #
    #    Each of these values have an importance.
    #      name is the name of the quest
    #      description is a small blurb explaining the overall goal of the quest
    #      objective[0..n] are short-term goals that lead to the overall goal
    #      primes are which objectives need to be complete before the quest is
    #        considered to be complete
    #      icon_index is the icon that represents the quest
    #
    #    Note that any of the above values can be omitted without throwing an
    #    error, but for the quest to work properly you should at least set the
    #    name, description, and objectives. If you do omit these, the default
    #    values are:
    #   
    #      name = '??????'
    #      description = '??????????'
    #      objectives = []
    #      prime = [all objectives]
    #      icon_index = 0
    #
    #   If you do want to require that all objectives must be satisfied before
    #   the quest is complete, then do not bother defining it. Otherwise, be
    #   sure to set it.
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    when 1 # Fetch
      name = 'Fetch'
      description = 'Martha needs someone to play with her dog'
      objectives[0] = 'Find a stick'
      objectives[1] = 'Throw the stick to the dog'
      objectives[2] = 'Retrieve the stick from the dog'
      icon_index = 79
    when 4 # Cat Retrieval
      name = 'Cat Retrieval'
      description = 'Mrs. Bunderby has lost her cat, and she has employed you to find it.'
      objectives[0] = 'Find the lost cat'
      objectives[1] = 'Climb the tree and retrieve the cat'
      objectives[2] = "Return a cat to Mrs. Bunderby"
      # Set prime objectives in an array based on index
      prime = [0, 2]
      icon_index = 137
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    # * END EDITABLE REGION
    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

no clue what that ^means lol

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Well, play through the demo and look at the events to see what is happening is the best way to do it I think.

**
Rep: +0/-0Level 84
this is what i'm having problems with

  Instructions:
#      Basically, set up all of your quests in the module below. The Constants
#    section is annotated, so read the comments near them to determine what you
#    should set these constants to. As you can see, they are filled in with
#    default values currently, and so that should give you an idea of what to
#    do.



where exactly do i do this in the module? and how would i go about doing it for every quest i make? i know how to do quests in vx . but im really lost in how i have to set them up with the  script??? sorry for the trouble

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
#  To set up a quest, first identify it with an ID - this can be anything
    #  as long as it is not the same as another quest, but it is important to
    #  remember this ID as it is the only way to access your quest.
    #    In any case, the format for setting up a quest is:
    #
    #      when <quest_id> # Give the quest an ID number
    #        name = '<quest_name>'
    #        description = '<quest_description>'
    #        objectives[0] = '<first_objective>'
    #        ...
    #        objectives[n] = '<nth objective>'
    #        prime = [<objective_id>, ..., <objective_id>]
    #        icon_index = <quest_icon_index>
    #
    #    Each of these values have an importance.
    #      name is the name of the quest
    #      description is a small blurb explaining the overall goal of the quest
    #      objective[0..n] are short-term goals that lead to the overall goal
    #      primes are which objectives need to be complete before the quest is
    #        considered to be complete
    #      icon_index is the icon that represents the quest




SO:

Code: [Select]
when 1 # Fetch
      name = 'Fetch'
      description = 'Martha needs someone to play with her dog'
      objectives[0] = 'Find a stick'
      objectives[1] = 'Throw the stick to the dog'
      objectives[2] = 'Retrieve the stick from the dog'
      icon_index = 79

sets up a quest with ID 1, that has the name Fetch, description "Martha needs someone to play with her dog", the objectives "find a stick", "throw the stick to the dog", and "retrieve the stick from the dog" and is represented by icon 79


I don't know what you don't understand :(
« Last Edit: January 11, 2009, 09:44:16 PM by Modern Algebra »

**
Rep: +0/-0Level 84
i understand that part. but where exactly do i put it in script? do i just keep adding them after the ones that are already their?
   when 1 # Fetch
      name = 'Fetch'
      description = 'Martha needs someone to play with her dog'
      objectives[0] = 'Find a stick'
      objectives[1] = 'Throw the stick to the dog'
      objectives[2] = 'Retrieve the stick from the dog'
      icon_index = 79
    when 4 # Cat Retrieval
      name = 'Cat Retrieval'
      description = 'Mrs. Bunderby has lost her cat, and she has employed you to find it.'
      objectives[0] = 'Find the lost cat'
      objectives[1] = 'Climb the tree and retrieve the cat'
      objectives[2] = "Return a cat to Mrs. Bunderby"
      # Set prime objectives in an array based on index
      prime = [0, 2]
      icon_index = 137


*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
do i just keep adding them after the ones that are already there?



yes.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Food for thought:

-Perhaps you could make it so that completing an objective when a quest isn't offered yet doesn't make the quest available? If you use .complete_objective(n), the corresponding quest can be prematurely activated.

-I'd love it if you could make variables work inside \nq[n]. I made common events for quest addition/expansion/completion using \nq[\v[4]] but it just shows \nq[variable contents].


1. I will make it more easily possible in the next version, but for now you can just conceal all the quests by default, and then unconceal them only when you first want them revealed. All you would need to do is go down to line 222 and change:

Code: [Select]
      @concealed = false
to
Code: [Select]
      @concealed = true

2. Just switch it around, so that it looks like:

Code: [Select]
    # Run Original Method
    modalg_quest_jrnl_spec_char_convert
    @text.gsub! (/\\NQ\[(\d+)\]/i) { $game_party.quests[$1.to_i] } # Name Quest

instead of the gsub being above. That way, it will convert \v[id] before nq, and it would work.

**
Rep: +0/-0Level 84
Having a bit of a problem...
I placed the scripts into my Script editor, not putting any quests in yet; just wanted to make sure there wasn't a problem with it.
And when I try to open my menu I get this error:
Spoiler for:
Line 924:
Spoiler for:
i += 1 if i >= ModAlg_QuestData::MENU_INDEX

Is it another script messing with this one?
Or do I need to implement a quest first?

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
If another script overwrites the initialize method of Window_Command, then that problem would occur. Try putting the Quest Journal below all of the other custom scripts you have and test it then. If that doesn't work, report back and tell me what scripts you have - I may want to see the scripts.rvdata too.

**
Rep: +0/-0Level 84
Below everything didn't work.
I took out each script that had a window_command in it, and the one that's affecting it is my Monster Book script (by Woratana).

Spoiler for:
#=============================================================
# * Window_Command Insert Tool
#=============================================================
class Window_Command < Window_Selectable
  unless method_defined? :wora_cominstool_wincom_ini
    alias wora_cominstool_wincom_ini initialize
    alias wora_cominstool_wincom_drawitem draw_item
  end
Or
Spoiler for:
@window_monlist = Window_Command.new(544, monlist, 2)

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Show me the entire script from Wora.

**
Rep: +0/-0Level 84
Here you go.
Edit: My bad. I should have put it in a code box first, fixed.

Spoiler for:
Code: [Select]
#===============================================================
# ? [VX] ? Monster Book II ? ?
#--------------------------------------------------------------
# ? by Woratana [woratana@hotmail.com]
# ? Thaiware RPG Maker Community
# ? Released on: 02/01/2009
# ? Version: 2.0
# ? Special Thanks: Momomo~ for interface from Monster Book XP version
#--------------------------------------------------------------
# ** FEATURES
#--------------------------------------------------------------
# - Built-in snippet to add 'Monster Book' in the menu's command
# - Show enemies' data in Monster Book after player fight with them
# - All the texts are editable in setup part
# - Call script to clear/complete Monster Book's data
# - Call script to show/hide monster's data in Monster Book
# - Compare monster's status with the highest level actors in party
# - Turn ON switch to stop adding data into Monster Book temporarily
# - Choose the monsters you don't want to show their name and data
#--------------------------------------------------------------
# ** HOW TO USE
#--------------------------------------------------------------
# * Call Scene Monster Book by call script:
#  $scene = Scene_MonsterBook.new

# * Complete all enemies' information by call script:
#  $game_system.set_monbook_complete

# * Clear all enemies' information by call script:
#  $game_system.reset_monbook
#--------------------------------------------------------------
# * Show enemy's information by call script:
#  $game_system.monbook[enemy_id] = true

# * Hide enemy's information by call script:
#  $game_system.monbook[enemy_id] = false

# ^ Change 'enemy_id' to ID of enemy you want
# ** e.g. $game_system.monbook[10] = true
#===============================================================

module Wora_Monbook

#===============================================================
# ** [Setup Part] - Config script in this part
#-------------------------------------------------------------- 
  SHOW_IN_MENU = true # Show Monster Book in Menu Command? (true / false)
  MENU_COMMAND = 'MonsterBook' # Menu command name for Monster Book
  MENU_INDEX = 4 # Index of menu command you want to insert monster book 
 
  TEXT_TITLE = 'Monster Book'
  # Monster Book Title (Show at top left of the screen)
  TEXT_FOUND = 'Found: '
  # Text before number of how many monster are found
  TEXT_COMPLETED = 'Completed: '
  # Text before percentage of how many monster are found
 
  TEXT_DOT = '.'
  # Text show after enemy's ID (e.g. '.' will make '2.' and ')' will make '2)' )
 
  COMPARE_STATUS = true
  # Use Compare Status System? It will compare enemy's status with highest level
  # actor in party. Show GREEN number if enemy has lower status.
  # Show RED-GRAY number if enemy has higher status. (true / false)
 
  NO_RECORD_SWITCH = 10
  # If this switch ID turn ON, any monster the player fight with won't be added
  # into Monster Book.
 
  NO_DATA_MONSTER = []
  # List of IDs of monster you don't want to show name and data on Monster Book
  # e.g. [1, 3, 5] will make monster ID 1, 3, and 5 show no data in Monster Book
#===============================================================
end

#===============================================================
# ** [Alias] Game_System
#--------------------------------------------------------------
class Game_System
  attr_accessor :monbook
  alias :wora_monbook_gamsys_ini :initialize
  def initialize
    wora_monbook_gamsys_ini
    create_monbook
  end
 
  def create_monbook
    @monbook ||= Array.new($data_enemies.size) {false}
  end
 
  def set_monbook_complete
    @monbook = Array.new($data_enemies.size) {true}
    @monbook[0] = false
  end
 
  def reset_monbook
    @monbook = Array.new($data_enemies.size) {false}
  end
end

#===============================================================
# ** [Alias] Game_Troop
#--------------------------------------------------------------
class Game_Troop < Game_Unit
  alias :wora_monbook_gamtroop_setup :setup
  def setup(*args)
    wora_monbook_gamtroop_setup(*args)
    $game_system.create_monbook
    unless $game_switches[Wora_Monbook::NO_RECORD_SWITCH]
      @enemies.each {|e| $game_system.monbook[e.enemy_id] = true }
    end
  end
end

#===============================================================
# ** Window_MonsterBHelp
#--------------------------------------------------------------
class Window_MonsterBHelp < Window_Base
  include Wora_Monbook
 
  def initialize
    super(0, 0, 544, WLH + 32)
    # Write Monster Book Title
    contents.font.color = system_color
    contents.draw_text(0, 0, contents.width, WLH, TEXT_TITLE)
    # Calculate found monster & complete percentage
    found_count = 0
    $game_system.monbook.each {|e| found_count += 1 if e }
    percent_count = (found_count * 100) / ($data_enemies.size - 1)
    # Collect & Store Text in variables
    found_text = found_count.to_s + '/' + ($data_enemies.size - 1).to_s
    percent_text = percent_count.to_s + '%'
    mid_text = ' | '
    right_text = TEXT_FOUND + found_text + mid_text + TEXT_COMPLETED +
  percent_text
    # Calculate Text Width
    found_t_width = contents.text_size(TEXT_FOUND).width
    found_width = contents.text_size(found_text).width
    percent_t_width = contents.text_size(TEXT_COMPLETED).width
    mid_width = contents.text_size(mid_text).width
    right_width = contents.text_size(right_text).width
    # Write Monster Found & Complete Percentage
    contents.font.color = normal_color
    contents.draw_text(contents.width - right_width, 0, contents.width, WLH,
  TEXT_FOUND)
    contents.draw_text(contents.width - right_width + found_t_width +
  found_width, 0, contents.width, WLH, mid_text + TEXT_COMPLETED)
    contents.font.color = crisis_color
    contents.draw_text(contents.width - right_width + found_t_width, 0,
  contents.width, WLH, found_text)
    contents.draw_text(contents.width - right_width + found_t_width +
  found_width + mid_width + percent_t_width, 0, contents.width, WLH,
  percent_text)
  end
end

#===============================================================
# ** Window_MonsterBDetail
#--------------------------------------------------------------
class Window_MonsterBDetail < Window_Base
  def initialize(window_temp)
    super(window_temp.x, window_temp.y, window_temp.width, window_temp.height)
    self.opacity = 0
    @win_image = Window_Base.new(self.x, self.y, self.width, self.height)
    self.z = @win_image.z + 1
    @last_enemy = 0
  end
 
  def visible=(bool)
    super
    @win_image.visible = bool
  end
 
  def dispose
    @win_image.dispose
    super
  end
 
  def write_detail(enemy_id)
    return if @last_enemy == enemy_id
    contents.clear
    @win_image.contents.clear
    @last_enemy = enemy_id
    data = $data_enemies[enemy_id]
    # Draw Enemy Graphic
    bitmap = Cache.battler(data.battler_name, data.battler_hue)
    bw = bitmap.width < 160 ? (160 - bitmap.width) / 2 : 0
    bh = contents.height - bitmap.height
    @win_image.contents.blt(bw, bh, bitmap, bitmap.rect)
    bitmap.dispose
    # Write Name
    contents.font.color = normal_color
    contents.draw_text(0, 0, contents.width, WLH,
  data.id.to_s + Wora_Monbook::TEXT_DOT + ' ' + data.name)
    # Write Enemy Status
    hpx = 120
    draw_enemy_stat(data, contents.width - (hpx * 2) - 32, 0, hpx, 'hp')
    draw_enemy_stat(data, contents.width - hpx, 0, hpx, 'mp')
    draw_enemy_stat(data, contents.width - (hpx * 2) - 32, WLH * 2, hpx, 'atk')
    draw_enemy_stat(data, contents.width - hpx, WLH * 2, hpx, 'def')
    draw_enemy_stat(data, contents.width - (hpx * 2) - 32, WLH * 3, hpx, 'spi')
    draw_enemy_stat(data, contents.width - hpx, WLH * 3, hpx, 'agi')
    draw_enemy_stat(data, contents.width - (hpx * 2) - 32, WLH * 4, hpx, 'hit')
    draw_enemy_stat(data, contents.width - hpx, WLH * 4, hpx, 'eva')
    draw_enemy_stat(data, contents.width - (hpx * 2) - 32, WLH * 6, hpx, 'exp')
    draw_enemy_stat(data, contents.width - hpx, WLH * 6, hpx, 'gold')
    rect = Rect.new(contents.width - (hpx * 2) - 8, (WLH * 8) - 8, 216,
  (WLH * 4) + 16)
    contents.fill_rect(rect, Color.new(0,0,0,140))
    lsize = 2 # Line Size
    lcolor = Color.new(255,255,255,160) # Line Color
    contents.fill_rect(rect.x, rect.y, lsize, rect.height, lcolor)
    contents.fill_rect(rect.x, rect.y, rect.width, lsize, lcolor)
    contents.fill_rect(rect.x + rect.width - lsize, rect.y, lsize,
  rect.height, lcolor)
    contents.fill_rect(rect.x, rect.y + rect.height - lsize, rect.width,
  lsize, lcolor)
    contents.font.color = system_color
    contents.draw_text(contents.width - (hpx * 2), WLH * 8, 200, WLH,
  'Drop Item 1')
    draw_enemy_drop(data, 1, contents.width - (hpx * 2), WLH * 9)
    contents.font.color = system_color
    contents.draw_text(contents.width - (hpx * 2), WLH * 10, 200, WLH,
  'Drop Item 2')
    draw_enemy_drop(data, 2, contents.width - (hpx * 2), WLH * 11)
  end

  def draw_enemy_stat(actor, x, y, width, stat)
    color1 = system_color
    color2 = normal_color
    slash = false
    # Find highest level actor
    if Wora_Monbook::COMPARE_STATUS
      hactor = ($game_party.members.sort {|a,b| a.level <=> b.level })
      hactor = hactor[hactor.size - 1]
    end
    case stat
    when 'hp'
      vocab = Vocab::hp
      number = actor.maxhp
      hnumber = hactor.maxhp if Wora_Monbook::COMPARE_STATUS
      slash = true
    when 'mp'
      vocab = Vocab::mp
      number = actor.maxmp
      hnumber = hactor.maxmp if Wora_Monbook::COMPARE_STATUS
      slash = true
    when 'atk'
      vocab = Vocab::atk
      number = actor.atk
      hnumber = hactor.atk if Wora_Monbook::COMPARE_STATUS
    when 'def'
      vocab = Vocab::def
      number = actor.def
      hnumber = hactor.def if Wora_Monbook::COMPARE_STATUS
    when 'spi'
      vocab = Vocab::spi
      number = actor.spi
      hnumber = hactor.spi if Wora_Monbook::COMPARE_STATUS
    when 'agi'
      vocab = Vocab::agi
      number = actor.agi
      hnumber = hactor.agi if Wora_Monbook::COMPARE_STATUS
    when 'hit'
      vocab = 'HIT'
      number = actor.hit
      hnumber = hactor.hit if Wora_Monbook::COMPARE_STATUS
    when 'eva'
      vocab = 'EVA'
      number = actor.eva
      hnumber = hactor.eva if Wora_Monbook::COMPARE_STATUS
    when 'exp'
      vocab = 'EXP'
      number = actor.exp
      color2 = crisis_color
    when 'gold'
      vocab = 'Gold'
      number = actor.gold
      color2 = crisis_color
    end
    if Wora_Monbook::COMPARE_STATUS and !hnumber.nil?
      if hnumber > number # Higher
        color2 = power_up_color
      elsif hnumber < number # Less
        color2 = power_down_color
      elsif hnumber == number # Equal
        color2 = normal_color
      end
    end
    contents.font.color = color1
    contents.draw_text(x, y, 50, WLH, vocab)
    xr = x + width
    contents.font.color = color2
    if slash
      contents.draw_text(xr - 95, y, 40, WLH, number, 2)
      contents.draw_text(xr - 55, y, 11, WLH, '/', 2)
    end
    w_ava = slash ? 40 : 80
    contents.draw_text(xr - w_ava, y, w_ava, WLH, number, 2)
  end
 
  def draw_enemy_drop(actor, drop_id, x, y)
    drop = eval('actor.drop_item' + drop_id.to_s)
    if drop.kind.zero?
      contents.font.color = normal_color
      contents.draw_text(x, y, 200, WLH, "  ---------")
    else
      case drop.kind
      when 1; item = $data_items[drop.item_id]
      when 2; item = $data_weapons[drop.weapon_id]
      when 3; item = $data_armors[drop.armor_id]
      end
      draw_item_name(item, x, y)
    end
  end
end
#===============================================================
# ** Scene_MonsterBook
#--------------------------------------------------------------
class Scene_MonsterBook < Scene_Base
  def initialize(from_menu = false)
    @from_menu = from_menu
  end
 
  def start
    super
    create_menu_background
    $game_system.create_monbook
    @window_help = Window_MonsterBHelp.new
    # Create Monster List
    monlist = []
    $game_system.monbook.each_index do |i|
      next if i == 0 # The first index in $data_enemies is blank
      # If player found the monster
      if $game_system.monbook[i] and
    !Wora_Monbook::NO_DATA_MONSTER.include?(i)
        montext = i.to_s + Wora_Monbook::TEXT_DOT + ' ' + $data_enemies[i].name
      else # If player haven't found
        montext = i.to_s + Wora_Monbook::TEXT_DOT
      end
      monlist << montext
    end
    @window_monlist = Window_Command.new(544, monlist, 2)
    @window_monlist.y = @window_help.height
    @window_monlist.height = Graphics.height - @window_help.height
    @window_monlist.active = true
    @window_mondetail = Window_MonsterBDetail.new(@window_monlist)
    @window_mondetail.visible = false
  end
 
  def update
    super
    if @window_monlist.active
      @window_monlist.update
      if Input.trigger?(Input::C)
        # View monster's detail if found monster
        if $game_system.monbook[@window_monlist.index + 1] and
        !Wora_Monbook::NO_DATA_MONSTER.include?(@window_monlist.index + 1)
          Sound.play_decision
          @window_monlist.active = false
          @window_monlist.visible = false
          @window_mondetail.active = true
          @window_mondetail.visible = true
          @window_mondetail.write_detail(@window_monlist.index + 1)
        else
          Sound.play_cancel
        end
      elsif Input.trigger?(Input::B)
        Sound.play_cancel
        # Return
        $scene = @from_menu ? Scene_Menu.new(Wora_Monbook::MENU_INDEX) :
      Scene_Map.new
      end
    elsif @window_mondetail.active
      if Input.trigger?(Input::B)
        Sound.play_cancel
        @window_monlist.active = true
        @window_monlist.visible = true
        @window_mondetail.active = false
        @window_mondetail.visible = false
      end
    end
  end
 
  def terminate
    super
    dispose_menu_background
    @window_help.dispose
    @window_monlist.dispose
    @window_mondetail.dispose
  end
end

#=============================================================
# * Window_Command Insert Tool
#=============================================================
class Window_Command < Window_Selectable
  unless method_defined? :wora_cominstool_wincom_ini
    alias wora_cominstool_wincom_ini initialize
    alias wora_cominstool_wincom_drawitem draw_item
  end
 
  #------------------------------------
  # * [Alias] Initialize
  #------------------------------------
  def initialize(*args)
    @disabled_commands = [] # Array to keep track of disabled commands
    wora_cominstool_wincom_ini(*args)
  end
 
  #------------------------------------
  # * [Alias] Draw_Item
  #------------------------------------
  def draw_item(*args)
    wora_cominstool_wincom_drawitem(*args)
    # Set array's index to 1 if command is disabled
    @disabled_commands[args[0]] = args[1].nil? || args[1] ? nil : true
  end
 
  #------------------------------------
  # * Insert Command
  #------------------------------------
  def ins_command(index, text)
    @commands.insert(index, text) # Insert new commands
    @disabled_commands.insert(index, nil)
    # Set new height for window
    old_disabled_commands = @disabled_commands.dup
    self.height = (@commands.size + @column_max - 1) / @column_max * WLH + 32
    @item_max = @commands.size # Update @item_max to make refresh works correctly
    create_contents            # Create new content because window's size changed
    refresh                    # Redraw window's contents
    old_disabled_commands.each_index do |i|
      if !old_disabled_commands[i].nil?
        draw_item(i, false)    # Draw commands that disabled before
      end
    end
  end
 
  #------------------------------------
  # * Add Command
  #------------------------------------
  def add_command(text)
    ins_command(@commands.size, text) # Add new command to new index
  end
end

#=============================================================
# * Add command linked to Monster Book in Menu
#=============================================================
if Wora_Monbook::SHOW_IN_MENU
  class Scene_Menu < Scene_Base 
    #--------------------------------------------------------------------------
    # * Sort New Command(s)
    #--------------------------------------------------------------------------
    def wsort_newcommand
      @wsorted_command ||= [] # Array to collect sorted commands
      wnewcommand = @wnewcommand - @wsorted_command # Remove sorted commands
      wnewcommand.sort.each {|i| @menu_index += 1 if @menu_index >= i }
      @command_window.index = @menu_index # Set window's index to new index
      @wsorted_command = @wsorted_command + @wnewcommand # Add sorted commands
    end

    #--------------------------------------------------------------------------
    # * [Alias] Create Command Window
    #--------------------------------------------------------------------------
    alias wora_menucomorg_scemenu_crecomwin create_command_window
    def create_command_window(*args)
      wora_menucomorg_scemenu_crecomwin(*args)
      # Insert new command
      @command_window.ins_command(Wora_Monbook::MENU_INDEX,
    Wora_Monbook::MENU_COMMAND)
      # Set index to correct one if @menu_index is after/equal to new command
      @wnewcommand ||= []
      @wnewcommand << Wora_Monbook::MENU_INDEX
      wsort_newcommand
    end

    #--------------------------------------------------------------------------
    # * [Alias] Update Command Selection
    #--------------------------------------------------------------------------
    alias wora_menucomorg_scemenu_updcomsel update_command_selection
    def update_command_selection(*args)
      @menucomorpg_change = false
      # If player choose new command
      if Input.trigger?(Input::C) and @command_window.index ==
      Wora_Monbook::MENU_INDEX
        Sound.play_decision
        $scene = Scene_MonsterBook.new(true)
      else # If player choose index after new command
        if Input.trigger?(Input::C) and @command_window.index >
        Wora_Monbook::MENU_INDEX
          @command_window.index -= 1 # Decrease index to make old update works
          @menucomorpg_change = true
        end
        wora_menucomorg_scemenu_updcomsel(*args)
      end
      @command_window.index += 1 if @menucomorpg_change # Increase index back
    end
   
    #--------------------------------------------------------------------------
    # * [Alias] Update Actor Selection
    #--------------------------------------------------------------------------
    alias wora_menucomorg_scemenu_updactsel update_actor_selection
    def update_actor_selection(*args)
      @menucomorpg_change = false
      # If player choose index after new command
      if Input.trigger?(Input::C) and @command_window.index >
      Wora_Monbook::MENU_INDEX
        @command_window.index -= 1 # Decrease index to make old update works
        @menucomorpg_change = true
      end
      wora_menucomorg_scemenu_updactsel(*args)
      @command_window.index += 1 if @menucomorpg_change # Increase index back
    end
  end
end
« Last Edit: January 17, 2009, 08:22:24 PM by Noriku »

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Ah, well that is poor naming on my part. Go through my script and use CTRL-H to find all instances of
Code: [Select]
disabled_commands
and replace it with
Code: [Select]
ma_disabled_commands

**
Rep: +0/-0Level 84
Works perfectly!
Thanks so much!

**
Rep: +0/-0Level 85
This probably has a very simple solution, but I need your help in resolving a script conflict between this and another script that adds itself to the menu. No matter the menu index of Quest Journal, it disappears whenever I add this script (which has its own menu placement, of course). Here's the script:

Spoiler for:
Code: [Select]
################################################################################
=begin
################################################################################
Name:         Factions

By:           SojaBird
Version:      1.0 (full release)
Data:         03-01-'09
Site:         http://www.nestcast.blogspot.com

Discription:  The script is finished!

              After a long BETA-stage, the script finaly works as it should.
              Please be sure that you read all the info on how to use the
              script, before doing anything. After reading, you can go and edit
              the module wich is directly below the script info. With every
              change you make, the script will adept it's functionality, so that
              the factions you add, are displayed as they should.
             
              Enjoy and have fun!
             
             
              Greatzz,
              SojaBird.
               
################################################################################
      (\_/)                                                         (\_/)
      (o.o)                    READ BEFORE USING                    (o.o)
      (> <)                                                         (> <)

~Call script~
  Faction startup:
    add_faction(name, max_value, start_value, *help_text, *pic)
      This will add a faction to the system. Value's that must be insert are;
      - name (name of the faction)
      - max_value (the heighest amount of reputation the faction can get)
      - start_value (the reputation of the faction when entered in the system)
      Value's that could be insert for a personal touch are;
      - help_text (the text that will be displayed when the faction is selected
        in the menu (add ## to go the second line))
      - pic (the picture that can be shown in the menu)
    delete_faction(name)
      This will delete a faction from the system with the name of your choice.
      Value's that must be insert are;
      - name (the name of the faction that need to be deleted)
     
  Faction value changes:
    set_faction_value(name, value)
      This will set the value of a faction to the value of your choice. Value's
      that must be insert are;
      - name (the name of the faction that gets a new value)
      - value (the new value of the faction)
    add_faction_value(name, value)
      This will add an amount of reputation of your choice to a faction.
      Value's that must be insert are;
      - name (the name of the faction that gets reputation)
      - value (the value that needs to be add to the faction reputation)
    remove_faction_value(name, value)
      This will remove an amount of reputation of your choice from a faction.
      Value's that must be insert are;
      - name (the name of the faction that lose reputation)
      - value (the value that needs to be removed from the faction reputation)

  Faction max_value changes:
    set_faction_value_max(name, value)
      This will set the max_value of a faction to the value of your choice.
      Value's that must be insert are;
      - name (the name of the faction that gets a new max_value)
      - value (the new max_value of the faction)
    add_faction_value_max(name, value)
      This will add an amount to the max_value of your choice to a faction.
      Value's that must be insert are;
      - name (the name of the faction that gets a heigher max_value)
      - value (the value that needs to be add to the faction max_value)
    remove_faction_value_max(name, value)
      This will remove an amount of the max_value of your choice from a
      faction. Value's that must be insert are;
      - name (the name of the faction that gets a lower max_value)
      - value (the value that needs to be removed from the faction max_value)

  Faction info changes:
    change_faction_help(name, text)
      This will changes the help_text of a faction. Value's that must be insert
      are;
      - name (the name of the faction that gets a new help_text)
      - text (the new help text for the faction (a "/" will jump to the 2nd
        line))
    change_faction_pic(name, pic)
      This will changes the picture of a faction. Value's that must be insert
      are;
      - name (the name of the faction that gets a new picture)
      - pic (the name of the picture for the faction)

~Conditional Branch~
    faction?(name)
      This will check if a faction exists in the system. Value's that must be
      instert are;
      - name (the name of the faction that needs to be check on existence)
    faction_value?(name, value)
      This will check if a faction has a sertain minimum value. Value's that
      must be insert are;
      - name (the name of the faction that needs to have a sertain value)
      - value (the minimun value the faction needs to have)

~Extra's~
    F5 in testmode
      When you're in the DEBUG_mode (testmode), F5 will bring up the factions
      with their data, stored by the system.
    \FAC[name] in message
      When you put \FAC[name] in a message, it'll transform to the current value
      of the selected faction. Value's that must be insert are;
      - name (the name of the faction wich value must be displayed)

################################################################################
=end
################################################################################
module SojaBird_Factions
####################################
# Customize module
  You_Name_It = "Reputation" # Name that will showup in the menu
  Line_Height = 19 # Size of the text and bars (default = 19, wich will show 8 factions)
  Help_Name = 2 # Add's the faction-name in the descriptionwindow [0="Description", 1="Name: Description", 2="Name"|"Description"]
  Help_Picture = true # Add's the faction-picture to the descriptionwindow [true=Display, false=Don't display]
  Display_Picture = true # Add's the faction-picture to the selectionwindow [true=Display, false=Don't display]
  Empty_Picture = "" # The picture to be shown when no picture is added to the faction-info (put "" for realy empty)
  Empty_Description = "No extra information available." # The text that is displayed when there's no text added to the faction-info)
# Customize module: End
#####################################
end
#####################################
# Call script functions
  #-----------------------------------#
  # Change factions
    def add_faction(name, max_value, start_value, help_text = SojaBird_Factions::Empty_Description, pic = SojaBird_Factions::Empty_Picture)
      @info = [name, max_value, start_value, help_text, pic]
      @info[1] = @info[1] * -1 if @info[2] < 0
      $game_temp.faction_data.each do |data|
        if data[0] == name
          $game_temp.faction_data.delete_at $game_temp.faction_data.index(data)
        end
      end
      $game_temp.faction_data.push @info
      correct_faction_values(@info)
    end
   
    def delete_faction(name)
      $game_temp.faction_data.each do |data|
      if data[0] == name
          $game_temp.faction_data.delete(data)
        end
      end
    end
  # Change factions: End
  #-----------------------------------#
  # Change value
    def set_faction_value(name, value)
      $game_temp.faction_data.each do |data|
        if data[0] == name
          data[2] = value
          correct_faction_values(data)
        end
      end
    end
   
    def add_faction_value(name, value)
      $game_temp.faction_data.each do |data|
        if data[0] == name
          data[2] += value
          correct_faction_values(data)
        end
      end
    end
   
    def remove_faction_value(name, value)
      $game_temp.faction_data.each do |data|
        if data[0] == name
          data[2] -= value
          correct_faction_values(data)
        end
      end
    end
  # Change value: End
  #-----------------------------------#
  # Change max_value
    def set_faction_max(name, value)
      $game_temp.faction_data.each do |data|
        if data[0] == name
          data[1] = value
          correct_faction_values(data)
        end
      end
    end
   
    def add_faction_max(name, value)
      $game_temp.faction_data.each do |data|
        if data[0] == name
          data[1] += value
          correct_faction_values(data)
        end
      end
    end
   
    def remove_faction_max(name, value)
      $game_temp.faction_data.each do |data|
        if data[0] == name
          data[1] -= value
          correct_faction_values(data)
        end
      end
    end
  # Change max_value: End
  #-----------------------------------#
  # Correct values (no actual callscript)
    def correct_faction_values(data)
      data[1] *= -1 if data[2] < 0 and data[1] > 0
      data[1] *= -1 if data[2] > 0 and data[1] < 0
      data[2] = data[1] if data[2] < 0 and data[2] < data[1]
      data[2] = data[1] if data[2] > 0 and data[2] > data[1]
    end
  # Correct values: End
  #-----------------------------------#
  # Change extra's
    def change_faction_help(name, text)
      $game_temp.faction_data.each do |data|
        if data[0] == name
          data[3] = text
        end
      end
    end
   
    def change_faction_pic(name, pic)
      $game_temp.faction_data.each do |data|
        if data[0] == name
          data[4] = pic
        end
      end
    end
  # Change extra's: End
  #-----------------------------------#
  # User help
    # In testmode, F5 will show the factions-array
    def print_faction_data; p $game_temp.faction_data; end
  # User help: End
  #-----------------------------------#
  # Conditional-braches
    # As conditional-branch use 'faction?("name")', returns true if 'faction(name) exists'
    def faction?(name); $game_temp.faction_data.each do |data|; return true if data[0] == name; end; end
    # As conditional-branch use 'faction_value?("name", value)', returns true if 'faction_value >= value'
    def faction_value?(name, value); $game_temp.faction_data.each do |data|; if data[0] == name; return true if data[2] >= value; end; end; end
  # Conditional-braches: End
  #-----------------------------------#
# Call script: End
#####################################
#-----------------------------------#
#####################################
# Shows factions information
class Window_Factions < Window_Selectable
  include SojaBird_Factions
  def initialize(x, y, width, height, start)
    super(x, y, width, height, (2 * Line_Height))
    self.index = 0
    self.contents.font.size = Line_Height
    @max_lines = 304 / (Line_Height * 2)
    @start = start * @max_lines
    self.contents = Bitmap.new(width - 32, (2 * Line_Height) * @max_lines)
    refresh
  end
 
  def refresh
    self.contents.clear
    for faction in @start..@max_lines + @start - 1
      if $game_temp.faction_data[faction] != nil
        @item_max = faction - @start + 1
        data = $game_temp.faction_data[faction]
        x = 0
        y = (faction - @start) * Line_Height * 2
        if Display_Picture == true and data[4] != ""
          draw_picture(x, y, data)
          x += Cache.picture(data[4]).width
        end
        draw_bar(x, y, data)
        draw_name(x, y, data)
      end
    end
  end
 
  def draw_picture(x, y, data)
    pic = data[4]
    rect = Rect.new(0, (Line_Height * 2) - (Cache.picture(pic).height / 2), Cache.picture(pic).width - 1, Line_Height * 2 - 2)
    self.contents.blt(x + 1, y + 1, Cache.picture(pic), rect)
  end
 
  def draw_bar(x, y, data)
    ### Initialize ###
      # ~Parent info~
    @value = data[2]
    @value_max = data[1]
      # ~Color~
    @back_color = 4
    if @value > 0; color = 11
    elsif @value == 0; color = 4
    elsif @value < 0; color = 4; @back_color = 18
    end
      # ~Width~
    gauge_width = self.contents.width * @value / @value_max if @value_max != 0
    gauge_width = 0 if @value_max == 0
    border_width = self.contents.width
      # ~Position~
    @bar_x = 0
    @bar_x = self.contents.width - gauge_width if @value < 0
    @bar_y = y + Line_Height
      # ~Offset~
    if Display_Picture == true and data[4] != ""
      @picture_width = Cache.picture(data[4]).width
      @bar_x += @picture_width
      gauge_width -= @picture_width
      border_width -= @picture_width
    end
    ### Draw ###
      # ~Bar~
    self.contents.fill_rect(x + 1, @bar_y, border_width - 2, Line_Height - 1, text_color(4))
    self.contents.gradient_fill_rect(@bar_x + 1, @bar_y, gauge_width - 2, Line_Height - 1, text_color(@back_color), text_color(color))
      # ~Text~
    text_line = "#{@value}/#{@value_max}"
    if Display_Picture == true and data[4] != ""; x -= @picture_width; end
    self.contents.draw_text(x, @bar_y - 2, self.contents.width, Line_Height, text_line, 1)
  end
 
  def draw_name(x, y, data)
    name = data[0]
    self.contents.draw_text(x, y, self.contents.width, Line_Height, name)
  end
 
  def update_cursor
    self.cursor_rect.empty if @index < 0
    self.cursor_rect.set(0, @index * (Line_Height * 2), self.contents.width, Line_Height * 2)
  end
 
  def update_help
    if $game_temp.faction_data != []
      @description = $game_temp.faction_data[self.index + @start]
      text = ""
      text += @description[0] + ": " if Help_Name == 1
      text += @description[0] + "##" if Help_Name == 2
      text += @description[3]
      text.gsub!(/\n/, "")
      @help_window.set_text(text, 0, 4, @description[4]) if $game_temp.faction_data != []
    end
  end
end
# Window_Factions: End
#####################################
#-----------------------------------#
#####################################
# Faction info storage
class Game_Temp
  attr_accessor :faction_data
  alias old_initialize initialize
  def initialize
    old_initialize
    @faction_data = []
  end
end
# Game_Temp: End
#####################################
#-----------------------------------#
#####################################
# Operating scene
class Scene_Factions < Scene_Base
  def initialize(fac_list = 0)
    @fac_list = fac_list
    @max_lines = 304 / (SojaBird_Factions::Line_Height * 2)
  end
 
  def start
    super
    create_menu_background
    create_factions_windows
  end
 
  def create_factions_windows
    @faction_window = Window_Factions.new(0, 2*24+32, 544, 360-24, @fac_list)
    @help_window = Window_Help_Factions.new(0, 0, 544, 2*24+32)
    @faction_window.help_window = @help_window
  end
 
  def terminate
    super
    dispose_menu_background
    dispose_factions_windows
  end
 
  def dispose_factions_windows
    @faction_window.dispose
    @help_window.dispose
  end
 
  def update
    super
    update_menu_background
    update_factions_stuff
    update_factions_input
  end
 
  def update_factions_stuff
    @faction_window.update
    @help_window.update
  end
 
  def update_factions_input
    if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Menu.new(4)
    elsif Input.trigger?(Input::R) or Input.trigger?(Input::RIGHT)
      if (@fac_list + 1) * @max_lines < $game_temp.faction_data.size
        Sound.play_cursor
        next_fac_list
      else
        Sound.play_buzzer
      end
    elsif Input.trigger?(Input::L) or Input.trigger?(Input::LEFT)
      if @fac_list > 0
        Sound.play_cursor
        prev_fac_list
      else
        Sound.play_buzzer
      end
    end
  end
 
  def next_fac_list
    @fac_list += 1
    $scene = Scene_Factions.new(@fac_list)
  end
 
  def prev_fac_list
    @fac_list -= 1
    $scene = Scene_Factions.new(@fac_list)
  end
end
# Scene_Factions: End
#####################################
#-----------------------------------#
#####################################
# Add's an option to the menu
class Scene_Menu < Scene_Base
  def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = Vocab::status
    s5 = SojaBird_Factions::You_Name_It
    s6 = Vocab::save
    s7 = Vocab::game_end
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
    @command_window.index = @menu_index
    if $game_party.members.size == 0          # If number of party members is 0
      @command_window.draw_item(0, false)     # Disable item
      @command_window.draw_item(1, false)     # Disable skill
      @command_window.draw_item(2, false)     # Disable equipment
      @command_window.draw_item(3, false)     # Disable status
    end
    if $game_system.save_disabled             # If save is forbidden
      @command_window.draw_item(4, false)     # Disable save
    end
  end

  def update_command_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      if $game_party.members.size == 0 and @command_window.index < 4
        Sound.play_buzzer
        return
      elsif $game_system.save_disabled and @command_window.index == 4
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      case @command_window.index
      when 0      # Item
        $scene = Scene_Item.new
      when 1,2,3  # Skill, equipment, status
        start_actor_selection
      when 4      # Factions Menu
        $scene = Scene_Factions.new
      when 5      # Save
        $scene = Scene_File.new(true, false, false)
      when 6      # End Game
        $scene = Scene_End.new
      end
    end
  end
end
# Scene_Menu: End
#####################################
#-----------------------------------#
#####################################
# Add's display factions-array with F5
class Scene_Map < Scene_Base
  alias old_update update
  def update
    old_update
    if $TEST and Input.trigger?(Input::F5)
      print_faction_data
    end
  end
end
# Scene_Map: End
#####################################
#-----------------------------------#
#####################################
# Fixes the return_scene for the file-scene
class Scene_File < Scene_Base
  def return_scene
    if @from_title
      $scene = Scene_Title.new
    elsif @from_event
      $scene = Scene_Map.new
    else
      $scene = Scene_Menu.new(5)
    end
  end
end
# Scene_File: End
#####################################
#-----------------------------------#
#####################################
# Adjustable helpwindow height and text
class Window_Help_Factions < Window_Base
  def initialize(x = 0, y = 0, width= 544, height = WLH + 32)
    super(x, y, width, height)
  end
 
  def set_text(text, align = 0, x = 4, pic = "")
    if text != @text or align != @align or x != @x or pic != @pic
      self.contents.clear
      self.contents.font.color = normal_color
      rect = Rect.new(0, 0, Cache.picture(pic).width, 52)
      if SojaBird_Factions::Help_Picture == true and pic != ""
        y = 26 - (Cache.picture(pic).height / 2)
        self.contents.blt(0, y, Cache.picture(pic), rect)
        x += Cache.picture(pic).width
      end
      text = text.split(/\##/)
      for string in 0..text.size - 1
        self.contents.draw_text(x, string * WLH, self.width - 40, WLH, text.shift, align)
      end
      @text = text; @align = align; @x = x; @pic = pic
    end
  end
end
# Window_Help: End
#####################################
#-----------------------------------#
#####################################
# Enables to display reputation in messages
class Window_Message < Window_Selectable
  alias old_convert_special_characters convert_special_characters
 
  def convert_special_characters
    old_convert_special_characters
    @text.gsub!(/\\FAC\[(\w+)\]/i)  { "\x10#{$~}" }
  end
 
  def update_message
    loop do
      c = @text.slice!(/./m)
      case c
      when nil
        finish_message
        break
      when "\x00"
        new_line
        if @line_count >= MAX_LINE
          unless @text.empty?
            self.pause = true
            break
          end
        end
      when "\x01"
        @text.sub!(/\[([0-9]+)\]/, "")
        contents.font.color = text_color($1.to_i)
        next
      when "\x02"
        @gold_window.refresh
        @gold_window.open
      when "\x03"
        @wait_count = 15
        break
      when "\x04"
        @wait_count = 60
        break
      when "\x05"
        self.pause = true
        break
      when "\x06"
        @line_show_fast = true
      when "\x07"
        @line_show_fast = false
      when "\x08"
        @pause_skip = true
      #---------------------------------------NEW---#
      when "\x10"
        @text.sub(/\\FAC\[(\w+)\]/, "")
        $game_temp.faction_data.each do |data|
          if data[0] == $1
            @text.sub!(/\\FAC\[(\w+)\]/, data[2].to_s)
          end
        end
      #---------------------------------------NEW---#
      else
        contents.draw_text(@contents_x, @contents_y, 40, WLH, c)
        c_width = contents.text_size(c).width
        @contents_x += c_width
      end
      break unless @show_fast or @line_show_fast
    end
  end
end
# Window_Message: End
#####################################
#-----------------------------------#
#####################################
# Saves the faction-array
class Scene_File < Scene_Base
  alias old_write_save_data write_save_data
  alias old_read_save_data read_save_data
 
  def write_save_data(file)
    old_write_save_data(file)
    Marshal.dump($game_temp.faction_data, file)
  end
 
  def read_save_data(file)
    old_read_save_data(file)
    $game_temp.faction_data = Marshal.load(file)
  end
end
# Scene_File: End
#####################################

***
Chodemeister
Rep:
Level 84
got a problem
testing the default quest 1 so I can understand the scripting a bit
and I get the error...

Script 'Quest Journal' line 802: NameError occurred.

uninitialized constant Window_QuestInfo::Paragrapher

It happens whenever I try to enter the "quest log" (the thing that lets you view current quests)
Tahl died when I got my WoW account activated lol
And I lost my GoE 1 & 2 unecrypted data when my backup harddrive died after I reformatted...go figure
-GoE http://rmrk.net/index.php/topic,30050.0.html
-GoE2 http://rmrk.net/index.php/topic,30045.0.html

**
Rep: +0/-0Level 84
Current Project: RoSL
got a problem
testing the default quest 1 so I can understand the scripting a bit
and I get the error...

Script 'Quest Journal' line 802: NameError occurred.

uninitialized constant Window_QuestInfo::Paragrapher

It happens whenever I try to enter the "quest log" (the thing that lets you view current quests)

I'm gonna take a stab in the dark here and say you might have forgot to add the "Paragraph Formatter" script into your project. The Quest Journal Script requires Paragraph Formatter to work properly. It can be found by reading the first post of this thread.

If you do have it, my other guess is that you need to put Quest Journal below it. That's how mine is, and all works just dandy.


-Heart of Shadow-

"How can I be expected to save the world, when I can't even save myself?" --Sysolos(Return of a Shadow Lord)

***
Chodemeister
Rep:
Level 84
oh...my bad xD
Tahl died when I got my WoW account activated lol
And I lost my GoE 1 & 2 unecrypted data when my backup harddrive died after I reformatted...go figure
-GoE http://rmrk.net/index.php/topic,30050.0.html
-GoE2 http://rmrk.net/index.php/topic,30045.0.html

**
Rep: +0/-0Level 84
I seem to be having trouble making the Quest journal and the KGC_Enemyguide. In the Menu, they seem to occupy the same space. Entering Quest brings me to the monster manual.

I placed Quest journal above KGC_Enemyguide.

If anyone can help me maje these 2 things work togheter it would be great.

**
Rep: +0/-0Level 84
When I'm working on a quest which has an ID of 10 or higher and try to use the script to complete an objective I get this error:

ArgumentError occured while running script

wrong number of argurments(0 for 1)

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
@Corbeau: try putting Quest Journal below all KGC scripts that are integrated into the menu.

@CheeseMonster: I have never seen someone with that error before. What other scripts are you using? If possible, could you upload the project for me to take a look?

**
Rep: +0/-0Level 84
Ok, it worked, i have no more menu problem.

Now i have an error telling me line
168     return name, description, objectives, prime, icon_index

Exact Error text is:
Script 'Quest Journal' line 168 NameError occurred.
undefined local variable method `prime' for ModAlg_QuestData:Module

I have been working on graphic a lot lately and my right now my patience is tin. I would normally mess around the script more before I ask for help, but since your answers are clear I tough I would ask right away. Thank you.

**
Rep: +0/-0Level 84
These are the scripts I use:

Neo Message System
Prxus Party Manager
Side View Battle system
KGC's Mix Item
Minimap
Anaryu's Antilag
Paragraph Formatter
Quest Journal

Here's a (very) simple example of the error.

http://depositfiles.com/files/guwfln0cp