Project1

标题: 关于这个物品图鉴的问题,求脚本大角虫解决! [打印本页]

作者: VIPArcher    时间: 2014-4-5 00:41
标题: 关于这个物品图鉴的问题,求脚本大角虫解决!
这个物品图鉴脚本下面有 功能 这个显示项却没有作用 求大神优化下这个脚本。
RUBY 代码复制
  1. I_option_display       = true
  2.   I_option_display_x     = 0
  3.   I_option_display_y     = 92
  4.   I_option_display_width = 286
  5.   I_option_display_text1 = "功能"
  6.   I_option_display_text2 = "无"


功能下面万年显示“无”
能不能做成可以读取物品 使用效果 的效果(当然武器防具也得能显示效果才行)

实在不行(嫌麻烦)就帮我写成能读取备注信息的就行了!

QQ图片20140328210729.jpg (79.1 KB, 下载次数: 32)

界面

界面

QQ图片20140405003258.jpg (3.23 KB, 下载次数: 27)

就是这里

就是这里

物品图鉴.rar

1.43 MB, 下载次数: 105

发工程


作者: VIPArcher    时间: 2014-4-5 00:43
  1. #==============================================================================
  2. # ■ RGSS3 アイテム図鑑 ver 1.00 初期設定
  3. #------------------------------------------------------------------------------
  4. #  配布元:
  5. #     白の魔 http://izumiwhite.web.fc2.com/
  6. #
  7. #  利用規約:
  8. #     RPGツクールVXの正規の登録者のみご利用になれます。
  9. #     利用報告・著作権表示とかは必要ありません。
  10. #     改造もご自由にどうぞ。
  11. #     何か問題が発生しても責任は持ちません。
  12. #==============================================================================

  13. #-------------------------------------------------------------------------------
  14. # ★ 初期設定。
  15. #-------------------------------------------------------------------------------
  16. module WD_itemdictionary_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.   C_font_size = 20

  29. #===道具図鑑設定================================================================

  30.   #番号の表示
  31.   I_id_display        = true
  32.   I_id_display_x      = 0
  33.   I_id_display_y      = 0
  34.   I_id_display_width  = 60
  35.   I_id_display_digit  = 3 #桁数
  36.   
  37.   #名前の表示
  38.   I_name_display        = true
  39.   I_name_display_x      = 84
  40.   I_name_display_y      = 0
  41.   I_name_display_width  = 172

  42.   #価格の表示
  43.   I_price_display        = true
  44.   I_price_display_x      = 150
  45.   I_price_display_y      = 32
  46.   I_price_display_width  = 136
  47.   I_price_display_text1  = "价格"

  48.   #使用可能時の表示
  49.   I_occasion_display        = true
  50.   I_occasion_display_x      = 0
  51.   I_occasion_display_y      = 62
  52.   I_occasion_display_width  = 140
  53.   I_occasion_display_text1  = "使用"
  54.   I_occasion_display_text2  = "平时"
  55.   I_occasion_display_text3  = "战斗时"
  56.   I_occasion_display_text4  = "移动时"
  57.   I_occasion_display_text5  = "-"

  58.   #消耗の表示
  59.   I_consumable_display        = true
  60.   I_consumable_display_x      = 150
  61.   I_consumable_display_y      = 62
  62.   I_consumable_display_width  = 140
  63.   I_consumable_display_text1  = "消耗"
  64.   I_consumable_display_text2  = "需要消耗"
  65.   I_consumable_display_text3  = "不用消耗"

  66.   #特徴の表示
  67.   I_option_display       = true
  68.   I_option_display_x     = 0
  69.   I_option_display_y     = 92
  70.   I_option_display_width = 286
  71.   I_option_display_text1 = "功能"
  72.   I_option_display_text2 = "无"

  73. #===武器図鑑設定================================================================

  74.   #番号の表示
  75.   W_id_display        = true
  76.   W_id_display_x      = 0
  77.   W_id_display_y      = 0
  78.   W_id_display_width  = 60
  79.   W_id_display_digit  = 3 #桁数

  80.   #名前の表示
  81.   W_name_display        = true
  82.   W_name_display_x      = 84
  83.   W_name_display_y      = 0
  84.   W_name_display_width  = 172

  85.   #タイプの表示
  86.   W_type_display        = true
  87.   W_type_display_x      = 0
  88.   W_type_display_y      = 32
  89.   W_type_display_width  = 136
  90.   W_type_display_text1  = "类型"

  91.   #価格の表示
  92.   W_price_display       = true
  93.   W_price_display_x     = 150
  94.   W_price_display_y     = 32
  95.   W_price_display_width = 136
  96.   W_price_display_text1 = "价格"

  97.   #攻撃力の表示
  98.   W_atk_display         = true
  99.   W_atk_display_x       = 0
  100.   W_atk_display_y       = 62
  101.   W_atk_display_width   = 136

  102.   #防御力の表示
  103.   W_def_display         = true
  104.   W_def_display_x       = 150
  105.   W_def_display_y       = 62
  106.   W_def_display_width   = 136

  107.   #魔法力の表示
  108.   W_mat_display         = true
  109.   W_mat_display_x       = 0
  110.   W_mat_display_y       = 82
  111.   W_mat_display_width   = 136

  112.   #魔法防御の表示
  113.   W_mdf_display         = true
  114.   W_mdf_display_x       = 150
  115.   W_mdf_display_y       = 82
  116.   W_mdf_display_width   = 136

  117.   #敏捷性の表示
  118.   W_agi_display         = true
  119.   W_agi_display_x       = 0
  120.   W_agi_display_y       = 102
  121.   W_agi_display_width   = 136

  122.   #運の表示
  123.   W_luk_display         = true
  124.   W_luk_display_x       = 150
  125.   W_luk_display_y       = 102
  126.   W_luk_display_width   = 136

  127.   #最大HPの表示
  128.   W_mhp_display         = true
  129.   W_mhp_display_x       = 0
  130.   W_mhp_display_y       = 122
  131.   W_mhp_display_width   = 136

  132.   #最大MPの表示
  133.   W_mmp_display         = true
  134.   W_mmp_display_x       = 150
  135.   W_mmp_display_y       = 122
  136.   W_mmp_display_width   = 136

  137.   #特徴の表示
  138.   W_option_display       = true
  139.   W_option_display_x     = 0
  140.   W_option_display_y     = 152
  141.   W_option_display_width = 286
  142.   W_option_display_text1 = "功能"
  143.   W_option_display_text2 = "无"


  144. #===防具図鑑設定================================================================

  145.   #番号の表示
  146.   A_id_display        = true
  147.   A_id_display_x      = 0
  148.   A_id_display_y      = 0
  149.   A_id_display_width  = 60
  150.   A_id_display_digit  = 3 #桁数

  151.   #名前の表示
  152.   A_name_display        = true
  153.   A_name_display_x      = 84
  154.   A_name_display_y      = 0
  155.   A_name_display_width  = 172

  156.   #タイプの表示
  157.   A_type_display        = true
  158.   A_type_display_x      = 0
  159.   A_type_display_y      = 32
  160.   A_type_display_width  = 136
  161.   A_type_display_text1  = "类型"

  162.   #価格の表示
  163.   A_price_display       = true
  164.   A_price_display_x     = 150
  165.   A_price_display_y     = 32
  166.   A_price_display_width = 136
  167.   A_price_display_text1 = "价格"

  168.   #攻撃力の表示
  169.   A_atk_display         = true
  170.   A_atk_display_x       = 0
  171.   A_atk_display_y       = 62
  172.   A_atk_display_width   = 136

  173.   #防御力の表示
  174.   A_def_display         = true
  175.   A_def_display_x       = 150
  176.   A_def_display_y       = 62
  177.   A_def_display_width   = 136

  178.   #魔法力の表示
  179.   A_mat_display         = true
  180.   A_mat_display_x       = 0
  181.   A_mat_display_y       = 82
  182.   A_mat_display_width   = 136

  183.   #魔法防御の表示
  184.   A_mdf_display         = true
  185.   A_mdf_display_x       = 150
  186.   A_mdf_display_y       = 82
  187.   A_mdf_display_width   = 136

  188.   #敏捷性の表示
  189.   A_agi_display         = true
  190.   A_agi_display_x       = 0
  191.   A_agi_display_y       = 102
  192.   A_agi_display_width   = 136

  193.   #運の表示
  194.   A_luk_display         = true
  195.   A_luk_display_x       = 150
  196.   A_luk_display_y       = 102
  197.   A_luk_display_width   = 136

  198.   #最大HPの表示
  199.   A_mhp_display         = true
  200.   A_mhp_display_x       = 0
  201.   A_mhp_display_y       = 122
  202.   A_mhp_display_width   = 136

  203.   #最大MPの表示
  204.   A_mmp_display         = true
  205.   A_mmp_display_x       = 150
  206.   A_mmp_display_y       = 122
  207.   A_mmp_display_width   = 136

  208.   #特徴の表示
  209.   A_option_display       = true
  210.   A_option_display_x     = 0
  211.   A_option_display_y     = 152
  212.   A_option_display_width = 286
  213.   A_option_display_text1 = "功能"
  214.   A_option_display_text2 = "无"


  215. end
  216. #-------------------------------------------------------------------------------
  217. # ★ 初期設定おわり
  218. #-------------------------------------------------------------------------------
复制代码

作者: VIPArcher    时间: 2014-4-5 00:44
  1. #==============================================================================
  2. # ■ RGSS3 アイテム図鑑 ver 1.00 本体プログラム
  3. #------------------------------------------------------------------------------
  4. #  配布元:
  5. #     白の魔 http://izumiwhite.web.fc2.com/
  6. #
  7. #  利用規約:
  8. #     RPGツクールVXの正規の登録者のみご利用になれます。
  9. #     利用報告・著作権表示とかは必要ありません。
  10. #     改造もご自由にどうぞ。
  11. #     何か問題が発生しても責任は持ちません。
  12. #==============================================================================

  13. #==============================================================================
  14. # ■ WD_itemdictionary
  15. #------------------------------------------------------------------------------
  16. #  アイテム図鑑用の共通メソッドです。
  17. #==============================================================================

  18. module WD_itemdictionary
  19.   
  20.   
  21.   
  22.   def i_dictionary_switch_on(id)
  23.     $game_system.i_dic_sw = [] if $game_system.i_dic_sw == nil
  24.     $game_system.i_dic_sw[id] = false if $game_system.i_dic_sw[id] == nil
  25.     $game_system.i_dic_sw[id] = true
  26.   end
  27.   def i_dictionary_switch_off(id)
  28.     $game_system.i_dic_sw = [] if $game_system.i_dic_sw == nil
  29.     $game_system.i_dic_sw[id] = false if $game_system.i_dic_sw[id] == nil
  30.     $game_system.i_dic_sw[id] = false
  31.   end
  32.   def i_dictionary_switch_on?(id)
  33.     $game_system.i_dic_sw = [] if $game_system.i_dic_sw == nil
  34.     $game_system.i_dic_sw[id] = false if $game_system.i_dic_sw[id] == nil
  35.     return $game_system.i_dic_sw[id]
  36.   end
  37.   def w_dictionary_switch_on(id)
  38.     $game_system.w_dic_sw = [] if $game_system.w_dic_sw == nil
  39.     $game_system.w_dic_sw[id] = false if $game_system.w_dic_sw[id] == nil
  40.     $game_system.w_dic_sw[id] = true
  41.   end
  42.   def w_dictionary_switch_off(id)
  43.     $game_system.w_dic_sw = [] if $game_system.w_dic_sw == nil
  44.     $game_system.w_dic_sw[id] = false if $game_system.w_dic_sw[id] == nil
  45.     $game_system.w_dic_sw[id] = false
  46.   end
  47.   def w_dictionary_switch_on?(id)
  48.     $game_system.w_dic_sw = [] if $game_system.w_dic_sw == nil
  49.     $game_system.w_dic_sw[id] = false if $game_system.w_dic_sw[id] == nil
  50.     return $game_system.w_dic_sw[id]
  51.   end
  52.   def a_dictionary_switch_on(id)
  53.     $game_system.a_dic_sw = [] if $game_system.a_dic_sw == nil
  54.     $game_system.a_dic_sw[id] = false if $game_system.a_dic_sw[id] == nil
  55.     $game_system.a_dic_sw[id] = true
  56.   end
  57.   def a_dictionary_switch_off(id)
  58.     $game_system.a_dic_sw = [] if $game_system.a_dic_sw == nil
  59.     $game_system.a_dic_sw[id] = false if $game_system.a_dic_sw[id] == nil
  60.     $game_system.a_dic_sw[id] = false
  61.   end
  62.   def a_dictionary_switch_on?(id)
  63.     $game_system.a_dic_sw = [] if $game_system.a_dic_sw == nil
  64.     $game_system.a_dic_sw[id] = false if $game_system.a_dic_sw[id] == nil
  65.     return $game_system.a_dic_sw[id]
  66.   end
  67.   def t_dictionary_switch_on(item)
  68.     if item.is_a?(RPG::Item)
  69.       i_dictionary_switch_on(item.id)
  70.     end
  71.     if item.is_a?(RPG::Weapon)
  72.       w_dictionary_switch_on(item.id)
  73.     end
  74.     if item.is_a?(RPG::Armor)
  75.       a_dictionary_switch_on(item.id)
  76.     end
  77.   end
  78.   def t_dictionary_switch_on?(item)
  79.     if item.is_a?(RPG::Item)
  80.       return i_dictionary_switch_on?(item.id)
  81.     end
  82.     if item.is_a?(RPG::Weapon)
  83.       return w_dictionary_switch_on?(item.id)
  84.     end
  85.     if item.is_a?(RPG::Armor)
  86.       return a_dictionary_switch_on?(item.id)
  87.     end
  88.   end
  89.   def print_dictionary?(item)
  90.     if item != nil
  91.       if item.name.size > 0
  92.         hantei = /<图鉴无效>/ =~ item.note
  93.         if hantei == nil
  94.           return true
  95.         end
  96.       end
  97.     end
  98.     return false
  99.   end
  100.   def item_dictionary_perfection
  101.     dic_max = 0
  102.     dic_num = 0
  103.     $data_items.each do |item|
  104.       if print_dictionary?(item)
  105.         dic_max += 1
  106.         if i_dictionary_switch_on?(item.id) == true
  107.           dic_num += 1
  108.         end
  109.       end
  110.     end
  111.     $data_weapons.each do |item|
  112.       if print_dictionary?(item)
  113.         dic_max += 1
  114.         if w_dictionary_switch_on?(item.id) == true
  115.           dic_num += 1
  116.         end
  117.       end
  118.     end
  119.     $data_armors.each do |item|
  120.       if print_dictionary?(item)
  121.         dic_max += 1
  122.         if a_dictionary_switch_on?(item.id) == true
  123.           dic_num += 1
  124.         end
  125.       end
  126.     end
  127.     return (100*dic_num)/dic_max
  128.   end
  129. end

  130. class Game_Interpreter
  131.   include WD_itemdictionary
  132. end

  133. class Game_System
  134.   #--------------------------------------------------------------------------
  135.   # ● 公開インスタンス変数
  136.   #--------------------------------------------------------------------------
  137.   attr_accessor :i_dic_sw
  138.   attr_accessor :w_dic_sw
  139.   attr_accessor :a_dic_sw
  140.   #--------------------------------------------------------------------------
  141.   # ● オブジェクト初期化
  142.   #--------------------------------------------------------------------------
  143.   alias wd_orig_initialize001 initialize
  144.   def initialize
  145.     wd_orig_initialize001
  146.     @i_dic_sw = []
  147.     @w_dic_sw = []
  148.     @a_dic_sw = []
  149.   end
  150. end

  151. class Game_Party < Game_Unit
  152.   include WD_itemdictionary
  153.   #--------------------------------------------------------------------------
  154.   # ● アイテムの増加(減少)
  155.   #     include_equip : 装備品も含める
  156.   #--------------------------------------------------------------------------
  157.   alias wd_orig_gain_item001 gain_item
  158.   def gain_item(item, amount, include_equip = false)   
  159.     wd_orig_gain_item001(item, amount, include_equip = false)
  160.     if amount > 0
  161.       t_dictionary_switch_on(item)
  162.     end
  163.   end
  164. end


  165. #==============================================================================
  166. # ■ Scene_ItemDictionary
  167. #------------------------------------------------------------------------------
  168. #  アイテム図鑑画面の処理を行うクラスです。
  169. #==============================================================================

  170. class Scene_ItemDictionary < Scene_ItemBase
  171.   #--------------------------------------------------------------------------
  172.   # ● 開始処理
  173.   #--------------------------------------------------------------------------
  174.   def start
  175.     super
  176.      
  177.     create_help_window
  178.     create_category_window
  179.     create_status_window
  180.     create_item_window
  181.     create_perfection_window
  182.   end
  183.   #--------------------------------------------------------------------------
  184.   # ● カテゴリウィンドウの作成
  185.   #--------------------------------------------------------------------------
  186.   def create_category_window
  187.     @category_window = Window_ItemCategory.new
  188.     @category_window.viewport = @viewport
  189.     @category_window.help_window = @help_window
  190.     @category_window.y = @help_window.height
  191.     @category_window.set_handler(:ok,     method(:on_category_ok))
  192.     @category_window.set_handler(:cancel, method(:return_scene))
  193.   end
  194.   
  195.   def return_scene
  196.     $game_map.autoplay
  197.     SceneManager.return
  198.   end
  199.   
  200.   #--------------------------------------------------------------------------
  201.   # ● アイテムウィンドウの作成
  202.   #--------------------------------------------------------------------------
  203.   def create_item_window
  204.     wy = @category_window.y + @category_window.height
  205.     wh = Graphics.height - wy - 48
  206.     @item_window = Window_ItemDictionaryList.new(Graphics.width-172-48, wy, 172+48, wh)
  207.     @item_window.viewport = @viewport
  208.     @item_window.help_window = @help_window
  209.     @item_window.status_window = @status_window
  210.     @item_window.set_handler(:cancel, method(:on_item_cancel))
  211.     @category_window.item_window = @item_window
  212.   end
  213.   #--------------------------------------------------------------------------
  214.   # ● アイテムステータスウィンドウの作成
  215.   #--------------------------------------------------------------------------
  216.   def create_status_window
  217.     wy = @category_window.y + @category_window.height
  218.     wh = Graphics.height - wy
  219.     @status_window = Window_ItemDictionaryStatus.new(0, wy, Graphics.width-172-48, wh)
  220.     @status_window.viewport = @viewport
  221.     @status_window.set_item(nil)
  222.   end
  223.   #--------------------------------------------------------------------------
  224.   # ● 図鑑完成度ウィンドウの作成
  225.   #--------------------------------------------------------------------------
  226.   def create_perfection_window
  227.     wy = @item_window.y + @item_window.height
  228.     wh = 48
  229.     @perfection_window = Window_ItemDictionaryPerfection.new(Graphics.width-172-48, wy, 172+48, wh)
  230.     @perfection_window.viewport = @viewport
  231.   end
  232.   #--------------------------------------------------------------------------
  233.   # ● カテゴリ[決定]
  234.   #--------------------------------------------------------------------------
  235.   def on_category_ok
  236.     @item_window.activate
  237.     @item_window.select_last
  238.   end
  239.   #--------------------------------------------------------------------------
  240.   # ● アイテム[キャンセル]
  241.   #--------------------------------------------------------------------------
  242.   def on_item_cancel
  243.     @item_window.unselect
  244.     @category_window.activate
  245.     @status_window.set_item(nil)
  246.   end
  247. end


  248.   
  249. #==============================================================================
  250. # ■ Window_ItemDictionaryList
  251. #------------------------------------------------------------------------------
  252. #  アイテム図鑑画面で、アイテムの一覧を表示するウィンドウです。
  253. #==============================================================================

  254. class Window_ItemDictionaryList < Window_Selectable
  255.   include WD_itemdictionary
  256.   #--------------------------------------------------------------------------
  257.   # ● オブジェクト初期化
  258.   #--------------------------------------------------------------------------
  259.   def initialize(x, y, width, height)
  260.     super
  261.     @category = :none
  262.     @data = []
  263.   end
  264.   #--------------------------------------------------------------------------
  265.   # ● カテゴリの設定
  266.   #--------------------------------------------------------------------------
  267.   def category=(category)
  268.     return if @category == category
  269.     @category = category
  270.     refresh
  271.     self.oy = 0
  272.   end
  273.   #--------------------------------------------------------------------------
  274.   # ● 桁数の取得
  275.   #--------------------------------------------------------------------------
  276.   def col_max
  277.     return 1
  278.   end
  279.   #--------------------------------------------------------------------------
  280.   # ● 項目数の取得
  281.   #--------------------------------------------------------------------------
  282.   def item_max
  283.     @data ? @data.size : 1
  284.   end
  285.   #--------------------------------------------------------------------------
  286.   # ● アイテムの取得
  287.   #--------------------------------------------------------------------------
  288.   def item
  289.     @data && index >= 0 ? @data[index] : nil
  290.   end
  291.   #--------------------------------------------------------------------------
  292.   # ● 選択項目の有効状態を取得
  293.   #--------------------------------------------------------------------------
  294.   def current_item_enabled?
  295.     enable?(@data[index])
  296.   end
  297.   #--------------------------------------------------------------------------
  298.   # ● アイテムをリストに含めるかどうか
  299.   #--------------------------------------------------------------------------
  300.   def include?(item)
  301.     case @category
  302.     when :item
  303.       item.is_a?(RPG::Item) && !item.key_item?
  304.     when :weapon
  305.       item.is_a?(RPG::Weapon)
  306.     when :armor
  307.       item.is_a?(RPG::Armor)
  308.     when :key_item
  309.       item.is_a?(RPG::Item) && item.key_item?
  310.     else
  311.       false
  312.     end
  313.   end
  314.   #--------------------------------------------------------------------------
  315.   # ● アイテムリストの作成
  316.   #--------------------------------------------------------------------------
  317.   def make_item_list
  318.     @data = []
  319.     $data_items.each do |item|
  320.       if print_dictionary?(item)
  321.         @data.push(item) if include?(item)
  322.       end
  323.     end
  324.     $data_weapons.each do |item|
  325.       if print_dictionary?(item)
  326.         @data.push(item) if include?(item)
  327.       end
  328.     end
  329.     $data_armors.each do |item|
  330.       if print_dictionary?(item)
  331.         @data.push(item) if include?(item)
  332.       end
  333.     end
  334.     @data.push(nil) if include?(nil)
  335.   end
  336.   #--------------------------------------------------------------------------
  337.   # ● 前回の選択位置を復帰
  338.   #--------------------------------------------------------------------------
  339.   def select_last
  340.     select(0)
  341.   end
  342.   #--------------------------------------------------------------------------
  343.   # ● 項目の描画
  344.   #--------------------------------------------------------------------------
  345.   def draw_item(index)
  346.     item = @data[index]
  347.     if item
  348.       rect = item_rect(index)
  349.       rect.width -= 4
  350.       if t_dictionary_switch_on?(item)
  351.         change_color(normal_color, true)
  352.         draw_item_name(item, rect.x, rect.y, true)
  353.       else
  354.         change_color(normal_color, false)
  355.         draw_text(rect.x + 24, rect.y, 172, line_height, "???????")
  356.       end
  357.     end
  358.   end
  359.   #--------------------------------------------------------------------------
  360.   # ● ヘルプテキスト更新
  361.   #--------------------------------------------------------------------------
  362.   def update_help
  363.     if t_dictionary_switch_on?(item)
  364.       @help_window.set_item(item)
  365.       @status_window.set_item(item, @index, true)
  366.     else
  367.       @help_window.set_text("???????")
  368.       @status_window.set_item(item, @index, false)
  369.     end
  370.   end
  371.   #--------------------------------------------------------------------------
  372.   # ● リフレッシュ
  373.   #--------------------------------------------------------------------------
  374.   def refresh
  375.     make_item_list
  376.     create_contents
  377.     draw_all_items
  378.   end
  379.   #--------------------------------------------------------------------------
  380.   # ● ステータスウィンドウの設定
  381.   #--------------------------------------------------------------------------
  382.   def status_window=(status_window)
  383.     @status_window = status_window
  384.   end
  385. end

  386. #==============================================================================
  387. # ■ Window_ItemDictionaryPerfection
  388. #------------------------------------------------------------------------------
  389. #  アイテム図鑑画面で、図鑑の完成度を表示するウィンドウです。
  390. #==============================================================================

  391. class Window_ItemDictionaryPerfection < Window_Selectable
  392.   include WD_itemdictionary
  393.   #--------------------------------------------------------------------------
  394.   # ● オブジェクト初期化
  395.   #--------------------------------------------------------------------------
  396.   def initialize(x, y, width, height)
  397.     super
  398.     refresh(width)
  399.   end
  400.   #--------------------------------------------------------------------------
  401.   # ● リフレッシュ
  402.   #--------------------------------------------------------------------------
  403.   def refresh(width)
  404.     contents.clear
  405.     draw_text(0, 0, width-24, line_height, "图鉴完成度: #{item_dictionary_perfection} %", 1)
  406.   end
  407. end


  408. #==============================================================================
  409. # ■ Window_ItemDictionaryStatus
  410. #------------------------------------------------------------------------------
  411. #  アイテム図鑑画面で、アイテムの詳細を表示するウィンドウです。
  412. #==============================================================================

  413. class Window_ItemDictionaryStatus < Window_Selectable
  414.   include WD_itemdictionary
  415.   #--------------------------------------------------------------------------
  416.   # ● オブジェクト初期化
  417.   #--------------------------------------------------------------------------
  418.   def initialize(x, y, width, height)
  419.     super
  420.     @item = nil
  421.     refresh
  422.   end
  423.   #--------------------------------------------------------------------------
  424.   # ● アイテムの設定
  425.   #--------------------------------------------------------------------------
  426.   def set_item(item, index=-1, print=false)
  427.     return if ((@item == item) and ([url=home.php?mod=space&uid=370741]@Index[/url] == index))
  428.     @item = item
  429.     @index = index
  430.     @print = print
  431.     refresh
  432.   end
  433.   #--------------------------------------------------------------------------
  434.   # ● リフレッシュ
  435.   #--------------------------------------------------------------------------
  436.   def refresh
  437.     contents.clear
  438.     contents.font.size = 24

  439.     if @print

  440.       if @item.is_a?(RPG::Item)
  441.         if WD_itemdictionary_layout::I_id_display
  442.           text1  = sprintf("%0#{WD_itemdictionary_layout::I_id_display_digit}d",@index+1)
  443.           x      = WD_itemdictionary_layout::I_id_display_x
  444.           y      = WD_itemdictionary_layout::I_id_display_y
  445.           width  = WD_itemdictionary_layout::I_id_display_width
  446.           height = line_height
  447.           draw_text(x, y, width, height, text1, 0)
  448.         end
  449.         if WD_itemdictionary_layout::I_name_display
  450.           x      = WD_itemdictionary_layout::I_name_display_x
  451.           y      = WD_itemdictionary_layout::I_name_display_y
  452.           draw_item_name(@item, x, y, true)
  453.         end
  454.         font_size = WD_itemdictionary_layout::C_font_size
  455.         contents.font.size = font_size
  456.         if WD_itemdictionary_layout::I_price_display
  457.           text1  = WD_itemdictionary_layout::I_price_display_text1
  458.           text2  = @item.price
  459.           text3  = Vocab::currency_unit
  460.           x      = WD_itemdictionary_layout::I_price_display_x
  461.           y      = WD_itemdictionary_layout::I_price_display_y
  462.           width  = WD_itemdictionary_layout::I_price_display_width
  463.           change_color(system_color)
  464.           draw_text(x, y, width, font_size, text1, 0)
  465.           cx = text_size(Vocab::currency_unit).width
  466.           change_color(normal_color)
  467.           draw_text(x, y, width - cx - 2, font_size, text2, 2)
  468.           change_color(system_color)
  469.           draw_text(x, y, width, font_size, text3, 2)
  470.           change_color(normal_color)
  471.         end
  472.         if WD_itemdictionary_layout::I_occasion_display
  473.           text1  = WD_itemdictionary_layout::I_occasion_display_text1
  474.           text2  = WD_itemdictionary_layout::I_occasion_display_text2
  475.           text3  = WD_itemdictionary_layout::I_occasion_display_text3
  476.           text4  = WD_itemdictionary_layout::I_occasion_display_text4
  477.           text5  = WD_itemdictionary_layout::I_occasion_display_text5
  478.           x      = WD_itemdictionary_layout::I_occasion_display_x
  479.           y      = WD_itemdictionary_layout::I_occasion_display_y
  480.           width  = WD_itemdictionary_layout::I_occasion_display_width
  481.           change_color(system_color)
  482.           draw_text(x, y, width, font_size, text1, 0)
  483.           change_color(normal_color)
  484.           case @item.occasion
  485.           when 0
  486.             draw_text(x, y, width, font_size, text2, 2)
  487.           when 1
  488.             draw_text(x, y, width, font_size, text3, 2)
  489.           when 2
  490.             draw_text(x, y, width, font_size, text4, 2)
  491.           when 3
  492.             draw_text(x, y, width, font_size, text5, 2)
  493.           end
  494.         end
  495.         if WD_itemdictionary_layout::I_consumable_display
  496.           text1  = WD_itemdictionary_layout::I_consumable_display_text1
  497.           text2  = WD_itemdictionary_layout::I_consumable_display_text2
  498.           text3  = WD_itemdictionary_layout::I_consumable_display_text3
  499.           x      = WD_itemdictionary_layout::I_consumable_display_x
  500.           y      = WD_itemdictionary_layout::I_consumable_display_y
  501.           width  = WD_itemdictionary_layout::I_consumable_display_width
  502.           change_color(system_color)
  503.           draw_text(x, y, width, font_size, text1, 0)
  504.           change_color(normal_color)
  505.           if @item.consumable
  506.             draw_text(x, y, width, font_size, text2, 2)
  507.           else
  508.             draw_text(x, y, width, font_size, text3, 2)
  509.           end
  510.         end  
  511.         if WD_itemdictionary_layout::I_option_display
  512.           text1  = WD_itemdictionary_layout::I_option_display_text1
  513.           text2  = WD_itemdictionary_layout::I_option_display_text2
  514.           x      = WD_itemdictionary_layout::I_option_display_x
  515.           y      = WD_itemdictionary_layout::I_option_display_y
  516.           width  = WD_itemdictionary_layout::I_option_display_width
  517.           change_color(system_color)
  518.           draw_text(x, y, width, font_size, text1, 0)
  519.           change_color(normal_color)
  520.           i = 0
  521.           @item.note.scan(/<图鉴功能:(.*)>/){|matched|
  522.             i += 1
  523.             self.contents.draw_text(x + font_size, y + font_size * i, width - font_size, font_size, matched[0], 0)
  524.            }
  525.           if i == 0
  526.             self.contents.draw_text(x + font_size, y + font_size, width - font_size, font_size, text2, 0)
  527.           end
  528.         end

  529.       elsif @item.is_a?(RPG::Weapon)
  530.         if WD_itemdictionary_layout::W_id_display
  531.           text1  = sprintf("%0#{WD_itemdictionary_layout::W_id_display_digit}d",@index+1)
  532.           x      = WD_itemdictionary_layout::W_id_display_x
  533.           y      = WD_itemdictionary_layout::W_id_display_y
  534.           width  = WD_itemdictionary_layout::W_id_display_width
  535.           height = line_height
  536.           draw_text(x, y, width, height, text1, 0)
  537.         end
  538.         if WD_itemdictionary_layout::W_name_display
  539.           x      = WD_itemdictionary_layout::W_name_display_x
  540.           y      = WD_itemdictionary_layout::W_name_display_y
  541.           draw_item_name(@item, x, y, true)
  542.         end
  543.         font_size = WD_itemdictionary_layout::C_font_size
  544.         contents.font.size = font_size
  545.         if WD_itemdictionary_layout::W_type_display
  546.           text1  = WD_itemdictionary_layout::W_type_display_text1
  547.           text2  = $data_system.weapon_types[@item.wtype_id]
  548.           x      = WD_itemdictionary_layout::W_type_display_x
  549.           y      = WD_itemdictionary_layout::W_type_display_y
  550.           width  = WD_itemdictionary_layout::W_type_display_width
  551.           change_color(system_color)
  552.           draw_text(x, y, width, font_size, text1, 0)
  553.           change_color(normal_color)
  554.           draw_text(x, y, width, font_size, text2, 2)
  555.         end
  556.         if WD_itemdictionary_layout::W_price_display
  557.           text1  = WD_itemdictionary_layout::W_price_display_text1
  558.           text2  = @item.price
  559.           text3  = Vocab::currency_unit
  560.           x      = WD_itemdictionary_layout::W_price_display_x
  561.           y      = WD_itemdictionary_layout::W_price_display_y
  562.           width  = WD_itemdictionary_layout::W_price_display_width
  563.           change_color(system_color)
  564.           draw_text(x, y, width, font_size, text1, 0)
  565.           cx = text_size(Vocab::currency_unit).width
  566.           change_color(normal_color)
  567.           draw_text(x, y, width - cx - 2, font_size, text2, 2)
  568.           change_color(system_color)
  569.           draw_text(x, y, width, font_size, text3, 2)
  570.           change_color(normal_color)
  571.         end
  572.         if WD_itemdictionary_layout::W_atk_display
  573.           text1  = Vocab::param(2)
  574.           text2  = @item.params[2]
  575.           x      = WD_itemdictionary_layout::W_atk_display_x
  576.           y      = WD_itemdictionary_layout::W_atk_display_y
  577.           width  = WD_itemdictionary_layout::W_atk_display_width
  578.           change_color(system_color)
  579.           draw_text(x, y, width, font_size, text1, 0)
  580.           change_color(normal_color)
  581.           draw_text(x, y, width, font_size, text2, 2)
  582.         end
  583.         if WD_itemdictionary_layout::W_def_display
  584.           text1  = Vocab::param(3)
  585.           text2  = @item.params[3]
  586.           x      = WD_itemdictionary_layout::W_def_display_x
  587.           y      = WD_itemdictionary_layout::W_def_display_y
  588.           width  = WD_itemdictionary_layout::W_def_display_width
  589.           change_color(system_color)
  590.           draw_text(x, y, width, font_size, text1, 0)
  591.           change_color(normal_color)
  592.           draw_text(x, y, width, font_size, text2, 2)
  593.         end
  594.         if WD_itemdictionary_layout::W_mat_display
  595.           text1  = Vocab::param(4)
  596.           text2  = @item.params[4]
  597.           x      = WD_itemdictionary_layout::W_mat_display_x
  598.           y      = WD_itemdictionary_layout::W_mat_display_y
  599.           width  = WD_itemdictionary_layout::W_mat_display_width
  600.           change_color(system_color)
  601.           draw_text(x, y, width, font_size, text1, 0)
  602.           change_color(normal_color)
  603.           draw_text(x, y, width, font_size, text2, 2)
  604.         end
  605.         if WD_itemdictionary_layout::W_mdf_display
  606.           text1  = Vocab::param(5)
  607.           text2  = @item.params[5]
  608.           x      = WD_itemdictionary_layout::W_mdf_display_x
  609.           y      = WD_itemdictionary_layout::W_mdf_display_y
  610.           width  = WD_itemdictionary_layout::W_mdf_display_width
  611.           change_color(system_color)
  612.           draw_text(x, y, width, font_size, text1, 0)
  613.           change_color(normal_color)
  614.           draw_text(x, y, width, font_size, text2, 2)
  615.         end
  616.         if WD_itemdictionary_layout::W_agi_display
  617.           text1  = Vocab::param(6)
  618.           text2  = @item.params[6]
  619.           x      = WD_itemdictionary_layout::W_agi_display_x
  620.           y      = WD_itemdictionary_layout::W_agi_display_y
  621.           width  = WD_itemdictionary_layout::W_agi_display_width
  622.           change_color(system_color)
  623.           draw_text(x, y, width, font_size, text1, 0)
  624.           change_color(normal_color)
  625.           draw_text(x, y, width, font_size, text2, 2)
  626.         end
  627.         if WD_itemdictionary_layout::W_luk_display
  628.           text1  = Vocab::param(7)
  629.           text2  = @item.params[7]
  630.           x      = WD_itemdictionary_layout::W_luk_display_x
  631.           y      = WD_itemdictionary_layout::W_luk_display_y
  632.           width  = WD_itemdictionary_layout::W_luk_display_width
  633.           change_color(system_color)
  634.           draw_text(x, y, width, font_size, text1, 0)
  635.           change_color(normal_color)
  636.           draw_text(x, y, width, font_size, text2, 2)
  637.         end
  638.         if WD_itemdictionary_layout::W_mhp_display
  639.           text1  = Vocab::param(0)
  640.           text2  = @item.params[0]
  641.           x      = WD_itemdictionary_layout::W_mhp_display_x
  642.           y      = WD_itemdictionary_layout::W_mhp_display_y
  643.           width  = WD_itemdictionary_layout::W_mhp_display_width
  644.           change_color(system_color)
  645.           draw_text(x, y, width, font_size, text1, 0)
  646.           change_color(normal_color)
  647.           draw_text(x, y, width, font_size, text2, 2)
  648.         end
  649.         if WD_itemdictionary_layout::W_mmp_display
  650.           text1  = Vocab::param(1)
  651.           text2  = @item.params[1]
  652.           x      = WD_itemdictionary_layout::W_mmp_display_x
  653.           y      = WD_itemdictionary_layout::W_mmp_display_y
  654.           width  = WD_itemdictionary_layout::W_mmp_display_width
  655.           change_color(system_color)
  656.           draw_text(x, y, width, font_size, text1, 0)
  657.           change_color(normal_color)
  658.           draw_text(x, y, width, font_size, text2, 2)
  659.         end
  660.         if WD_itemdictionary_layout::W_option_display
  661.           text1  = WD_itemdictionary_layout::W_option_display_text1
  662.           text2  = WD_itemdictionary_layout::W_option_display_text2
  663.           x      = WD_itemdictionary_layout::W_option_display_x
  664.           y      = WD_itemdictionary_layout::W_option_display_y
  665.           width  = WD_itemdictionary_layout::W_option_display_width
  666.           change_color(system_color)
  667.           draw_text(x, y, width, font_size, text1, 0)
  668.           change_color(normal_color)
  669.           i = 0
  670.           @item.note.scan(/<图鉴功能:(.*)>/){|matched|
  671.             i += 1
  672.             self.contents.draw_text(x + font_size, y + font_size * i, width - font_size, font_size, matched[0], 0)
  673.            }
  674.           if i == 0
  675.             self.contents.draw_text(x + font_size, y + font_size, width - font_size, font_size, text2, 0)
  676.           end
  677.         end

  678.       elsif @item.is_a?(RPG::Armor)
  679.         if WD_itemdictionary_layout::A_id_display
  680.           text1  = sprintf("%0#{WD_itemdictionary_layout::A_id_display_digit}d",@index+1)
  681.           x      = WD_itemdictionary_layout::A_id_display_x
  682.           y      = WD_itemdictionary_layout::A_id_display_y
  683.           width  = WD_itemdictionary_layout::A_id_display_width
  684.           height = line_height
  685.           draw_text(x, y, width, height, text1, 0)
  686.         end
  687.         if WD_itemdictionary_layout::A_name_display
  688.           x      = WD_itemdictionary_layout::A_name_display_x
  689.           y      = WD_itemdictionary_layout::A_name_display_y
  690.           draw_item_name(@item, x, y, true)
  691.         end
  692.         font_size = WD_itemdictionary_layout::C_font_size
  693.         contents.font.size = font_size
  694.         if WD_itemdictionary_layout::A_type_display
  695.           text1  = WD_itemdictionary_layout::A_type_display_text1
  696.           text2  = $data_system.armor_types[@item.atype_id]
  697.           x      = WD_itemdictionary_layout::A_type_display_x
  698.           y      = WD_itemdictionary_layout::A_type_display_y
  699.           width  = WD_itemdictionary_layout::A_type_display_width
  700.           change_color(system_color)
  701.           draw_text(x, y, width, font_size, text1, 0)
  702.           change_color(normal_color)
  703.           draw_text(x, y, width, font_size, text2, 2)
  704.         end
  705.         if WD_itemdictionary_layout::A_price_display
  706.           text1  = WD_itemdictionary_layout::A_price_display_text1
  707.           text2  = @item.price
  708.           text3  = Vocab::currency_unit
  709.           x      = WD_itemdictionary_layout::A_price_display_x
  710.           y      = WD_itemdictionary_layout::A_price_display_y
  711.           width  = WD_itemdictionary_layout::A_price_display_width
  712.           change_color(system_color)
  713.           draw_text(x, y, width, font_size, text1, 0)
  714.           cx = text_size(Vocab::currency_unit).width
  715.           change_color(normal_color)
  716.           draw_text(x, y, width - cx - 2, font_size, text2, 2)
  717.           change_color(system_color)
  718.           draw_text(x, y, width, font_size, text3, 2)
  719.           change_color(normal_color)
  720.         end
  721.         if WD_itemdictionary_layout::A_atk_display
  722.           text1  = Vocab::param(2)
  723.           text2  = @item.params[2]
  724.           x      = WD_itemdictionary_layout::A_atk_display_x
  725.           y      = WD_itemdictionary_layout::A_atk_display_y
  726.           width  = WD_itemdictionary_layout::A_atk_display_width
  727.           change_color(system_color)
  728.           draw_text(x, y, width, font_size, text1, 0)
  729.           change_color(normal_color)
  730.           draw_text(x, y, width, font_size, text2, 2)
  731.         end
  732.         if WD_itemdictionary_layout::A_def_display
  733.           text1  = Vocab::param(3)
  734.           text2  = @item.params[3]
  735.           x      = WD_itemdictionary_layout::A_def_display_x
  736.           y      = WD_itemdictionary_layout::A_def_display_y
  737.           width  = WD_itemdictionary_layout::A_def_display_width
  738.           change_color(system_color)
  739.           draw_text(x, y, width, font_size, text1, 0)
  740.           change_color(normal_color)
  741.           draw_text(x, y, width, font_size, text2, 2)
  742.         end
  743.         if WD_itemdictionary_layout::A_mat_display
  744.           text1  = Vocab::param(4)
  745.           text2  = @item.params[4]
  746.           x      = WD_itemdictionary_layout::A_mat_display_x
  747.           y      = WD_itemdictionary_layout::A_mat_display_y
  748.           width  = WD_itemdictionary_layout::A_mat_display_width
  749.           change_color(system_color)
  750.           draw_text(x, y, width, font_size, text1, 0)
  751.           change_color(normal_color)
  752.           draw_text(x, y, width, font_size, text2, 2)
  753.         end
  754.         if WD_itemdictionary_layout::A_mdf_display
  755.           text1  = Vocab::param(5)
  756.           text2  = @item.params[5]
  757.           x      = WD_itemdictionary_layout::A_mdf_display_x
  758.           y      = WD_itemdictionary_layout::A_mdf_display_y
  759.           width  = WD_itemdictionary_layout::A_mdf_display_width
  760.           change_color(system_color)
  761.           draw_text(x, y, width, font_size, text1, 0)
  762.           change_color(normal_color)
  763.           draw_text(x, y, width, font_size, text2, 2)
  764.         end
  765.         if WD_itemdictionary_layout::A_agi_display
  766.           text1  = Vocab::param(6)
  767.           text2  = @item.params[6]
  768.           x      = WD_itemdictionary_layout::A_agi_display_x
  769.           y      = WD_itemdictionary_layout::A_agi_display_y
  770.           width  = WD_itemdictionary_layout::A_agi_display_width
  771.           change_color(system_color)
  772.           draw_text(x, y, width, font_size, text1, 0)
  773.           change_color(normal_color)
  774.           draw_text(x, y, width, font_size, text2, 2)
  775.         end
  776.         if WD_itemdictionary_layout::A_luk_display
  777.           text1  = Vocab::param(7)
  778.           text2  = @item.params[7]
  779.           x      = WD_itemdictionary_layout::A_luk_display_x
  780.           y      = WD_itemdictionary_layout::A_luk_display_y
  781.           width  = WD_itemdictionary_layout::A_luk_display_width
  782.           change_color(system_color)
  783.           draw_text(x, y, width, font_size, text1, 0)
  784.           change_color(normal_color)
  785.           draw_text(x, y, width, font_size, text2, 2)
  786.         end
  787.         if WD_itemdictionary_layout::A_mhp_display
  788.           text1  = Vocab::param(0)
  789.           text2  = @item.params[0]
  790.           x      = WD_itemdictionary_layout::A_mhp_display_x
  791.           y      = WD_itemdictionary_layout::A_mhp_display_y
  792.           width  = WD_itemdictionary_layout::A_mhp_display_width
  793.           change_color(system_color)
  794.           draw_text(x, y, width, font_size, text1, 0)
  795.           change_color(normal_color)
  796.           draw_text(x, y, width, font_size, text2, 2)
  797.         end
  798.         if WD_itemdictionary_layout::A_mmp_display
  799.           text1  = Vocab::param(1)
  800.           text2  = @item.params[1]
  801.           x      = WD_itemdictionary_layout::A_mmp_display_x
  802.           y      = WD_itemdictionary_layout::A_mmp_display_y
  803.           width  = WD_itemdictionary_layout::A_mmp_display_width
  804.           change_color(system_color)
  805.           draw_text(x, y, width, font_size, text1, 0)
  806.           change_color(normal_color)
  807.           draw_text(x, y, width, font_size, text2, 2)
  808.         end
  809.         if WD_itemdictionary_layout::A_option_display
  810.           text1  = WD_itemdictionary_layout::A_option_display_text1
  811.           text2  = WD_itemdictionary_layout::A_option_display_text2
  812.           x      = WD_itemdictionary_layout::A_option_display_x
  813.           y      = WD_itemdictionary_layout::A_option_display_y
  814.           width  = WD_itemdictionary_layout::A_option_display_width
  815.           change_color(system_color)
  816.           draw_text(x, y, width, font_size, text1, 0)
  817.           change_color(normal_color)
  818.           i = 0
  819.           @item.note.scan(/<图鉴功能:(.*)>/){|matched|
  820.             i += 1
  821.             self.contents.draw_text(x + font_size, y + font_size * i, width - font_size, font_size, matched[0], 0)
  822.            }
  823.           if i == 0
  824.             self.contents.draw_text(x + font_size, y + font_size, width - font_size, font_size, text2, 0)
  825.           end
  826.         end

  827.       end

  828.     elsif @item != nil
  829.       if @item.is_a?(RPG::Item)
  830.         if WD_itemdictionary_layout::I_id_display
  831.           text1  = sprintf("%0#{WD_itemdictionary_layout::I_id_display_digit}d",@index+1)
  832.           x      = WD_itemdictionary_layout::I_id_display_x
  833.           y      = WD_itemdictionary_layout::I_id_display_y
  834.           width  = WD_itemdictionary_layout::I_id_display_width
  835.           height = line_height
  836.           draw_text(x, y, width, height, text1, 0)
  837.         end
  838.         if WD_itemdictionary_layout::I_name_display
  839.           text1  = "- No Data -"
  840.           x      = WD_itemdictionary_layout::I_name_display_x
  841.           y      = WD_itemdictionary_layout::I_name_display_y
  842.           width  = WD_itemdictionary_layout::I_name_display_width
  843.           height = line_height
  844.           draw_text(x, y, width, height, text1, 0)
  845.         end
  846.       end
  847.       if @item.is_a?(RPG::Weapon)
  848.         if WD_itemdictionary_layout::W_id_display
  849.           text1  = sprintf("%0#{WD_itemdictionary_layout::W_id_display_digit}d",@index+1)
  850.           x      = WD_itemdictionary_layout::W_id_display_x
  851.           y      = WD_itemdictionary_layout::W_id_display_y
  852.           width  = WD_itemdictionary_layout::W_id_display_width
  853.           height = line_height
  854.           draw_text(x, y, width, height, text1, 0)
  855.         end
  856.         if WD_itemdictionary_layout::W_name_display
  857.           text1  = "- No Data -"
  858.           x      = WD_itemdictionary_layout::W_name_display_x
  859.           y      = WD_itemdictionary_layout::W_name_display_y
  860.           width  = WD_itemdictionary_layout::W_name_display_width
  861.           height = line_height
  862.           draw_text(x, y, width, height, text1, 0)
  863.         end
  864.       end
  865.       if @item.is_a?(RPG::Armor)
  866.         if WD_itemdictionary_layout::A_id_display
  867.           text1  = sprintf("%0#{WD_itemdictionary_layout::A_id_display_digit}d",@index+1)
  868.           x      = WD_itemdictionary_layout::A_id_display_x
  869.           y      = WD_itemdictionary_layout::A_id_display_y
  870.           width  = WD_itemdictionary_layout::A_id_display_width
  871.           height = line_height
  872.           draw_text(x, y, width, height, text1, 0)
  873.         end
  874.         if WD_itemdictionary_layout::A_name_display
  875.           text1  = "- No Data -"
  876.           x      = WD_itemdictionary_layout::A_name_display_x
  877.           y      = WD_itemdictionary_layout::A_name_display_y
  878.           width  = WD_itemdictionary_layout::A_name_display_width
  879.           height = line_height
  880.           draw_text(x, y, width, height, text1, 0)
  881.         end
  882.       end

  883.     end
  884.   end
  885. end
复制代码

作者: tseyik    时间: 2014-4-5 09:34
本帖最后由 tseyik 于 2014-4-5 15:51 编辑

本脚本原本就有這功能
データベース上のアイテムのメモ欄に
 「<図鑑特徴:○○○>」と記述すると、それが図鑑の特徴欄に
 記述されます。
在数据庫中該物品的註中用
「<図鑑特徴:○○○>」
以圖為例:


更改脚本這句可改語柄
@item.note.scan(/<図鑑特徴:(.*)>/){|matched|i += 1

@item.note.scan(/<Features:(.*)>/){|matched|i += 1
那就変成
「<Features:○○○>」
另外本脚本己更新1.01
ver1.01 (2013/10/26)
 「武器の増減」・「防具の増減」で、「装備品を含める」としても装備品が減らないバグを修正。
ver1.01
000.rar (4.93 KB, 下载次数: 108)
作者: VIPArcher    时间: 2014-4-5 12:08
tseyik 发表于 2014-4-5 09:34
本脚本原本就有這功能
データベース上のアイテムのメモ欄に
 「」と記述すると、それが図鑑の特徴欄に

谢谢,我都没发现诶,那个里面也没注释下。。。还有你发的TXT我这没字体,都乱码了.能弄个工程丢上来吗?
作者: SuperMario    时间: 2014-4-6 01:00
VIPArcher 发表于 2014-4-5 12:08
谢谢,我都没发现诶,那个里面也没注释下。。。还有你发的TXT我这没字体,都乱码了.能弄个工程丢上来吗? ...

那应该是编码问题,用浏览器打开文本,然后选择编码。
作者: VIPArcher    时间: 2014-4-7 23:50
SuperMario 发表于 2014-4-6 01:00
那应该是编码问题,用浏览器打开文本,然后选择编码。

选那种编码?我用IE打开还是都是乱码,还得一个一个对应得改,太麻烦
作者: VIPArcher    时间: 2014-4-8 20:19
tseyik 发表于 2014-4-5 09:34
本脚本原本就有這功能
データベース上のアイテムのメモ欄に
 「」と記述すると、それが図鑑の特徴欄に

可以了,谢谢!




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1