查看: 2325|回复: 8

[已经解决] 怪物图鉴脚本问题

[复制链接]
梦石
0
星屑
50
在线时间
641 小时
注册时间
2015-7-29
回帖
188
发表于 2015-10-17 16:26:45 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
想问下关于白の魔的怪物图鉴问题,   为什么击杀1个敌人以后击破数不是加1而是加2.   还有一个就是为什么敌人的掉落物必须要敌人掉落出来以后才会在敌人图鉴中显示,怎么做才能击杀敌人以后就算不掉落物品也在图鉴中显示敌人的掉落物
















[pre lang="ruby"]#==============================================================================
# ■ RGSS3 魔物図鑑 ver 1.00 初期設定
#------------------------------------------------------------------------------
#  配布元:
#     白の魔 http://izumiwhite.web.fc2.com/
#
#  利用規約:
#     RPGツクールVXの正規の登録者のみご利用になれます。
#     利用報告・著作権表示とかは必要ありません。
#     改造もご自由にどうぞ。
#     何か問題が発生しても責任は持ちません。
#==============================================================================

#-------------------------------------------------------------------------------
# ★ 初期設定。
#-------------------------------------------------------------------------------
module WD_monsterdictionary_layout

#=== 各項目のレイアウト設定項目 ================================================
#
#   *_***_display       : trueで表示。falseで非表示。
#   *_***_display_x     : 表示位置のx座標
#   *_***_display_y     : 表示位置のy座標
#   *_***_display_width : 表示テキストの幅
#   *_***_display_text* : 表示テキスト
#
#===============================================================================

#===全図鑑共通設定==============================================================

  #図鑑完成度にどの段階で繁栄するか
  Perfection_timing = 2 #1⇒遭遇時、2⇒撃破時

  #フォントサイズ
  C_font_size = 18

#===魔物図鑑設定================================================================

  #番号の表示
  M_id_display            = true
  M_id_display_x          = 0
  M_id_display_y          = 0
  M_id_display_width      = 60
  M_id_display_digit      = 3 #桁数
  
  #名前の表示
  M_name_display          = true
  M_name_display_x        = 84
  M_name_display_y        = 0
  M_name_display_width    = 172

  #画像の表示
  M_pic_display           = true
  M_pic_display_x         = 140
  M_pic_display_y         = 380
  M_pic_display_opacity   = 255 #画像の不透明度

  #最大HPの表示
  M_mhp_display           = true
  M_mhp_display_x         = 0
  M_mhp_display_y         = 33
  M_mhp_display_width     = 136

  #最大MPの表示
  M_mmp_display           = true
  M_mmp_display_x         = 150
  M_mmp_display_y         = 33
  M_mmp_display_width     = 136

  #攻撃力の表示
  M_atk_display           = true
  M_atk_display_x         = 0
  M_atk_display_y         = 51
  M_atk_display_width     = 136

  #防御力の表示
  M_def_display           = true
  M_def_display_x         = 150
  M_def_display_y         = 51
  M_def_display_width     = 136

  #魔法力の表示
  M_mat_display           = true
  M_mat_display_x         = 0
  M_mat_display_y         = 69
  M_mat_display_width     = 136

  #魔法防御の表示
  M_mdf_display           = true
  M_mdf_display_x         = 150
  M_mdf_display_y         = 69
  M_mdf_display_width     = 136

  #敏捷性の表示
  M_agi_display           = true
  M_agi_display_x         = 0
  M_agi_display_y         = 87
  M_agi_display_width     = 136

  #運の表示
  M_luk_display           = true
  M_luk_display_x         = 150
  M_luk_display_y         = 87
  M_luk_display_width     = 136

  #特徴の表示
  M_feature_display       = true
  M_feature_display_x     = 0
  M_feature_display_y     = 114
  M_feature_display_width = 286
  M_feature_display_text1 = "功能"
  M_feature_display_text2 = "-"

  #経験値の表示
  M_exp_display           = true
  M_exp_display_x         = 0
  M_exp_display_y         = 213
  M_exp_display_width     = 136
  M_exp_display_text1     = "经验值"

  #お金の表示
  M_gold_display          = true
  M_gold_display_x        = 150
  M_gold_display_y        = 213
  M_gold_display_width    = 136
  M_gold_display_text1    = "货币"

  #ドロップアイテムの表示
  M_drop_display          = true
  M_drop_display_x        = 0
  M_drop_display_y        = 240
  M_drop_display_width    = 286
  M_drop_display_text1    = "掉落物品"
  M_drop_display_text2    = "无"

  #説明の表示
  M_help_display          = true
  M_help_display_x        = 0
  M_help_display_y        = 321
  M_help_display_width    = 286
  M_help_display_text1    = "说明"
  M_help_display_text2    = "-"

  #撃破数の表示
  M_geno_display          = true
  M_geno_display_x        = 320
  M_geno_display_y        = 321
  M_geno_display_width    = 100
  M_geno_display_text1    = "击破数"

end
#-------------------------------------------------------------------------------
# ★ 初期設定おわり
#-------------------------------------------------------------------------------
[/pre]




[pre lang="ruby"]#==============================================================================
# ■ RGSS3 魔物図鑑 ver 1.00 本体プログラム
#------------------------------------------------------------------------------
#  配布元:
#     白の魔 http://izumiwhite.web.fc2.com/
#
#  利用規約:
#     RPGツクールVXの正規の登録者のみご利用になれます。
#     利用報告・著作権表示とかは必要ありません。
#     改造もご自由にどうぞ。
#     何か問題が発生しても責任は持ちません。
#==============================================================================

#==============================================================================
# ■ WD_monsterdictionary
#------------------------------------------------------------------------------
#  魔物図鑑用の共通メソッドです。
#==============================================================================

module WD_monsterdictionary
   

  
  def m_dictionary_encount_switch_on(id)
    $game_system.m_dic_encount_sw = [] if $game_system.m_dic_encount_sw == nil
    $game_system.m_dic_encount_sw[id] = false if $game_system.m_dic_encount_sw[id] == nil
    $game_system.m_dic_encount_sw[id] = true
  end
  def m_dictionary_encount_switch_off(id)
    $game_system.m_dic_encount_sw = [] if $game_system.m_dic_encount_sw == nil
    $game_system.m_dic_encount_sw[id] = false if $game_system.m_dic_encount_sw[id] == nil
    $game_system.m_dic_encount_sw[id] = false
  end
  def m_dictionary_encount_switch_on?(id)
    $game_system.m_dic_encount_sw = [] if $game_system.m_dic_encount_sw == nil
    $game_system.m_dic_encount_sw[id] = false if $game_system.m_dic_encount_sw[id] == nil
    return $game_system.m_dic_encount_sw[id]
  end
  def m_dictionary_victory_switch_on(id)
    $game_system.m_dic_victory_sw = [] if $game_system.m_dic_victory_sw == nil
    $game_system.m_dic_victory_sw[id] = false if $game_system.m_dic_victory_sw[id] == nil
    $game_system.m_dic_victory_sw[id] = true
  end
  def m_dictionary_victory_switch_off(id)
    $game_system.m_dic_victory_sw = [] if $game_system.m_dic_victory_sw == nil
    $game_system.m_dic_victory_sw[id] = false if $game_system.m_dic_victory_sw[id] == nil
    $game_system.m_dic_victory_sw[id] = false
  end
  def m_dictionary_victory_switch_on?(id)
    $game_system.m_dic_victory_sw = [] if $game_system.m_dic_victory_sw == nil
    $game_system.m_dic_victory_sw[id] = false if $game_system.m_dic_victory_sw[id] == nil
    return $game_system.m_dic_victory_sw[id]
  end
  def m_dictionary_drop_switch_on(id, n)
    $game_system.m_dic_drop_sw = [] if $game_system.m_dic_drop_sw == nil
    $game_system.m_dic_drop_sw[id] = [] if $game_system.m_dic_drop_sw[id] == nil
    $game_system.m_dic_drop_sw[id][n] = false if $game_system.m_dic_drop_sw[id][n] == nil
    $game_system.m_dic_drop_sw[id][n] = true
  end
  def m_dictionary_drop_switch_off(id, n)
    $game_system.m_dic_drop_sw = [] if $game_system.m_dic_drop_sw == nil
    $game_system.m_dic_drop_sw[id] = [] if $game_system.m_dic_drop_sw[id] == nil
    $game_system.m_dic_drop_sw[id][n] = false if $game_system.m_dic_drop_sw[id][n] == nil
    $game_system.m_dic_drop_sw[id][n] = false
  end
  def m_dictionary_drop_switch_on?(id, n)
    $game_system.m_dic_drop_sw = [] if $game_system.m_dic_drop_sw == nil
    $game_system.m_dic_drop_sw[id] = [] if $game_system.m_dic_drop_sw[id] == nil
    $game_system.m_dic_drop_sw[id][n] = false if $game_system.m_dic_drop_sw[id][n] == nil
    return $game_system.m_dic_drop_sw[id][n]
  end
  def m_dictionary_genoside_number_add(id, n)
    $game_system.m_dic_genoside_num = [] if $game_system.m_dic_genoside_num == nil
    $game_system.m_dic_genoside_num[id] = 0 if $game_system.m_dic_genoside_num[id] == nil
    $game_system.m_dic_genoside_num[id] += n
  end
  def m_dictionary_genoside_number(id)
    $game_system.m_dic_genoside_num = [] if $game_system.m_dic_genoside_num == nil
    $game_system.m_dic_genoside_num[id] = 0 if $game_system.m_dic_genoside_num[id] == nil
    return $game_system.m_dic_genoside_num[id]
  end

  def print_dictionary?(enemy)
    if enemy != nil
      if enemy.name.size > 0
        hantei = /<图鉴无效>/ =~ enemy.note
        if hantei == nil
          return true
        end
      end
    end
    return false
  end
  def monster_dictionary_perfection
    dic_max = 0
    dic_num = 0
    $data_enemies.each do |enemy|
      if print_dictionary?(enemy)
        dic_max += 1
        if WD_monsterdictionary_layout::Perfection_timing == 1
          if m_dictionary_encount_switch_on?(enemy.id) == true
            dic_num += 1
          end
        elsif WD_monsterdictionary_layout::Perfection_timing == 2
          if m_dictionary_victory_switch_on?(enemy.id) == true
            dic_num += 1
          end
        end
      end
    end
    return (100*dic_num)/dic_max
  end
end

class Game_Interpreter
  include WD_monsterdictionary
end

class Game_System
  #--------------------------------------------------------------------------
  # ● 公開インスタンス変数
  #--------------------------------------------------------------------------
  attr_accessor :m_dic_encount_sw
  attr_accessor :m_dic_victory_sw
  attr_accessor :m_dic_drop_sw
  attr_accessor :m_dic_genoside_num
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  alias wd_orig_initialize002 initialize
  def initialize
    wd_orig_initialize002
    @m_dic_encount_sw = []
    @m_dic_victory_sw = []
    @m_dic_drop_sw = []
    @m_dic_genoside_num = []
  end
end

class Game_Troop < Game_Unit
  include WD_monsterdictionary
  #--------------------------------------------------------------------------
  # ● 図鑑への登録(遭遇済み判定)
  #--------------------------------------------------------------------------
  def dictionary1
    for enemy in members
      m_dictionary_encount_switch_on(enemy.enemy_id) unless enemy.hidden? #遭遇済み図鑑登録
    end
  end
  #--------------------------------------------------------------------------
  # ● 図鑑への登録(撃破済み判定)
  #--------------------------------------------------------------------------
  def dictionary2
    for enemy in dead_members
      m_dictionary_victory_switch_on(enemy.enemy_id) unless enemy.hidden? #撃破済み図鑑登録
      m_dictionary_genoside_number_add(enemy.enemy_id, 1) unless enemy.hidden? #撃破数カウント
    end
  end
end

class << BattleManager
  #--------------------------------------------------------------------------
  # ● 戦闘開始
  #--------------------------------------------------------------------------
  alias wd_orig_battle_start002 battle_start
  def battle_start
    wd_orig_battle_start002
    $game_troop.dictionary1 #図鑑への登録(遭遇済み判定)
  end
  #--------------------------------------------------------------------------
  # ● 勝利の処理
  #--------------------------------------------------------------------------
  alias wd_orig_process_victory002 process_victory
  def process_victory
    $game_troop.dictionary2 #図鑑への登録(撃破済み判定)
    wd_orig_process_victory002
  end
end

class Game_Interpreter
  #--------------------------------------------------------------------------
  # ● 敵キャラの出現
  #--------------------------------------------------------------------------
  alias wd_orig_command_335_002 command_335
  def command_335
    wd_orig_command_335_002
    $game_troop.dictionary1 #図鑑への登録(遭遇済み判定)
  end
end

class Game_Enemy < Game_Battler
  include WD_monsterdictionary
  #--------------------------------------------------------------------------
  # ● ドロップアイテムの配列作成(再定義)
  #--------------------------------------------------------------------------
  def make_drop_items
    n = -1
    enemy.drop_items.inject([]) do |r, di|
      n += 1
      if di.kind > 0 && rand * di.denominator < drop_item_rate
        m_dictionary_drop_switch_on(@enemy_id, n)
        r.push(item_object(di.kind, di.data_id))
      else
        r
      end
    end
  end
end

#==============================================================================
# ■ Scene_MonsterDictionary
#------------------------------------------------------------------------------
#  魔物図鑑画面の処理を行うクラスです。
#==============================================================================

class Scene_MonsterDictionary < Scene_ItemBase
  #--------------------------------------------------------------------------
  # ● 開始処理
  #--------------------------------------------------------------------------
  def start
    super
     
    create_status_window
    create_item_window
    create_perfection_window
  end
  #--------------------------------------------------------------------------
  # ● アイテムウィンドウの作成
  #--------------------------------------------------------------------------
  def create_item_window
    wy = 0
    wh = Graphics.height - 48
    @item_window = Window_MonsterDictionaryList.new(Graphics.width-172-48, wy, 172+48, wh)
    @item_window.viewport = @viewport
    @item_window.status_window = @status_window
    @item_window.set_handler(:cancel, method(:return_scene))
    @item_window.update_help
  end
  
  def return_scene
    $game_map.autoplay
    SceneManager.return
  end
  
  #--------------------------------------------------------------------------
  # ● アイテムステータスウィンドウの作成
  #--------------------------------------------------------------------------
  def create_status_window
    wy = 0
    wh = Graphics.height
    @status_window = Window_MonsterDictionaryStatus.new(0, wy, Graphics.width-172-48, wh)
    @status_window.viewport = @viewport
  end
  #--------------------------------------------------------------------------
  # ● 図鑑完成度ウィンドウの作成
  #--------------------------------------------------------------------------
  def create_perfection_window
    wy = @item_window.y + @item_window.height
    wh = 48
    @perfection_window = Window_MonsterDictionaryPerfection.new(Graphics.width-172-48, wy, 172+48, wh)
    @perfection_window.viewport = @viewport
  end
end


#==============================================================================
# ■ Window_MonsterDictionaryList
#------------------------------------------------------------------------------
#  魔物図鑑画面で、魔物の一覧を表示するウィンドウです。
#==============================================================================

class Window_MonsterDictionaryList < Window_Selectable
  include WD_monsterdictionary
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize(x, y, width, height)
    super
    @data = []
    refresh
    activate
    select(0)
  end
  #--------------------------------------------------------------------------
  # ● 桁数の取得
  #--------------------------------------------------------------------------
  def col_max
    return 1
  end
  #--------------------------------------------------------------------------
  # ● 項目数の取得
  #--------------------------------------------------------------------------
  def item_max
    @data ? @data.size : 1
  end
  #--------------------------------------------------------------------------
  # ● アイテムの取得
  #--------------------------------------------------------------------------
  def enemy
    @data && index >= 0 ? @data[index] : nil
  end
  #--------------------------------------------------------------------------
  # ● アイテムリストの作成
  #--------------------------------------------------------------------------
  def make_item_list
    @data = []
    $data_enemies.each do |enemy|
      if print_dictionary?(enemy)
        @data.push(enemy)
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● 項目の描画
  #--------------------------------------------------------------------------
  def draw_item(index)
    enemy = @data[index]
    if enemy
      rect = item_rect(index)
      rect.width -= 4
      if m_dictionary_encount_switch_on?(enemy.id)
        change_color(normal_color, true)
        draw_text(rect.x, rect.y, 172, line_height, enemy.name)
      else
        change_color(normal_color, false)
        draw_text(rect.x, rect.y, 172, line_height, "无数据")
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● ヘルプウィンドウ更新メソッドの呼び出し
  #--------------------------------------------------------------------------
  def call_update_help
    update_help if active
  end
  #--------------------------------------------------------------------------
  # ● ヘルプテキスト更新
  #--------------------------------------------------------------------------
  def update_help
    if @status_window
      if m_dictionary_encount_switch_on?(enemy.id)
        @status_window.set_item(enemy, @index, true)
      else
        @status_window.set_item(enemy, @index, false)
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    make_item_list
    create_contents
    draw_all_items
  end
  #--------------------------------------------------------------------------
  # ● ステータスウィンドウの設定
  #--------------------------------------------------------------------------
  def status_window=(status_window)
    @status_window = status_window
  end
end

#==============================================================================
# ■ Window_MonsterDictionaryPerfection
#------------------------------------------------------------------------------
#  魔物図鑑画面で、図鑑の完成度を表示するウィンドウです。
#==============================================================================

class Window_MonsterDictionaryPerfection < Window_Selectable
  include WD_monsterdictionary
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize(x, y, width, height)
    super
    refresh(width)
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh(width)
    contents.clear
    draw_text(0, 0, width-24, line_height, "图鉴完成度: #{monster_dictionary_perfection} %", 1)
  end
end


#==============================================================================
# ■ Window_MonsterDictionaryStatus
#------------------------------------------------------------------------------
#  魔物図鑑画面で、エネミーの詳細を表示するウィンドウです。
#==============================================================================

class Window_MonsterDictionaryStatus < Window_Selectable
  include WD_monsterdictionary
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize(x, y, width, height)
    super
    @enemy = nil
    refresh
  end
  #--------------------------------------------------------------------------
  # ● アイテムの設定
  #--------------------------------------------------------------------------
  def set_item(enemy, index=-1, print=false)
    return if ((@enemy == enemy) and (@index == index))
    @enemy = enemy
    @index = index
    @print = print
    refresh
  end
  #--------------------------------------------------------------------------
  # ● アイテムオブジェクトの取得,掉落物取得
  #--------------------------------------------------------------------------
  def item_object(kind, data_id)
    return $data_items  [data_id] if kind == 1
    return $data_weapons[data_id] if kind == 2
    return $data_armors [data_id] if kind == 3
    return nil
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    contents.clear
    contents.font.size = 24

    if @print

      if WD_monsterdictionary_layout::M_id_display
        text1  = sprintf("%0#{WD_monsterdictionary_layout::M_id_display_digit}d",@index+1)
        x      = WD_monsterdictionary_layout::M_id_display_x
        y      = WD_monsterdictionary_layout::M_id_display_y
        width  = WD_monsterdictionary_layout::M_id_display_width
        height = line_height
        draw_text(x, y, width, height, text1, 0)
      end
      if WD_monsterdictionary_layout::M_name_display
        text1  = @enemy.name
        x      = WD_monsterdictionary_layout::M_name_display_x
        y      = WD_monsterdictionary_layout::M_name_display_y
        width  = WD_monsterdictionary_layout::M_name_display_width
        height = line_height
        draw_text(x, y, width, height, text1, 0)
      end
      if WD_monsterdictionary_layout::M_pic_display
        pic_name = @enemy.battler_name
        pic_hue  = @enemy.battler_hue
        x      = WD_monsterdictionary_layout::M_pic_display_x
        y      = WD_monsterdictionary_layout::M_pic_display_y
        opacity= WD_monsterdictionary_layout::M_pic_display_opacity
        bitmap = Cache.battler(pic_name, pic_hue)
        rect = Rect.new(0, 0, bitmap.width, bitmap.height)
        contents.blt(x - rect.width/2, y - rect.height, bitmap, rect, opacity)
      end

      font_size = WD_monsterdictionary_layout::C_font_size
      contents.font.size = font_size
      if WD_monsterdictionary_layout::M_mhp_display
        text1  = Vocab::param(0)
        text2  = "?"
        text2  = @enemy.params[0] if m_dictionary_victory_switch_on?(@enemy.id)
        x      = WD_monsterdictionary_layout::M_mhp_display_x
        y      = WD_monsterdictionary_layout::M_mhp_display_y
        width  = WD_monsterdictionary_layout::M_mhp_display_width
        change_color(system_color)
        draw_text(x, y, width, font_size, text1, 0)
        change_color(normal_color)
        draw_text(x, y, width, font_size, text2, 2)
      end
      if WD_monsterdictionary_layout::M_mmp_display
        text1  = Vocab::param(1)
        text2  = "?"
        text2  = @enemy.params[1] if m_dictionary_victory_switch_on?(@enemy.id)
        x      = WD_monsterdictionary_layout::M_mmp_display_x
        y      = WD_monsterdictionary_layout::M_mmp_display_y
        width  = WD_monsterdictionary_layout::M_mmp_display_width
        change_color(system_color)
        draw_text(x, y, width, font_size, text1, 0)
        change_color(normal_color)
        draw_text(x, y, width, font_size, text2, 2)
      end
      if WD_monsterdictionary_layout::M_atk_display
        text1  = Vocab::param(2)
        text2  = "?"
        text2  = @enemy.params[2] if m_dictionary_victory_switch_on?(@enemy.id)
        x      = WD_monsterdictionary_layout::M_atk_display_x
        y      = WD_monsterdictionary_layout::M_atk_display_y
        width  = WD_monsterdictionary_layout::M_atk_display_width
        change_color(system_color)
        draw_text(x, y, width, font_size, text1, 0)
        change_color(normal_color)
        draw_text(x, y, width, font_size, text2, 2)
      end
      if WD_monsterdictionary_layout::M_def_display
        text1  = Vocab::param(3)
        text2  = "?"
        text2  = @enemy.params[3] if m_dictionary_victory_switch_on?(@enemy.id)
        x      = WD_monsterdictionary_layout::M_def_display_x
        y      = WD_monsterdictionary_layout::M_def_display_y
        width  = WD_monsterdictionary_layout::M_def_display_width
        change_color(system_color)
        draw_text(x, y, width, font_size, text1, 0)
        change_color(normal_color)
        draw_text(x, y, width, font_size, text2, 2)
      end
      if WD_monsterdictionary_layout::M_mat_display
        text1  = Vocab::param(4)
        text2  = "?"
        text2  = @enemy.params[4] if m_dictionary_victory_switch_on?(@enemy.id)
        x      = WD_monsterdictionary_layout::M_mat_display_x
        y      = WD_monsterdictionary_layout::M_mat_display_y
        width  = WD_monsterdictionary_layout::M_mat_display_width
        change_color(system_color)
        draw_text(x, y, width, font_size, text1, 0)
        change_color(normal_color)
        draw_text(x, y, width, font_size, text2, 2)
      end
      if WD_monsterdictionary_layout::M_mdf_display
        text1  = Vocab::param(5)
        text2  = "?"
        text2  = @enemy.params[5] if m_dictionary_victory_switch_on?(@enemy.id)
        x      = WD_monsterdictionary_layout::M_mdf_display_x
        y      = WD_monsterdictionary_layout::M_mdf_display_y
        width  = WD_monsterdictionary_layout::M_mdf_display_width
        change_color(system_color)
        draw_text(x, y, width, font_size, text1, 0)
        change_color(normal_color)
        draw_text(x, y, width, font_size, text2, 2)
      end
      if WD_monsterdictionary_layout::M_agi_display
        text1  = Vocab::param(6)
        text2  = "?"
        text2  = @enemy.params[6] if m_dictionary_victory_switch_on?(@enemy.id)
        x      = WD_monsterdictionary_layout::M_agi_display_x
        y      = WD_monsterdictionary_layout::M_agi_display_y
        width  = WD_monsterdictionary_layout::M_agi_display_width
        change_color(system_color)
        draw_text(x, y, width, font_size, text1, 0)
        change_color(normal_color)
        draw_text(x, y, width, font_size, text2, 2)
      end
      if WD_monsterdictionary_layout::M_luk_display
        text1  = Vocab::param(7)
        text2  = "?"
        text2  = @enemy.params[7] if m_dictionary_victory_switch_on?(@enemy.id)
        x      = WD_monsterdictionary_layout::M_luk_display_x
        y      = WD_monsterdictionary_layout::M_luk_display_y
        width  = WD_monsterdictionary_layout::M_luk_display_width
        change_color(system_color)
        draw_text(x, y, width, font_size, text1, 0)
        change_color(normal_color)
        draw_text(x, y, width, font_size, text2, 2)
      end
      if WD_monsterdictionary_layout::M_feature_display
        text1  = WD_monsterdictionary_layout::M_feature_display_text1
        text2  = "?"
        text2  = WD_monsterdictionary_layout::M_feature_display_text2 if m_dictionary_victory_switch_on?(@enemy.id)
        x      = WD_monsterdictionary_layout::M_feature_display_x
        y      = WD_monsterdictionary_layout::M_feature_display_y
        width  = WD_monsterdictionary_layout::M_feature_display_width
        change_color(system_color)
        draw_text(x, y, width, font_size, text1, 0)
        change_color(normal_color)
        i = 0
        if m_dictionary_victory_switch_on?(@enemy.id)
          @enemy.note.scan(/<图鉴功能:(.*)>/){|matched|
            i += 1
            self.contents.draw_text(x + font_size, y + font_size * i, width - font_size, font_size, matched[0], 0)
          }
        end
        if i == 0
          self.contents.draw_text(x + font_size, y + font_size, width - font_size, font_size, text2, 0)
        end
      end
      if WD_monsterdictionary_layout::M_exp_display
        text1  = WD_monsterdictionary_layout::M_exp_display_text1
        text2  = "?"
        text2  = @enemy.exp if m_dictionary_victory_switch_on?(@enemy.id)
        x      = WD_monsterdictionary_layout::M_exp_display_x
        y      = WD_monsterdictionary_layout::M_exp_display_y
        width  = WD_monsterdictionary_layout::M_exp_display_width
        change_color(system_color)
        draw_text(x, y, width, font_size, text1, 0)
        change_color(normal_color)
        draw_text(x, y, width, font_size, text2, 2)
      end
      if WD_monsterdictionary_layout::M_gold_display
        text1  = WD_monsterdictionary_layout::M_gold_display_text1
        text2  = "?"
        text2  = @enemy.gold if m_dictionary_victory_switch_on?(@enemy.id)
        text3  = Vocab::currency_unit
        x      = WD_monsterdictionary_layout::M_gold_display_x
        y      = WD_monsterdictionary_layout::M_gold_display_y
        width  = WD_monsterdictionary_layout::M_gold_display_width
        change_color(system_color)
        draw_text(x, y, width, font_size, text1, 0)
        cx = text_size(Vocab::currency_unit).width
        change_color(normal_color)
        draw_text(x, y, width - cx - 2, font_size, text2, 2)
        change_color(system_color)
        draw_text(x, y, width, font_size, text3, 2)
        change_color(normal_color)
      end
      if WD_monsterdictionary_layout::M_drop_display
        text1  = WD_monsterdictionary_layout::M_drop_display_text1
        text2  = WD_monsterdictionary_layout::M_drop_display_text2 if m_dictionary_victory_switch_on?(@enemy.id)
        x      = WD_monsterdictionary_layout::M_drop_display_x
        y      = WD_monsterdictionary_layout::M_drop_display_y
        width  = WD_monsterdictionary_layout::M_drop_display_width
        change_color(system_color)
        draw_text(x, y, width, font_size, text1, 0)
        change_color(normal_color)
        i = 0
        @enemy.drop_items.each do |di|
          if di.kind > 0
            i += 1
            item = item_object(di.kind, di.data_id)
            n = i -1
            if m_dictionary_drop_switch_on?(@enemy.id, n)
              text2 = item.name
              text3 = "1/#{di.denominator}"
            else
              text2  = "无数据"
              text3  = ""
            end
            self.contents.draw_text(x + font_size, y + font_size * i, width - font_size, font_size, text2, 0)
            self.contents.draw_text(x + font_size, y + font_size * i, width - font_size, font_size, text3, 2)
          end
        end
        if i == 0
          self.contents.draw_text(x + font_size, y + font_size, width - font_size, font_size, text2, 0)
        end
      end
      if WD_monsterdictionary_layout::M_help_display
        text1  = WD_monsterdictionary_layout::M_help_display_text1
        text2  = "?"
        text2  = WD_monsterdictionary_layout::M_help_display_text2 if m_dictionary_victory_switch_on?(@enemy.id)
        x      = WD_monsterdictionary_layout::M_help_display_x
        y      = WD_monsterdictionary_layout::M_help_display_y
        width  = WD_monsterdictionary_layout::M_help_display_width
        change_color(system_color)
        draw_text(x, y, width, font_size, text1, 0)
        change_color(normal_color)
        i = 0
        if m_dictionary_victory_switch_on?(@enemy.id)
          @enemy.note.scan(/<图鉴说明:(.*)>/){|matched|
            i += 1
            self.contents.draw_text(x + font_size, y + font_size * i, width - font_size, font_size, matched[0], 0)
          }
        end
        if i == 0
          self.contents.draw_text(x + font_size, y + font_size, width - font_size, font_size, text2, 0)
        end
      end
      if WD_monsterdictionary_layout::M_geno_display
        text1  = WD_monsterdictionary_layout::M_geno_display_text1
        text2  = "#{m_dictionary_genoside_number(@enemy.id)}"
        x      = WD_monsterdictionary_layout::M_geno_display_x
        y      = WD_monsterdictionary_layout::M_geno_display_y
        width  = WD_monsterdictionary_layout::M_geno_display_width
        change_color(system_color)
        draw_text(x, y, width, font_size, text1, 0)
        change_color(normal_color)
        draw_text(x, y, width, font_size, text2, 2)
      end

    elsif @enemy != nil

      if WD_monsterdictionary_layout::M_id_display
        text1  = sprintf("%0#{WD_monsterdictionary_layout::M_id_display_digit}d",@index+1)
        x      = WD_monsterdictionary_layout::M_id_display_x
        y      = WD_monsterdictionary_layout::M_id_display_y
        width  = WD_monsterdictionary_layout::M_id_display_width
        height = line_height
        draw_text(x, y, width, height, text1, 0)
      end
      if WD_monsterdictionary_layout::M_name_display
        text1  = "- ???? -"
        x      = WD_monsterdictionary_layout::M_name_display_x
        y      = WD_monsterdictionary_layout::M_name_display_y
        width  = WD_monsterdictionary_layout::M_name_display_width
        height = line_height
        draw_text(x, y, width, height, text1, 0)
      end

    end
  end
end
[/pre]



[pre lang="ruby"]#==============================================================================
#  菜单画面
#==============================================================================
class Scene_Menu < Scene_MenuBase
  #--------------------------------------------------------------------------
  # alias 给 create_command_window 方法取个别名 尽量命名独特不容易重名
  #--------------------------------------------------------------------------
  alias miao_20150812_create_1 create_command_window
  #--------------------------------------------------------------------------
  # ● 生成指令窗口
  #--------------------------------------------------------------------------
  def create_command_window
    miao_20150812_create_1
    @command_window.set_handler(:neko_commands1,    method(:command_neko1))
  end
  #--------------------------------------------------------------------------
  # ● 按钮所执行的内容方法名与上面的 method() 里的符号对应
  #--------------------------------------------------------------------------
  def command_neko1
    #通常指令内容是呼出场景
    SceneManager.call(Scene_MonsterDictionary)
    #但是按钮按下去的效果不一定局限于切换场景
  end
end
#==============================================================================
#  菜单画面中显示指令的窗口
#==============================================================================
class Window_MenuCommand < Window_Command
  alias miao_20150812_aoc add_original_commands
  #--------------------------------------------------------------------------
  # ● 独自添加指令用
  #--------------------------------------------------------------------------
  def add_original_commands
    miao_20150812_aoc
    add_command("怪物图鉴", :neko_commands1, main_commands_enabled)#添加按钮
=begin
    add_command()里的3个参数依次为:
                  ● name:选项的名称,在描绘选项时使用
                  ● symbol:选项的符号,这是一个标志与上面set_handler里对应
                  ● enabled:有效状态,当值为 false 时选项无效且用半透明绘制
=end
  end
end[/pre]








梦石
0
星屑
50
在线时间
30 小时
注册时间
2015-5-6
回帖
23
发表于 2015-10-17 19:02:38 | 显示全部楼层
说起来我也特别想要一个怪物图鉴啊,识别率什么的根本无所谓,这种繁琐的东西……
我只想要可以写怪物介绍说明的,可以显示怪物技能的……
回复

使用道具 举报

梦石
0
星屑
9292
在线时间
2504 小时
注册时间
2011-5-20
回帖
14521

开拓者

发表于 2015-10-17 19:56:20 | 显示全部楼层
  1. M_drop_display          = true
复制代码
你把这些的true改成false就好了

点评

如一个怪物掉3件装备,但是被你打死了只掉了一件装备,那么图鉴只显示掉落物是某件装备,如果没掉, 那么都不显示掉落物,  发表于 2015-10-18 10:56
如一个怪物掉3件装备,但是被你打死了只掉了一件装备,那么图鉴只显示掉落物是某件装备,如果没掉, 那么都不显示掉落物,  发表于 2015-10-18 10:56
开了自然显示啦,但是要显示的前提如上所说,这个怪物必须掉落过某件物品然后才能显示出来,例.  发表于 2015-10-18 10:55
你开着也没显示?  发表于 2015-10-18 08:20
兄弟,这个开关本来开着的,你关掉了,连原本怪物掉落的物品显示都关掉了,更加不行啦!!!哈哈  发表于 2015-10-18 02:58
[img]http://service.t.sina.com.cn/widget/qmd/5339802982/c02e16bd/7.png
回复

使用道具 举报

梦石
0
星屑
50
在线时间
30 小时
注册时间
2015-5-6
回帖
23
发表于 2015-10-17 21:16:37 | 显示全部楼层
chd114 发表于 2015-10-17 19:56
你把这些的true改成false就好了

有没有能在备注里写怪物描述的图鉴?
一般RPG图鉴都有怪物说明,我觉得最重要的就是这个了。

点评

这个脚本除了我说的那个毛病又不算毛病的毛病外, 怪物的特性,说明都可以自己增加的, 完全可以满足你的要求  发表于 2015-10-18 03:01
有好几个····  发表于 2015-10-18 00:01
回复

使用道具 举报

梦石
1
星屑
22083
在线时间
4885 小时
注册时间
2014-12-22
回帖
1509

开拓者

发表于 2015-10-18 05:36:45 | 显示全部楼层
关于敌人击破数,我用的ver 1.01并没有这个问题,不确定是否是版本的bug总之建议使用最新版本~

点评

能发出来吗,白の魔网站进不去,不知道是不是不能翻墙还是网站没了  发表于 2015-10-18 10:58
回复

使用道具 举报

梦石
0
星屑
9292
在线时间
2504 小时
注册时间
2011-5-20
回帖
14521

开拓者

发表于 2015-10-18 08:21:45 | 显示全部楼层
  1. if WD_monsterdictionary_layout::M_drop_display
  2.         text1  = WD_monsterdictionary_layout::M_drop_display_text1
  3.         text2  = WD_monsterdictionary_layout::M_drop_display_text2 if m_dictionary_victory_switch_on?(@enemy.id)
  4.         x      = WD_monsterdictionary_layout::M_drop_display_x
  5.         y      = WD_monsterdictionary_layout::M_drop_display_y
  6.         width  = WD_monsterdictionary_layout::M_drop_display_width
  7.         change_color(system_color)
  8.         draw_text(x, y, width, font_size, text1, 0)
  9.         change_color(normal_color)
  10.         i = 0
  11.         @enemy.drop_items.each do |di|
  12.           if di.kind > 0
  13.             i += 1
  14.             item = item_object(di.kind, di.data_id)
  15.             n = i -1
  16.             if m_dictionary_drop_switch_on?(@enemy.id, n)
  17.               text2 = item.name
  18.               text3 = "1/#{di.denominator}"
  19.             else
  20.               text2  = "无数据"
  21.               text3  = ""
  22.             end
  23.             self.contents.draw_text(x + font_size, y + font_size * i, width - font_size, font_size, text2, 0)
  24.             self.contents.draw_text(x + font_size, y + font_size * i, width - font_size, font_size, text3, 2)
  25.           end
  26.         end
  27.         if i == 0
  28.           self.contents.draw_text(x + font_size, y + font_size, width - font_size, font_size, text2, 0)
  29.         end
  30.       end
复制代码
这里就3个开关控制···先去掉if m_dictionary_drop_switch_on?(@enemy.id, n)
不然就是
if m_dictionary_victory_switch_on?(@enemy.id)
[img]http://service.t.sina.com.cn/widget/qmd/5339802982/c02e16bd/7.png
回复

使用道具 举报

梦石
1
星屑
22083
在线时间
4885 小时
注册时间
2014-12-22
回帖
1509

开拓者

发表于 2015-10-18 18:40:28 | 显示全部楼层
是要翻墙。其实随便找个在线/网页代理就好了说~


设定:

  1. #==============================================================================

  2. # ■ RGSS3 魔物図鑑 ver 1.01 初期設定

  3. #------------------------------------------------------------------------------

  4. #  配布元:

  5. #     白の魔 http://izumiwhite.web.fc2.com/

  6. #

  7. #  利用規約:

  8. #     RPGツクールVX Aceの正規の登録者のみご利用になれます。

  9. #     利用報告・著作権表示とかは必要ありません。

  10. #     改造もご自由にどうぞ。

  11. #     何か問題が発生しても責任は持ちません。

  12. #==============================================================================




  13. #-------------------------------------------------------------------------------

  14. # ★ 初期設定。

  15. #-------------------------------------------------------------------------------

  16. module WD_monsterdictionary_layout




  17. #=== 各項目のレイアウト設定項目 ================================================

  18. #

  19. #   *_***_display       : trueで表示。falseで非表示。

  20. #   *_***_display_x     : 表示位置のx座標

  21. #   *_***_display_y     : 表示位置のy座標

  22. #   *_***_display_width : 表示テキストの幅

  23. #   *_***_display_text* : 表示テキスト

  24. #

  25. #===============================================================================




  26. #===全図鑑共通設定==============================================================




  27.   #図鑑完成度にどの段階で繁栄するか

  28.   Perfection_timing = 1 #1⇒遭遇時、2⇒撃破時




  29.   #フォントサイズ

  30.   C_font_size = 18




  31. #===魔物図鑑設定================================================================




  32.   #番号の表示

  33.   M_id_display            = true

  34.   M_id_display_x          = 0

  35.   M_id_display_y          = 0

  36.   M_id_display_width      = 60

  37.   M_id_display_digit      = 3 #桁数

  38.   

  39.   #名前の表示

  40.   M_name_display          = true

  41.   M_name_display_x        = 84

  42.   M_name_display_y        = 0

  43.   M_name_display_width    = 172




  44.   #画像の表示

  45.   M_pic_display           = true

  46.   M_pic_display_x         = 140

  47.   M_pic_display_y         = 380

  48.   M_pic_display_opacity   = 255 #画像の不透明度




  49.   #最大HPの表示

  50.   M_mhp_display           = true

  51.   M_mhp_display_x         = 0

  52.   M_mhp_display_y         = 33

  53.   M_mhp_display_width     = 136




  54.   #最大MPの表示

  55.   M_mmp_display           = true

  56.   M_mmp_display_x         = 150

  57.   M_mmp_display_y         = 33

  58.   M_mmp_display_width     = 136




  59.   #攻撃力の表示

  60.   M_atk_display           = true

  61.   M_atk_display_x         = 0

  62.   M_atk_display_y         = 51

  63.   M_atk_display_width     = 136




  64.   #防御力の表示

  65.   M_def_display           = true

  66.   M_def_display_x         = 150

  67.   M_def_display_y         = 51

  68.   M_def_display_width     = 136




  69.   #魔法力の表示

  70.   M_mat_display           = true

  71.   M_mat_display_x         = 0

  72.   M_mat_display_y         = 69

  73.   M_mat_display_width     = 136




  74.   #魔法防御の表示

  75.   M_mdf_display           = true

  76.   M_mdf_display_x         = 150

  77.   M_mdf_display_y         = 69

  78.   M_mdf_display_width     = 136




  79.   #敏捷性の表示

  80.   M_agi_display           = true

  81.   M_agi_display_x         = 0

  82.   M_agi_display_y         = 87

  83.   M_agi_display_width     = 136




  84.   #運の表示

  85.   M_luk_display           = true

  86.   M_luk_display_x         = 150

  87.   M_luk_display_y         = 87

  88.   M_luk_display_width     = 136




  89.   #特徴の表示

  90.   M_feature_display       = true

  91.   M_feature_display_x     = 0

  92.   M_feature_display_y     = 114

  93.   M_feature_display_width = 286

  94.   M_feature_display_text1 = "特徴"

  95.   M_feature_display_text2 = "-"




  96.   #経験値の表示

  97.   M_exp_display           = true

  98.   M_exp_display_x         = 0

  99.   M_exp_display_y         = 213

  100.   M_exp_display_width     = 136

  101.   M_exp_display_text1     = "経験値"




  102.   #お金の表示

  103.   M_gold_display          = true

  104.   M_gold_display_x        = 150

  105.   M_gold_display_y        = 213

  106.   M_gold_display_width    = 136

  107.   M_gold_display_text1    = "お金"




  108.   #ドロップアイテムの表示

  109.   M_drop_display          = true

  110.   M_drop_display_x        = 0

  111.   M_drop_display_y        = 240

  112.   M_drop_display_width    = 286

  113.   M_drop_display_text1    = "ドロップアイテム"

  114.   M_drop_display_text2    = "なし"




  115.   #説明の表示

  116.   M_help_display          = true

  117.   M_help_display_x        = 0

  118.   M_help_display_y        = 321

  119.   M_help_display_width    = 286

  120.   M_help_display_text1    = "説明"

  121.   M_help_display_text2    = "-"




  122.   #撃破数の表示

  123.   M_geno_display          = false

  124.   M_geno_display_x        = 0

  125.   M_geno_display_y        = 321

  126.   M_geno_display_width    = 136

  127.   M_geno_display_text1    = "撃破数"




  128. end

  129. #-------------------------------------------------------------------------------

  130. # ★ 初期設定おわり

  131. #-------------------------------------------------------------------------------
复制代码
本体:

  1. #==============================================================================

  2. # ■ RGSS3 魔物図鑑 ver 1.01 本体プログラム

  3. #------------------------------------------------------------------------------

  4. #  配布元:

  5. #     白の魔 http://izumiwhite.web.fc2.com/

  6. #

  7. #  利用規約:

  8. #     RPGツクールVX Aceの正規の登録者のみご利用になれます。

  9. #     利用報告・著作権表示とかは必要ありません。

  10. #     改造もご自由にどうぞ。

  11. #     何か問題が発生しても責任は持ちません。

  12. #==============================================================================




  13. #==============================================================================

  14. # ■ WD_monsterdictionary

  15. #------------------------------------------------------------------------------

  16. #  魔物図鑑用の共通メソッドです。

  17. #==============================================================================




  18. module WD_monsterdictionary

  19.   def m_dictionary_encount_switch_on(id)

  20.     $game_system.m_dic_encount_sw = [] if $game_system.m_dic_encount_sw == nil

  21.     $game_system.m_dic_encount_sw[id] = false if $game_system.m_dic_encount_sw[id] == nil

  22.     $game_system.m_dic_encount_sw[id] = true

  23.   end

  24.   def m_dictionary_encount_switch_off(id)

  25.     $game_system.m_dic_encount_sw = [] if $game_system.m_dic_encount_sw == nil

  26.     $game_system.m_dic_encount_sw[id] = false if $game_system.m_dic_encount_sw[id] == nil

  27.     $game_system.m_dic_encount_sw[id] = false

  28.   end

  29.   def m_dictionary_encount_switch_on?(id)

  30.     $game_system.m_dic_encount_sw = [] if $game_system.m_dic_encount_sw == nil

  31.     $game_system.m_dic_encount_sw[id] = false if $game_system.m_dic_encount_sw[id] == nil

  32.     return $game_system.m_dic_encount_sw[id]

  33.   end

  34.   def m_dictionary_victory_switch_on(id)

  35.     $game_system.m_dic_victory_sw = [] if $game_system.m_dic_victory_sw == nil

  36.     $game_system.m_dic_victory_sw[id] = false if $game_system.m_dic_victory_sw[id] == nil

  37.     $game_system.m_dic_victory_sw[id] = true

  38.   end

  39.   def m_dictionary_victory_switch_off(id)

  40.     $game_system.m_dic_victory_sw = [] if $game_system.m_dic_victory_sw == nil

  41.     $game_system.m_dic_victory_sw[id] = false if $game_system.m_dic_victory_sw[id] == nil

  42.     $game_system.m_dic_victory_sw[id] = false

  43.   end

  44.   def m_dictionary_victory_switch_on?(id)

  45.     $game_system.m_dic_victory_sw = [] if $game_system.m_dic_victory_sw == nil

  46.     $game_system.m_dic_victory_sw[id] = false if $game_system.m_dic_victory_sw[id] == nil

  47.     return $game_system.m_dic_victory_sw[id]

  48.   end

  49.   def m_dictionary_drop_switch_on(id, n)

  50.     $game_system.m_dic_drop_sw = [] if $game_system.m_dic_drop_sw == nil

  51.     $game_system.m_dic_drop_sw[id] = [] if $game_system.m_dic_drop_sw[id] == nil

  52.     $game_system.m_dic_drop_sw[id][n] = false if $game_system.m_dic_drop_sw[id][n] == nil

  53.     $game_system.m_dic_drop_sw[id][n] = true

  54.   end

  55.   def m_dictionary_drop_switch_off(id, n)

  56.     $game_system.m_dic_drop_sw = [] if $game_system.m_dic_drop_sw == nil

  57.     $game_system.m_dic_drop_sw[id] = [] if $game_system.m_dic_drop_sw[id] == nil

  58.     $game_system.m_dic_drop_sw[id][n] = false if $game_system.m_dic_drop_sw[id][n] == nil

  59.     $game_system.m_dic_drop_sw[id][n] = false

  60.   end

  61.   def m_dictionary_drop_switch_on?(id, n)

  62.     $game_system.m_dic_drop_sw = [] if $game_system.m_dic_drop_sw == nil

  63.     $game_system.m_dic_drop_sw[id] = [] if $game_system.m_dic_drop_sw[id] == nil

  64.     $game_system.m_dic_drop_sw[id][n] = false if $game_system.m_dic_drop_sw[id][n] == nil

  65.     return $game_system.m_dic_drop_sw[id][n]

  66.   end

  67.   def m_dictionary_genoside_number_add(id, n)

  68.     $game_system.m_dic_genoside_num = [] if $game_system.m_dic_genoside_num == nil

  69.     $game_system.m_dic_genoside_num[id] = 0 if $game_system.m_dic_genoside_num[id] == nil

  70.     $game_system.m_dic_genoside_num[id] += n

  71.   end

  72.   def m_dictionary_genoside_number(id)

  73.     $game_system.m_dic_genoside_num = [] if $game_system.m_dic_genoside_num == nil

  74.     $game_system.m_dic_genoside_num[id] = 0 if $game_system.m_dic_genoside_num[id] == nil

  75.     return $game_system.m_dic_genoside_num[id]

  76.   end




  77.   def print_dictionary?(enemy)

  78.     if enemy != nil

  79.       if enemy.name.size > 0

  80.         hantei = /<図鑑無効>/ =~ enemy.note

  81.         if hantei == nil

  82.           return true

  83.         end

  84.       end

  85.     end

  86.     return false

  87.   end

  88.   def monster_dictionary_perfection

  89.     dic_max = 0

  90.     dic_num = 0

  91.     $data_enemies.each do |enemy|

  92.       if print_dictionary?(enemy)

  93.         dic_max += 1

  94.         if WD_monsterdictionary_layout::Perfection_timing == 1

  95.           if m_dictionary_encount_switch_on?(enemy.id) == true

  96.             dic_num += 1

  97.           end

  98.         elsif WD_monsterdictionary_layout::Perfection_timing == 2

  99.           if m_dictionary_victory_switch_on?(enemy.id) == true

  100.             dic_num += 1

  101.           end

  102.         end

  103.       end

  104.     end

  105.     return (100*dic_num)/dic_max

  106.   end

  107. end




  108. class Game_Interpreter

  109.   include WD_monsterdictionary

  110. end




  111. class Game_System

  112.   #--------------------------------------------------------------------------

  113.   # ● 公開インスタンス変数

  114.   #--------------------------------------------------------------------------

  115.   attr_accessor :m_dic_encount_sw

  116.   attr_accessor :m_dic_victory_sw

  117.   attr_accessor :m_dic_drop_sw

  118.   attr_accessor :m_dic_genoside_num

  119.   #--------------------------------------------------------------------------

  120.   # ● オブジェクト初期化

  121.   #--------------------------------------------------------------------------

  122.   alias wd_orig_initialize002 initialize

  123.   def initialize

  124.     wd_orig_initialize002

  125.     @m_dic_encount_sw = []

  126.     @m_dic_victory_sw = []

  127.     @m_dic_drop_sw = []

  128.     @m_dic_genoside_num = []

  129.   end

  130. end




  131. class Game_Troop < Game_Unit

  132.   include WD_monsterdictionary

  133.   #--------------------------------------------------------------------------

  134.   # ● 図鑑への登録(遭遇済み判定)

  135.   #--------------------------------------------------------------------------

  136.   def dictionary1

  137.     for enemy in members

  138.       m_dictionary_encount_switch_on(enemy.enemy_id) unless enemy.hidden? #遭遇済み図鑑登録

  139.     end

  140.   end

  141.   #--------------------------------------------------------------------------

  142.   # ● 図鑑への登録(撃破済み判定)

  143.   #--------------------------------------------------------------------------

  144.   def dictionary2

  145.     for enemy in dead_members

  146.       m_dictionary_victory_switch_on(enemy.enemy_id) unless enemy.hidden? #撃破済み図鑑登録

  147.       m_dictionary_genoside_number_add(enemy.enemy_id, 1) unless enemy.hidden? #撃破数カウント

  148.     end

  149.   end

  150. end




  151. class << BattleManager

  152.   #--------------------------------------------------------------------------

  153.   # ● 戦闘開始

  154.   #--------------------------------------------------------------------------

  155.   alias wd_orig_battle_start002 battle_start

  156.   def battle_start

  157.     wd_orig_battle_start002

  158.     $game_troop.dictionary1 #図鑑への登録(遭遇済み判定)

  159.   end

  160.   #--------------------------------------------------------------------------

  161.   # ● 勝利の処理

  162.   #--------------------------------------------------------------------------

  163.   alias wd_orig_process_victory002 process_victory

  164.   def process_victory

  165.     $game_troop.dictionary2 #図鑑への登録(撃破済み判定)

  166.     wd_orig_process_victory002

  167.   end

  168. end




  169. class Game_Interpreter

  170.   #--------------------------------------------------------------------------

  171.   # ● 敵キャラの出現

  172.   #--------------------------------------------------------------------------

  173.   alias wd_orig_command_335_002 command_335

  174.   def command_335

  175.     wd_orig_command_335_002

  176.     $game_troop.dictionary1 #図鑑への登録(遭遇済み判定)

  177.   end

  178.   #--------------------------------------------------------------------------

  179.   # ● 敵キャラの変身

  180.   #--------------------------------------------------------------------------

  181.   alias wd_orig_command_336_002 command_336

  182.   def command_336

  183.     wd_orig_command_336_002

  184.     $game_troop.dictionary1 #図鑑への登録(遭遇済み判定)

  185.   end

  186. end




  187. class Game_Enemy < Game_Battler

  188.   include WD_monsterdictionary

  189.   #--------------------------------------------------------------------------

  190.   # ● ドロップアイテムの配列作成(再定義)

  191.   #--------------------------------------------------------------------------

  192.   def make_drop_items

  193.     n = -1

  194.     enemy.drop_items.inject([]) do |r, di|

  195.       n += 1

  196.       if di.kind > 0 && rand * di.denominator < drop_item_rate

  197.         m_dictionary_drop_switch_on(@enemy_id, n)

  198.         r.push(item_object(di.kind, di.data_id))

  199.       else

  200.         r

  201.       end

  202.     end

  203.   end

  204. end




  205. #==============================================================================

  206. # ■ Scene_MonsterDictionary

  207. #------------------------------------------------------------------------------

  208. #  魔物図鑑画面の処理を行うクラスです。

  209. #==============================================================================




  210. class Scene_MonsterDictionary < Scene_ItemBase

  211.   #--------------------------------------------------------------------------

  212.   # ● 開始処理

  213.   #--------------------------------------------------------------------------

  214.   def start

  215.     super

  216.     create_status_window

  217.     create_item_window

  218.     create_perfection_window

  219.   end

  220.   #--------------------------------------------------------------------------

  221.   # ● アイテムウィンドウの作成

  222.   #--------------------------------------------------------------------------

  223.   def create_item_window

  224.     wy = 0

  225.     wh = Graphics.height- 48

  226.     @item_window = Window_MonsterDictionaryList.new(Graphics.width-172-48, wy, 172+48, wh)

  227.     @item_window.viewport = @viewport

  228.     @item_window.status_window = @status_window

  229.     @item_window.set_handler(:cancel, method(:return_scene))

  230.     @item_window.update_help

  231.   end

  232.   #--------------------------------------------------------------------------

  233.   # ● アイテムステータスウィンドウの作成

  234.   #--------------------------------------------------------------------------

  235.   def create_status_window

  236.     wy = 0

  237.     wh = Graphics.height

  238.     @status_window = Window_MonsterDictionaryStatus.new(0, wy, Graphics.width-172-48, wh)

  239.     @status_window.viewport = @viewport

  240.   end

  241.   #--------------------------------------------------------------------------

  242.   # ● 図鑑完成度ウィンドウの作成

  243.   #--------------------------------------------------------------------------

  244.   def create_perfection_window

  245.     wy = @item_window.y + @item_window.height

  246.     wh = 48

  247.     @perfection_window = Window_MonsterDictionaryPerfection.new(Graphics.width-172-48, wy, 172+48, wh)

  248.     @perfection_window.viewport = @viewport

  249.   end

  250. end







  251. #==============================================================================

  252. # ■ Window_MonsterDictionaryList

  253. #------------------------------------------------------------------------------

  254. #  魔物図鑑画面で、魔物の一覧を表示するウィンドウです。

  255. #==============================================================================




  256. class Window_MonsterDictionaryList < Window_Selectable

  257.   include WD_monsterdictionary

  258.   #--------------------------------------------------------------------------

  259.   # ● オブジェクト初期化

  260.   #--------------------------------------------------------------------------

  261.   def initialize(x, y, width, height)

  262.     super

  263.     @data = []

  264.     refresh

  265.     activate

  266.     select(0)

  267.   end

  268.   #--------------------------------------------------------------------------

  269.   # ● 桁数の取得

  270.   #--------------------------------------------------------------------------

  271.   def col_max

  272.     return 1

  273.   end

  274.   #--------------------------------------------------------------------------

  275.   # ● 項目数の取得

  276.   #--------------------------------------------------------------------------

  277.   def item_max

  278.     @data ? @data.size : 1

  279.   end

  280.   #--------------------------------------------------------------------------

  281.   # ● アイテムの取得

  282.   #--------------------------------------------------------------------------

  283.   def enemy

  284.     @data && index >= 0 ? @data[index] : nil

  285.   end

  286.   #--------------------------------------------------------------------------

  287.   # ● アイテムリストの作成

  288.   #--------------------------------------------------------------------------

  289.   def make_item_list

  290.     @data = []

  291.     $data_enemies.each do |enemy|

  292.       if print_dictionary?(enemy)

  293.         @data.push(enemy)

  294.       end

  295.     end

  296.   end

  297.   #--------------------------------------------------------------------------

  298.   # ● 項目の描画

  299.   #--------------------------------------------------------------------------

  300.   def draw_item(index)

  301.     enemy = @data[index]

  302.     if enemy

  303.       rect = item_rect(index)

  304.       rect.width -= 4

  305.       if m_dictionary_encount_switch_on?(enemy.id)

  306.         change_color(normal_color, true)

  307.         draw_text(rect.x, rect.y, 172, line_height, enemy.name)

  308.       else

  309.         change_color(normal_color, false)

  310.         draw_text(rect.x, rect.y, 172, line_height, "???????")

  311.       end

  312.     end

  313.   end

  314.   #--------------------------------------------------------------------------

  315.   # ● ヘルプウィンドウ更新メソッドの呼び出し

  316.   #--------------------------------------------------------------------------

  317.   def call_update_help

  318.     update_help if active

  319.   end

  320.   #--------------------------------------------------------------------------

  321.   # ● ヘルプテキスト更新

  322.   #--------------------------------------------------------------------------

  323.   def update_help

  324.     if @status_window

  325.       if m_dictionary_encount_switch_on?(enemy.id)

  326.         @status_window.set_item(enemy, @index, true)

  327.       else

  328.         @status_window.set_item(enemy, @index, false)

  329.       end

  330.     end

  331.   end

  332.   #--------------------------------------------------------------------------

  333.   # ● リフレッシュ

  334.   #--------------------------------------------------------------------------

  335.   def refresh

  336.     make_item_list

  337.     create_contents

  338.     draw_all_items

  339.   end

  340.   #--------------------------------------------------------------------------

  341.   # ● ステータスウィンドウの設定

  342.   #--------------------------------------------------------------------------

  343.   def status_window=(status_window)

  344.     @status_window = status_window

  345.   end

  346. end




  347. #==============================================================================

  348. # ■ Window_MonsterDictionaryPerfection

  349. #------------------------------------------------------------------------------

  350. #  魔物図鑑画面で、図鑑の完成度を表示するウィンドウです。

  351. #==============================================================================




  352. class Window_MonsterDictionaryPerfection < Window_Selectable

  353.   include WD_monsterdictionary

  354.   #--------------------------------------------------------------------------

  355.   # ● オブジェクト初期化

  356.   #--------------------------------------------------------------------------

  357.   def initialize(x, y, width, height)

  358.     super

  359.     refresh(width)

  360.   end

  361.   #--------------------------------------------------------------------------

  362.   # ● リフレッシュ

  363.   #--------------------------------------------------------------------------

  364.   def refresh(width)

  365.     contents.clear

  366.     draw_text(0, 0, width-24, line_height, "図鑑完成度: #{monster_dictionary_perfection} %", 1)

  367.   end

  368. end







  369. #==============================================================================

  370. # ■ Window_MonsterDictionaryStatus

  371. #------------------------------------------------------------------------------

  372. #  魔物図鑑画面で、エネミーの詳細を表示するウィンドウです。

  373. #==============================================================================




  374. class Window_MonsterDictionaryStatus < Window_Selectable

  375.   include WD_monsterdictionary

  376.   #--------------------------------------------------------------------------

  377.   # ● オブジェクト初期化

  378.   #--------------------------------------------------------------------------

  379.   def initialize(x, y, width, height)

  380.     super

  381.     @enemy = nil

  382.     refresh

  383.   end

  384.   #--------------------------------------------------------------------------

  385.   # ● アイテムの設定

  386.   #--------------------------------------------------------------------------

  387.   def set_item(enemy, index=-1, print=false)

  388.     return if ((@enemy == enemy) and (@index == index))

  389.     @enemy = enemy

  390.     @index = index

  391.     @print = print

  392.     refresh

  393.   end

  394.   #--------------------------------------------------------------------------

  395.   # ● アイテムオブジェクトの取得

  396.   #--------------------------------------------------------------------------

  397.   def item_object(kind, data_id)

  398.     return $data_items  [data_id] if kind == 1

  399.     return $data_weapons[data_id] if kind == 2

  400.     return $data_armors [data_id] if kind == 3

  401.     return nil

  402.   end

  403.   #--------------------------------------------------------------------------

  404.   # ● リフレッシュ

  405.   #--------------------------------------------------------------------------

  406.   def refresh

  407.     contents.clear

  408.     contents.font.size = 24




  409.     if @print




  410.       if WD_monsterdictionary_layout::M_id_display

  411.         text1  = sprintf("%0#{WD_monsterdictionary_layout::M_id_display_digit}d",@index+1)

  412.         x      = WD_monsterdictionary_layout::M_id_display_x

  413.         y      = WD_monsterdictionary_layout::M_id_display_y

  414.         width  = WD_monsterdictionary_layout::M_id_display_width

  415.         height = line_height

  416.         draw_text(x, y, width, height, text1, 0)

  417.       end

  418.       if WD_monsterdictionary_layout::M_name_display

  419.         text1  = @enemy.name

  420.         x      = WD_monsterdictionary_layout::M_name_display_x

  421.         y      = WD_monsterdictionary_layout::M_name_display_y

  422.         width  = WD_monsterdictionary_layout::M_name_display_width

  423.         height = line_height

  424.         draw_text(x, y, width, height, text1, 0)

  425.       end

  426.       if WD_monsterdictionary_layout::M_pic_display

  427.         pic_name = @enemy.battler_name

  428.         pic_hue  = @enemy.battler_hue

  429.         x      = WD_monsterdictionary_layout::M_pic_display_x

  430.         y      = WD_monsterdictionary_layout::M_pic_display_y

  431.         opacity= WD_monsterdictionary_layout::M_pic_display_opacity

  432.         bitmap = Cache.battler(pic_name, pic_hue)

  433.         rect = Rect.new(0, 0, bitmap.width, bitmap.height)

  434.         contents.blt(x - rect.width/2, y - rect.height, bitmap, rect, opacity)

  435.       end




  436.       font_size = WD_monsterdictionary_layout::C_font_size

  437.       contents.font.size = font_size

  438.       if WD_monsterdictionary_layout::M_mhp_display

  439.         text1  = Vocab::param(0)

  440.         text2  = "?"

  441.         text2  = @enemy.params[0] if m_dictionary_victory_switch_on?(@enemy.id)

  442.         x      = WD_monsterdictionary_layout::M_mhp_display_x

  443.         y      = WD_monsterdictionary_layout::M_mhp_display_y

  444.         width  = WD_monsterdictionary_layout::M_mhp_display_width

  445.         change_color(system_color)

  446.         draw_text(x, y, width, font_size, text1, 0)

  447.         change_color(normal_color)

  448.         draw_text(x, y, width, font_size, text2, 2)

  449.       end

  450.       if WD_monsterdictionary_layout::M_mmp_display

  451.         text1  = Vocab::param(1)

  452.         text2  = "?"

  453.         text2  = @enemy.params[1] if m_dictionary_victory_switch_on?(@enemy.id)

  454.         x      = WD_monsterdictionary_layout::M_mmp_display_x

  455.         y      = WD_monsterdictionary_layout::M_mmp_display_y

  456.         width  = WD_monsterdictionary_layout::M_mmp_display_width

  457.         change_color(system_color)

  458.         draw_text(x, y, width, font_size, text1, 0)

  459.         change_color(normal_color)

  460.         draw_text(x, y, width, font_size, text2, 2)

  461.       end

  462.       if WD_monsterdictionary_layout::M_atk_display

  463.         text1  = Vocab::param(2)

  464.         text2  = "?"

  465.         text2  = @enemy.params[2] if m_dictionary_victory_switch_on?(@enemy.id)

  466.         x      = WD_monsterdictionary_layout::M_atk_display_x

  467.         y      = WD_monsterdictionary_layout::M_atk_display_y

  468.         width  = WD_monsterdictionary_layout::M_atk_display_width

  469.         change_color(system_color)

  470.         draw_text(x, y, width, font_size, text1, 0)

  471.         change_color(normal_color)

  472.         draw_text(x, y, width, font_size, text2, 2)

  473.       end

  474.       if WD_monsterdictionary_layout::M_def_display

  475.         text1  = Vocab::param(3)

  476.         text2  = "?"

  477.         text2  = @enemy.params[3] if m_dictionary_victory_switch_on?(@enemy.id)

  478.         x      = WD_monsterdictionary_layout::M_def_display_x

  479.         y      = WD_monsterdictionary_layout::M_def_display_y

  480.         width  = WD_monsterdictionary_layout::M_def_display_width

  481.         change_color(system_color)

  482.         draw_text(x, y, width, font_size, text1, 0)

  483.         change_color(normal_color)

  484.         draw_text(x, y, width, font_size, text2, 2)

  485.       end

  486.       if WD_monsterdictionary_layout::M_mat_display

  487.         text1  = Vocab::param(4)

  488.         text2  = "?"

  489.         text2  = @enemy.params[4] if m_dictionary_victory_switch_on?(@enemy.id)

  490.         x      = WD_monsterdictionary_layout::M_mat_display_x

  491.         y      = WD_monsterdictionary_layout::M_mat_display_y

  492.         width  = WD_monsterdictionary_layout::M_mat_display_width

  493.         change_color(system_color)

  494.         draw_text(x, y, width, font_size, text1, 0)

  495.         change_color(normal_color)

  496.         draw_text(x, y, width, font_size, text2, 2)

  497.       end

  498.       if WD_monsterdictionary_layout::M_mdf_display

  499.         text1  = Vocab::param(5)

  500.         text2  = "?"

  501.         text2  = @enemy.params[5] if m_dictionary_victory_switch_on?(@enemy.id)

  502.         x      = WD_monsterdictionary_layout::M_mdf_display_x

  503.         y      = WD_monsterdictionary_layout::M_mdf_display_y

  504.         width  = WD_monsterdictionary_layout::M_mdf_display_width

  505.         change_color(system_color)

  506.         draw_text(x, y, width, font_size, text1, 0)

  507.         change_color(normal_color)

  508.         draw_text(x, y, width, font_size, text2, 2)

  509.       end

  510.       if WD_monsterdictionary_layout::M_agi_display

  511.         text1  = Vocab::param(6)

  512.         text2  = "?"

  513.         text2  = @enemy.params[6] if m_dictionary_victory_switch_on?(@enemy.id)

  514.         x      = WD_monsterdictionary_layout::M_agi_display_x

  515.         y      = WD_monsterdictionary_layout::M_agi_display_y

  516.         width  = WD_monsterdictionary_layout::M_agi_display_width

  517.         change_color(system_color)

  518.         draw_text(x, y, width, font_size, text1, 0)

  519.         change_color(normal_color)

  520.         draw_text(x, y, width, font_size, text2, 2)

  521.       end

  522.       if WD_monsterdictionary_layout::M_luk_display

  523.         text1  = Vocab::param(7)

  524.         text2  = "?"

  525.         text2  = @enemy.params[7] if m_dictionary_victory_switch_on?(@enemy.id)

  526.         x      = WD_monsterdictionary_layout::M_luk_display_x

  527.         y      = WD_monsterdictionary_layout::M_luk_display_y

  528.         width  = WD_monsterdictionary_layout::M_luk_display_width

  529.         change_color(system_color)

  530.         draw_text(x, y, width, font_size, text1, 0)

  531.         change_color(normal_color)

  532.         draw_text(x, y, width, font_size, text2, 2)

  533.       end

  534.       if WD_monsterdictionary_layout::M_feature_display

  535.         text1  = WD_monsterdictionary_layout::M_feature_display_text1

  536.         text2  = "?"

  537.         text2  = WD_monsterdictionary_layout::M_feature_display_text2 if m_dictionary_victory_switch_on?(@enemy.id)

  538.         x      = WD_monsterdictionary_layout::M_feature_display_x

  539.         y      = WD_monsterdictionary_layout::M_feature_display_y

  540.         width  = WD_monsterdictionary_layout::M_feature_display_width

  541.         change_color(system_color)

  542.         draw_text(x, y, width, font_size, text1, 0)

  543.         change_color(normal_color)

  544.         i = 0

  545.         if m_dictionary_victory_switch_on?(@enemy.id)

  546.           @enemy.note.scan(/<図鑑特徴:(.*)>/){|matched|

  547.             i += 1

  548.             self.contents.draw_text(x + font_size, y + font_size * i, width - font_size, font_size, matched[0], 0)

  549.           }

  550.         end

  551.         if i == 0

  552.           self.contents.draw_text(x + font_size, y + font_size, width - font_size, font_size, text2, 0)

  553.         end

  554.       end

  555.       if WD_monsterdictionary_layout::M_exp_display

  556.         text1  = WD_monsterdictionary_layout::M_exp_display_text1

  557.         text2  = "?"

  558.         text2  = @enemy.exp if m_dictionary_victory_switch_on?(@enemy.id)

  559.         x      = WD_monsterdictionary_layout::M_exp_display_x

  560.         y      = WD_monsterdictionary_layout::M_exp_display_y

  561.         width  = WD_monsterdictionary_layout::M_exp_display_width

  562.         change_color(system_color)

  563.         draw_text(x, y, width, font_size, text1, 0)

  564.         change_color(normal_color)

  565.         draw_text(x, y, width, font_size, text2, 2)

  566.       end

  567.       if WD_monsterdictionary_layout::M_gold_display

  568.         text1  = WD_monsterdictionary_layout::M_gold_display_text1

  569.         text2  = "?"

  570.         text2  = @enemy.gold if m_dictionary_victory_switch_on?(@enemy.id)

  571.         text3  = Vocab::currency_unit

  572.         x      = WD_monsterdictionary_layout::M_gold_display_x

  573.         y      = WD_monsterdictionary_layout::M_gold_display_y

  574.         width  = WD_monsterdictionary_layout::M_gold_display_width

  575.         change_color(system_color)

  576.         draw_text(x, y, width, font_size, text1, 0)

  577.         cx = text_size(Vocab::currency_unit).width

  578.         change_color(normal_color)

  579.         draw_text(x, y, width - cx - 2, font_size, text2, 2)

  580.         change_color(system_color)

  581.         draw_text(x, y, width, font_size, text3, 2)

  582.         change_color(normal_color)

  583.       end

  584.       if WD_monsterdictionary_layout::M_drop_display

  585.         text1  = WD_monsterdictionary_layout::M_drop_display_text1

  586.         text2  = WD_monsterdictionary_layout::M_drop_display_text2 if m_dictionary_victory_switch_on?(@enemy.id)

  587.         x      = WD_monsterdictionary_layout::M_drop_display_x

  588.         y      = WD_monsterdictionary_layout::M_drop_display_y

  589.         width  = WD_monsterdictionary_layout::M_drop_display_width

  590.         change_color(system_color)

  591.         draw_text(x, y, width, font_size, text1, 0)

  592.         change_color(normal_color)

  593.         i = 0

  594.         @enemy.drop_items.each do |di|

  595.           if di.kind > 0

  596.             i += 1

  597.             item = item_object(di.kind, di.data_id)

  598.             n = i -1

  599.             if m_dictionary_drop_switch_on?(@enemy.id, n)

  600.               text2 = item.name

  601.               text3 = "1/#{di.denominator}"

  602.             else

  603.               text2  = "???????"

  604.               text3  = ""

  605.             end

  606.             self.contents.draw_text(x + font_size, y + font_size * i, width - font_size, font_size, text2, 0)

  607.             self.contents.draw_text(x + font_size, y + font_size * i, width - font_size, font_size, text3, 2)

  608.           end

  609.         end

  610.         if i == 0

  611.           self.contents.draw_text(x + font_size, y + font_size, width - font_size, font_size, text2, 0)

  612.         end

  613.       end

  614.       if WD_monsterdictionary_layout::M_help_display

  615.         text1  = WD_monsterdictionary_layout::M_help_display_text1

  616.         text2  = "?"

  617.         text2  = WD_monsterdictionary_layout::M_help_display_text2 if m_dictionary_victory_switch_on?(@enemy.id)

  618.         x      = WD_monsterdictionary_layout::M_help_display_x

  619.         y      = WD_monsterdictionary_layout::M_help_display_y

  620.         width  = WD_monsterdictionary_layout::M_help_display_width

  621.         change_color(system_color)

  622.         draw_text(x, y, width, font_size, text1, 0)

  623.         change_color(normal_color)

  624.         i = 0

  625.         if m_dictionary_victory_switch_on?(@enemy.id)

  626.           @enemy.note.scan(/<図鑑説明:(.*)>/){|matched|

  627.             i += 1

  628.             self.contents.draw_text(x + font_size, y + font_size * i, width - font_size, font_size, matched[0], 0)

  629.           }

  630.         end

  631.         if i == 0

  632.           self.contents.draw_text(x + font_size, y + font_size, width - font_size, font_size, text2, 0)

  633.         end

  634.       end

  635.       if WD_monsterdictionary_layout::M_geno_display

  636.         text1  = WD_monsterdictionary_layout::M_geno_display_text1

  637.         text2  = "#{m_dictionary_genoside_number(@enemy.id)}"

  638.         x      = WD_monsterdictionary_layout::M_geno_display_x

  639.         y      = WD_monsterdictionary_layout::M_geno_display_y

  640.         width  = WD_monsterdictionary_layout::M_geno_display_width

  641.         change_color(system_color)

  642.         draw_text(x, y, width, font_size, text1, 0)

  643.         change_color(normal_color)

  644.         draw_text(x, y, width, font_size, text2, 2)

  645.       end



  646.     elsif @enemy != nil



  647.       if WD_monsterdictionary_layout::M_id_display

  648.         text1  = sprintf("%0#{WD_monsterdictionary_layout::M_id_display_digit}d",@index+1)

  649.         x      = WD_monsterdictionary_layout::M_id_display_x

  650.         y      = WD_monsterdictionary_layout::M_id_display_y

  651.         width  = WD_monsterdictionary_layout::M_id_display_width

  652.         height = line_height

  653.         draw_text(x, y, width, height, text1, 0)

  654.       end

  655.       if WD_monsterdictionary_layout::M_name_display

  656.         text1  = "- No Data -"

  657.         x      = WD_monsterdictionary_layout::M_name_display_x

  658.         y      = WD_monsterdictionary_layout::M_name_display_y

  659.         width  = WD_monsterdictionary_layout::M_name_display_width

  660.         height = line_height

  661.         draw_text(x, y, width, height, text1, 0)

  662.       end




  663.     end

  664.   end

  665. end
复制代码
回复

使用道具 举报

梦石
0
星屑
50
在线时间
30 小时
注册时间
2015-5-6
回帖
23
发表于 2015-10-18 22:45:45 | 显示全部楼层
请问能不能帮我找一个可以编写注释的怪物图鉴脚本,把其中的击破数什么都的去掉,改成只要遇到或者击破一次就能完全显示?
回复

使用道具 举报

梦石
0
星屑
50
在线时间
30 小时
注册时间
2015-5-6
回帖
23
发表于 2015-10-18 23:16:50 | 显示全部楼层
发现在菜单里加入图鉴很容易和其他脚本相冲突……
如何通过在菜单里使用某个道具,比如一本叫“怪物图鉴”的书来激活怪物图鉴?

点评

吖。。。这样,物品里面触发公共事件,公共事件调用SceneManager.call(Scene_MonsterDictionary)没人给我解决,我硬生生的自己看F1解决了 = =  发表于 2015-10-21 00:14
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部