设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1684|回复: 3
打印 上一主题 下一主题

[已经过期] 關於一個"魔物圖鑑"的腳本,顯示圖片及功能如何設更改定??

[复制链接]

Lv2.观梦者

梦石
0
星屑
552
在线时间
464 小时
注册时间
2009-10-11
帖子
407
跳转到指定楼层
1
发表于 2013-3-18 15:39:08 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
我在6R區搜到一個魔物圖鑑腳本覺得不錯,想拿來研究下,結果遇到了大困難...

我的怪物都是行走圖的,此腳本會顯示整張的怪物圖,
有辦法讓它讀取圖片的時候自動作切割(垂直3等份,水平4等份、有些圖比96*128大上許多),並且只選怪物正面的那塊嗎??
(不用限定敵人ID、因為我的敵人全部都是行走圖)

然後在圖鑑裡的"特徵",必須自己手動用<図鑑特徴:○○○>在怪物的NOTE添加文字,
能改寫圖鑑裡的"特徵" 自動顯示敵人右邊的特性欄內容(追加能力值、攻擊屬性等...) 嗎??

附上腳本來源網址:http://izumiwhite.web.fc2.com/rgss3/rgss3_002.html

如果被屏障可以下我的工程範例,裡面有"怪物图鉴"腳本:http://115.com/file/ei5nhq8p

只想看腳本的我貼在下面(共兩個)↓

[pre lang="ruby" line="1" file="怪物图鉴"]#==============================================================================
# ■ 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  = "- No Data -"
        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" line="1" file="怪物图鉴設定"]#==============================================================================
# ■ 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 = 1 #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          = false
  M_geno_display_x        = 0
  M_geno_display_y        = 321
  M_geno_display_width    = 136
  M_geno_display_text1    = "击破数"

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

{:2_263:}
因为现实太残酷、所以我们都在打造虚幻的天堂。如果现实不再残酷,也是因为有这快乐的天堂。

Lv2.观梦者

梦石
0
星屑
552
在线时间
464 小时
注册时间
2009-10-11
帖子
407
2
 楼主| 发表于 2013-3-19 19:00:59 | 只看该作者
哈...研究一整天...
自己只解決了圖像顯示的問題 (就是rect = Rect.new(0, 0, bitmap.width/3, bitmap.height/4) 這樣就好了!!)

比較麻煩的還是自動描述特徵的地方...求達人們幫忙了...自己弄狂出錯...

点评

http://pan.baidu.com/share/link?shareid=365687&uk=1395993159 好了~ 我是在這範例裡面看到這腳本的  发表于 2013-3-20 22:41
把范例传到这个网盘吧?http://pan.baidu.com/ 115不好用,下不了  发表于 2013-3-20 18:47
因为现实太残酷、所以我们都在打造虚幻的天堂。如果现实不再残酷,也是因为有这快乐的天堂。
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
552
在线时间
464 小时
注册时间
2009-10-11
帖子
407
3
 楼主| 发表于 2013-3-20 20:05:49 | 只看该作者
ok,我現在在補習班,等等回家再傳一次!!
因为现实太残酷、所以我们都在打造虚幻的天堂。如果现实不再残酷,也是因为有这快乐的天堂。
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
41 小时
注册时间
2013-3-19
帖子
44
4
发表于 2013-3-20 21:12:55 | 只看该作者
...我也不知道耶....
回复 支持 反对

使用道具 举报

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

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-6-11 13:35

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表