Monster Catalogue

0 Members and 1 Guest are viewing this topic.

*
Rep:
Level 97
2014 Best RPG Maker User - Engine2014 Most Unsung Member2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best RPG Maker User (Scripting)2011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best Use of Avatar and Signature Space2010 Favourite Staff Member2010 Most Mature Member
Monster Catalogue
Version: 1.0b
Author: modern algebra
Date: August 21, 2009

Version History


  • <Version 1.0b> 08.21.2009 - Fixed a naming error that would cause a bug when this script is used with the Items & Skills Catalogue. Copy pasta = bad!
  • <Version 1.0> 08.18.2009 - Original Release

Description


This script allows you to create multiple monster catalogues that shows a small information window on any monsters you have encountered (and have included in the particular catalogue). As with all my Catalogue scripts, you can make many different catalogues. Want a catalogue that shows all monsters? That can be done. Want a catalogue that only shows Undead monsters? That can be done too. You can also turn auto encounter to off and manually set when monsters should show up, or you could turn the show all option on for a catalogue and have it reveal all monsters included in the catalogue. The choice is yours to make :)

Features

  • Very configurable. Everything from the position of the battler in the catalogue to the colour of the border is configurable.
  • You can make as many monster catalogues as you like and put only the monsters you want in each one.
  • You can have the monsters added as soon as they are encountered or you can disable autoencounter and control it all manually through call script
  • A simple, but I think quite pretty design

Screenshots



Instructions

Please see the header and the editable regions for instructions on using this script

Script


Please note that this script requires the Catalogue Base script. Bitmap Addons is recommended.


Code: [Select]
#==============================================================================
#    Monster Catalogue
#    Version: 1.0b
#    Author: modern algebra (rmrk.net)
#    Date: August 21, 2009
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Description:
#
#    This script allows you to create a monster catalogue that shows a small
#   information window on any monsters you have encountered (if you have auto
#   encounter ON. You could also manually alter which monsters have been
#   "encountered" if you wish to set different conditions on their inclusion in
#   the catalogues. As with all my Catalogue scripts, you can make many
#   many different catalogues. Want a catalogue that shows all monsters? That
#   can be done. Want a catalogue that only shows Undead monsters? That can be
#   done too.
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Instructions:
#
#    This script REQUIRES the Catalogue_Base script, and Bitmap Addons is
#   recommended. Both can be found in the RMVX Scripts Database of RMRK.
#
#    Place this script above Main and below Catalogue Base (which should itself
#   be below Materials). For instructions on setting up new catalogues and
#   other configuration options, please see the editable regions at lines 122,
#   157, and 252.
#
#    To call a catalogue screen, use this code:
#
#      $scene = Scene_Catalogue.new (id)
#
#    By default, the all enemies catalogue has an ID of 20, and this is because
#   I didn't want it to interfere if you also have the Items Catalogue. Remember
#   that NO catalogue can have the same ID as another, even if they are
#   different scripts. So, by default, to call the all enemies catalogue, the
#   code is:
#
#      $scene = Scene_Catalogue.new (20)
#
#  To manually "encounter" an enemy without having to actually fight the
# monster, you can use the code in a Call Script:
#
#    encounter_monster (monster_id)
#      monster_id : the ID of the monster to encounter
#
#    Some Enemy data can be set in the notebox.
#
#      SPECIES
#  In order to make monster collection a little more interesting, it is
# possible to give an enemy a species now. It is purely cosmetic. If you wish
# to get rid of it altogether, then go down to lines 163 and 127 and change
# the name to "" and icon to 0. Those are the default species settings.
# However, you can change species settings on an individual enemy basis by
# putting these codes in the note box of the enemy:
#
#    \species["<name>"]
#      name : the name of the species.
#    \species_icon[<index>]
#      index : the icon index for the species
#
#  Example:
#    \species[Undead]
#    \species_icon[112]
#
#      ICON
#  In order to make the monster list a little more interesting looking, you can
# give them individual icons to show up in that list. If you do not give them
# an individual icon, then it will default to showing the species icon. The
# code to put in the notes box is:
#
#    \icon[<index>]
#      index : the index of the icon you want to use.
#
#  Example:
#    \icon[1]
#
#  Note: if you want to keep a species icon, but don't want any icons to show
#   up next to the monster's name in the list, than you can manually set the
#   icon to blank with the code: \icon[0]
#
#      DESCRIPTION
#  Another feature to make the screens a little more interesting is that you
# can give monsters individual descriptions. If you don't give them a
# description, than it will default to the value at line 166. The code to put in
# the note box is:
#
#    \description[<text>]
#      text : the description text. Don't worry about extending past one line.
#
#  Example:
#    \description[It may be blind,
#     but it's still a dangerous
#     foe]
#
#      CATALOGUE Y
#  This is something purely cosmetic. By default, the monster battler is drawn
# at about 48 pixels in the catalogue window. This allows you to change that
# y value if you so desire. It can make for a nice effect with maybe flying
# creatures appearing a little over the border, for instance, or anything like
# that really. It's very unnecessary though, and I recommend you not altering
# it. The code to put in the note box is:
#  
#    \cat_y[<new_y>]
#      new_y : the y position for the battler in the catalogue window
#
#  Example:
#    \cat_y[16]
#==============================================================================\

#==============================================================================
# *** ModernAlgebra
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    new constants - CM_DEFAULT_SPECIES_ICON
#==============================================================================

module ModernAlgebra
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # ** CONSTANTS
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  #\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  #  EDITABLE REGION A
  #``````````````````````````````````````````````````````````````````````````
  #  Read the instructions surrounding each constant to see what it does.
  #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  # The icon for whatever you set as the default species
  CM_DEFAULT_SPECIES_ICON = 196
  # Truth value of whether monsters should be visible once they are first
  #  fought against or whether it should be done manually.
  CM_AUTO_ENCOUNTER_MONSTERS = true
  # All colours set up as: [Red, Green, Blue[, Alpha]]
  CM_MONSTERSPECIES_COLOUR = [160, 160, 160] # Colour of Monster Race
  CM_MONSTERCARD_RIM_COLOUR = [105, 105, 255, 255] # Colour of Card Border
  CM_MONSTERCARD_RIMSHADOW_COLOUR = [0, 0, 0] # Shadow of Card Border
  #  Icons to represent elements of items in the Item Card. Every element MUST
  # have an icon. If you have set this up in CI_ITEM_ELEMENT_ICONS, you can
  # delete it here.
  CI_ITEM_ELEMENT_ICONS = [132, 2, 4, 14, 16, 12, 138, 137, 104, 105, 106, 107,
                           108, 109, 110, 111]
  #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  #  END EDITABLE REGION A
  #//////////////////////////////////////////////////////////////////////////
end

#==============================================================================
# *** Vocab
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    new constants : GI_EVASION; GI_HIT_RATIO; CM_DEFAULT_RACE
#==============================================================================

module Vocab
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # ** CONSTANTS
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  #\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  #  EDITABLE REGION B
  #``````````````````````````````````````````````````````````````````````````
  #  Read the instructions surrounding each constant to see what it does.
  #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  # If a species name is not set in the enemy's note box, it will show up
  #  as the following for defualt.
  CM_DEFAULT_SPECIES_NAME = "Monster"
  # If a description is not set in an enemy's note box, this is the description
  #  it will have.
  CM_DEFAULT_MONSTER_DESCRIPTION = "A fearsome foe"
  # These are the letter ranks for a monster's element efficiency.
  CM_ELEMENT_RANKS = ["A", "B", "C", "D", "E", "F"]
  # All constants prefaced by GI are also present in the Grid Inventory script
  #  and in the Item & Skill Catalogue script; if you have either of those
  #  scripts, it is recommended that you delete any of the constants with GI
  #  preface in this script (Monster Catalogue).
  # THe label for stats
  GI_STATS = "Stats"
  # The label for the evasion stat of armors
  GI_EVASION = "Evasion"
  # The label for the hit stat of skills & weapons
  GI_HIT_RATIO = "Hit Ratio"
  #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  #  END EDITABLE REGION B
  #//////////////////////////////////////////////////////////////////////////
end

#==============================================================================
# ** RPG::Enemy
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    new method - ma_species
#==============================================================================

class RPG::Enemy
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Species Name
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def ma_species_name
    if @species_name == nil
      @species_name = self.note[/\\SPECIES\[(.*?)\]/i] != nil ? $1 : Vocab::CM_DEFAULT_SPECIES_NAME
    end
    return @species_name
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Species Icon
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def ma_species_icon
    if @species_icon == nil
      @species_icon = self.note[/\\SPECIES_ICON\[(\d+)\]/i] != nil ? $1.to_i : ModernAlgebra::CM_DEFAULT_SPECIES_ICON
    end
    return @species_icon
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * ICON
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def icon_index
    if @ma_icon == nil
      @ma_icon = self.note[/\\ICON\[(\d+)\]/i] != nil ? $1.to_i : ma_species_icon
    end
    return @ma_icon
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * ICON
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def description
    if @ma_desc == nil
      @ma_desc = self.note[/\\DESCRIPTION\[(.*?)\]/i] != nil ? $1 : Vocab::CM_DEFAULT_MONSTER_DESCRIPTION
    end
    return @ma_desc
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Catalogue Y
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def catalogue_y
    @ma_cat_y = (self.note[/\\CAT_Y\[(\d+)\]/i] != nil ? $1.to_i : 32) if @ma_cat_y == nil
    return @ma_cat_y
  end
end

#==============================================================================
# ** Data Catalogues
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased method - initialize
#==============================================================================

class Data_Catalogues
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias malgbr_monstcatlg_intlz_5bc2 initialize
  def initialize (*args)
    malgbr_monstcatlg_intlz_5bc2 (*args) # Run Original Method
    #\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    #  EDITABLE REGION C
    #``````````````````````````````````````````````````````````````````````
    #  These are the setup options for making catalogues. It can be sort of
    # complicated, so I will go into detail here.
    #
    #  A catalogue object can be made with the following code:
    #
    #    @data[<id>] = Catalogue_Monster.new ("<name>", [<objects>], <show_all>)
    #      id       : this is the ID of this catalogue. When you open a
    #        catalogue, this is how you reference the catalogue you want to
    #        open. No two catalogues can EVER possess the same ID.
    #      name     : this is the name of the catalogue, as it appears in the
    #        catalogue scene when you open this catalogue. Defaults to
    #        "Catalogue"
    #      objects  : this is the array of monster IDs that  belong to this
    #        catalogue and will show up (if encountered) when the catalogue is
    #        open.  Defaults to []
    #      show_all : this is the truth value on whether encountered arrays
    #        are ignored. If true, then all objects in the catalogue,
    #        regardless of whether they've been encountered, will show up
    #        when this particular catalogue is opened. Note that it will
    #        show all objects of THIS catalogue, which is to say that it
    #        will only show them if they are set as objects belonging. It
    #        DOESN'T mean that all monsters ever will show up, unless those
    #        are the objects setup. Defaults to false
    #
    #  The default monster catalogues are:
    #
    #    20 => Name: Enemies; Objects: All enemiesin database; shows only
    #      encountered enemies in its group. It is called by:
    #
    #            $scene = Scene_Catalogue.new (20)
    #``````````````````````````````````````````````````````````````````````
    # * EXAMPLES
    #    monsters = [1, 2, 3, 4, 7, 8, 9]
    #    @data[22] = Catalogue_Monster.new ("Random Baddies", monsters, true)
    #
    #      this will make a catalogue that will include the enemies with IDs
    #     1, 2, 3, 4, 7, 8, & 9. It is named "Random Baddies", and it will
    #     always show all the monsters it includes regardless of whether
    #     they have been encountered because show_all is true. It's ID is 22,
    #     so it can be called by:
    #              $scene = Scene_Catalogue.new (22)
    #
    #    monsters = [2, 3, 6, 11, 14, 15, 18, 19, 27]
    #    @data[23] = Catalogue_Monster.new ("Flying Enemies", monsters)
    #
    #      this will make a catalogue that will include the enemies with IDs
    #     2, 3, 6, 11, 14, 15, 18, 19, & 27. It is named "Flying Enemies",
    #     and it will only show the monsters it includes if they have been
    #     encountered by the party. It's ID is 23, so it can be called by:
    #              $scene = Scene_Catalogue.new (23)
    #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
    all_monsters = []
    for i in 1...$data_enemies.size do all_monsters.push (i) end
    @data[20] = Catalogue_Monster.new ("Enemies", all_monsters)
    undead = [11, 12, 17, 26]
    @data[21] = Catalogue_Monster.new ("Undead", undead)
    #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
    #  END EDITABLE REGION C
    #//////////////////////////////////////////////////////////////////////
  end
end

#==============================================================================
# ** Game_Party
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased method - initialize
#    new public instance variable - encountered_monsters
#==============================================================================

class Game_Party
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Public Instance Variables
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  attr_reader   :encountered_monsters
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias algbamorn_init_monstrcatlg_6jb1 initialize
  def initialize (*args)
    @encountered_monsters = []
    algbamorn_init_monstrcatlg_6jb1 (*args) # Run Original Method
  end
end

#==============================================================================
# ** Game Interpreter
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    new method - encounter_monster
#==============================================================================

class Game_Interpreter
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Encounter Monster
  #    monster_id : the ID of the monster to encounter
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def encounter_monster (monster_id)
    $game_party.encountered_monsters.push (monster_id) unless $game_party.encountered_monsters.include? (monster_id)
  end
end

#==============================================================================
# ** Catalogue_Monster
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    modified super methods - card; object; object_help_text; include?
#==============================================================================

class Catalogue_Monster < Catalogue_Base
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Card
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def card
    return Window_MonsterCard
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object
  #    index : index of the object in @objects
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def object (index)
    return nil if index == nil || @objects[index] == nil
    return $data_enemies[@objects[index]]
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Help Text
  #    index : index of the object in @objects
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def object_help_text (index)
    return "" if object (index) == nil
    return object (index).description
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Include?
  #    index : index of the object in @objects
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def include? (index)
    return true if @show_all
    return $game_party.encountered_monsters.include? (@objects[index])
  end
end

#==============================================================================
# ** Window MonsterCard
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  This window displays all relevant information about a monster
#==============================================================================

class Window_MonsterCard < Window_CatalogueCard
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Refresh
  #    placement : the item placement
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def refresh (index)
    super
    draw_border
    return if @object == nil
    draw_monster_name (8, 4)
    draw_monster_species (8, 32)
    # Calculate room all other stats will take
    item_stats, stat_names = get_monster_stats
    y = draw_stats_box (6, contents.width - 12, item_stats.size)
    height = y - @object.catalogue_y
    draw_monster_battler (0, @object.catalogue_y, contents.width, height)
    draw_stats_signifier (30, y)
    draw_monster_stats (12, y + (WLH / 2), contents.width - 24, item_stats, stat_names)
    draw_monster_elements (contents.width - 32, 4)
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Draw Border
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def draw_border
    # Choose Colours for Frame
    rim = Color.new(*ModernAlgebra::CM_MONSTERCARD_RIM_COLOUR)
    shadow = Color.new(*ModernAlgebra::CM_MONSTERCARD_RIMSHADOW_COLOUR)
    # Draw the frame
    cb_outline_rect (1, 1, contents.width - 1, contents.height - 1, shadow, 1, 1)
    cb_outline_rect (0, 0, contents.width - 1, contents.height - 1, rim, 1, 1)
    # Other Lines
    contents.fill_rect (1, 31, contents.width - 2, 1, rim)
    contents.fill_rect (2, 32, contents.width - 4, 1, shadow)
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Draw Monster Name
  #    x, y : the coordinates to draw on
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def draw_monster_name (x, y)
    contents.font.color = normal_color
    contents.draw_text (x, y, 200, WLH, @object.name)
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Draw Monster Species
  #    x, y : the coordinates to draw on
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def draw_monster_species (x, y)
    # Draw the species icon
    draw_icon (@object.ma_species_icon, x, y)
    contents.font.color = Color.new (*ModernAlgebra::CM_MONSTERSPECIES_COLOUR)
    contents.draw_text (x + 24, y, contents.width / 2, WLH, @object.ma_species_name)
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Draw Stats Box
  #    x     : the x coordinate for the stats
  #    width : the amount of space it can take horizontally
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def draw_stats_box (x, width, size)
    # Draw Box
    box_size = ((size / 2) + 1)*WLH
    y = contents.height - 8 - box_size
    cb_outline_rect (x, y, contents.width - 2*x, box_size)
    return y
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Draw Stats Signifier
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def draw_stats_signifier (x, y)
    # Clear place for signifier
    tw = contents.text_size (Vocab::GI_STATS).width
    contents.clear_rect (x, y, tw + 4, 2)
    contents.font.color = system_color
    contents.draw_text (x + 2, y - (WLH / 2), tw + 2, WLH, Vocab::GI_STATS)
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Draw Monster Stats
  #    x     : the x coordinate for the stats
  #    width : the amount of space it can take horizontally
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def draw_monster_stats (x, y, width, item_stats, stat_names)
    room_width = (contents.width - x*2 - 10) / 2
    for i in 0...item_stats.size
      tw = contents.text_size (item_stats[i].to_s).width
      x_actual = x + (room_width + 10)*(i % 2)
      # Draw Signifier Text
      contents.font.color = system_color
      contents.draw_text (x_actual, y + (i / 2)*WLH, room_width - tw - 4, WLH, stat_names[i])
      contents.font.color = normal_color
      contents.draw_text (x_actual, y + (i / 2)*WLH, room_width, WLH, item_stats[i].to_s, 2)
    end
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Draw Monster Battler
  #     x, y    : the coordinates to draw on
  #     enabled : truth value of whether it should be drawn opaque or not
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def draw_monster_battler (x, y, width, height)
    bmp = Cache.battler (@object.battler_name, @object.battler_hue)
    src_rect = bmp.rect.dup
    opac_rect = Rect.new (0, 0, src_rect.width, 0)
    draw_opac_rect = false
    # If it will overlap
    # Take the centre of the bitmap if too large
    if width < src_rect.width
      src_rect.x = (src_rect.width - width) / 2
      opac_rect.x = src_rect.x
      src_rect.width = width
    else # Centre battler
      x += (width - src_rect.width) / 2
    end
    # Take the centre of the bitmap if too large
    if height < src_rect.height
      opac_rect.y = height
      opac_rect.height = src_rect.height - height
      src_rect.height = height
      draw_opac_rect = true
    else # Centre battler
      y += (height - src_rect.height) / 2
    end
    contents.blt (x, y, bmp, src_rect)
    contents.blt (x, y + opac_rect.y, bmp, opac_rect, 128) if draw_opac_rect
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Draw Monster Elements
  #    x, y : coordinates to draw onto
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def draw_monster_elements (x, y)
    contents.font.color = system_color
    for i in 1...@object.element_ranks.xsize
      next if @object.element_ranks[i] == 3
      draw_icon (ModernAlgebra::CI_ITEM_ELEMENT_ICONS[i - 1], x, y, false)
      # Draw Rank
      rank = Vocab::CM_ELEMENT_RANKS[@object.element_ranks[i] - 1]
      contents.draw_text (x, y, 24, 24, rank, 1)
      x -= 24
    end
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Get Monster Stats
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def get_monster_stats
    item_stats, stat_names = [], []
    # HP and MP
    item_stats.push (@object.maxhp, @object.maxmp)
    stat_names.push (Vocab.hp, Vocab.mp)
    # Get all parameters
    item_stats.push (@object.atk, @object.def, @object.agi, @object.spi)
    stat_names.push (Vocab.atk, Vocab.def, Vocab.agi, Vocab.spi)
    item_stats.push (@object.hit, @object.eva)
    stat_names.push (Vocab::GI_HIT_RATIO, Vocab::GI_EVASION)
    return item_stats, stat_names
  end
end

#==============================================================================
# ** Scene Battle
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased method - initialize
#==============================================================================

class Scene_Battle
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias malgbra_catmonster_start_5hg2 start
  def start (*args)
    if ModernAlgebra::CM_AUTO_ENCOUNTER_MONSTERS
      array = $game_party.encountered_monsters
      $game_troop.members.each { |enemy| array.push (enemy.enemy_id) unless array.include? (enemy.enemy_id) }
    end
    malgbra_catmonster_start_5hg2 (*args) # Run Original Method
  end
end

Credit


  • modern algebra

Support


Please post in this topic for support. Do not PM me.

FAQs

  • How come monsters show up just upon encounter and their data is available even if the party escapes? I'd much prefer if the party has to defeat a monster before it can show up.

Spoiler for Reveal only after monster defeat:
You can use this code to have it appear only after defeating the monster. Go to line 556 of the script and replace this:

Code: [Select]
#==============================================================================
# ** Scene Battle
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased method - initialize
#==============================================================================

class Scene_Battle
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias malgbra_catmonster_start_5hg2 start
  def start (*args)
    if ModernAlgebra::CM_AUTO_ENCOUNTER_MONSTERS
      array = $game_party.encountered_monsters
      $game_troop.members.each { |enemy| array.push (enemy.enemy_id) unless array.include? (enemy.enemy_id) }
    end
    malgbra_catmonster_start_5hg2 (*args) # Run Original Method
  end
end

with this:

Code: [Select]
#==============================================================================
# ** Game_Enemy
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased method - hp=
#==============================================================================

class Game_Enemy
  alias mdalg_killhp_enmy_encntr_moncatlg_0kh3 hp=
  def hp= (*args)
    mdalg_killhp_enmy_encntr_moncatlg_0kh3 (*args) # Run Original Method
    if self.hp <= 0 # If killed
      # Add as encountered
      $game_party.encountered_monsters.push (self.enemy_id) unless $game_party.encountered_monsters.include? (self.enemy_id)
    end
  end
end

Known Compatibility Issues

No known compatibility issues.

With Omegazonian's Roguelike battle system (ORBS), it is necessary to use the Reveal only upon monster defeat patch in the FAQ spoiler


Creative Commons License
This script by modern algebra is licensed under a Creative Commons Attribution-Non-Commercial-Share Alike 2.5 Canada License.
« Last Edit: February 11, 2010, 09:35:08 PM by Modern Algebra »

********
Resource Artist
Rep:
Level 94
\\\\\
Project of the Month winner for June 2009
Oh holy crap. This is badass MA. I love this.

*
Rep:
Level 97
2014 Best RPG Maker User - Engine2014 Most Unsung Member2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best RPG Maker User (Scripting)2011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best Use of Avatar and Signature Space2010 Favourite Staff Member2010 Most Mature Member
Thanks!

I have a feeling I made it too hard to configure though :(

********
Resource Artist
Rep:
Level 94
\\\\\
Project of the Month winner for June 2009
I'll have to check it out when I get home.

**
Rep: +0/-0Level 82
I bet this is going to be followed up with many more questions, but here goes..
Warning, I'm a total scripting noob, so any suggestions I am open to.

Ok, so I copied and pasted the scripts for Catalogue Base and this one (I don't need icons, or would rather wait before complicating it anymore) below the materials script in the master script list, with the Catalogue Base first, and then another line for this script (should they have been in the same script window, or separate with one above the other which is what I have now)

Now what do I do from this point to actually make this work in the game. I can bring up a blank catalogue by putting the line "$scene = Scene_Catalogue.new (20)" as an event script, but how do I make it come up in my general menu or link it to an in game item like a "book" item or something. I'm happy with either option.

Also (I may be getting ahead of myself here) I inserted the lines:

monsters = [31, 32, 33, 34, 35]
@data[22] = Catalogue_Monster.new ("My Monsters", monsters)


under the lines:

   all_monsters = []
    for i in 1...$data_enemies.size do all_monsters.push (i) end
    @data[20] = Catalogue_Monster.new ("Enemies", all_monsters)
    undead = [11, 12, 17, 26]
    @data[21] = Catalogue_Monster.new ("Undead", undead)


The numbers listed are monsters I've added into the enemy tab in the database..

I can only imagine this has at least a few problems, but I'm doing my best here with no scripting or programing knowledge what so ever. If I'm just missing some basic facts that I can learn from some Scripting 101 tutorial, then please suggest one so I can learn more about this. Otherwise, if there are some easy explanations that can help, I'm all ears.

Below is the full script pasted in the spoiler tab in case that helps. Thanks!!
Spoiler for:
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Description:
#
#    This script allows you to create a monster catalogue that shows a small
#   information window on any monsters you have encountered (if you have auto
#   encounter ON. You could also manually alter which monsters have been
#   "encountered" if you wish to set different conditions on their inclusion in
#   the catalogues. As with all my Catalogue scripts, you can make many
#   many different catalogues. Want a catalogue that shows all monsters? That
#   can be done. Want a catalogue that only shows Undead monsters? That can be
#   done too.
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Instructions:
#
#    This script REQUIRES the Catalogue_Base script, and Bitmap Addons is
#   recommended. Both can be found in the RMVX Scripts Database of RMRK.
#
#    Place this script above Main and below Catalogue Base (which should itself
#   be below Materials). For instructions on setting up new catalogues and
#   other configuration options, please see the editable regions at lines 122,
#   157, and 252.
#
#    To call a catalogue screen, use this code:
#
#      $scene = Scene_Catalogue.new (id)
#
#    By default, the all enemies catalogue has an ID of 20, and this is because
#   I didn't want it to interfere if you also have the Items Catalogue. Remember
#   that NO catalogue can have the same ID as another, even if they are
#   different scripts. So, by default, to call the all enemies catalogue, the
#   code is:
#
#      $scene = Scene_Catalogue.new (20)
#
#  To manually "encounter" an enemy without having to actually fight the
# monster, you can use the code in a Call Script:
#
#    encounter_monster (monster_id)
#      monster_id : the ID of the monster to encounter
#
#    Some Enemy data can be set in the notebox.
#
#      SPECIES
#  In order to make monster collection a little more interesting, it is
# possible to give an enemy a species now. It is purely cosmetic. If you wish
# to get rid of it altogether, then go down to lines 163 and 127 and change
# the name to "" and icon to 0. Those are the default species settings.
# However, you can change species settings on an individual enemy basis by
# putting these codes in the note box of the enemy:
#
#    \species["<name>"]
#      name : the name of the species.
#    \species_icon[<index>]
#      index : the icon index for the species
#
#  Example:
#    \species[Undead]
#    \species_icon[112]
#
#      ICON
#  In order to make the monster list a little more interesting looking, you can
# give them individual icons to show up in that list. If you do not give them
# an individual icon, then it will default to showing the species icon. The
# code to put in the notes box is:
#
#    \icon[<index>]
#      index : the index of the icon you want to use.
#
#  Example:
#    \icon[1]
#
#  Note: if you want to keep a species icon, but don't want any icons to show
#   up next to the monster's name in the list, than you can manually set the
#   icon to blank with the code: \icon[0]
#
#      DESCRIPTION
#  Another feature to make the screens a little more interesting is that you
# can give monsters individual descriptions. If you don't give them a
# description, than it will default to the value at line 166. The code to put in
# the note box is:
#
#    \description[<text>]
#      text : the description text. Don't worry about extending past one line.
#
#  Example:
#    \description[It may be blind,
#     but it's still a dangerous
#     foe]
#
#      CATALOGUE Y
#  This is something purely cosmetic. By default, the monster battler is drawn
# at about 48 pixels in the catalogue window. This allows you to change that
# y value if you so desire. It can make for a nice effect with maybe flying
# creatures appearing a little over the border, for instance, or anything like
# that really. It's very unnecessary though, and I recommend you not altering
# it. The code to put in the note box is:

#    \cat_y[<new_y>]
#      new_y : the y position for the battler in the catalogue window
#
#  Example:
#    \cat_y[16]
#==============================================================================\

#==============================================================================
# *** ModernAlgebra
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    new constants - CM_DEFAULT_SPECIES_ICON
#==============================================================================

module ModernAlgebra
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # ** CONSTANTS
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  #\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  #  EDITABLE REGION A
  #``````````````````````````````````````````````````````````````````````````
  #  Read the instructions surrounding each constant to see what it does.
  #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  # The icon for whatever you set as the default species
  CM_DEFAULT_SPECIES_ICON = 196
  # Truth value of whether monsters should be visible once they are first
  #  fought against or whether it should be done manually.
  CM_AUTO_ENCOUNTER_MONSTERS = true
  # All colours set up as: [Red, Green, Blue[, Alpha]]
  CM_MONSTERSPECIES_COLOUR = [160, 160, 160] # Colour of Monster Race
  CM_MONSTERCARD_RIM_COLOUR = [105, 105, 255, 255] # Colour of Card Border
  CM_MONSTERCARD_RIMSHADOW_COLOUR = [0, 0, 0] # Shadow of Card Border
  #  Icons to represent elements of items in the Item Card. Every element MUST
  # have an icon. If you have set this up in CI_ITEM_ELEMENT_ICONS, you can
  # delete it here.
  CI_ITEM_ELEMENT_ICONS = [132, 2, 4, 14, 16, 12, 138, 137, 104, 105, 106, 107,
                           108, 109, 110, 111]
  #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  #  END EDITABLE REGION A
  #//////////////////////////////////////////////////////////////////////////
end

#==============================================================================
# *** Vocab
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    new constants : GI_EVASION; GI_HIT_RATIO; CM_DEFAULT_RACE
#==============================================================================

module Vocab
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # ** CONSTANTS
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  #\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  #  EDITABLE REGION B
  #``````````````````````````````````````````````````````````````````````````
  #  Read the instructions surrounding each constant to see what it does.
  #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  # If a species name is not set in the enemy's note box, it will show up
  #  as the following for defualt.
  CM_DEFAULT_SPECIES_NAME = "Monster"
  # If a description is not set in an enemy's note box, this is the description
  #  it will have.
  CM_DEFAULT_MONSTER_DESCRIPTION = "A fearsome foe"
  # These are the letter ranks for a monster's element efficiency.
  CM_ELEMENT_RANKS = ["A", "B", "C", "D", "E", "F"]
  # All constants prefaced by GI are also present in the Grid Inventory script
  #  and in the Item & Skill Catalogue script; if you have either of those
  #  scripts, it is recommended that you delete any of the constants with GI
  #  preface in this script (Monster Catalogue).
  # THe label for stats
  GI_STATS = "Lore"
  # The label for the evasion stat of armors
  GI_EVASION = "Evasion"
  # The label for the hit stat of skills & weapons
  GI_HIT_RATIO = "Hit Ratio"
  #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  #  END EDITABLE REGION B
  #//////////////////////////////////////////////////////////////////////////
end

#==============================================================================
# ** RPG::Enemy
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    new method - ma_species
#==============================================================================

class RPG::Enemy
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Species Name
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def ma_species_name
    if @species_name == nil
      @species_name = self.note[/\\SPECIES\[(.*?)\]/i] != nil ? $1 : Vocab::CM_DEFAULT_SPECIES_NAME
    end
    return @species_name
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Species Icon
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def ma_species_icon
    if @species_icon == nil
      @species_icon = self.note[/\\SPECIES_ICON\[(\d+)\]/i] != nil ? $1.to_i : ModernAlgebra::CM_DEFAULT_SPECIES_ICON
    end
    return @species_icon
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * ICON
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def icon_index
    if @ma_icon == nil
      @ma_icon = self.note[/\\ICON\[(\d+)\]/i] != nil ? $1.to_i : ma_species_icon
    end
    return @ma_icon
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * ICON
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def description
    if @ma_desc == nil
      @ma_desc = self.note[/\\DESCRIPTION\[(.*?)\]/i] != nil ? $1 : Vocab::CM_DEFAULT_MONSTER_DESCRIPTION
    end
    return @ma_desc
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Catalogue Y
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def catalogue_y
    @ma_cat_y = (self.note[/\\CAT_Y\[(\d+)\]/i] != nil ? $1.to_i : 32) if @ma_cat_y == nil
    return @ma_cat_y
  end
end

#==============================================================================
# ** Data Catalogues
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased method - initialize
#==============================================================================

class Data_Catalogues
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias malgbr_monstcatlg_intlz_5bc2 initialize
  def initialize (*args)
    malgbr_monstcatlg_intlz_5bc2 (*args) # Run Original Method
    #\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    #  EDITABLE REGION C
    #``````````````````````````````````````````````````````````````````````
    #  These are the setup options for making catalogues. It can be sort of
    # complicated, so I will go into detail here.
    #
    #  A catalogue object can be made with the following code:
    #
    #    @data[<id>] = Catalogue_Monster.new ("<name>", [<objects>], <show_all>)
    #      id       : this is the ID of this catalogue. When you open a
    #        catalogue, this is how you reference the catalogue you want to
    #        open. No two catalogues can EVER possess the same ID.
    #      name     : this is the name of the catalogue, as it appears in the
    #        catalogue scene when you open this catalogue. Defaults to
    #        "Catalogue"
    #      objects  : this is the array of monster IDs that  belong to this
    #        catalogue and will show up (if encountered) when the catalogue is
    #        open.  Defaults to []
    #      show_all : this is the truth value on whether encountered arrays
    #        are ignored. If true, then all objects in the catalogue,
    #        regardless of whether they've been encountered, will show up
    #        when this particular catalogue is opened. Note that it will
    #        show all objects of THIS catalogue, which is to say that it
    #        will only show them if they are set as objects belonging. It
    #        DOESN'T mean that all monsters ever will show up, unless those
    #        are the objects setup. Defaults to false
    #
    #  The default monster catalogues are:
    #
    #    20 => Name: Enemies; Objects: All enemiesin database; shows only
    #      encountered enemies in its group. It is called by:
    #
    #            $scene = Scene_Catalogue.new (20)
    #``````````````````````````````````````````````````````````````````````
    # * EXAMPLES
    #    monsters = [1, 2, 3, 4, 7, 8, 9]
    #    @data[22] = Catalogue_Monster.new ("Random Baddies", monsters, true)
    #
    #      this will make a catalogue that will include the enemies with IDs
    #     1, 2, 3, 4, 7, 8, & 9. It is named "Random Baddies", and it will
    #     always show all the monsters it includes regardless of whether
    #     they have been encountered because show_all is true. It's ID is 22,
    #     so it can be called by:
    #              $scene = Scene_Catalogue.new (22)
    #
    #    monsters = [2, 3, 6, 11, 14, 15, 18, 19, 27]
    #    @data[23] = Catalogue_Monster.new ("Flying Enemies", monsters)
    #
    #      this will make a catalogue that will include the enemies with IDs
    #     2, 3, 6, 11, 14, 15, 18, 19, & 27. It is named "Flying Enemies",
    #     and it will only show the monsters it includes if they have been
    #     encountered by the party. It's ID is 23, so it can be called by:
    #              $scene = Scene_Catalogue.new (23)
    #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
    all_monsters = [31, 32, 33, 34, 35]
    for i in 1...$data_enemies.size do all_monsters.push (i) end
    @data[20] = Catalogue_Monster.new ("Enemies", all_monsters)
    undead = [11, 12, 17, 26]
    @data[21] = Catalogue_Monster.new ("Undead", undead)
    monsters = [31, 32, 33, 34, 35]
    @data[22] = Catalogue_Monster.new ("My Monsters", monsters)
    #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
    #  END EDITABLE REGION C
    #//////////////////////////////////////////////////////////////////////
  end
end

#==============================================================================
# ** Game_Party
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased method - initialize
#    new public instance variable - encountered_monsters
#==============================================================================

class Game_Party
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Public Instance Variables
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  attr_reader   :encountered_monsters
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias algbamorn_init_monstrcatlg_6jb1 initialize
  def initialize (*args)
    @encountered_monsters = []
    algbamorn_init_monstrcatlg_6jb1 (*args) # Run Original Method
  end
end

#==============================================================================
# ** Game Interpreter
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    new method - encounter_monster
#==============================================================================

class Game_Interpreter
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Encounter Monster
  #    monster_id : the ID of the monster to encounter
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def encounter_monster (monster_id)
    $game_party.encountered_monsters.push (monster_id) unless $game_party.encountered_monsters.include? (monster_id)
  end
end

#==============================================================================
# ** Catalogue_Monster
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    modified super methods - card; object; object_help_text; include?
#==============================================================================

class Catalogue_Monster < Catalogue_Base
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Card
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def card
    return Window_MonsterCard
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object
  #    index : index of the object in @objects
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def object (index)
    return nil if index == nil || @objects[index] == nil
    return $data_enemies[@objects[index]]
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Help Text
  #    index : index of the object in @objects
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def object_help_text (index)
    return "" if object (index) == nil
    return object (index).description
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Include?
  #    index : index of the object in @objects
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def include? (index)
    return true if @show_all
    return $game_party.encountered_monsters.include? (@objects[index])
  end
end

#==============================================================================
# ** Window MonsterCard
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  This window displays all relevant information about a monster
#==============================================================================

class Window_MonsterCard < Window_CatalogueCard
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Refresh
  #    placement : the item placement
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def refresh (index)
    super
    draw_border
    return if @object == nil
    draw_monster_name (8, 4)
    draw_monster_species (8, 32)
    # Calculate room all other stats will take
    item_stats, stat_names = get_monster_stats
    y = draw_stats_box (6, contents.width - 12, item_stats.size)
    height = y - @object.catalogue_y
    draw_monster_battler (0, @object.catalogue_y, contents.width, height)
    draw_stats_signifier (30, y)
    draw_monster_stats (12, y + (WLH / 2), contents.width - 24, item_stats, stat_names)
    draw_monster_elements (contents.width - 32, 4)
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Draw Border
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def draw_border
    # Choose Colours for Frame
    rim = Color.new(*ModernAlgebra::CM_MONSTERCARD_RIM_COLOUR)
    shadow = Color.new(*ModernAlgebra::CM_MONSTERCARD_RIMSHADOW_COLOUR)
    # Draw the frame
    cb_outline_rect (1, 1, contents.width - 1, contents.height - 1, shadow, 1, 1)
    cb_outline_rect (0, 0, contents.width - 1, contents.height - 1, rim, 1, 1)
    # Other Lines
    contents.fill_rect (1, 31, contents.width - 2, 1, rim)
    contents.fill_rect (2, 32, contents.width - 4, 1, shadow)
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Draw Monster Name
  #    x, y : the coordinates to draw on
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def draw_monster_name (x, y)
    contents.font.color = normal_color
    contents.draw_text (x, y, 200, WLH, @object.name)
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Draw Monster Species
  #    x, y : the coordinates to draw on
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def draw_monster_species (x, y)
    # Draw the species icon
    draw_icon (@object.ma_species_icon, x, y)
    contents.font.color = Color.new (*ModernAlgebra::CM_MONSTERSPECIES_COLOUR)
    contents.draw_text (x + 24, y, contents.width / 2, WLH, @object.ma_species_name)
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Draw Stats Box
  #    x     : the x coordinate for the stats
  #    width : the amount of space it can take horizontally
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def draw_stats_box (x, width, size)
    # Draw Box
    box_size = ((size / 2) + 1)*WLH
    y = contents.height - 8 - box_size
    cb_outline_rect (x, y, contents.width - 2*x, box_size)
    return y
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Draw Stats Signifier
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def draw_stats_signifier (x, y)
    # Clear place for signifier
    tw = contents.text_size (Vocab::GI_STATS).width
    contents.clear_rect (x, y, tw + 4, 2)
    contents.font.color = system_color
    contents.draw_text (x + 2, y - (WLH / 2), tw + 2, WLH, Vocab::GI_STATS)
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Draw Monster Stats
  #    x     : the x coordinate for the stats
  #    width : the amount of space it can take horizontally
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def draw_monster_stats (x, y, width, item_stats, stat_names)
    room_width = (contents.width - x*2 - 10) / 2
    for i in 0...item_stats.size
      tw = contents.text_size (item_stats.to_s).width
      x_actual = x + (room_width + 10)*(i % 2)
      # Draw Signifier Text
      contents.font.color = system_color
      contents.draw_text (x_actual, y + (i / 2)*WLH, room_width - tw - 4, WLH, stat_names)
      contents.font.color = normal_color
      contents.draw_text (x_actual, y + (i / 2)*WLH, room_width, WLH, item_stats.to_s, 2)
    end
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Draw Monster Battler
  #     x, y    : the coordinates to draw on
  #     enabled : truth value of whether it should be drawn opaque or not
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def draw_monster_battler (x, y, width, height)
    bmp = Cache.battler (@object.battler_name, @object.battler_hue)
    src_rect = bmp.rect.dup
    opac_rect = Rect.new (0, 0, src_rect.width, 0)
    draw_opac_rect = false
    # If it will overlap
    # Take the centre of the bitmap if too large
    if width < src_rect.width
      src_rect.x = (src_rect.width - width) / 2
      opac_rect.x = src_rect.x
      src_rect.width = width
    else # Centre battler
      x += (width - src_rect.width) / 2
    end
    # Take the centre of the bitmap if too large
    if height < src_rect.height
      opac_rect.y = height
      opac_rect.height = src_rect.height - height
      src_rect.height = height
      draw_opac_rect = true
    else # Centre battler
      y += (height - src_rect.height) / 2
    end
    contents.blt (x, y, bmp, src_rect)
    contents.blt (x, y + opac_rect.y, bmp, opac_rect, 128) if draw_opac_rect
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Draw Monster Elements
  #    x, y : coordinates to draw onto
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def draw_monster_elements (x, y)
    contents.font.color = system_color
    for i in 1...@object.element_ranks.xsize
      next if @object.element_ranks == 3
      draw_icon (ModernAlgebra::CI_ITEM_ELEMENT_ICONS[i - 1], x, y, false)
      # Draw Rank
      rank = Vocab::CM_ELEMENT_RANKS[@object.element_ranks - 1]
      contents.draw_text (x, y, 24, 24, rank, 1)
      x -= 24
    end
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Get Monster Stats
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def get_monster_stats
    item_stats, stat_names = [], []
    # HP and MP
    item_stats.push (@object.maxhp, @object.maxmp)
    stat_names.push (Vocab.hp, Vocab.mp)
    # Get all parameters
    item_stats.push (@object.atk, @object.def, @object.agi, @object.spi)
    stat_names.push (Vocab.atk, Vocab.def, Vocab.agi, Vocab.spi)
    item_stats.push (@object.hit, @object.eva)
    stat_names.push (Vocab::GI_HIT_RATIO, Vocab::GI_EVASION)
    return item_stats, stat_names
  end
end

#==============================================================================
# ** Scene Battle
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased method - initialize
#==============================================================================

#==============================================================================
# ** Game_Enemy
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased method - hp=
#==============================================================================

class Game_Enemy
  alias mdalg_killhp_enmy_encntr_moncatlg_0kh3 hp=
  def hp= (*args)
    mdalg_killhp_enmy_encntr_moncatlg_0kh3 (*args) # Run Original Method
    if self.hp <= 0 # If killed
      # Add as encountered
      $game_party.encountered_monsters.push (self.enemy_id) unless $game_party.encountered_monsters.include? (self.enemy_id)
    end
  end
end

**
Rep: +0/-0Level 82
An update, I just put an event item in the game map that will bring up the monster's I killed list when activated. So I guess my real question is, how can I make this work through an item in my inventory?

edit: and now I have just learned about the wonderful world of common events. Sorry for the bother, I think I can figure it out from here.
« Last Edit: August 26, 2009, 01:18:00 AM by bluebogle »

*
Rep:
Level 97
2014 Best RPG Maker User - Engine2014 Most Unsung Member2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best RPG Maker User (Scripting)2011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best Use of Avatar and Signature Space2010 Favourite Staff Member2010 Most Mature Member
Good to hear :)

And yeah, having the item call a common event with the scene call in it is the way to go.

*
Rep:
Level 87
ooh - pretty!
Always remember you're unique.
Just like everybody else.

**
Rep: +0/-0Level 82
Ok, I have a new problem. It seemed to be working for a while, and then I put it on a new map, and when I try to call it up through an item with a common event for the script, it gives me this error:

????? 'Window_Base'? 158??? NoMethodError ????????
undefined method ' ' for nil:NilClass

If I use it without first killing any monsters, it works fine as a blank menu page, but after I kill something, it gives that error. Any ideas?

Thanks!

*
Rep:
Level 97
2014 Best RPG Maker User - Engine2014 Most Unsung Member2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best RPG Maker User (Scripting)2011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best Use of Avatar and Signature Space2010 Favourite Staff Member2010 Most Mature Member
My best guess at this point is an inappropriate argument for your icon. What did you put as either the icon or the species icon for the monster or monsters that should show up. By that, I mean what do their noteboxes look like?

**
Rep: +0/-0Level 82
Thanks! It was because I'd added some new elements, and hadn't assigned icon values to them. Figuring it all out has also given me the courage to try to mess with the icon settings a little more. Thanks for pointing me in the right direction. Now if only I hadn't implemented that 5000 item icon list into the game  :D

I may have more questions, but if not, thanks again for the help and the awesome scripts!

*
Rep:
Level 97
2014 Best RPG Maker User - Engine2014 Most Unsung Member2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best RPG Maker User (Scripting)2011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best Use of Avatar and Signature Space2010 Favourite Staff Member2010 Most Mature Member
Oh, yeah, that would do it too :) I should have a more visible warning.

I'm glad you figured it out.

**
Rep: +0/-0Level 84
Would it be possible to include a count of how many of a specific monster has been defeated, so you can get items etc. when you defeat a set number of that monster?
I've got a plan so cunning you could brush your teeth with it.

*
Rep:
Level 97
2014 Best RPG Maker User - Engine2014 Most Unsung Member2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best RPG Maker User (Scripting)2011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best Use of Avatar and Signature Space2010 Favourite Staff Member2010 Most Mature Member
It doesn't count them in its current state, but I could certainly script in a feature easily enough. Would you want it to show up on the card? If yes, where?

**
Rep:
Level 82
Eternally bloody...
It was a pain to read all the text, the picture just made me drool, it looks so amazing o.O

***
Rep:
Level 82
aka DigiDeity
I agree to the comments of the others, this Monster Catalogue looks really good.

Greets
Deity
Greetings
DigiDeity

├Work┤
├Contact┤


**
Rep: +0/-0Level 84
It doesn't count them in its current state, but I could certainly script in a feature easily enough. Would you want it to show up on the card? If yes, where?
Maybe just above the stats box would be good if you could. I'd appreciate it a lot.
I've got a plan so cunning you could brush your teeth with it.

**
Rep: +0/-0Level 81
'sup again, well, the game says there is an error with line ''281:    @catalogue = $data_catalogues[catalogue_id]'' in the catalouge base, however, when I tried in another test game, it did work. Now what does this line do or something? The possible causes are new scripts, or the new iconset. It worked before, and this ''error'' only appears when the player opens the catalogue.

*
Rep:
Level 97
2014 Best RPG Maker User - Engine2014 Most Unsung Member2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best RPG Maker User (Scripting)2011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best Use of Avatar and Signature Space2010 Favourite Staff Member2010 Most Mature Member
Well, that's not really enough info. What type of error was it? Was it a nil error?

My guess is that you have some title screen script or something that modifies Scene_Title and is overwriting create_data_objects.

Try putting the Catalogue_Base script beneath all your other custom scripts, but still above Main and see if that fixes it.

**
Rep: +0/-0Level 81
Looks like I solved it... I don't really know how but I did. Thanks anyway.

**
Rep:
Level 82
Eternally bloody...
In the corner where it states the element weaknesses (I believe that's what it does, right?), wouldn't it be smarter to actually show a number in percent, since not everyone might know what the different letters mean (I know I always forget anyway, and I'm making the games for my friends who've never used any rpg- or game makers :P)?

*
Rep: +0/-0Level 81
There wouldn't be a way to make it show up in BigEd781' Final Fantasy IX Menu would there? Preferably just above the ATB options. I've tried tinkering around with lines of script but I can't seem to figure it out.

Oh, and I put the script above Main but under the Main Process heading? Or above Main but within the Materials section? The latter makes more sense to me, but I just want to get it right haha.

EDIT: Figured I'd post BigEd781' Final Fantasy IX Menu script if that helps! Hopefully someone can lend a guy a hand?

Spoiler for:
=begin                 
                          BigEd781' Final Fantasy IX Menu
            Credit to PainHurt at rpgmakervx.net for most of the graphics
=end

module FF9_Config 
   
  # set this to 'true' if you would like to use a cusotm background image
  USE_CUSTOM_BACK = false
  # the name of the custom background image, without the file extension (no .png)
  BACK_NAME = 'StoneBackground'
  # if you set this to 'true', you must be using the enhanced
  # Window class script that I posted:  You can get that script here:
  # http://www.rpgmakervx.net/index.php?showtopic=8042&hl=
  # this will make the provided FF9 windowskin look really good.
  USE_TILED_WINDOW = false
 
  # When this is set to 'true', the menu cirsor will animate back and forth.
  # When set to 'false', it will stay in place
  ANIMATE_CURSOR = false
 
  # When set to 'true', four background panels are always drawn.
  # When set to 'false', a panel is only drawn for each party member
  DRAW_FOR_ALL = true
 
  # the name of the font used in the menu. 
  # use 'Font.default_name' for the default font.  Try 'Centaur' for a nice, smaller font.
  DEFAULT_FONT = Font.default_name
 
  # set this to true to enable the font above for all windows.
  # also sets the back_opacity to 255 for all windows. 
  # I recommend setting this to 'true' to maintain a consistent look.
  USE_FOR_ALL = true
 
  # the icon id for your gold window portion of the menu, 194 by default.
  GOLD_ICON_ID = 194
 
end

if FF9_Config::USE_FOR_ALL   
 
  Font.default_name = FF9_Config::DEFAULT_FONT
 
  class Window_Base < Window
   
    alias :eds_pre_ff9_menu_base_initialize :initialize
    def initialize(*args)
      eds_pre_ff9_menu_base_initialize(*args) 
      self.stretch = false if FF9_Config::USE_TILED_WINDOW
      self.back_opacity = 255
    end
   
  end
 
end

class Window_Base < Window
 
  CAPTION_COLOR = Color.new(255,255,255)#(228, 228, 228)
  CAPTION_HEIGHT = 12
  X_OFFSET = 16
  Y_OFFSET = -5
 
  alias :eds_pre_window_caption_intialize :initialize
  def initialize(*args)     
    eds_pre_window_caption_intialize(*args)   
    @caption_sprite = Sprite_Base.new(self.viewport)
    create_caption_bitmap(1, CAPTION_HEIGHT)       
    @caption_sprite.x = self.x + X_OFFSET
    @caption_sprite.y = self.y + Y_OFFSET
    @caption_sprite.z = self.z + 1
  end
 
  def x=(value)
    super
    @caption_sprite.x = value + X_OFFSET unless @caption_sprite.nil?
  end
 
  def y=(value)
    super
    @caption_sprite.y = value + Y_OFFSET unless @caption_sprite.nil?
  end
 
  def z=(value)
    super
    @caption_sprite.z = value + 1 unless @caption_sprite.nil?
  end
 
  def caption=(text)
    return unless text.is_a?(String)
    return if text.empty?
    @caption = text
    width = @caption_sprite.bitmap.text_size(@caption).width
    create_caption_bitmap(width, CAPTION_HEIGHT)   
    draw_caption
  end 
 
  def create_caption_bitmap(w, h)
    @caption_sprite.bitmap = Bitmap.new(w, h)   
    @caption_sprite.bitmap.font.size = 12
    @caption_sprite.bitmap.font.color = CAPTION_COLOR
    @caption_sprite.bitmap.font.bold = true 
  end
 
  def draw_caption
    unless @caption.nil?
      h = @caption_sprite.bitmap.height
      w = @caption_sprite.bitmap.width
      rect = Rect.new( 0, h / 2, w, h / 4 )
      @caption_sprite.bitmap.fill_rect(rect, Color.new(0, 0, 0, 96))     
      @caption_sprite.bitmap.draw_text(@caption_sprite.src_rect, @caption)     
    end
  end
 
  alias :eds_pre_caption_window_dispose :dispose
  def dispose
    eds_pre_caption_window_dispose
    @caption_sprite.dispose
  end
 
  def find_window_width(text)             
    return Bitmap.new(544, 416).text_size(text).width + 32
  end   
 
end

class Window_TimeGold < Window_Base 
   
  def initialize(x, y) 
    width = find_window_width("9999999")
    width = 140 if width < 140
    super(x, y, width, WLH + 58)   
    self.back_opacity = 255
    self.stretch = false if FF9_Config::USE_TILED_WINDOW
    self.contents.font.name = FF9_Config::DEFAULT_FONT
    self.caption = "TIME & #{Vocab.gold}"
    @time_icon = Cache.picture('Timer') 
    @intern_frame_count = 0
    refresh
  end
 
  def draw_time
    sec = (Graphics.frame_count / 60) % 60
    min = (Graphics.frame_count / 3600) % 60
    hrs = Graphics.frame_count / 216000   
    self.contents.font.color = Color.new(255, 255, 255)   
    time = "%02d:%02d:%02d" % [hrs, min, sec]
    self.contents.draw_text(0, 0, self.contents.width, WLH, time, 2)   
  end 
 
  def refresh
    self.contents.clear
    self.contents.blt(0, 0, @time_icon, @time_icon.rect)
    draw_icon(FF9_Config::GOLD_ICON_ID, 2, WLH) 
    draw_currency_value($game_party.gold, 0, WLH, self.contents.width)
    draw_time
  end
 
  def draw_currency_value(value, x, y, width)
    gold_text = Vocab.gold
    cx = contents.text_size(gold_text[0,1]).width
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y, width - cx - 2, WLH, value, 2)
    self.contents.font.color = system_color
    # just print the first character of Vocab::gold
    self.contents.draw_text(x, y, width, WLH, gold_text[0,1], 2)
  end
 
  def update
    super
    @intern_frame_count += 1
    return if (@intern_frame_count % 60) != 0         
    refresh
  end
 
  def find_window_width(text)             
    return Bitmap.new(544, 416).text_size(text).width + 80
  end
 
end

class Window_MenuLocation < Window_Base
 
  def initialize(x, y)
    @map_name = load_data("Data/MapInfos.rvdata")[$game_map.map_id].name
    width = find_window_width(@map_name)
    super(x, y, width, WLH + 32)   
    self.stretch = false if FF9_Config::USE_TILED_WINDOW
    self.contents.font.name = FF9_Config::DEFAULT_FONT
    self.back_opacity = 255
    self.caption = "LOCATION"
    refresh
  end
 
  def refresh
    self.contents.clear   
    self.contents.draw_text(0, 0, self.contents.width, WLH,  @map_name, 1)
  end
 
  def find_window_width(text)             
    return Bitmap.new(544, 416).text_size(text).width + 48
  end
 
end

class Window_Command < Window_Selectable
 
  alias :eds_pre_ff9_menu_win_command_init :initialize
  def initialize(*args)
    @font_name = Font.default_name   
    eds_pre_ff9_menu_win_command_init(*args)   
  end
  #--------------------------------------------------------------------------
  # * OVERWRITTEN
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear   
    self.contents.font.name = @font_name
    for i in 0...@item_max
      draw_item(i)
    end
  end
 
  def font_name=(name)
    @font_name = name   
  end
 
end

class Window_Uses < Window_Base 
 
  def initialize(right, y, item)   
    @remaining_text = "Remaining: #{$game_party.item_number(item)}"
    w = 160
    x = right ? (544 - w) : 0   
    super(x, y, w, WLH + 32)   
    self.stretch = false if FF9_Config::USE_TILED_WINDOW
    self.contents.font.name = FF9_Config::DEFAULT_FONT
    refresh
  end
 
  def item=(item)   
    return unless item.is_a?(RPG::Item)
    @remaining_text = "Remaining: #{$game_party.item_number(item)}"     
    refresh
  end
 
  def visible=(value)
    super
    refresh if value
  end
 
  def refresh
    self.contents.clear
    self.contents.draw_text(self.contents.rect, @remaining_text, 1)
  end
 
end

class Window_SkillUses < Window_Base 
 
  def initialize(right, y, actor, skill)   
    @remaining_text = make_info_string(actor, skill)
    w = 182
    x = right ? (544 - w) : 0       
    super(x, y, w, WLH + 32) 
    self.stretch = false if FF9_Config::USE_TILED_WINDOW
    self.contents.font.name = FF9_Config::DEFAULT_FONT
    refresh
  end
 
  def make_info_string(actor, skill)
    return if actor.nil? || skill.nil?
    cost = actor.calc_mp_cost(skill)
    return "Unlimited" if cost < 1
    return "Remaining: #{actor.mp / cost}"
  end
 
  def set_skill(actor, skill)
    return if actor.nil? || skill.nil?
    return unless skill.is_a?(RPG::Skill)
    @remaining_text = make_info_string(actor, skill)   
    refresh
  end
 
  def visible=(value)
    super
    refresh if value
  end
 
  def refresh   
    self.contents.clear
    self.contents.draw_text(self.contents.rect, @remaining_text, 1)
  end
 
end

class Window_MenuStatus < Window_Selectable
   
  #--------------------------------------------------------------------------
  # * OVERWRITTEN
  #--------------------------------------------------------------------------
  def initialize(x, y)
    super(x, y, 452, 352)     
    @bg_image = Cache.picture('FF9_MenuBar') 
    @arrow_image = Cache.picture('Pointer')
    create_arrow_sprites
    @sprite_last_draw_x = 0
    @sprite_inc_x = 1
    @intern_frame_count = 0   
    self.stretch = false if FF9_Config::USE_TILED_WINDOW
    self.contents.font.name = FF9_Config::DEFAULT_FONT
    self.opacity = 0   
    self.z = 99       
    self.active = false
    self.index = -1
    refresh
  end
  #--------------------------------------------------------------------------
  # * create_arrow_sprites
  #--------------------------------------------------------------------------
  def create_arrow_sprites 
    @arrow_sprites = []
    for i in 0..3
      @arrow_sprites << Sprite.new
      @arrow_sprites.bitmap = Bitmap.new(@arrow_image.width + 7, @arrow_image.height)
      @arrow_sprites.x = self.x
      @arrow_sprites.y = (i * 80) + self.y + 40     
      @arrow_sprites.z = 999       
    end
  end
  #--------------------------------------------------------------------------
  # * OVERWRITTEN
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = $game_party.members.size
    draw_background_windows if FF9_Config::DRAW_FOR_ALL
    for actor in $game_party.members
      x = 104
      y = actor.index * 80     
      y_offset = 6     
      draw_background_window(0, y) unless FF9_Config::DRAW_FOR_ALL
      draw_actor_face(actor, 19, y + 4, 73)
      draw_actor_name(actor, x, y + y_offset)
      draw_actor_class(actor, x + 125, y + y_offset) if actor.states.empty?
      draw_actor_level(actor, x, y + WLH * 1)     
      draw_actor_state(actor, x + 125, y + y_offset)
      draw_actor_hp(actor, x, ((y) + (WLH * 2) - 5))
      draw_actor_mp(actor, x + 125, ((y) + (WLH * 2) - 5))
    end
  end 
  #--------------------------------------------------------------------------
  # * OVERWRITTEN
  #--------------------------------------------------------------------------
  def update_cursor             
    if @index < 0             
      #refactor into update arrow method
      @arrow_sprites.each { |sprite| sprite.bitmap.clear }
      return
    end
    @intern_frame_count += 1
    return unless (@intern_frame_count % 5) == 0
    if @sprite_last_draw_x >= 7     
      @sprite_inc_x = -1
    elsif @sprite_last_draw_x <= 0
      @sprite_inc_x = 1
    end
    update_arrow_sprites
  end
  #--------------------------------------------------------------------------
  # * update_arrow_sprites
  #--------------------------------------------------------------------------
  def update_arrow_sprites   
    @arrow_sprites.each { |sprite| sprite.bitmap.clear }   
    if @index == 99   # all selected       
      return unless (@intern_frame_count % 10) == 0
      draw_arrow_sprites(@arrow_sprites, false)     
    else
      draw_arrow_sprites([@arrow_sprites[@index]], FF9_Config::ANIMATE_CURSOR)     
    end
  end
  #--------------------------------------------------------------------------
  # * draw_arrow_sprites
  #--------------------------------------------------------------------------
  def draw_arrow_sprites(sprites, animated=true)
    for sprite in sprites         
      image_x = animated ? @sprite_last_draw_x + @sprite_inc_x : 0
      @sprite_last_draw_x = image_x           
      sprite.bitmap.blt(image_x, 0, @arrow_image, @arrow_image.rect)
    end
  end
  #--------------------------------------------------------------------------
  # * y=
  #--------------------------------------------------------------------------
  def y=(value)
    super
    unless @arrow_sprites.nil?
      for i in 0..3
        @arrow_sprites.y = (i * 80) + value + 40
      end
    end
  end
  #--------------------------------------------------------------------------
  # * x=
  #--------------------------------------------------------------------------
  def x=(value)
    super
    unless @arrow_sprites.nil?
      @arrow_sprites.each { |sprite| sprite.x = value }
    end
  end
  #--------------------------------------------------------------------------
  # * draw_background_windows
  #--------------------------------------------------------------------------
  def draw_background_windows 
    self.contents.blt(0, 0, @bg_image, @bg_image.rect)   
    self.contents.blt(0, 80, @bg_image, @bg_image.rect)   
    self.contents.blt(0, 160, @bg_image, @bg_image.rect)   
    self.contents.blt(0, 240, @bg_image, @bg_image.rect)   
  end 
  #--------------------------------------------------------------------------
  # * draw_background_window (single)
  #--------------------------------------------------------------------------
  def draw_background_window(x, y)
    self.contents.blt(x, y, @bg_image, @bg_image.rect)   
  end
  #--------------------------------------------------------------------------
  # * visible
  #--------------------------------------------------------------------------
  def visible=(value)
    super
    @arrow_sprites.each { |sprite| sprite.visible = value }
  end
  #--------------------------------------------------------------------------
  # * dispose
  #--------------------------------------------------------------------------
  alias :eds_pre_ff9_win_stat_dispose :dispose
  def dispose
    eds_pre_ff9_win_stat_dispose
    @arrow_sprites.each { |sprite| sprite.dispose }
  end
 
  def enable_cursor?(rect=nil)
    # for compatibility with the improved command window
    return false
  end   
 
end

class Scene_Menu
     
  #--------------------------------------------------------------------------
  # * create_menu_background (only if USE_CUSTOM_BACK == true)
  #--------------------------------------------------------------------------
  if FF9_Config::USE_CUSTOM_BACK
   
    def create_menu_background
      @menuback_sprite = Sprite.new
      @menuback_sprite.bitmap = Cache.picture(FF9_Config::BACK_NAME)
      @menuback_sprite.color.set(16, 16, 16, 128)
      update_menu_background
    end
   
  end
  #--------------------------------------------------------------------------
  # * OVERWRITTEN
  #--------------------------------------------------------------------------   
  def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = Vocab::status
    s5 = Vocab::save
    s6 = Vocab::game_end
    # just changed the width of the window here
    @command_window = Window_Command.new(132, [s1, s2, s3, s4, s5, s6])
    @command_window.index = @menu_index
    @command_window.stretch = false if FF9_Config::USE_TILED_WINDOW
    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     
    # new stuff here   
    @command_window.font_name = FF9_Config::DEFAULT_FONT
    @command_window.x = 528 - @command_window.width
    @command_window.y = 16
    @command_window.back_opacity = 255
  end
  #--------------------------------------------------------------------------
  # * This method is intended to fix some compatibility problems
  #   that scripts run into when they change the command window
  #   in some way.  So, we let them override "create_command_window"
  #   and we simply don't call it from the "start" method.
  #   Instead, we call this method which does some extra checking.
  #--------------------------------------------------------------------------
  def eds_create_command_window
    create_command_window
    old_commands = @command_window.commands
    return if old_commands == [ Vocab::item,
                                Vocab::skill,
                                Vocab::equip,
                                Vocab::status,
                                Vocab::save,
                                Vocab::game_end ]

    # so we know that the default command window is not being used
    # we don't want to create another window, so we manually resize it
    # before the player can see. 
    long = ''
    # dynamically size the width based on the longest command
    old_commands.each { |command| long = command if command.length > long.length }
    # set the index to -1 so that the rectangle disappears.
    # if we don't do this, you can see the selection rectangle resize.
    @command_window.index = -1
    @command_window.width = @command_window.contents.text_size(long).width + 42
    @command_window.contents = Bitmap.new( @command_window.width - 32,
                                           @command_window.height - 32 )   
    @command_window.font_name = FF9_Config::DEFAULT_FONT
    @command_window.x = 528 - @command_window.width
    @command_window.y = 16
    @command_window.back_opacity = 255       
    @command_window.refresh
    @command_window.index = @menu_index
  end
  #--------------------------------------------------------------------------
  # * OVERWRITTEN
  #--------------------------------------------------------------------------
  def start
    super
    create_menu_background
    #call this method for compatibility
    eds_create_command_window
    @gold_window = Window_TimeGold.new(372, 342)
    @gold_window.y -= @gold_window.height
    @gold_window.x = 528 - @gold_window.width
    @status_window = Window_MenuStatus.new(0, 12)
    @location_window = Window_MenuLocation.new(0, 0)
    @location_window.x = 528 - @location_window.width 
    @location_window.y = 398 - @location_window.height
  end
 
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  alias :eds_pre_ff9_menu_scene_menu_terminate :terminate
  def terminate
    eds_pre_ff9_menu_scene_menu_terminate
    @location_window.dispose
  end
 
end

class Scene_Item < Scene_Base
 
  #--------------------------------------------------------------------------
  # * start
  #--------------------------------------------------------------------------
  alias :eds_pre_ff9_menu_scene_item_start :start
  def start       
    eds_pre_ff9_menu_scene_item_start
    @target_window.y = 58   
    @uses_window = Window_Uses.new(true, @help_window.height, nil)
    @uses_window.visible = false
  end 
  #--------------------------------------------------------------------------
  # * OVERWRITTEN
  #   - right-align flag ignored
  #--------------------------------------------------------------------------
  alias :eds_pre_ff9_menu_win_stat_show_target_window :show_target_window
  def show_target_window(right) 
    @uses_window.item = @item_window.item
    @uses_window.visible = true   
    @item_window.visible = false   
    @item_window.active = false   
    @target_window.visible = true
    @target_window.active = true 
    @viewport.rect.set(0, 0, 544, 416)
    @viewport.ox = 0
  end
  #--------------------------------------------------------------------------
  # * hide_target_window
  #--------------------------------------------------------------------------
  alias :eds_pre_ff9_menu_scene_item_hide_target_window :hide_target_window
  def hide_target_window
    eds_pre_ff9_menu_scene_item_hide_target_window 
    @uses_window.visible = false unless @uses_window.nil?
    @item_window.visible = true       
  end
  #--------------------------------------------------------------------------
  # * determine_target
  #--------------------------------------------------------------------------
  alias :eds_pre_ff9_menu_scene_item_determine_target :determine_target
  def determine_target   
    eds_pre_ff9_menu_scene_item_determine_target
    @uses_window.item = @item_window.item
  end   
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  alias :eds_pre_ff9_menu_scene_item_terminate :terminate
  def terminate
    eds_pre_ff9_menu_scene_item_terminate
    @uses_window.dispose
  end
 
end

class Scene_Skill < Scene_Base
 
  #--------------------------------------------------------------------------
  # * start
  #--------------------------------------------------------------------------
  alias :eds_pre_ff9_menu_scene_skill_start :start
  def start       
    eds_pre_ff9_menu_scene_skill_start
    @target_window.y = 58         
    @uses_window = Window_SkillUses.new(true, @help_window.height, nil, nil)
    @uses_window.visible = false
  end 
  #--------------------------------------------------------------------------
  # * OVERWRITTEN
  #   - right-align flag ignored
  #--------------------------------------------------------------------------
  def show_target_window(right)
    @uses_window.set_skill($game_party.members[@actor_index], @skill_window.skill)
    @uses_window.visible = true
    @status_window.visible = false
    @skill_window.visible = false
    @skill_window.active = false   
    @target_window.visible = true
    @target_window.active = true 
    @viewport.rect.set(0, 0, 544, 416)
    @viewport.ox = 0
  end
  #--------------------------------------------------------------------------
  # * hide_target_window
  #--------------------------------------------------------------------------
  alias :eds_pre_ff9_menu_scene_skill_hide_target_window :hide_target_window
  def hide_target_window
    eds_pre_ff9_menu_scene_skill_hide_target_window 
    @uses_window.visible = false unless @uses_window.nil?
    @skill_window.visible = true
    @status_window.visible = true
  end
  #--------------------------------------------------------------------------
  # * determine_target
  #--------------------------------------------------------------------------
  alias :eds_pre_ff9_menu_scene_skill_determine_target :determine_target
  def determine_target   
    eds_pre_ff9_menu_scene_skill_determine_target
    @uses_window.set_skill($game_party.members[@actor_index], @skill_window.skill)
  end   
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  alias :eds_pre_ff9_menu_scene_item_terminate :terminate
  def terminate
    eds_pre_ff9_menu_scene_item_terminate
    @uses_window.dispose
  end
 
end
« Last Edit: February 24, 2010, 08:08:53 PM by wonderjosh »

*
Rep: +0/-0Level 76
Silent
Hey modern algebra, I'm a total scripting noob and need some help. I have two problems actually... One is when I go go into my game and start a fight I get a message that reads:

Script 'Monster Dialogue' line 574: NoMethodError occured
undefined method 'include?' for nil:Nil Class.

and when I try to open up the Monster Catalogue as an item I get this message:

Script 'Monster Dialogue' line 393: NoMethodError occured
undefned method 'include?' for nil:Nil Class

This may be the same problem but I decided to post both in case its different, if you have an answer please respond. Thank You!
Hello, my name is Terry, I have come to steal your soul"

*
Rep:
Level 97
2014 Best RPG Maker User - Engine2014 Most Unsung Member2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best RPG Maker User (Scripting)2011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best Use of Avatar and Signature Space2010 Favourite Staff Member2010 Most Mature Member
It's probably an incompatibility. Put the Monster Catalogue below any other scripts you have but still above Main. Alternatively, it might be that you are loading a save game you made before adding this script. That might do it too.

*
Rep: +0/-0Level 76
Silent
 Thanks, it's because I'm loading a save file from before.  :-[
Hello, my name is Terry, I have come to steal your soul"