Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

EASY- Monster Catergories In Beastiary...

Hi anyone who is actually reading this!

There is a payment... (See Bottom)

Request:

To use "Catergories" of monsters in my Beastiary...

Here is my bestiary script:

(Sorry Admins, I'm a newb and don't know how to use spoiler tags... Sorry...)

EDIT- I learnt it...



#魔物図鑑
#
#エネミーの遭遇情報は、戦闘終了時(経験値などを獲得する所)で追加されます。
#よって、敵から逃げた場合や負けイベントでの戦闘敗北などでは
#図鑑に登録されません。
#このタイミングを変えたい場合は各自書き換えて下さい。
#(class Scene_Battle の start_phase5 で追加してます。)
#
#また、所々「アナライズ」という単語がありますが、
#現在、この魔物辞典だけでは機能しておりません。(自ゲームでの名残)
#Window_MonsterBook_Info の DROP_ITEM_NEED_ANALYZE が true になっていると
#ドロップアイテムが表示されなくなりますので、通常は false にしておいて下さい。
#
#注意
#このまま使うと、データベースのトループの1番に
#何も設定していないと、エラー吐きます。
#対処策としては
#1.素直にデータベースのトループの1番に何でもいいから設定する。
#2.Game_Enemy_Book の 「super(1, 0)#ダミー」 の左側の数字の部分を
# 存在するトループIDに書き換える。
#のどちらかになります。
#
#2005.2.6 機能追加
#図鑑完成度の表示機能を追加
#SHOW_COMPLETE_TYPE で設定できます。
#イベントコマンドの「スクリプト」で
#$game_party.enemy_book_max で図鑑の総魔物数(最大数)
#$game_party.enemy_book_now で図鑑の現在登録数(現在数)
#$game_party.complete_percentage で図鑑の完成率(小数点切捨て)
#を取得できます。
#
#2005.2.17
#complete_percentageのメソッド名を
#enemy_book_complete_percentageに変更(他の図鑑と区別できるように)
#イベントコマンドの「スクリプト」で最大数等の取得を短縮できるようになりました。
#enemy_book_max で図鑑の総魔物数(最大数)
#enemy_book_now で図鑑の現在登録数(現在数)
#enemy_book_compで図鑑の完成率(小数点切捨て)
#
#2005.2.18 バグ修正
#complete_percentageのメソッド名を
#enemy_book_complete_percentageに変更したのに
#complete_percentageって呼び出してました。(単なる書き換え漏れですね)
#
#2005.7.4 機能追加
#コメント機能に対応。
#全体的に色々いじりました。
#
#2005.7.4 バグ修正
#細かいバグを修正。


module Enemy_Book_Config
#ドロップアイテム表示にアナライズが必要かどうか
DROP_ITEM_NEED_ANALYZE = true
#回避修正の名前
EVA_NAME = "Evasion"
#図鑑完成率の表示方法
#0:表示なし 1:現在数/最大数 2:%表示 3:両方
SHOW_COMPLETE_TYPE = 3
#コメント機能を使うかどうか(要・コメント追加スクリプト導入)
COMMENT_SYSTEM = true
end

class Game_Temp
attr_accessor :enemy_book_data
alias temp_enemy_book_data_initialize initialize
def initialize
temp_enemy_book_data_initialize
@enemy_book_data = Data_MonsterBook.new
end
end

class Game_Party
attr_accessor :enemy_info # 出会った敵情報(図鑑用)
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
alias book_info_initialize initialize
def initialize
book_info_initialize
@enemy_info = {}
end
#--------------------------------------------------------------------------
# ● エネミー情報の追加(図鑑用)
# type : 通常遭遇かアナライズか 0:通常 1:アナライズ -1:情報削除
# 0:無遭遇 1:遭遇済 2:アナライズ済
#--------------------------------------------------------------------------
def add_enemy_info(enemy_id, type = 0)
case type
when 0
if @enemy_info[enemy_id] == 2
return false
end
@enemy_info[enemy_id] = 1
when 1
@enemy_info[enemy_id] = 2
when -1
@enemy_info[enemy_id] = 0
end
end
#--------------------------------------------------------------------------
# ● 魔物図鑑の最大登録数を取得
#--------------------------------------------------------------------------
def enemy_book_max
return $game_temp.enemy_book_data.id_data.size - 1
end
#--------------------------------------------------------------------------
# ● 魔物図鑑の現在登録数を取得
#--------------------------------------------------------------------------
def enemy_book_now
now_enemy_info = @enemy_info.keys
# 登録無視の属性IDを取得
no_add = $game_temp.enemy_book_data.no_add_element
new_enemy_info = []
for i in now_enemy_info
enemy = $data_enemies
next if enemy.name == ""
if enemy.element_ranks[no_add] == 1
next
end
new_enemy_info.push(enemy.id)
end
return new_enemy_info.size
end
#--------------------------------------------------------------------------
# ● 魔物図鑑の完成率を取得
end

class Interpreter
def enemy_book_max
return $game_party.enemy_book_max
end
def enemy_book_now
return $game_party.enemy_book_now
end
def enemy_book_comp
return $game_party.enemy_book_complete_percentage
end
end

class Scene_Battle
alias add_enemy_info_start_phase5 start_phase5
def start_phase5
for enemy in $game_troop.enemies
# エネミーが隠れ状態でない場合
unless enemy.hidden
# 敵遭遇情報追加
$game_party.add_enemy_info(enemy.id, 0)
end
end
add_enemy_info_start_phase5
end
end

class Window_Base < Window
#--------------------------------------------------------------------------
# ● エネミーの戦闘後獲得アイテムの描画
#--------------------------------------------------------------------------
def draw_enemy_drop_item(enemy, x, y)
self.contents.font.color = normal_color
treasures = []
if enemy.item_id > 0
treasures.push($data_items[enemy.item_id])
end
if enemy.weapon_id > 0
treasures.push($data_weapons[enemy.weapon_id])
end
if enemy.armor_id > 0
treasures.push($data_armors[enemy.armor_id])
end
# 現状ではとりあえず1つのみ描画
if treasures.size > 0
item = treasures[0]
bitmap = RPG::Cache.icon(item.icon_name)
opacity = 255
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
name = treasures[0].name
else
self.contents.font.color = disabled_color
name = "No Item"
end
self.contents.draw_text(x+28, y, 212, 32, name)
end
#--------------------------------------------------------------------------
# ● エネミーの図鑑IDの描画
#--------------------------------------------------------------------------
def draw_enemy_book_id(enemy, x, y)
self.contents.font.color = normal_color
id = $game_temp.enemy_book_data.id_data.index(enemy.id)
self.contents.draw_text(x, y, 32, 32, id.to_s)
end
#--------------------------------------------------------------------------
# ● エネミーの名前の描画
# enemy : エネミー
# x : 描画先 X 座標
# y : 描画先 Y 座標
#--------------------------------------------------------------------------
def draw_enemy_name(enemy, x, y)
self.contents.font.color = normal_color
self.contents.draw_text(x, y, 152, 32, enemy.name)
end
#--------------------------------------------------------------------------
# ● エネミーグラフィックの描画(アナライズ)
# enemy : エネミー
# x : 描画先 X 座標
# y : 描画先 Y 座標
#--------------------------------------------------------------------------
def draw_enemy_graphic(enemy, x, y, opacity = 255)
bitmap = RPG::Cache.battler(enemy.battler_name, enemy.battler_hue)
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
x = x + (cw / 2 - x) if cw / 2 > x
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, opacity)
end
#--------------------------------------------------------------------------
# ● エネミーの獲得EXPの描画
# enemy : エネミー
# x : 描画先 X 座標
# y : 描画先 Y 座標
#--------------------------------------------------------------------------
def draw_enemy_exp(enemy, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 120, 32, "EXP")
self.contents.font.color = normal_color
self.contents.draw_text(x + 120, y, 36, 32, enemy.exp.to_s, 2)
end
#--------------------------------------------------------------------------
# ● エネミーの獲得GOLDの描画
# enemy : エネミー
# x : 描画先 X 座標
# y : 描画先 Y 座標
#--------------------------------------------------------------------------
def draw_enemy_gold(enemy, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 120, 32, $data_system.words.gold)
self.contents.font.color = normal_color
self.contents.draw_text(x + 120, y, 36, 32, enemy.gold.to_s, 2)
end
end

class Game_Enemy_Book < Game_Enemy
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize(enemy_id)
super(1, 0)#ダミー
@enemy_id = enemy_id
enemy = $data_enemies[@enemy_id]
@battler_name = enemy.battler_name
@battler_hue = enemy.battler_hue
@hp = maxhp
@sp = maxsp
end
end

class Data_MonsterBook
attr_reader :id_data
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
@id_data = enemy_book_id_set
end
#--------------------------------------------------------------------------
# ● 図鑑用登録無視属性取得
#--------------------------------------------------------------------------
def no_add_element
no_add = 0
# 登録無視の属性IDを取得
for i in 1...$data_system.elements.size
if $data_system.elements =~ /図鑑登録無効/
no_add = i
break
end
end
return no_add
end
#--------------------------------------------------------------------------
# ● 図鑑用敵ID設定
#--------------------------------------------------------------------------
def enemy_book_id_set
data = [0]
no_add = no_add_element
# 登録無視の属性IDを取得
for i in 1...$data_enemies.size
enemy = $data_enemies
next if enemy.name == ""
if enemy.element_ranks[no_add] == 1
next
end
data.push(enemy.id)
end
return data
end
end


class Window_MonsterBook < Window_Selectable
attr_reader :data
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize(index=0)
super(0, 64, 640, 416)
@column_max = 2
@book_data = $game_temp.enemy_book_data
@data = @book_data.id_data.dup
@data.shift
#@data.sort!
@item_max = @data.size
self.index = 0
refresh if @item_max > 0
end
#--------------------------------------------------------------------------
# ● 遭遇データを取得
#--------------------------------------------------------------------------
def data_set
data = $game_party.enemy_info.keys
data.sort!
newdata = []
for i in data
next if $game_party.enemy_info == 0
# 図鑑登録無視を考慮
if book_id(i) != nil
newdata.push(i)
end
end
return newdata
end
#--------------------------------------------------------------------------
# ● 表示許可取得
#--------------------------------------------------------------------------
def show?(id)
if $game_party.enemy_info[id] == 0 or $game_party.enemy_info[id] == nil
return false
else
return true
end
end
#--------------------------------------------------------------------------
# ● 図鑑用ID取得
#--------------------------------------------------------------------------
def book_id(id)
return @book_data.index(id)
end
#--------------------------------------------------------------------------
# ● エネミー取得
#--------------------------------------------------------------------------
def item
return @data[self.index]
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
self.contents = Bitmap.new(width - 32, row_max * 32)
if $fontface != nil
self.contents.font.name = $fontface
elsif $defaultfonttype != nil
self.contents.font.name = $defaultfonttype
end

#項目数が 0 でなければビットマップを作成し、全項目を描画
if @item_max > 0
for i in 0...@item_max
draw_item(i)
end
end
end
#--------------------------------------------------------------------------
# ● 項目の描画
# index : 項目番号
#--------------------------------------------------------------------------
def draw_item(index)
enemy = $data_enemies[@data[index]]
return if enemy == nil
x = 4 + index % 2 * (288 + 32)
y = index / 2 * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.font.color = normal_color
draw_enemy_book_id(enemy, x, y)
if show?(enemy.id)
self.contents.draw_text(x + 28+16, y, 212, 32, enemy.name, 0)
else
self.contents.draw_text(x + 28+16, y, 212, 32, "-----", 0)
return
end
if analyze?(@data[index])
self.contents.font.color = text_color(3)
self.contents.draw_text(x + 256, y, 24, 32, "済", 2)
end
end
#--------------------------------------------------------------------------
# ● アナライズ済かどうか
#--------------------------------------------------------------------------
def analyze?(enemy_id)
if $game_party.enemy_info[enemy_id] == 2
return true
else
return false
end
end
end


class Window_MonsterBook_Info < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
super(0, 0+64, 640, 480-64)
self.contents = Bitmap.new(width - 32, height - 32)
if $fontface != nil
self.contents.font.name = $fontface
elsif $defaultfonttype != nil
self.contents.font.name = $defaultfonttype
end
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh(enemy_id)
self.contents.clear
self.contents.font.size = 22
enemy = Game_Enemy_Book.new(enemy_id)
draw_enemy_graphic(enemy, 96, 240+48+64, 200)
draw_enemy_book_id(enemy, 4, 0)
draw_enemy_name(enemy, 48, 0)
draw_actor_hp(enemy, 288, 0)
draw_actor_sp(enemy, 288+160, 0)
draw_actor_parameter(enemy, 288 , 32, 0)
self.contents.font.color = system_color
self.contents.draw_text(288+160, 32, 120, 32, Enemy_Book_Config::EVA_NAME)
self.contents.font.color = normal_color
self.contents.draw_text(288+160 + 120, 32, 36, 32, enemy.eva.to_s, 2)
draw_actor_parameter(enemy, 288 , 64, 3)
draw_actor_parameter(enemy, 288+160, 64, 4)
draw_actor_parameter(enemy, 288 , 96, 5)
draw_actor_parameter(enemy, 288+160, 96, 6)
draw_actor_parameter(enemy, 288 , 128, 1)
draw_actor_parameter(enemy, 288+160, 128, 2)
draw_enemy_exp(enemy, 288, 160)
draw_enemy_gold(enemy, 288+160, 160)
if analyze?(enemy.id) or !Enemy_Book_Config::DROP_ITEM_NEED_ANALYZE
self.contents.draw_text(288, 192, 96, 32, "Drop Item")
draw_enemy_drop_item(enemy, 288+96+4, 192)
self.contents.font.color = normal_color
#draw_element_guard(enemy, 320-32, 160-16+96)
end
end
#--------------------------------------------------------------------------
# ● アナライズ済かどうか
#--------------------------------------------------------------------------
def analyze?(enemy_id)
if $game_party.enemy_info[enemy_id] == 2
return true
else
return false
end
end
end


class Scene_MonsterBook
#--------------------------------------------------------------------------
# ● メイン処理
#--------------------------------------------------------------------------
def main
$game_temp.enemy_book_data = Data_MonsterBook.new
# ウィンドウを作成
@title_window = Window_Base.new(0, 0, 640, 64)
@title_window.contents = Bitmap.new(640 - 32, 64 - 32)
if $fontface != nil
self.contents.font.name = $fontface
elsif $defaultfonttype != nil
self.contents.font.name = $defaultfonttype
end
@title_window.contents.draw_text(4, 0, 320, 32, "Monster Information", 0)
@main_window = Window_MonsterBook.new
@main_window.active = true
# インフォウィンドウを作成 (不可視・非アクティブに設定)
@info_window = Window_MonsterBook_Info.new
@info_window.z = 110
@info_window.visible = false
@info_window.active = false
@visible_index = 0
if Enemy_Book_Config::COMMENT_SYSTEM
# コメントウィンドウを作成 (不可視・非アクティブに設定)
@comment_window = Window_Monster_Book_Comment.new
@comment_window.z = 120
@comment_window.visible = false
@comment_on = false # コメントフラグ
end
# トランジション実行
Graphics.transition
# メインループ
loop do
# ゲーム画面を更新
Graphics.update
# 入力情報を更新
Input.update
# フレーム更新
update
# 画面が切り替わったらループを中断
if $scene != self
break
end
end
# トランジション準備
Graphics.freeze
# ウィンドウを解放
@main_window.dispose
@info_window.dispose
@title_window.dispose
@comment_window.dispose if @comment_window != nil
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
# ウィンドウを更新
@main_window.update
@info_window.update
if @info_window.active
update_info
return
end
# メインウィンドウがアクティブの場合: update_target を呼ぶ
if @main_window.active
update_main
return
end
end
#--------------------------------------------------------------------------
# ● フレーム更新 (メインウィンドウがアクティブの場合)
#--------------------------------------------------------------------------
def update_main
# B ボタンが押された場合
if Input.trigger?(Input::B)
# キャンセル SE を演奏
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
# C ボタンが押された場合
if Input.trigger?(Input::C)
if @main_window.item == nil or @main_window.show?(@main_window.item) == false
# ブザー SE を演奏
$game_system.se_play($data_system.buzzer_se)
return
end
# 決定 SE を演奏
$game_system.se_play($data_system.decision_se)
@main_window.active = false
@info_window.active = true
@info_window.visible = true
@visible_index = @main_window.index
@info_window.refresh(@main_window.item)
if @comment_window != nil
@comment_window.refresh(@main_window.item)
if @comment_on
@comment_window.visible = true
else
@comment_window.visible = false
end
end
return
end
end
#--------------------------------------------------------------------------
# ● フレーム更新 (インフォウィンドウがアクティブの場合)
#--------------------------------------------------------------------------
def update_info
# B ボタンが押された場合
if Input.trigger?(Input::B)
# キャンセル SE を演奏
$game_system.se_play($data_system.cancel_se)
@main_window.active = true
@info_window.active = false
@info_window.visible = false
@comment_window.visible = false if @comment_window != nil
return
end
# C ボタンが押された場合
if Input.trigger?(Input::C)
if @comment_window != nil
# 決定 SE を演奏
$game_system.se_play($data_system.decision_se)
if @comment_on
@comment_on = false
@comment_window.visible = false
else
@comment_on = true
@comment_window.visible = true
end
return
end
end
if Input.trigger?(Input::L)
# 決定 SE を演奏
$game_system.se_play($data_system.decision_se)
loop_end = false
while loop_end == false
if @visible_index != 0
@visible_index -= 1
else
@visible_index = @main_window.data.size - 1
end
loop_end = true if @main_window.show?(@main_window.data[@visible_index])
end
id = @main_window.data[@visible_index]
@info_window.refresh(id)
@comment_window.refresh(id) if @comment_window != nil
return
end
if Input.trigger?(Input::R)
# 決定 SE を演奏
$game_system.se_play($data_system.decision_se)
loop_end = false
while loop_end == false
if @visible_index != @main_window.data.size - 1
@visible_index += 1
else
@visible_index = 0
end
loop_end = true if @main_window.show?(@main_window.data[@visible_index])
end
id = @main_window.data[@visible_index]
@info_window.refresh(id)
@comment_window.refresh(id) if @comment_window != nil
return
end
end
end

=begin

THIS IS THE COMMENTS FUNCTION!!! THIS IS WHAT I EDIT!!!

=end

# 図鑑コメント機能追加(基本)
#
# 図鑑にコメント機能を使いするのに必須です。
#
# 2005.9.19
# ウィンドウの不透明度、フォントと文字色を指定可能に。

class Window_Book_Comment < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize(x, y, width, height)
super(x, y, width, height)
self.contents = Bitmap.new(width - 32, height - 32)
if $fontface != nil
self.contents.font.name = $fontface
elsif $defaultfonttype != nil
self.contents.font.name = $defaultfonttype
end
self.opacity = self.window_opa
self.contents.font.name = self.font_name
self.contents.font.color = self.font_color
end
#--------------------------------------------------------------------------
# ● 文字列変換
#--------------------------------------------------------------------------
def transfer(str)
text = str.clone
# 制御文字処理
begin
text.gsub!(/\\[Vv]\[([0-9]+)\]/) { $game_variables[$1.to_i] }
end
text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
$game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
end
# 便宜上、"\\\\" を "\000" に変換
text.gsub!(/\\\\/) { "\000" }
# "\\C" を "\001" に、"\\G" を "\002" に変換
text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
text.gsub!(/\\[Gg]/) { "\002" }
# 不透明度
text.gsub!(/\\[Oo]\[([0-9]+)\]/) { "\200[#{$1}]" }
# 文字サイズ
text.gsub!(/\\[Hh]\[([0-9]+)\]/) { "\201[#{$1}]" }
# ルビ
text.gsub!(/\\[Rr]\[(.+?),(.+?)\]/) { "\202[#{$1},#{$2}]" }
# ピクチャ表示
text.gsub!(/\\[Pp]ic\[([0-9]+),([0-9]+),([^,\]]+)\]/) { "\250[#{$1},#{$2},#{$3}]" }
# バトラー表示
text.gsub!(/\\[Bb]at\[([0-9]+),([0-9]+),([^,\]]+),([0-9]+)\]/) { "\251[#{$1},#{$2},#{$3},#{$4}]" }
# キャラグラフィック表示
text.gsub!(/\\[Cc]ha\[([0-9]+),([0-9]+),([^,\]]+),([0-9]+),([0-9]+),([0-9]+)\]/) { "\252[#{$1},#{$2},#{$3},#{$4},#{$5},#{$6}]" }

return text
end
#--------------------------------------------------------------------------
# ● 変換した文字列を描画
#--------------------------------------------------------------------------
def draw_ex_text(ox, oy, str, align=0)
text = str.clone
x = 0
y = 0
# c に 1 文字を取得 (文字が取得できなくなるまでループ)
while ((c = text.slice!(/./m)) != nil)
# \\ の場合
if c == "\000"
# 本来の文字に戻す
c = "\\"
end
# \C[n] の場合
if c == "\001"
# 文字色を変更
text.sub!(/\[([0-9]+)\]/, "")
color = $1.to_i
if color >= 0 and color <= 7
self.contents.font.color = text_color(color)
end
# 次の文字へ
next
end
# \G の場合
if c == "\002"
# 所持ゴールドに変換
c = $game_party.gold.to_s
# 文字を描画
self.contents.draw_text(ox+4+x, oy+4+ 32 * y, self.contents.text_size(c).width, 32, c)
# x に描画した文字の幅を加算
x += self.contents.text_size(c).width
# 次の文字へ
next
end

# \O の場合
if c == "\200"
text.sub!(/\[([0-9]+)\]/, "")
opacity = $1.to_i
temp = self.contents.font.color
self.contents.font.color = Color.new(temp.red, temp.green, temp.blue, opacity)
# 次の文字へ
next
end
# \H の場合
if c == "\201"
text.sub!(/\[([0-9]+)\]/, "")
self.contents.font.size = [[$1.to_i, 6].max, 32].min
# 次の文字へ
next
end
# \R の場合
if c == "\202"
text.sub!(/\[(.+?),(.+?)\]/, "")
x += ruby_set(ox+x,oy+(y*32),$1,$2)
# 次の文字へ
next
end
# \Pic の場合
if c == "\250"
text.sub!(/\[([0-9]+),([0-9]+),([^,\]]+)\]/, "")
ope = self.contents.font.color.alpha
set_picture($1.to_i, $2.to_i, $3, ope)
# 次の文字へ
next
end
# \Bat の場合
if c == "\251"
text.sub!(/\[([0-9]+),([0-9]+),([^,\]]+),([0-9]+)\]/, "")
ope = self.contents.font.color.alpha
set_battler($1.to_i, $2.to_i, $3, $4.to_i, ope)
# 次の文字へ
next
end
# \Cha の場合
if c == "\252"
text.sub!(/\[([0-9]+),([0-9]+),([^,\]]+),([0-9]+),([0-9]+),([0-9]+)\]/, "")
ope = self.contents.font.color.alpha
set_character($1.to_i, $2.to_i, $3, $4.to_i, $5.to_i, $6.to_i, ope)
# 次の文字へ
next
end
# 改行文字の場合
if c == "\n"
# y に 1 を加算
y += 1
x = 0
# 次の文字へ
next
end
# 文字を描画
self.contents.draw_text(ox+4+x, 4+oy+ 32 * y, 40, 32, c)
# x に描画した文字の幅を加算
x += self.contents.text_size(c).width
end
end
#--------------------------------------------------------------------------
# ● ルビ描画
#--------------------------------------------------------------------------
def ruby_set(x,y,str,ruby)
text_w = self.contents.text_size(str).width
text_h = self.contents.text_size(str).height
f_size_back = self.contents.font.size
ruby_size = 10
self.contents.font.size = ruby_size
ruby_w = self.contents.text_size(ruby).width
self.contents.draw_text(4+x, 4+4+y-ruby_size+1, text_w, ruby_size, ruby, 1)
self.contents.font.size = f_size_back
self.contents.draw_text(4+x, 4+4+y, text_w, text_h, str)
return text_w
end
#--------------------------------------------------------------------------
# ● ピクチャー描画
#--------------------------------------------------------------------------
def set_picture(x, y, filename, opacity=255)
bitmap = RPG::Cache.picture(filename)
self.contents.blt(x, y, bitmap, bitmap.rect, opacity)
end
#--------------------------------------------------------------------------
# ● バトラー描画
#--------------------------------------------------------------------------
def set_battler(x, y, filename, hue, opacity=255)
bitmap =RPG::Cache.battler(filename, hue)
self.contents.blt(x, y, bitmap, bitmap.rect, opacity)
end
#--------------------------------------------------------------------------
# ● キャラクター描画
#--------------------------------------------------------------------------
def set_character(x, y, filename, hue, dir, pat, opacity=255)
bitmap = RPG::Cache.character(filename, hue)
cw = bitmap.width / 4
ch = bitmap.height / 4
cy = ch * (dir / 2 - 1)
cx = cw * (pat - 1)
src_rect = Rect.new(cx, cy, cw, ch)
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, opacity)
end
def window_opa
end
def font_name
end
def font_color
end
end

=begin

THIS IS WHAT I ACTUALLY EDIT!!! INDIVIDUAL COMMENTS...

=end

# 図鑑コメント機能追加(魔物図鑑)
#
# コメントには冒険日記と同様の制御文字が使用可能です。
# 詳しくは冒険日記の方をご覧下さい。
#
# 2005.9.19
# ウィンドウの不透明度、フォントと文字色を指定可能に。

module MoMo_M_Book_Comment
# コメントウィンドウの横幅
C_WINDOW_WIDTH = 640
# コメントウィンドウの縦幅
C_WINDOW_HEIGHT = 480
# コメントウィンドウのX座標
C_WINDOW_X = 0
# コメントウィンドウのY座標
C_WINDOW_Y = 0
# コメントウィンドウの不透明度
C_WINDOW_OPA = 255
# 使用するフォント名(希望順に配列に追加してください)
C_WINDOW_FONT_NAME = ["Tahoma"]
# 使用する文字色
# Color.new(赤の値, 緑の値, 青の値, 不透明度) ※0~255まで
C_WINDOW_FONT_COLOR = Color.new(255, 255, 255, 255)
end

class Window_Monster_Book_Comment < Window_Book_Comment
def initialize
x = MoMo_M_Book_Comment::C_WINDOW_X
y = MoMo_M_Book_Comment::C_WINDOW_Y
width = MoMo_M_Book_Comment::C_WINDOW_WIDTH
height = MoMo_M_Book_Comment::C_WINDOW_HEIGHT
super(x, y, width, height)
end
def draw_comment(id)
self.contents.clear
comment = get_comment(id)
draw_ex_text(0, 0, transfer(comment))
end
def get_comment(id)
return comment_set[0] if comment_set[id] == nil
return comment_set[id]
end
def comment_set
return MoMo_M_Book_Comment::M_BOOK_COMMENT
end
def refresh(id)
draw_comment(id)
end
def window_opa
return MoMo_M_Book_Comment::C_WINDOW_OPA
end
def font_name
return MoMo_M_Book_Comment::C_WINDOW_FONT_NAME
end
def font_color
return MoMo_M_Book_Comment::C_WINDOW_FONT_COLOR
end
end

module MoMo_M_Book_Comment
str = []
# str[エネミーID]
str[0] = <<-EOS #デフォ(コメント未設定時用、通常は使用しない)
コメントな~し!
EOS
str[11] = <<-EOS #Aqua
Aqua:
A fiend on Dunhil Beach, recently forced onto the land
because of a territory squabble with a nearby Krakken.
It is a powerful foe compared with its competition around
Dunhil Beach, and usually at the top of the food chain, until
the Krakken came along. It is capable of being a strong
predator, but would usually eat small fish and the like, but
when it was forced onto the land, it began to develop a taste
for human flesh, starting with passing merchants, and moving
its way up, until starting to consume hunters and the like...

Dunhil Beach:
A small beach on the island of Yeltzern, this is usually a quiet
place with not much going on, until the recent territory
squabble with the Aqua and the Krakken, two fiends which
would normally be found nearer the Tibean Coast...
EOS
str[1] = <<-EOS #Goblin
Goblin:
These mischevious creatures are always causing annoyance
to the citizens of Dunhil. They are usually green, but special
breeds have various tones of colour, probably showing the
different levels of the pecking order, with the Goblin Elder
at the top. This one wields two daggers and is relatively
low in the pecking order. Even though these goblins know
no states or provinces, they still attack anything they
consider to be in there territory, making these a common
target for hunters...

Goblin Scimitar:
Once in every 1000 years, a Goblin genius is born, this
weapon in particular was developed by one of these
geniuses. It is curved so that it can slide over the top of
shields and hack away at the person behind. The genius
who developed this weapon was later tried, and found
guilty of being too clever and put to death...
EOS
str[2] = <<-EOS #Goblin Archer
Goblin Archer:
A more respected member of the pecking order, it is
skilled in the use of the bow. They are still a far way
down from The Elder, but are more respected than their
sword-wielding cousins...

Goblin Bow:
Curved and elegant, the Goblin Bow is a fine example
of rare Goblin inginuity. It isn't as good as most human
craft, but is still plausable in todays weapons market, even
if for a very low price. Again, the Goblin genius that designed
this weapon was sentenced to death by The Elder, this time
for being too smart... The poor goblin wrote his appeal in
his own blood, but was rejected because the Goblin Elder
was too busy looking at shiny rocks in the side of a cliff...
EOS
str[3] = <<-EOS
Basilisk:
A venomous fiend that inhabbits parts of Dunhil Canyons.
It is very agile and almost top of the food chain in that
area. The myth about these creatures eating men whole
is complete rubbish. They prefer to poison their victims
first, and then to eat their victims whole...

Antidotes:
A cure for the Basilisks venom had puzzled scientists
for many centuries. Until one day, when a scientist by
the name of Anne Dotte invented a cure by chance when
playing around with a flask of crushed Yaneor Leaf, a bag
of flour, and some stale, melted cheese. She originally
called her cure 'Anne Dotte', but it was later changed to
'Antidote'...
EOS
str[4] = <<-EOS
Cockatrice:
A bird similar to a chicken in appearance that roams
across many places on the island of Yeltzern. It is many
times faster and more violent than its tasty counter-part
and has a habbit of attacking passing merchants for items
of food. This one has not yet matured, but if it had, it
would be a much harder bird to catch indeed...

Cockatrice Feather:
Should you encounter one of these on your way, then
you should count yourself extremely lucky as these are
very hard to get hold of, since the birds move so very
fast. Some hunters eat raw cockatrice with the feathers
on, but it would be more advisable to actually sell the
feathers, as some people do, trying to pass them off for
Pheonix Feathers instead. So buyers beware!
EOS
str[5] = <<-EOS
Sand Scorpion:
One of the few creatures which can inhabbit the
intense heat and severe lack of water in Kalenn Desert.
This creature is more regarded as a pest, than a fiend of
Dalicia, but it has been known to attack unprepared
merchants and the like...

Sandy Knife:
A buttter knife that, because of being buried underneath the
sands of Kalenn Desert, has gained the extraordinary
power to command small sandstorms. This power thought
to be from a magician's staff that got buried under the sand
and released all of its magical energy into the sands turning
the butter knife into a most powerful weapon. It is strongly
adivised that if someone should find this weapon then
you should leave it alone, since this weapon could be
leathal if in the wrong hands...
EOS
str[6] = <<-EOS
Sand Wolf:
A dangerous type of wolf found in the unforgiving Kalenn
Desert. It is a fast, agile and hungry predator and most
certainly top the food chain in Kalenn Desert. But even they
cannot survive the sheer intensity of the heat at midday,
so they must rest under one of the few palm trees that
struggles to grow there. Even though you can sneak past
the wolves, be warned! The wolves have exceptionally good
hearing and anything that enters their territory does not
usually come out alive...

Kalenn Desert:
A barren wasteland that gaps the road from Dunhil to Lakur.
It inhabbits many a fiend and you should make sure that you
are fully prepared when entering the desert. Even though
the wolves and scorpions are frequent killers, the no.1 spot
is taken by the extreme and major lack of water...
EOS
str[7] = <<-EOS
Sewer Rat:
A verminous pest that over-ran the Yanua waterways
about 100 years ago. It is believed that they were
brought to the sewers by a Dunhil Sabbotage Unit
whence they were released into the sewers to cause
panic and disquiet. They are very agile and hard to hit
but don't have a great defence. Even though they are more
of a nuiscence than a fiend, they can still attack the
unwary traveller...

Yanua Waterways:

EOS

M_BOOK_COMMENT = str
end





(Hey! I said sorry already... I'm only 12... :( )

Anyhoo...

What I want...

I would like it so that it displays catergory 1 at the top and catergory 999 at the bottom, regardless of what order they are in in the database... Displaying the catergory name at the top... (Underlined and italic if possible...)

Like this:

Humans

Lakur Soldier

Saladon

General Soloman

I want it set out in this way...

THIS:

MONSTER_CAT

1 = [2,3,5,9,17]

Thanks...

OH! And as a reward there is an AMAZING BATTLER OF A HELL MONSTER!!! It isn't RTP but works perfectly with it...
 
*Coughs* BUMP! Pretty please? I will FULLY credit you AND give you the AMAZING battler that I always give out as rewards for script requests... It is not RTP style but works perfectly with it, since my game is mainly RTP but with a little realistic touch here and there...

So...

Basically...

PLEASE?

I really want this script since it is only little...

Oh! And another thing, you should be able to choose the names of the catergories like this:

CAT_ONE_NAME = "Humans"
CAT_TWO_NAME = "Dunhil Beach"
CAT_THREE_NAME = "Dunhil Canyons"

etc...

Kay?

Thanks!
 
*Cough*

BUMP!!!

*/Cough*

Lol...

PLEASE???

There have been like... 50 views of this... And no-one says anything?

And there IS a reward for goodness sake...

It's AMAZING Battler in naurama style...
It's an EVIL MUTANT!!!

Amos

P.S- The Category names must be shown above the catergory...
 
I have to learn the script first, since it's written in Japanese and I can't read Japanese >.<

Well, since you mention EASY, I might work on it, as to refamiliarize myself with RGSS. I think it's easy...

EDIT:
Oh, anyway, you might want to use the CODE tag so any characters in the script don't accidentally turn into smilies (I got error using above). Something like this (remove dashes to try):

[-spoiler=Example][-code]Something here...[/code][/spoiler]
See that normally typing :, :, and D in a row will change it to ::D...

Code:
Using these two tags altogether, ::D will never change to smilies!
 
Oh! Sorry!

Code:
#魔物図鑑
#
#エネミーの遭遇情報は、戦闘終了時(経験値などを獲得する所)で追加されます。
#よって、敵から逃げた場合や負けイベントでの戦闘敗北などでは
#図鑑に登録されません。
#このタイミングを変えたい場合は各自書き換えて下さい。
#(class Scene_Battle の start_phase5 で追加してます。)
#
#また、所々「アナライズ」という単語がありますが、
#現在、この魔物辞典だけでは機能しておりません。(自ゲームでの名残)
#Window_MonsterBook_Info の DROP_ITEM_NEED_ANALYZE が true になっていると
#ドロップアイテムが表示されなくなりますので、通常は false にしておいて下さい。
#
#注意
#このまま使うと、データベースのトループの1番に
#何も設定していないと、エラー吐きます。
#対処策としては
#1.素直にデータベースのトループの1番に何でもいいから設定する。
#2.Game_Enemy_Book の 「super(1, 0)#ダミー」 の左側の数字の部分を
#  存在するトループIDに書き換える。
#のどちらかになります。
#
#2005.2.6 機能追加
#図鑑完成度の表示機能を追加
#SHOW_COMPLETE_TYPE で設定できます。
#イベントコマンドの「スクリプト」で
#$game_party.enemy_book_max で図鑑の総魔物数(最大数)
#$game_party.enemy_book_now で図鑑の現在登録数(現在数)
#$game_party.complete_percentage で図鑑の完成率(小数点切捨て)
#を取得できます。
#
#2005.2.17
#complete_percentageのメソッド名を
#enemy_book_complete_percentageに変更(他の図鑑と区別できるように)
#イベントコマンドの「スクリプト」で最大数等の取得を短縮できるようになりました。
#enemy_book_max で図鑑の総魔物数(最大数)
#enemy_book_now で図鑑の現在登録数(現在数)
#enemy_book_compで図鑑の完成率(小数点切捨て)
#
#2005.2.18 バグ修正
#complete_percentageのメソッド名を
#enemy_book_complete_percentageに変更したのに
#complete_percentageって呼び出してました。(単なる書き換え漏れですね)
#
#2005.7.4 機能追加
#コメント機能に対応。
#全体的に色々いじりました。
#
#2005.7.4 バグ修正
#細かいバグを修正。


module Enemy_Book_Config
  #ドロップアイテム表示にアナライズが必要かどうか
  DROP_ITEM_NEED_ANALYZE = true
  #回避修正の名前
  EVA_NAME = "Evasion"              
  #図鑑完成率の表示方法
  #0:表示なし 1:現在数/最大数 2:%表示 3:両方
  SHOW_COMPLETE_TYPE = 3         
  #コメント機能を使うかどうか(要・コメント追加スクリプト導入)
  COMMENT_SYSTEM = true
end

class Game_Temp
  attr_accessor :enemy_book_data
  alias temp_enemy_book_data_initialize initialize
  def initialize
    temp_enemy_book_data_initialize
    @enemy_book_data = Data_MonsterBook.new
  end
end

class Game_Party
  attr_accessor :enemy_info               # 出会った敵情報(図鑑用)
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  alias book_info_initialize initialize
  def initialize
    book_info_initialize
    @enemy_info = {}
  end
  #--------------------------------------------------------------------------
  # ● エネミー情報の追加(図鑑用)
  #     type : 通常遭遇かアナライズか 0:通常 1:アナライズ -1:情報削除
  #     0:無遭遇 1:遭遇済 2:アナライズ済
  #--------------------------------------------------------------------------
  def add_enemy_info(enemy_id, type = 0)
    case type
    when 0
      if @enemy_info[enemy_id] == 2
        return false
      end
      @enemy_info[enemy_id] = 1
    when 1
      @enemy_info[enemy_id] = 2
    when -1
      @enemy_info[enemy_id] = 0
    end
  end
  #--------------------------------------------------------------------------
  # ● 魔物図鑑の最大登録数を取得
  #--------------------------------------------------------------------------
  def enemy_book_max
    return $game_temp.enemy_book_data.id_data.size - 1
  end
  #--------------------------------------------------------------------------
  # ● 魔物図鑑の現在登録数を取得
  #--------------------------------------------------------------------------
  def enemy_book_now
    now_enemy_info = @enemy_info.keys
    # 登録無視の属性IDを取得
    no_add = $game_temp.enemy_book_data.no_add_element
    new_enemy_info = []
    for i in now_enemy_info
      enemy = $data_enemies[i]
      next if enemy.name == ""
      if enemy.element_ranks[no_add] == 1
        next
      end
      new_enemy_info.push(enemy.id)
    end
    return new_enemy_info.size
  end
  #--------------------------------------------------------------------------
  # ● 魔物図鑑の完成率を取得
end

class Interpreter
  def enemy_book_max
    return $game_party.enemy_book_max
  end
  def enemy_book_now
    return $game_party.enemy_book_now
  end
  def enemy_book_comp
    return $game_party.enemy_book_complete_percentage
  end
end

class Scene_Battle
  alias add_enemy_info_start_phase5 start_phase5
  def start_phase5
    for enemy in $game_troop.enemies
      # エネミーが隠れ状態でない場合
      unless enemy.hidden
        # 敵遭遇情報追加
        $game_party.add_enemy_info(enemy.id, 0)
      end
    end
    add_enemy_info_start_phase5
  end
end

class Window_Base < Window
  #--------------------------------------------------------------------------
  # ● エネミーの戦闘後獲得アイテムの描画
  #--------------------------------------------------------------------------
  def draw_enemy_drop_item(enemy, x, y)
    self.contents.font.color = normal_color
    treasures = []
    if enemy.item_id > 0
      treasures.push($data_items[enemy.item_id])
    end
    if enemy.weapon_id > 0
      treasures.push($data_weapons[enemy.weapon_id])
    end
    if enemy.armor_id > 0
      treasures.push($data_armors[enemy.armor_id])
    end
    # 現状ではとりあえず1つのみ描画
    if treasures.size > 0
      item = treasures[0]
      bitmap = RPG::Cache.icon(item.icon_name)
      opacity = 255
      self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
      name = treasures[0].name
    else
      self.contents.font.color = disabled_color
      name = "No Item"
    end
    self.contents.draw_text(x+28, y, 212, 32, name)
  end
  #--------------------------------------------------------------------------
  # ● エネミーの図鑑IDの描画
  #--------------------------------------------------------------------------
  def draw_enemy_book_id(enemy, x, y)
    self.contents.font.color = normal_color
    id = $game_temp.enemy_book_data.id_data.index(enemy.id)
    self.contents.draw_text(x, y, 32, 32, id.to_s)
  end
  #--------------------------------------------------------------------------
  # ● エネミーの名前の描画
  #     enemy : エネミー
  #     x     : 描画先 X 座標
  #     y     : 描画先 Y 座標
  #--------------------------------------------------------------------------
  def draw_enemy_name(enemy, x, y)
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y, 152, 32, enemy.name)
  end
  #--------------------------------------------------------------------------
  # ● エネミーグラフィックの描画(アナライズ)
  #     enemy : エネミー
  #     x     : 描画先 X 座標
  #     y     : 描画先 Y 座標
  #--------------------------------------------------------------------------
  def draw_enemy_graphic(enemy, x, y, opacity = 255)
    bitmap = RPG::Cache.battler(enemy.battler_name, enemy.battler_hue)
    cw = bitmap.width
    ch = bitmap.height
    src_rect = Rect.new(0, 0, cw, ch)
    x = x + (cw / 2 - x) if cw / 2 > x
    self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, opacity)
  end
  #--------------------------------------------------------------------------
  # ● エネミーの獲得EXPの描画
  #     enemy : エネミー
  #     x     : 描画先 X 座標
  #     y     : 描画先 Y 座標
  #--------------------------------------------------------------------------
  def draw_enemy_exp(enemy, x, y)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 120, 32, "EXP")
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 120, y, 36, 32, enemy.exp.to_s, 2)
  end
  #--------------------------------------------------------------------------
  # ● エネミーの獲得GOLDの描画
  #     enemy : エネミー
  #     x     : 描画先 X 座標
  #     y     : 描画先 Y 座標
  #--------------------------------------------------------------------------
  def draw_enemy_gold(enemy, x, y)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 120, 32, $data_system.words.gold)
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 120, y, 36, 32, enemy.gold.to_s, 2)
  end
end

class Game_Enemy_Book < Game_Enemy
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize(enemy_id)
    super(1, 0)#ダミー
    @enemy_id = enemy_id
    enemy = $data_enemies[@enemy_id]
    @battler_name = enemy.battler_name
    @battler_hue = enemy.battler_hue
    @hp = maxhp
    @sp = maxsp
  end
end

class Data_MonsterBook
  attr_reader :id_data
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    @id_data = enemy_book_id_set
  end
  #--------------------------------------------------------------------------
  # ● 図鑑用登録無視属性取得
  #--------------------------------------------------------------------------
  def no_add_element
    no_add = 0
    # 登録無視の属性IDを取得
    for i in 1...$data_system.elements.size
      if $data_system.elements[i] =~ /図鑑登録無効/
        no_add = i
        break
      end
    end
    return no_add
  end
  #--------------------------------------------------------------------------
  # ● 図鑑用敵ID設定
  #--------------------------------------------------------------------------
  def enemy_book_id_set
    data = [0]
    no_add = no_add_element
    # 登録無視の属性IDを取得
    for i in 1...$data_enemies.size
      enemy = $data_enemies[i]
      next if enemy.name == ""
      if enemy.element_ranks[no_add] == 1
        next
      end
      data.push(enemy.id)
    end
    return data
  end
end


class Window_MonsterBook < Window_Selectable
  attr_reader   :data
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize(index=0)
    super(0, 64, 640, 416)
    @column_max = 2
    @book_data = $game_temp.enemy_book_data
    @data = @book_data.id_data.dup
    @data.shift
    #@data.sort!
    @item_max = @data.size
    self.index = 0
    refresh if @item_max > 0
  end
  #--------------------------------------------------------------------------
  # ● 遭遇データを取得
  #--------------------------------------------------------------------------
  def data_set
    data = $game_party.enemy_info.keys
    data.sort!
    newdata = []
    for i in data
      next if $game_party.enemy_info[i] == 0
      # 図鑑登録無視を考慮
      if book_id(i) != nil
        newdata.push(i)
      end
    end
    return newdata
  end
  #--------------------------------------------------------------------------
  # ● 表示許可取得
  #--------------------------------------------------------------------------
  def show?(id)
    if $game_party.enemy_info[id] == 0 or $game_party.enemy_info[id] == nil
      return false
    else
      return true
    end
  end
  #--------------------------------------------------------------------------
  # ● 図鑑用ID取得
  #--------------------------------------------------------------------------
  def book_id(id)
    return @book_data.index(id)
  end
  #--------------------------------------------------------------------------
  # ● エネミー取得
  #--------------------------------------------------------------------------
  def item
    return @data[self.index]
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    self.contents = Bitmap.new(width - 32, row_max * 32)
    if $fontface != nil
        self.contents.font.name = $fontface
      elsif $defaultfonttype != nil
        self.contents.font.name = $defaultfonttype
      end

    #項目数が 0 でなければビットマップを作成し、全項目を描画
    if @item_max > 0
      for i in 0...@item_max
       draw_item(i)
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● 項目の描画
  #     index : 項目番号
  #--------------------------------------------------------------------------
  def draw_item(index)
    enemy = $data_enemies[@data[index]]
    return if enemy == nil
    x = 4 + index % 2 * (288 + 32)
    y = index / 2 * 32
    rect = Rect.new(x, y, self.width / @column_max - 32, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    self.contents.font.color = normal_color
    draw_enemy_book_id(enemy, x, y)
    if show?(enemy.id)
      self.contents.draw_text(x + 28+16, y, 212, 32, enemy.name, 0)
    else
      self.contents.draw_text(x + 28+16, y, 212, 32, "-----", 0)
      return
    end
    if analyze?(@data[index])
      self.contents.font.color = text_color(3)
      self.contents.draw_text(x + 256, y, 24, 32, "済", 2)
    end
  end
  #--------------------------------------------------------------------------
  # ● アナライズ済かどうか
  #--------------------------------------------------------------------------
  def analyze?(enemy_id)
    if $game_party.enemy_info[enemy_id] == 2
      return true
    else
      return false
    end
  end
end


class Window_MonsterBook_Info < Window_Base
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0+64, 640, 480-64)
    self.contents = Bitmap.new(width - 32, height - 32)
    if $fontface != nil
        self.contents.font.name = $fontface
      elsif $defaultfonttype != nil
        self.contents.font.name = $defaultfonttype
      end
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh(enemy_id)
    self.contents.clear
    self.contents.font.size = 22
    enemy = Game_Enemy_Book.new(enemy_id)
    draw_enemy_graphic(enemy, 96, 240+48+64, 200)
    draw_enemy_book_id(enemy, 4, 0)
    draw_enemy_name(enemy, 48, 0)
    draw_actor_hp(enemy, 288, 0)
    draw_actor_sp(enemy, 288+160, 0)
    draw_actor_parameter(enemy, 288    ,  32, 0)
    self.contents.font.color = system_color
    self.contents.draw_text(288+160, 32, 120, 32, Enemy_Book_Config::EVA_NAME)
    self.contents.font.color = normal_color
    self.contents.draw_text(288+160 + 120, 32, 36, 32, enemy.eva.to_s, 2)
    draw_actor_parameter(enemy, 288    ,  64, 3)
    draw_actor_parameter(enemy, 288+160,  64, 4)
    draw_actor_parameter(enemy, 288    ,  96, 5)
    draw_actor_parameter(enemy, 288+160,  96, 6)
    draw_actor_parameter(enemy, 288    , 128, 1)
    draw_actor_parameter(enemy, 288+160, 128, 2)
    draw_enemy_exp(enemy, 288, 160)
    draw_enemy_gold(enemy, 288+160, 160)
    if analyze?(enemy.id) or !Enemy_Book_Config::DROP_ITEM_NEED_ANALYZE
      self.contents.draw_text(288, 192, 96, 32, "Drop Item")
      draw_enemy_drop_item(enemy, 288+96+4, 192)
      self.contents.font.color = normal_color
      #draw_element_guard(enemy, 320-32, 160-16+96)
    end
  end
  #--------------------------------------------------------------------------
  # ● アナライズ済かどうか
  #--------------------------------------------------------------------------
  def analyze?(enemy_id)
    if $game_party.enemy_info[enemy_id] == 2
      return true
    else
      return false
    end
  end
end


class Scene_MonsterBook
  #--------------------------------------------------------------------------
  # ● メイン処理
  #--------------------------------------------------------------------------
  def main
    $game_temp.enemy_book_data = Data_MonsterBook.new
    # ウィンドウを作成
    @title_window = Window_Base.new(0, 0, 640, 64)
    @title_window.contents = Bitmap.new(640 - 32, 64 - 32)
    @title_window.contents.draw_text(4, 0, 320, 32, "Monster Information", 0)
    @main_window = Window_MonsterBook.new
    @main_window.active = true
    # インフォウィンドウを作成 (不可視・非アクティブに設定)
    @info_window = Window_MonsterBook_Info.new
    @info_window.z = 110
    @info_window.visible = false
    @info_window.active = false
    @visible_index = 0
    if Enemy_Book_Config::COMMENT_SYSTEM
      # コメントウィンドウを作成 (不可視・非アクティブに設定)
      @comment_window = Window_Monster_Book_Comment.new
      @comment_window.z = 120
      @comment_window.visible = false
      @comment_on = false # コメントフラグ
    end
    # トランジション実行
    Graphics.transition
    # メインループ
    loop do
      # ゲーム画面を更新
      Graphics.update
      # 入力情報を更新
      Input.update
      # フレーム更新
      update
      # 画面が切り替わったらループを中断
      if $scene != self
        break
      end
    end
    # トランジション準備
    Graphics.freeze
    # ウィンドウを解放
    @main_window.dispose
    @info_window.dispose
    @title_window.dispose
    @comment_window.dispose if @comment_window != nil
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新
  #--------------------------------------------------------------------------
  def update
    # ウィンドウを更新
    @main_window.update
    @info_window.update
    if @info_window.active
      update_info
      return
    end
    # メインウィンドウがアクティブの場合: update_target を呼ぶ
    if @main_window.active
      update_main
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (メインウィンドウがアクティブの場合)
  #--------------------------------------------------------------------------
  def update_main
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Map.new
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      if @main_window.item == nil or @main_window.show?(@main_window.item) == false
        # ブザー SE を演奏
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # 決定 SE を演奏
      $game_system.se_play($data_system.decision_se)
      @main_window.active = false
      @info_window.active = true
      @info_window.visible = true
      @visible_index = @main_window.index
      @info_window.refresh(@main_window.item)
      if @comment_window != nil
        @comment_window.refresh(@main_window.item)
        if @comment_on
          @comment_window.visible = true
        else
          @comment_window.visible = false
        end
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (インフォウィンドウがアクティブの場合)
  #--------------------------------------------------------------------------
  def update_info
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      @main_window.active = true
      @info_window.active = false
      @info_window.visible = false
      @comment_window.visible = false if @comment_window != nil
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      if @comment_window != nil
        # 決定 SE を演奏
        $game_system.se_play($data_system.decision_se)
        if @comment_on
          @comment_on = false
          @comment_window.visible = false
        else
          @comment_on = true
          @comment_window.visible = true
        end
        return
      end
    end
    if Input.trigger?(Input::L)
      # 決定 SE を演奏
      $game_system.se_play($data_system.decision_se)
      loop_end = false
      while loop_end == false
        if @visible_index != 0
          @visible_index -= 1
        else
          @visible_index = @main_window.data.size - 1
        end
        loop_end = true if @main_window.show?(@main_window.data[@visible_index])
      end
      id = @main_window.data[@visible_index]
      @info_window.refresh(id)
      @comment_window.refresh(id) if @comment_window != nil
      return
    end
    if Input.trigger?(Input::R)
      # 決定 SE を演奏
      $game_system.se_play($data_system.decision_se)
      loop_end = false
      while loop_end == false
        if @visible_index != @main_window.data.size - 1
          @visible_index += 1
        else
          @visible_index = 0
        end
        loop_end = true if @main_window.show?(@main_window.data[@visible_index])
      end
      id = @main_window.data[@visible_index]
      @info_window.refresh(id)
      @comment_window.refresh(id) if @comment_window != nil
      return
    end
  end
end

=begin

THIS IS THE COMMENTS FUNCTION!!! THIS IS WHAT I EDIT!!!

=end

# 図鑑コメント機能追加(基本)
#
# 図鑑にコメント機能を使いするのに必須です。
#
# 2005.9.19
# ウィンドウの不透明度、フォントと文字色を指定可能に。

class Window_Book_Comment < Window_Base
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize(x, y, width, height)
    super(x, y, width, height)
    self.contents = Bitmap.new(width - 32, height - 32)
    if $fontface != nil
        self.contents.font.name = $fontface
      elsif $defaultfonttype != nil
        self.contents.font.name = $defaultfonttype
      end
    self.opacity = self.window_opa
    self.contents.font.name = self.font_name
    self.contents.font.color = self.font_color
  end
  #--------------------------------------------------------------------------
  # ● 文字列変換
  #--------------------------------------------------------------------------
  def transfer(str)
    text = str.clone
    # 制御文字処理
    begin
    text.gsub!(/\\[Vv]\[([0-9]+)\]/) { $game_variables[$1.to_i] }
    end
    text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
      $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
    end
    # 便宜上、"\\\\" を "\000" に変換
    text.gsub!(/\\\\/) { "\000" }
    # "\\C" を "\001" に、"\\G" を "\002" に変換
    text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
    text.gsub!(/\\[Gg]/) { "\002" }
    # 不透明度
    text.gsub!(/\\[Oo]\[([0-9]+)\]/) { "\200[#{$1}]" }
    # 文字サイズ
    text.gsub!(/\\[Hh]\[([0-9]+)\]/) { "\201[#{$1}]" }
    # ルビ
    text.gsub!(/\\[Rr]\[(.+?),(.+?)\]/) { "\202[#{$1},#{$2}]" }
    # ピクチャ表示
    text.gsub!(/\\[Pp]ic\[([0-9]+),([0-9]+),([^,\]]+)\]/) { "\250[#{$1},#{$2},#{$3}]" }
    # バトラー表示
    text.gsub!(/\\[Bb]at\[([0-9]+),([0-9]+),([^,\]]+),([0-9]+)\]/) { "\251[#{$1},#{$2},#{$3},#{$4}]" }
    # キャラグラフィック表示
    text.gsub!(/\\[Cc]ha\[([0-9]+),([0-9]+),([^,\]]+),([0-9]+),([0-9]+),([0-9]+)\]/) { "\252[#{$1},#{$2},#{$3},#{$4},#{$5},#{$6}]" }
    
    return text
  end
  #--------------------------------------------------------------------------
  # ● 変換した文字列を描画
  #--------------------------------------------------------------------------
  def draw_ex_text(ox, oy, str, align=0)
    text = str.clone
    x = 0
    y = 0
    # c に 1 文字を取得 (文字が取得できなくなるまでループ)
    while ((c = text.slice!(/./m)) != nil)
      # \\ の場合
      if c == "\000"
        # 本来の文字に戻す
        c = "\\"
      end
      # \C[n] の場合
      if c == "\001"
        # 文字色を変更
        text.sub!(/\[([0-9]+)\]/, "")
        color = $1.to_i
        if color >= 0 and color <= 7
          self.contents.font.color = text_color(color)
        end
        # 次の文字へ
        next
      end
      # \G の場合
      if c == "\002"
        # 所持ゴールドに変換
        c = $game_party.gold.to_s
        # 文字を描画
        self.contents.draw_text(ox+4+x, oy+4+ 32 * y, self.contents.text_size(c).width, 32, c)
        # x に描画した文字の幅を加算
        x += self.contents.text_size(c).width
        # 次の文字へ
        next
      end
      
      # \O の場合
      if c == "\200"
        text.sub!(/\[([0-9]+)\]/, "")
        opacity = $1.to_i
        temp = self.contents.font.color
        self.contents.font.color = Color.new(temp.red, temp.green, temp.blue, opacity)
        # 次の文字へ
        next
      end
      # \H の場合
      if c == "\201"
        text.sub!(/\[([0-9]+)\]/, "")
        self.contents.font.size = [[$1.to_i, 6].max, 32].min
        # 次の文字へ
        next
      end
      # \R の場合
      if c == "\202"
        text.sub!(/\[(.+?),(.+?)\]/, "")
        x += ruby_set(ox+x,oy+(y*32),$1,$2)
        # 次の文字へ
        next
      end
      # \Pic の場合
      if c == "\250"
        text.sub!(/\[([0-9]+),([0-9]+),([^,\]]+)\]/, "")
        ope = self.contents.font.color.alpha
        set_picture($1.to_i, $2.to_i, $3, ope)
        # 次の文字へ
        next
      end
      # \Bat の場合
      if c == "\251"
        text.sub!(/\[([0-9]+),([0-9]+),([^,\]]+),([0-9]+)\]/, "")
        ope = self.contents.font.color.alpha
        set_battler($1.to_i, $2.to_i, $3, $4.to_i, ope)
        # 次の文字へ
        next
      end
      # \Cha の場合
      if c == "\252"
        text.sub!(/\[([0-9]+),([0-9]+),([^,\]]+),([0-9]+),([0-9]+),([0-9]+)\]/, "")
        ope = self.contents.font.color.alpha
        set_character($1.to_i, $2.to_i, $3, $4.to_i, $5.to_i, $6.to_i, ope)
        # 次の文字へ
        next
      end
      # 改行文字の場合
      if c == "\n"
        # y に 1 を加算
        y += 1
        x = 0
        # 次の文字へ
        next
      end
      # 文字を描画
      self.contents.draw_text(ox+4+x, 4+oy+ 32 * y, 40, 32, c)
      # x に描画した文字の幅を加算
      x += self.contents.text_size(c).width
    end
  end
  #--------------------------------------------------------------------------
  # ● ルビ描画
  #--------------------------------------------------------------------------
  def ruby_set(x,y,str,ruby)
    text_w = self.contents.text_size(str).width
    text_h = self.contents.text_size(str).height
    f_size_back = self.contents.font.size
    ruby_size = 10
    self.contents.font.size = ruby_size
    ruby_w = self.contents.text_size(ruby).width
    self.contents.draw_text(4+x, 4+4+y-ruby_size+1, text_w, ruby_size, ruby, 1)
    self.contents.font.size = f_size_back
    self.contents.draw_text(4+x, 4+4+y, text_w, text_h, str)
    return text_w
  end
  #--------------------------------------------------------------------------
  # ● ピクチャー描画
  #--------------------------------------------------------------------------
  def set_picture(x, y, filename, opacity=255)
    bitmap = RPG::Cache.picture(filename)
    self.contents.blt(x, y, bitmap, bitmap.rect, opacity) 
  end
  #--------------------------------------------------------------------------
  # ● バトラー描画
  #--------------------------------------------------------------------------
  def set_battler(x, y, filename, hue, opacity=255)
    bitmap =RPG::Cache.battler(filename, hue)
    self.contents.blt(x, y, bitmap, bitmap.rect, opacity) 
  end
  #--------------------------------------------------------------------------
  # ● キャラクター描画
  #--------------------------------------------------------------------------
  def set_character(x, y, filename, hue, dir, pat, opacity=255)
    bitmap = RPG::Cache.character(filename, hue)
    cw = bitmap.width / 4
    ch = bitmap.height / 4
    cy = ch * (dir / 2 - 1)
    cx = cw * (pat - 1)
    src_rect = Rect.new(cx, cy, cw, ch)
    self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, opacity)
  end
  def window_opa
  end
  def font_name
  end
  def font_color
  end
end

=begin

THIS IS WHAT I ACTUALLY EDIT!!! INDIVIDUAL COMMENTS...

=end

# 図鑑コメント機能追加(魔物図鑑)
#
# コメントには冒険日記と同様の制御文字が使用可能です。
# 詳しくは冒険日記の方をご覧下さい。
#
# 2005.9.19
# ウィンドウの不透明度、フォントと文字色を指定可能に。

module MoMo_M_Book_Comment
  # コメントウィンドウの横幅
  C_WINDOW_WIDTH = 640
  # コメントウィンドウの縦幅
  C_WINDOW_HEIGHT = 480
  # コメントウィンドウのX座標
  C_WINDOW_X = 0
  # コメントウィンドウのY座標
  C_WINDOW_Y = 0
  # コメントウィンドウの不透明度
  C_WINDOW_OPA = 255
  # 使用するフォント名(希望順に配列に追加してください)
  C_WINDOW_FONT_NAME = ["Tahoma"]
  # 使用する文字色
  # Color.new(赤の値, 緑の値, 青の値, 不透明度) ※0~255まで
  C_WINDOW_FONT_COLOR = Color.new(255, 255, 255, 255)
end

class Window_Monster_Book_Comment < Window_Book_Comment
  def initialize
    x = MoMo_M_Book_Comment::C_WINDOW_X
    y = MoMo_M_Book_Comment::C_WINDOW_Y
    width = MoMo_M_Book_Comment::C_WINDOW_WIDTH
    height = MoMo_M_Book_Comment::C_WINDOW_HEIGHT
    super(x, y, width, height)
  end
  def draw_comment(id)
    self.contents.clear
    comment = get_comment(id)
    draw_ex_text(0, 0, transfer(comment))
  end
  def get_comment(id)
    return comment_set[0] if comment_set[id] == nil
    return comment_set[id]
  end
  def comment_set
    return MoMo_M_Book_Comment::M_BOOK_COMMENT
  end
  def refresh(id)
    draw_comment(id)
  end
  def window_opa
    return MoMo_M_Book_Comment::C_WINDOW_OPA
  end
  def font_name
    return MoMo_M_Book_Comment::C_WINDOW_FONT_NAME
  end
  def font_color
    return MoMo_M_Book_Comment::C_WINDOW_FONT_COLOR
  end
end

module MoMo_M_Book_Comment
  str = []
    # str[エネミーID]
    str[0] = <<-EOS #デフォ(コメント未設定時用、通常は使用しない)
コメントな~し!
    EOS
    str[11] = <<-EOS
Aqua:
A fiend on Dunhil Beach, recently forced onto the land
because of a territory squabble with a Krakken. It is a powerful
foe compared with its competition around Dunhil Beach, and
would usually be at the top of the food chain. It is capable of
being a strong predator, but would usually eat small fish and
the like, but when it was forced onto the land, it began to 
develop a taste for human flesh...

Dunhil Beach:
A small beach on the island of Yeltzern, this is usually a quiet
place with not much going on, until the recent territory
squabble with the Aqua and the Krakken, two fiends which
would normally be found nearer the Tibean Coast...
    EOS
    str[1] = <<-EOS
Goblin:
These mischevious creatures are always causing annoyance
to the citizens of Dunhil. They are usually green, but special
breeds have various tones of colour, probably showing the
different levels of the pecking order, with the Goblin Elder
at the top. This one wields two daggers and is relatively
low in the pecking order. A common target for hunters...

Goblin Scimitar:
Once in every 1000 years, a Goblin genius is born, this
weapon in particular was developed by one of these
geniuses. It is curved so that it can slide over the top of
shields and hack away at the person behind. The genius
who developed this weapon was later tried, and found
guilty of being too clever and put to death...
    EOS
    str[2] = <<-EOS
Goblin Archer:
The Goblin Archer is a higher ranking member of the
pecking order of the goblins, than their sword wielding
cousins, but are still a long way off from the Elder...

Goblin Bow:
The Goblin Bow is a fine example of Goblin Inginuity, even
if there is very little to go on. It is curved and elegant and
some say, even plausable in the human market, where these
bows are bought and sold quite often! The Goblin genius that
created these bows was sentenced to death, but escaped deep
into the caves in Dunhil Canyons, the Elder did not notice
the Goblin genius sneaking away as he was too busy looking
at shiny rocks in the side of a cliff...
    EOS
    str[3] = <<-EOS
Basilisk:
A venomous fiend that inhabbits parts of Dunhil Canyons.
It is very agile and almost top of the food chain in that
area. The myth about these creatures eating men whole
is complete rubbish. They prefer to poison their victims
first, and then to eat their victims whole...

Antidotes:
A cure for the Basilisks venom had puzzled scientists
for many centuries. Until one day, when a scientist by
the name of Anne Dotte invented a cure by chance when
playing around with a flask of crushed Yaneor Leaf, a bag
of flour, and some stale cheese. She originally named the cure
'Anne-Dotte' but it was later changed to 'Antidote'...
    EOS
    str[4] = <<-EOS
Cockatrice:
A bird similar to a chicken in appearance that roams
across many places on the island of Yeltzern. It is many
times faster and more violent than its tasty counter-part
and has a habbit of attacking passing merchants for items
of food...

Cockatrice Feather:
Should you encounter one of these on your way, then
you should count yourself extremely lucky as these are
very hard to get hold of, since the birds move so very
fast. Some hunters try to sell such feathers, trying to pass
them off as phoenix feathers... Buyers Beware!
    EOS
    str[5] = <<-EOS
Sand Scorpion:
One of the few creatures which can inhabbit the
intense heat and severe lack of water in Kalenn Desert.
This creature is more regarded as a pest, than a fiend of
Dalicia, but it has been known to attack unprepared
merchants and the like...

Sandy Knife:
A buttter knife that, because of being buried underneath the
sands of Kalenn Desert, has gained the extraordinary 
power to command small sandstorms. This power thought
to be from a magician's staff that got buried under the sand
and released all of its magical energy into the sands turning
the butter knife into a most powerful weapon indeed...
    EOS
    str[6] = <<-EOS
Sand Wolf:
A dangerous type of wolf found in the unforgiving Kalenn
Desert. It is a fast, agile and hungry predator and most
certainly top the food chain in Kalenn Desert. But even they
cannot survive the sheer intensity of the heat at midday,
so they must rest under a palm tree to escape going mad.
Even though you can sneak past the wolves, be warned! The
wolves have exceptionally good hearing and anything that
enters their territory does not usually come out alive...

Kalenn Desert:
A barren wasteland that gaps the road from Dunhil to Lakur.
It inhabbits many a fiend and you should make sure that you
are fully prepared when entering the desert. Even though
the wolves and scorpions are frequent killers, the no.1 spot
is taken by the extreme heat and major lack of water...
    EOS
    str[7] = <<-EOS
Sewer Rat:
A verminous pest that over-ran the Yanua waterways
about 100 years ago. It is believed that they were
brought to the sewers by a Dunhil Sabbotage Unit
whence they were released into the sewers to spread
plague and famine. Even though they are more of a
nuiscence than a fiend, they can still bring down the
unwary traveller...

Yanua Waterways:
When Lakur officially became a city, the council decided
that it needed a sewer system, since most of the council
were off sick that day from all the sewage flowing freely
through the streets, and so it was decided. About 100
years ago, the Waterways became infested with Sewer Rats
and hasn't been entered since...
    EOS
    str[8] = <<-EOS
Lakurian Soldier:
These are the lowest rank of the Lakurian Army. They wear
no cloak and no helmet. They are armed with a single short
sword and receive little or no training. Most of these soldiers
are peasants and join the Lakurian Army just for the money.
They are usually treated harshly, receiving a very poor diet.
Beatings are common among the soldiers by their higher
ranking officers. These are meant to toughen up the new
recruits but do little of the sort really...

Lakur:
A city on the Island of Yeltzern. The majority of the population
are whealthy nobles and upper class citizens. Lakur has been
at war with a neighbouring town, Dunhil for many decades now.
Yet still, the cause of this war is unknown. Dunhil say it's for
power and greed, but the Lakurians say that it's for honour and
glory...
    EOS
    str[9] = <<-EOS
Lakurian Mage:
A member of the mysterious Order Of Magi, lead by the
dark and powerful Sir Diem Narcis, a wizard said to have the
power to bring down all of Dunhil with one stroke of his staff.
They wear silk robes until they attain a higher class, whence
they receive a set of velvet robes. These mages are the lowest
rank of the order, but are better treated than the lower soldiers...

Order Of Magi:
A secret order set up about 300 years ago. They used to be an
academy for training magical talent, but now their main purpose
is a vital part of the Lakurian war machine. Their leader, Sir Diem
Narcis, is a man said to have the power to burn down all of Dunhil
and even, so some say, power enough to challenge the very gods
who made him...
    EOS

    M_BOOK_COMMENT = str
end


YAY!!!

It worked! *Thanks Exsharaen!*

Please try my request! Even if it's impossible and you can't do it, I'd still thank you!

OH! And since you've already got THAT battler... *Ponders*

You're reward is a free copy of the game!

*Shrugs*

Amos36

(The forum "Ginger)
 
I'll do it. And FYI, I do it for free, not motivated by anything including rewards (that applies to everyone I agree to help too). I see that your game has a potential to develop better and better, and I look forward to it.

Now, before I work on it, there is one thing I'd like to know:

Using the script alone, the monster list will be in two columns. Since you'll add categories, what layout would you like to use?

(I'll leave text formats for now.)
1. The original two columns, like this:
Code:
Category A          Category B
Monster 1           Monster 2
Monster 3           Monster 4
What if Category A has more monsters than Category B?

2. A single column, like this:
Code:
Category A
Monster 1
Monster 3
<separator, may be empty or anything you'd like to use as separator>
Category B
Monster 2
Monster 4
Of course, I have to make so the cursor never selects any separators nor any category name (automagically jumps to the next selectable monster in the list), but if you don't like the idea of "jumping" cursor, tell me.

3. Categories are separated into their own screen. So, by the moment we open the Bestiary book, it will come like this:
a. People see a list of monster categories. Choose one of them and...
b. People see a list of monsters that belong to selected category. They choose a monster and...
c. People see the information for the selected monster.
This way, categories and monsters list can come up to two columns.

If none of above suits your liking, provide me with another layout you'd like to use (preferably with a visual sketch).

Anyway... that script has a minor bug:
When I see additional information of, let's say, Ghost (by pressing C on the info screen), then I go out and pick another monster, let's say, Goblin, the one that appears first for Goblin is its additional information, not the general info. I expected to see general info first before going in-depth. Maybe you can consider which one is better (I'll leave that to you for the moment).
 
Hi again!

You are truely amazing! You must know that before we begin... And whether you want the reward or not, you're gonna get it! :D

It would be greatly appreciated if you could fix that minor bug but it is not neccessary...

This is the Layout I want, like FFXII:

Code:
           Category A
[LEFT]Goblin                 Goblin Archer
Goblin Elite           Troll             
                Category B
Lakurian Defender          Lakurian Mage
Lakurian Soldier             [/LEFT]

I WOULD LIKE the cursor "Jumping", so you don't go onto the category name... And the category name MUST be displayed somewhere so...

CAT_ONE = "Lakurian Army"
CAT_TWO = "Goblins"
CAT_THREE = "Bosses"



Thanks for taking this on!!! I REALLY appreciate it!

Thanks for trying my demo BTW! And I think it's pretty good too! :)

Good Luck and get back to me!

Amos36

P.S- I can't get alignment right, but the category name should be centred!!! *Curses stupid diagram
 
Hi Exsharaen! How're you getting on with this then? Going alright? Or not so good? If you need more detail or the detail that I give is not possible then just PM or say so in this thread...

Amos36

(Is it cos' I is ginger?) :D
 
Done, but with some minor bugs...

First, here's the script:

Code:
#魔物図鑑
#
#エネミーの遭遇情報は、戦闘終了時(経験値などを獲得する所)で追加されます。
#よって、敵から逃げた場合や負けイベントでの戦闘敗北などでは
#図鑑に登録されません。
#このタイミングを変えたい場合は各自書き換えて下さい。
#(class Scene_Battle の start_phase5 で追加してます。)
#
#また、所々「アナライズ」という単語がありますが、
#現在、この魔物辞典だけでは機能しておりません。(自ゲームでの名残)
#Window_MonsterBook_Info の DROP_ITEM_NEED_ANALYZE が true になっていると
#ドロップアイテムが表示されなくなりますので、通常は false にしておいて下さい。
#
#注意
#このまま使うと、データベースのトループの1番に
#何も設定していないと、エラー吐きます。
#対処策としては
#1.素直にデータベースのトループの1番に何でもいいから設定する。
#2.Game_Enemy_Book の 「super(1, 0)#ダミー」 の左側の数字の部分を
# 存在するトループIDに書き換える。
#のどちらかになります。
#
#2005.2.6 機能追加
#図鑑完成度の表示機能を追加
#SHOW_COMPLETE_TYPE で設定できます。
#イベントコマンドの「スクリプト」で
#$game_party.enemy_book_max で図鑑の総魔物数(最大数)
#$game_party.enemy_book_now で図鑑の現在登録数(現在数)
#$game_party.complete_percentage で図鑑の完成率(小数点切捨て)
#を取得できます。
#
#2005.2.17
#complete_percentageのメソッド名を
#enemy_book_complete_percentageに変更(他の図鑑と区別できるように)
#イベントコマンドの「スクリプト」で最大数等の取得を短縮できるようになりました。
#enemy_book_max で図鑑の総魔物数(最大数)
#enemy_book_now で図鑑の現在登録数(現在数)
#enemy_book_compで図鑑の完成率(小数点切捨て)
#
#2005.2.18 バグ修正
#complete_percentageのメソッド名を
#enemy_book_complete_percentageに変更したのに
#complete_percentageって呼び出してました。(単なる書き換え漏れですね)
#
#2005.7.4 機能追加
#コメント機能に対応。
#全体的に色々いじりました。
#
#2005.7.4 バグ修正
#細かいバグを修正。

=begin
Edited by ?xshara?n
Now you can have as much category as you like.
Specify the categories below as exampled.
For each category, use this format:

{
  :name   => "Category name",
  :member => [Enemy IDs as found in the game database]
}

Do not forget to separate each category by a comma (except for the last one).
Any other enemies which don't have category will appear in a special category
which will be put in the end of list. You can change the special category name
below.
=end

# SETTINGS BEGIN

# Categories
CATEGORY = 
[
{
  :name   => "Spirit",
  :member => [1, 9, 10, 12, 17]
},
{
  :name   => "Reptiles",
  :member => [2, 3, 4, 6]
}
]

# Special category name
NO_CATEGORY_NAME = "Others"

# SETTINGS END

module Enemy_Book_Config
#ドロップアイテム表示にアナライズが必要かどうか
DROP_ITEM_NEED_ANALYZE = true
#回避修正の名前
EVA_NAME = "Evasion" 
#図鑑完成率の表示方法
#0:表示なし 1:現在数/最大数 2:%表示 3:両方
SHOW_COMPLETE_TYPE = 3 
#コメント機能を使うかどうか(要・コメント追加スクリプト導入)
COMMENT_SYSTEM = true
end

class Game_Temp
attr_accessor :enemy_book_data
alias temp_enemy_book_data_initialize initialize
def initialize
temp_enemy_book_data_initialize
@enemy_book_data = Data_MonsterBook.new
end
end

class Game_Party
attr_accessor :enemy_info # 出会った敵情報(図鑑用)
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
alias book_info_initialize initialize
def initialize
book_info_initialize
@enemy_info = {}
end
#--------------------------------------------------------------------------
# ● エネミー情報の追加(図鑑用)
# type : 通常遭遇かアナライズか 0:通常 1:アナライズ -1:情報削除
# 0:無遭遇 1:遭遇済 2:アナライズ済
#--------------------------------------------------------------------------
def add_enemy_info(enemy_id, type = 0)
case type
when 0
if @enemy_info[enemy_id] == 2
return false
end
@enemy_info[enemy_id] = 1
when 1
@enemy_info[enemy_id] = 2
when -1
@enemy_info[enemy_id] = 0
end
end
#--------------------------------------------------------------------------
# ● 魔物図鑑の最大登録数を取得
#--------------------------------------------------------------------------
def enemy_book_max
return $game_temp.enemy_book_data.id_data.size - 1
end
#--------------------------------------------------------------------------
# ● 魔物図鑑の現在登録数を取得
#--------------------------------------------------------------------------
def enemy_book_now
now_enemy_info = @enemy_info.keys
# 登録無視の属性IDを取得
no_add = $game_temp.enemy_book_data.no_add_element
new_enemy_info = []
for i in now_enemy_info
enemy = $data_enemies[i]
next if enemy.name == ""
if enemy.element_ranks[no_add] == 1
next
end
new_enemy_info.push(enemy.id)
end
return new_enemy_info.size
end
#--------------------------------------------------------------------------
# ● 魔物図鑑の完成率を取得
end

class Interpreter
def enemy_book_max
return $game_party.enemy_book_max
end
def enemy_book_now
return $game_party.enemy_book_now
end
def enemy_book_comp
return $game_party.enemy_book_complete_percentage
end
end

class Scene_Battle
alias add_enemy_info_start_phase5 start_phase5
def start_phase5
for enemy in $game_troop.enemies
# エネミーが隠れ状態でない場合
unless enemy.hidden
# 敵遭遇情報追加
$game_party.add_enemy_info(enemy.id, 0)
end
end
add_enemy_info_start_phase5
end
end

class Window_Base < Window
#--------------------------------------------------------------------------
# ● エネミーの戦闘後獲得アイテムの描画
#--------------------------------------------------------------------------
def draw_enemy_drop_item(enemy, x, y)
self.contents.font.color = normal_color
treasures = []
if enemy.item_id > 0
treasures.push($data_items[enemy.item_id])
end
if enemy.weapon_id > 0
treasures.push($data_weapons[enemy.weapon_id])
end
if enemy.armor_id > 0
treasures.push($data_armors[enemy.armor_id])
end
# 現状ではとりあえず1つのみ描画
if treasures.size > 0
item = treasures[0]
bitmap = RPG::Cache.icon(item.icon_name)
opacity = 255
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
name = treasures[0].name
else
self.contents.font.color = disabled_color
name = "No Item"
end
self.contents.draw_text(x+28, y, 212, 32, name)
end
#--------------------------------------------------------------------------
# ● エネミーの図鑑IDの描画
#--------------------------------------------------------------------------
def draw_enemy_book_id(enemy, x, y)
self.contents.font.color = normal_color
id = $game_temp.enemy_book_data.id_data.index(enemy.id)
self.contents.draw_text(x, y, 32, 32, id.to_s)
end
#--------------------------------------------------------------------------
# ● エネミーの名前の描画
# enemy : エネミー
# x : 描画先 X 座標
# y : 描画先 Y 座標
#--------------------------------------------------------------------------
def draw_enemy_name(enemy, x, y)
self.contents.font.color = normal_color
self.contents.draw_text(x, y, 152, 32, enemy.name)
end
#--------------------------------------------------------------------------
# ● エネミーグラフィックの描画(アナライズ)
# enemy : エネミー
# x : 描画先 X 座標
# y : 描画先 Y 座標
#--------------------------------------------------------------------------
def draw_enemy_graphic(enemy, x, y, opacity = 255)
bitmap = RPG::Cache.battler(enemy.battler_name, enemy.battler_hue)
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
x = x + (cw / 2 - x) if cw / 2 > x
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, opacity)
end
#--------------------------------------------------------------------------
# ● エネミーの獲得EXPの描画
# enemy : エネミー
# x : 描画先 X 座標
# y : 描画先 Y 座標
#--------------------------------------------------------------------------
def draw_enemy_exp(enemy, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 120, 32, "EXP")
self.contents.font.color = normal_color
self.contents.draw_text(x + 120, y, 36, 32, enemy.exp.to_s, 2)
end
#--------------------------------------------------------------------------
# ● エネミーの獲得GOLDの描画
# enemy : エネミー
# x : 描画先 X 座標
# y : 描画先 Y 座標
#--------------------------------------------------------------------------
def draw_enemy_gold(enemy, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 120, 32, $data_system.words.gold)
self.contents.font.color = normal_color
self.contents.draw_text(x + 120, y, 36, 32, enemy.gold.to_s, 2)
end
end

class Game_Enemy_Book < Game_Enemy
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize(enemy_id)
super(1, 0)#ダミー
@enemy_id = enemy_id
enemy = $data_enemies[@enemy_id]
@battler_name = enemy.battler_name
@battler_hue = enemy.battler_hue
@hp = maxhp
@sp = maxsp
end
end

class Data_MonsterBook
attr_reader :id_data
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
@id_data = enemy_book_id_set
end
#--------------------------------------------------------------------------
# ● 図鑑用登録無視属性取得
#--------------------------------------------------------------------------
def no_add_element
no_add = 0
# 登録無視の属性IDを取得
for i in 1...$data_system.elements.size
if $data_system.elements[i] =~ /図鑑登録無効/
no_add = i
break
end
end
return no_add
end
#--------------------------------------------------------------------------
# ● 図鑑用敵ID設定
#--------------------------------------------------------------------------
def enemy_book_id_set
data = [0]
no_add = no_add_element
# 登録無視の属性IDを取得
for i in 1...$data_enemies.size
enemy = $data_enemies[i]
next if enemy.name == ""
if enemy.element_ranks[no_add] == 1
next
end
data.push(enemy.id)
end
return data
end
end


class Window_MonsterBook < Window_Selectable
attr_reader :data
attr_reader :cursor_y
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize(index=0)
super(0, 64, 640, 416)
@column_max = 2
@book_data = $game_temp.enemy_book_data
@data = @book_data.id_data.dup
@data.shift
#@data.sort!
rearrange_data
@item_max = @data.size
#@cursor_y = {}
#count_cursor_y
#p @cursor_y
self.index = 0
refresh if @item_max > 0
end

# Rearrange data to be sorted by category
def rearrange_data
  data_temp = Array.new
  # Push all enemy ID that has category
  for i in 0 ... CATEGORY.size
    data_temp += CATEGORY[i][:member]
    # If this category has odd member size, add dummy
    if CATEGORY[i][:member].size % 2 == 1
      data_temp += [nil]
    end
  end
  # Push all enemy with no category
  enemy_with_no_category = @data - data_temp
  data_temp += enemy_with_no_category
  if enemy_with_no_category.size % 2 == 1
    data_temp += [nil]
  end
  # Replace data with this new one
  @data = data_temp
  #p @data
end
#--------------------------------------------------------------------------
# ● 遭遇データを取得
#--------------------------------------------------------------------------
def data_set
data = $game_party.enemy_info.keys
data.sort!
newdata = []
for i in data
next if $game_party.enemy_info[i] == 0
# 図鑑登録無視を考慮
if book_id(i) != nil
newdata.push(i)
end
end
return newdata
end
#--------------------------------------------------------------------------
# ● 表示許可取得
#--------------------------------------------------------------------------
def show?(id)
if $game_party.enemy_info[id] == 0 or $game_party.enemy_info[id] == nil
return false
else
return true
end
end
#--------------------------------------------------------------------------
# ● 図鑑用ID取得
#--------------------------------------------------------------------------
def book_id(id)
return @book_data.index(id)
end
#--------------------------------------------------------------------------
# ● エネミー取得
#--------------------------------------------------------------------------
def item
return @data[self.index]
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
self.contents = Bitmap.new(width - 32, row_max * 32)
if $fontface != nil
self.contents.font.name = $fontface
elsif $defaultfonttype != nil
self.contents.font.name = $defaultfonttype
end

#項目数が 0 でなければビットマップを作成し、全項目を描画
if @item_max > 0
  draw_category_name

for i in 0...@item_max
draw_item(i)
end

end
end
#--------------------------------------------------------------------------
# ● 項目の描画
# index : 項目番号
#--------------------------------------------------------------------------
def draw_item(index)
  return if @data[index] == nil
enemy = $data_enemies[@data[index]]
return if enemy == nil
x = 4 + index % 2 * (288 + 32)
    # For calculating Y...
    # 1. Find out category ID
    cat_id = -1
    enemy_id = @data[index]
    for i in 0 ... CATEGORY.size
      if CATEGORY[i][:member].include?(enemy_id)
        cat_id = i
        break
      end
    end
    cat_id = CATEGORY.size if cat_id == -1
    # 2. Calculate Y
      y = (index / @column_max + cat_id + 1) * 32 #- self.oy
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.font.color = normal_color
draw_enemy_book_id(enemy, x, y)
if show?(enemy.id)
self.contents.draw_text(x + 28+16, y, 212, 32, enemy.name, 0)
else
self.contents.draw_text(x + 28+16, y, 212, 32, "-----", 0)
return
end
if analyze?(@data[index])
self.contents.font.color = text_color(3)
self.contents.draw_text(x + 256, y, 24, 32, "済", 2)
end
end

def draw_category_name
  for i in 0..CATEGORY.size
    x = 4
    # Count how many items has been drawn up to this category
    total_item = 0
    for j in 0 ... i
      total_item += CATEGORY[j][:member].size
      total_item += 1 if CATEGORY[j][:member].size % 2 == 1
    end
    y = (i + (total_item / 2.0).ceil) * 32
    rect = Rect.new(x, y, self.width / @column_max - 32, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    self.contents.font.color = normal_color
    if i == CATEGORY.size
      cat_name = NO_CATEGORY_NAME
    else
      cat_name = CATEGORY[i][:name]
    end
    self.contents.font.bold = true
    self.contents.font.italic = true
    self.contents.draw_text(x + 4, y, 640 - 32 - 4, 32, cat_name, 1)
  end
  self.contents.font.bold = false
    self.contents.font.italic = false
end

def count_cursor_y
  for i in @data
    # Get category number
    index = 0
    for j in 0 ... CATEGORY.size
      if CATEGORY[j][:member].include?(i)
        index = j
        break
      end
    end
    total_item = 0
    for j in 0 ... index
      total_item += CATEGORY[j][:member].size
    end
    y = ((total_item / 2.0).ceil) * 32
    @cursor_y[i - 1] = y
  end
end

  def row_max
    # Compute rows from number of items and columns
    return (@item_max + @column_max - 1) / @column_max + CATEGORY.size + 1
  end
  def update_cursor_rect
    # If cursor position is less than 0
    if @index < 0
      self.cursor_rect.empty
      return
    end
    # Get current row
    cat_id = -1
    enemy_id = @data[@index]
    for i in 0 ... CATEGORY.size
      if CATEGORY[i][:member].include?(enemy_id)
        cat_id = i
        break
      end
    end
    cat_id = CATEGORY.size if cat_id == -1
    row = @index / @column_max + cat_id
    # If current row is before top row
    if row < self.top_row
      # Scroll so that current row becomes top row
      self.top_row = row
    end
    # If current row is more to back than back row
    if row > self.top_row + (self.page_row_max - 2)
      # Scroll so that current row becomes back row
      self.top_row = row - (self.page_row_max - 2)
    end
    # Calculate cursor width
    cursor_width = self.width / @column_max - 32
    # Calculate cursor coordinates
    x = @index % @column_max * (cursor_width + 32)
    # For calculating Y...
    # 1. Find out category ID
    cat_id = -1
    # if item in this index is nil...
    if item == nil
      # Pretend we take the enemy before this
      enemy_id = @data[@index - 1]
    else
      enemy_id = item
    end
    for i in 0 ... CATEGORY.size
      if CATEGORY[i][:member].include?(enemy_id)
        cat_id = i
        break
      end
    end
    cat_id = CATEGORY.size if cat_id == -1 and item != nil
    # 2. Calculate Y
    if cat_id > -1
      y = (@index / @column_max + cat_id + 1) * 32 - self.oy
    else
      y = (@index / @column_max + CATEGORY.size + 1) * 32 - self.oy
    end
    # Update cursor rectangle
    self.cursor_rect.set(x, y, cursor_width, 32)  
  end
#--------------------------------------------------------------------------
# ● アナライズ済かどうか
#--------------------------------------------------------------------------
def analyze?(enemy_id)
if $game_party.enemy_info[enemy_id] == 2
return true
else
return false
end
end
end


class Window_MonsterBook_Info < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
super(0, 0+64, 640, 480-64)
self.contents = Bitmap.new(width - 32, height - 32)
if $fontface != nil
self.contents.font.name = $fontface
elsif $defaultfonttype != nil
self.contents.font.name = $defaultfonttype
end
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh(enemy_id)
self.contents.clear
self.contents.font.size = 22
enemy = Game_Enemy_Book.new(enemy_id)
draw_enemy_graphic(enemy, 96, 240+48+64, 200)
draw_enemy_book_id(enemy, 4, 0)
draw_enemy_name(enemy, 48, 0)
draw_actor_hp(enemy, 288, 0)
draw_actor_sp(enemy, 288+160, 0)
draw_actor_parameter(enemy, 288 , 32, 0)
self.contents.font.color = system_color
self.contents.draw_text(288+160, 32, 120, 32, Enemy_Book_Config::EVA_NAME)
self.contents.font.color = normal_color
self.contents.draw_text(288+160 + 120, 32, 36, 32, enemy.eva.to_s, 2)
draw_actor_parameter(enemy, 288 , 64, 3)
draw_actor_parameter(enemy, 288+160, 64, 4)
draw_actor_parameter(enemy, 288 , 96, 5)
draw_actor_parameter(enemy, 288+160, 96, 6)
draw_actor_parameter(enemy, 288 , 128, 1)
draw_actor_parameter(enemy, 288+160, 128, 2)
draw_enemy_exp(enemy, 288, 160)
draw_enemy_gold(enemy, 288+160, 160)
if analyze?(enemy.id) or !Enemy_Book_Config::DROP_ITEM_NEED_ANALYZE
self.contents.draw_text(288, 192, 96, 32, "Drop Item")
draw_enemy_drop_item(enemy, 288+96+4, 192)
self.contents.font.color = normal_color
#draw_element_guard(enemy, 320-32, 160-16+96)
end
end
#--------------------------------------------------------------------------
# ● アナライズ済かどうか
#--------------------------------------------------------------------------
def analyze?(enemy_id)
if $game_party.enemy_info[enemy_id] == 2
return true
else
return false
end
end
end


class Scene_MonsterBook
#--------------------------------------------------------------------------
# ● メイン処理
#--------------------------------------------------------------------------
def main
$game_temp.enemy_book_data = Data_MonsterBook.new
# ウィンドウを作成
@title_window = Window_Base.new(0, 0, 640, 64)
@title_window.contents = Bitmap.new(640 - 32, 64 - 32)
if $fontface != nil
self.contents.font.name = $fontface
elsif $defaultfonttype != nil
self.contents.font.name = $defaultfonttype
end
@title_window.contents.draw_text(4, 0, 320, 32, "Monster Information", 0)
@main_window = Window_MonsterBook.new
@main_window.active = true
# インフォウィンドウを作成 (不可視・非アクティブに設定)
@info_window = Window_MonsterBook_Info.new
@info_window.z = 110
@info_window.visible = false
@info_window.active = false
@visible_index = 0
if Enemy_Book_Config::COMMENT_SYSTEM
# コメントウィンドウを作成 (不可視・非アクティブに設定)
@comment_window = Window_Monster_Book_Comment.new
@comment_window.z = 120
@comment_window.visible = false
@comment_on = false # コメントフラグ
end
# トランジション実行
Graphics.transition
# メインループ
loop do
# ゲーム画面を更新
Graphics.update
# 入力情報を更新
Input.update
# フレーム更新
update
# 画面が切り替わったらループを中断
if $scene != self
break
end
end
# トランジション準備
Graphics.freeze
# ウィンドウを解放
@main_window.dispose
@info_window.dispose
@title_window.dispose
@comment_window.dispose if @comment_window != nil
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
# ウィンドウを更新
@main_window.update
@info_window.update
if @info_window.active
update_info
return
end
# メインウィンドウがアクティブの場合: update_target を呼ぶ
if @main_window.active
update_main
return
end
end
#--------------------------------------------------------------------------
# ● フレーム更新 (メインウィンドウがアクティブの場合)
#--------------------------------------------------------------------------
def update_main
# B ボタンが押された場合
if Input.trigger?(Input::B)
# キャンセル SE を演奏
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
# C ボタンが押された場合
if Input.trigger?(Input::C)
if @main_window.item == nil or @main_window.show?(@main_window.item) == false
# ブザー SE を演奏
$game_system.se_play($data_system.buzzer_se)
return
end
# 決定 SE を演奏
$game_system.se_play($data_system.decision_se)
@main_window.active = false
@info_window.active = true
@info_window.visible = true
@visible_index = @main_window.index
@info_window.refresh(@main_window.item)
if @comment_window != nil
@comment_window.refresh(@main_window.item)
if @comment_on
@comment_window.visible = true
else
@comment_window.visible = false
end
end
return
end
end
#--------------------------------------------------------------------------
# ● フレーム更新 (インフォウィンドウがアクティブの場合)
#--------------------------------------------------------------------------
def update_info
# B ボタンが押された場合
if Input.trigger?(Input::B)
# キャンセル SE を演奏
$game_system.se_play($data_system.cancel_se)
@main_window.active = true
@info_window.active = false
@info_window.visible = false
@comment_window.visible = false if @comment_window != nil
@comment_on = false if @comment_window != nil
return
end
# C ボタンが押された場合
if Input.trigger?(Input::C)
if @comment_window != nil
# 決定 SE を演奏
$game_system.se_play($data_system.decision_se)
if @comment_on
@comment_on = false
@comment_window.visible = false
else
@comment_on = true
@comment_window.visible = true
end
return
end
end
if Input.trigger?(Input::L)
# 決定 SE を演奏
$game_system.se_play($data_system.decision_se)
loop_end = false
while loop_end == false
if @visible_index != 0
@visible_index -= 1
else
@visible_index = @main_window.data.size - 1
end
loop_end = true if @main_window.show?(@main_window.data[@visible_index])
end
id = @main_window.data[@visible_index]
@info_window.refresh(id)
@comment_window.refresh(id) if @comment_window != nil
return
end
if Input.trigger?(Input::R)
# 決定 SE を演奏
$game_system.se_play($data_system.decision_se)
loop_end = false
while loop_end == false
if @visible_index != @main_window.data.size - 1
@visible_index += 1
else
@visible_index = 0
end
loop_end = true if @main_window.show?(@main_window.data[@visible_index])
end
id = @main_window.data[@visible_index]
@info_window.refresh(id)
@comment_window.refresh(id) if @comment_window != nil
return
end
end
end

=begin

THIS IS THE COMMENTS FUNCTION!!! THIS IS WHAT I EDIT!!!

=end

# 図鑑コメント機能追加(基本)
#
# 図鑑にコメント機能を使いするのに必須です。
#
# 2005.9.19
# ウィンドウの不透明度、フォントと文字色を指定可能に。

class Window_Book_Comment < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize(x, y, width, height)
super(x, y, width, height)
self.contents = Bitmap.new(width - 32, height - 32)
if $fontface != nil
self.contents.font.name = $fontface
elsif $defaultfonttype != nil
self.contents.font.name = $defaultfonttype
end
self.opacity = self.window_opa
self.contents.font.name = self.font_name
self.contents.font.color = self.font_color
end
#--------------------------------------------------------------------------
# ● 文字列変換
#--------------------------------------------------------------------------
def transfer(str)
text = str.clone
# 制御文字処理
begin
text.gsub!(/\\[Vv]\[([0-9]+)\]/) { $game_variables[$1.to_i] }
end
text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
$game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
end
# 便宜上、"\\\\" を "\000" に変換
text.gsub!(/\\\\/) { "\000" }
# "\\C" を "\001" に、"\\G" を "\002" に変換
text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
text.gsub!(/\\[Gg]/) { "\002" }
# 不透明度
text.gsub!(/\\[Oo]\[([0-9]+)\]/) { "\200[#{$1}]" }
# 文字サイズ
text.gsub!(/\\[Hh]\[([0-9]+)\]/) { "\201[#{$1}]" }
# ルビ
text.gsub!(/\\[Rr]\[(.+?),(.+?)\]/) { "\202[#{$1},#{$2}]" }
# ピクチャ表示
text.gsub!(/\\[Pp]ic\[([0-9]+),([0-9]+),([^,\]]+)\]/) { "\250[#{$1},#{$2},#{$3}]" }
# バトラー表示
text.gsub!(/\\[Bb]at\[([0-9]+),([0-9]+),([^,\]]+),([0-9]+)\]/) { "\251[#{$1},#{$2},#{$3},#{$4}]" }
# キャラグラフィック表示
text.gsub!(/\\[Cc]ha\[([0-9]+),([0-9]+),([^,\]]+),([0-9]+),([0-9]+),([0-9]+)\]/) { "\252[#{$1},#{$2},#{$3},#{$4},#{$5},#{$6}]" }

return text
end
#--------------------------------------------------------------------------
# ● 変換した文字列を描画
#--------------------------------------------------------------------------
def draw_ex_text(ox, oy, str, align=0)
text = str.clone
x = 0
y = 0
# c に 1 文字を取得 (文字が取得できなくなるまでループ)
while ((c = text.slice!(/./m)) != nil)
# \\ の場合
if c == "\000"
# 本来の文字に戻す
c = "\\"
end
# \C[n] の場合
if c == "\001"
# 文字色を変更
text.sub!(/\[([0-9]+)\]/, "")
color = $1.to_i
if color >= 0 and color <= 7
self.contents.font.color = text_color(color)
end
# 次の文字へ
next
end
# \G の場合
if c == "\002"
# 所持ゴールドに変換
c = $game_party.gold.to_s
# 文字を描画
self.contents.draw_text(ox+4+x, oy+4+ 32 * y, self.contents.text_size(c).width, 32, c)
# x に描画した文字の幅を加算
x += self.contents.text_size(c).width
# 次の文字へ
next
end

# \O の場合
if c == "\200"
text.sub!(/\[([0-9]+)\]/, "")
opacity = $1.to_i
temp = self.contents.font.color
self.contents.font.color = Color.new(temp.red, temp.green, temp.blue, opacity)
# 次の文字へ
next
end
# \H の場合
if c == "\201"
text.sub!(/\[([0-9]+)\]/, "")
self.contents.font.size = [[$1.to_i, 6].max, 32].min
# 次の文字へ
next
end
# \R の場合
if c == "\202"
text.sub!(/\[(.+?),(.+?)\]/, "")
x += ruby_set(ox+x,oy+(y*32),$1,$2)
# 次の文字へ
next
end
# \Pic の場合
if c == "\250"
text.sub!(/\[([0-9]+),([0-9]+),([^,\]]+)\]/, "")
ope = self.contents.font.color.alpha
set_picture($1.to_i, $2.to_i, $3, ope)
# 次の文字へ
next
end
# \Bat の場合
if c == "\251"
text.sub!(/\[([0-9]+),([0-9]+),([^,\]]+),([0-9]+)\]/, "")
ope = self.contents.font.color.alpha
set_battler($1.to_i, $2.to_i, $3, $4.to_i, ope)
# 次の文字へ
next
end
# \Cha の場合
if c == "\252"
text.sub!(/\[([0-9]+),([0-9]+),([^,\]]+),([0-9]+),([0-9]+),([0-9]+)\]/, "")
ope = self.contents.font.color.alpha
set_character($1.to_i, $2.to_i, $3, $4.to_i, $5.to_i, $6.to_i, ope)
# 次の文字へ
next
end
# 改行文字の場合
if c == "\n"
# y に 1 を加算
y += 1
x = 0
# 次の文字へ
next
end
# 文字を描画
self.contents.draw_text(ox+4+x, 4+oy+ 32 * y, 40, 32, c)
# x に描画した文字の幅を加算
x += self.contents.text_size(c).width
end
end
#--------------------------------------------------------------------------
# ● ルビ描画
#--------------------------------------------------------------------------
def ruby_set(x,y,str,ruby)
text_w = self.contents.text_size(str).width
text_h = self.contents.text_size(str).height
f_size_back = self.contents.font.size
ruby_size = 10
self.contents.font.size = ruby_size
ruby_w = self.contents.text_size(ruby).width
self.contents.draw_text(4+x, 4+4+y-ruby_size+1, text_w, ruby_size, ruby, 1)
self.contents.font.size = f_size_back
self.contents.draw_text(4+x, 4+4+y, text_w, text_h, str)
return text_w
end
#--------------------------------------------------------------------------
# ● ピクチャー描画
#--------------------------------------------------------------------------
def set_picture(x, y, filename, opacity=255)
bitmap = RPG::Cache.picture(filename)
self.contents.blt(x, y, bitmap, bitmap.rect, opacity) 
end
#--------------------------------------------------------------------------
# ● バトラー描画
#--------------------------------------------------------------------------
def set_battler(x, y, filename, hue, opacity=255)
bitmap =RPG::Cache.battler(filename, hue)
self.contents.blt(x, y, bitmap, bitmap.rect, opacity) 
end
#--------------------------------------------------------------------------
# ● キャラクター描画
#--------------------------------------------------------------------------
def set_character(x, y, filename, hue, dir, pat, opacity=255)
bitmap = RPG::Cache.character(filename, hue)
cw = bitmap.width / 4
ch = bitmap.height / 4
cy = ch * (dir / 2 - 1)
cx = cw * (pat - 1)
src_rect = Rect.new(cx, cy, cw, ch)
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, opacity)
end
def window_opa
end
def font_name
end
def font_color
end
end

=begin

THIS IS WHAT I ACTUALLY EDIT!!! INDIVIDUAL COMMENTS...

=end

# 図鑑コメント機能追加(魔物図鑑)
#
# コメントには冒険日記と同様の制御文字が使用可能です。
# 詳しくは冒険日記の方をご覧下さい。
#
# 2005.9.19
# ウィンドウの不透明度、フォントと文字色を指定可能に。

module MoMo_M_Book_Comment
# コメントウィンドウの横幅
C_WINDOW_WIDTH = 640
# コメントウィンドウの縦幅
C_WINDOW_HEIGHT = 480
# コメントウィンドウのX座標
C_WINDOW_X = 0
# コメントウィンドウのY座標
C_WINDOW_Y = 0
# コメントウィンドウの不透明度
C_WINDOW_OPA = 255
# 使用するフォント名(希望順に配列に追加してください)
C_WINDOW_FONT_NAME = ["Tahoma"]
# 使用する文字色
# Color.new(赤の値, 緑の値, 青の値, 不透明度) ※0~255まで
C_WINDOW_FONT_COLOR = Color.new(255, 255, 255, 255)
end

class Window_Monster_Book_Comment < Window_Book_Comment
def initialize
x = MoMo_M_Book_Comment::C_WINDOW_X
y = MoMo_M_Book_Comment::C_WINDOW_Y
width = MoMo_M_Book_Comment::C_WINDOW_WIDTH
height = MoMo_M_Book_Comment::C_WINDOW_HEIGHT
super(x, y, width, height)
end
def draw_comment(id)
self.contents.clear
comment = get_comment(id)
draw_ex_text(0, 0, transfer(comment))
end
def get_comment(id)
return comment_set[0] if comment_set[id] == nil
return comment_set[id]
end
def comment_set
return MoMo_M_Book_Comment::M_BOOK_COMMENT
end
def refresh(id)
draw_comment(id)
end
def window_opa
return MoMo_M_Book_Comment::C_WINDOW_OPA
end
def font_name
return MoMo_M_Book_Comment::C_WINDOW_FONT_NAME
end
def font_color
return MoMo_M_Book_Comment::C_WINDOW_FONT_COLOR
end
end

module MoMo_M_Book_Comment
str = []
# str[エネミーID]
str[0] = <<-EOS #デフォ(コメント未設定時用、通常は使用しない)
コメントな~し!
EOS
str[11] = <<-EOS #Aqua
Aqua:
A fiend on Dunhil Beach, recently forced onto the land
because of a territory squabble with a nearby Krakken.
It is a powerful foe compared with its competition around
Dunhil Beach, and usually at the top of the food chain, until
the Krakken came along. It is capable of being a strong
predator, but would usually eat small fish and the like, but
when it was forced onto the land, it began to develop a taste
for human flesh, starting with passing merchants, and moving
its way up, until starting to consume hunters and the like...

Dunhil Beach:
A small beach on the island of Yeltzern, this is usually a quiet
place with not much going on, until the recent territory
squabble with the Aqua and the Krakken, two fiends which
would normally be found nearer the Tibean Coast...
EOS
str[1] = <<-EOS #Goblin
Goblin:
These mischevious creatures are always causing annoyance
to the citizens of Dunhil. They are usually green, but special
breeds have various tones of colour, probably showing the
different levels of the pecking order, with the Goblin Elder
at the top. This one wields two daggers and is relatively
low in the pecking order. Even though these goblins know
no states or provinces, they still attack anything they
consider to be in there territory, making these a common
target for hunters...

Goblin Scimitar:
Once in every 1000 years, a Goblin genius is born, this
weapon in particular was developed by one of these
geniuses. It is curved so that it can slide over the top of
shields and hack away at the person behind. The genius
who developed this weapon was later tried, and found
guilty of being too clever and put to death...
EOS
str[2] = <<-EOS #Goblin Archer
Goblin Archer:
A more respected member of the pecking order, it is
skilled in the use of the bow. They are still a far way
down from The Elder, but are more respected than their
sword-wielding cousins...

Goblin Bow:
Curved and elegant, the Goblin Bow is a fine example
of rare Goblin inginuity. It isn't as good as most human
craft, but is still plausable in todays weapons market, even
if for a very low price. Again, the Goblin genius that designed
this weapon was sentenced to death by The Elder, this time
for being too smart... The poor goblin wrote his appeal in
his own blood, but was rejected because the Goblin Elder
was too busy looking at shiny rocks in the side of a cliff...
EOS
str[3] = <<-EOS
Basilisk:
A venomous fiend that inhabbits parts of Dunhil Canyons.
It is very agile and almost top of the food chain in that
area. The myth about these creatures eating men whole
is complete rubbish. They prefer to poison their victims
first, and then to eat their victims whole...

Antidotes:
A cure for the Basilisks venom had puzzled scientists
for many centuries. Until one day, when a scientist by
the name of Anne Dotte invented a cure by chance when
playing around with a flask of crushed Yaneor Leaf, a bag
of flour, and some stale, melted cheese. She originally
called her cure 'Anne Dotte', but it was later changed to
'Antidote'...
EOS
str[4] = <<-EOS
Cockatrice:
A bird similar to a chicken in appearance that roams
across many places on the island of Yeltzern. It is many
times faster and more violent than its tasty counter-part
and has a habbit of attacking passing merchants for items
of food. This one has not yet matured, but if it had, it
would be a much harder bird to catch indeed...

Cockatrice Feather:
Should you encounter one of these on your way, then
you should count yourself extremely lucky as these are
very hard to get hold of, since the birds move so very
fast. Some hunters eat raw cockatrice with the feathers
on, but it would be more advisable to actually sell the
feathers, as some people do, trying to pass them off for
Pheonix Feathers instead. So buyers beware!
EOS
str[5] = <<-EOS
Sand Scorpion:
One of the few creatures which can inhabbit the
intense heat and severe lack of water in Kalenn Desert.
This creature is more regarded as a pest, than a fiend of
Dalicia, but it has been known to attack unprepared
merchants and the like...

Sandy Knife:
A buttter knife that, because of being buried underneath the
sands of Kalenn Desert, has gained the extraordinary 
power to command small sandstorms. This power thought
to be from a magician's staff that got buried under the sand
and released all of its magical energy into the sands turning
the butter knife into a most powerful weapon. It is strongly
adivised that if someone should find this weapon then
you should leave it alone, since this weapon could be
leathal if in the wrong hands...
EOS
str[6] = <<-EOS
Sand Wolf:
A dangerous type of wolf found in the unforgiving Kalenn
Desert. It is a fast, agile and hungry predator and most
certainly top the food chain in Kalenn Desert. But even they
cannot survive the sheer intensity of the heat at midday,
so they must rest under one of the few palm trees that
struggles to grow there. Even though you can sneak past
the wolves, be warned! The wolves have exceptionally good
hearing and anything that enters their territory does not
usually come out alive...

Kalenn Desert:
A barren wasteland that gaps the road from Dunhil to Lakur.
It inhabbits many a fiend and you should make sure that you
are fully prepared when entering the desert. Even though
the wolves and scorpions are frequent killers, the no.1 spot
is taken by the extreme and major lack of water...
EOS
str[7] = <<-EOS
Sewer Rat:
A verminous pest that over-ran the Yanua waterways
about 100 years ago. It is believed that they were
brought to the sewers by a Dunhil Sabbotage Unit
whence they were released into the sewers to cause
panic and disquiet. They are very agile and hard to hit
but don't have a great defence. Even though they are more
of a nuiscence than a fiend, they can still attack the
unwary traveller...

Yanua Waterways:

EOS

M_BOOK_COMMENT = str
end

Now for the bugs I discover so far:
1. I can't make category names in underline. It might be possible, but I still don't know how ^_^;
2. When scrolling the page upward, the window scrolls already when you go beyond the second row from the top, not the topmost row (as a normal selectable window will).
3. If you don't specify the monster IDs in order (as my example in the script), the numbers shown in the Bestiary follow monster IDs, so they are not sorted as well. Do you prefer to sort them (1, 2, 3, 4, ...)?

If there are more bugs I didn't catch, let me know.
 
Hi Exsharaen!

Thanks! It works great, had to edit one little part of the original which didn't fit in with the new thing... But don't worry... (I DO know how to edit, just not come up with original, and my editing causes errors usually... But anyhoo)

BUGS N' STUFF:

1. Doesn't matter but it'd be great if you could!

2. I don't actually understand what you're saying... It's great! I like the scrolling... Elaborate cos' I haven't seen anything wrong with the scrollin'... So keep scrollin' scrollin' scrollin'... (English rock- Normally rollin')

3. If you could get rid of the gay numbers once and for all then that would be brill! Cos' those numbers really spazz up the bestiary and it looks totally unprofessional... Especially since I create monsters in 1, 2, 3... So all the categories are mixed...

Sorry if I'm just bein' perdantic but I am gonna try to get my game sold ya know...

Thanks again for doin' this!

Amos36

The ginger.... NINJA!!! Ka-Pow! Hi-Ya!!!

P.S- Whether you require payment or not you're getting the free game whether you like it or not! :p :p :p
 
OK, so here are the bug fixes:

1. Can anyone help? How to underline a text in RGSS?

2. Well, if you consider it's not a bug, then it's okay I think...

3. The numbers are actually drawn by a method called draw_enemy_book_id, so it's two lines edit only to get rid of them. I won't repost the whole script to accomplish this, so I hope you can do this on your own:

Comment any draw_enemy_book_id you find (but for safety, leave the method definition as it is). You know how to comment, don't you? Either use # sign or =begin/=end block (I see you already master using =begin/=end block). They can be found here:

a. The first one is in def draw_item(index) within class Window_MonsterBook < Window_Selectable. But if you just do this, monsters names will appear slightly too far from left, so you may want to edit these lines (they are exactly below our new commented line):
Code:
if show?(enemy.id)
self.contents.draw_text(x + 28+16, y, 212, 32, enemy.name, 0)
else
self.contents.draw_text(x + 28+16, y, 212, 32, "-----", 0)
return
end
into:
Code:
if show?(enemy.id)
self.contents.draw_text(x + 4, y, 212, 32, enemy.name, 0)
else
self.contents.draw_text(x + 4, y, 212, 32, "-----", 0)
return
end

b. The second one lies in def refresh(enemy_id) of Class Window_MonsterBook_Info < Window_Base. Then, you may want to edit:
Code:
draw_enemy_name(enemy, 48, 0)
into:
Code:
draw_enemy_name(enemy, 4, 0)
so monster names are drawn not too far from the left.

Or as you like, edit the position of monster names.

Should there be more bugs, let me know.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top