=begin ◆概要 アイテムの鑑定が出来るようになります。 似たようなスクリプトは他所にもありますが、このスクリプトはTOPの「?SWORD」など ランダム変化する鑑定に特化しています。 ◆機能 ・武具アイテムのメモ欄に<鑑定アイテム>と記入すると、鑑定することで別の アイテムに変化するアイテムになります。 ・<名前鑑定済>か<名前鑑定済み>と記入すると、最初から名前だけ分かります。 ・<鑑定結果 n, p>でそのアイテムがpの確率でIDnのアイテムに変化(種類は元の アイテムに対応)します。百分率ではありません。 例:<鑑定結果 1, 3><鑑定結果 2, 1><鑑定結果 3, 1>の三つを設定した場合、 pの合計は5であるから、それぞれ3/5、1/5、1/5の確率で変化。 ・アイテムまたはスキルのメモ欄に<鑑定>と記入すると、そのスキルまたはアイテムを 使用することで鑑定が出来ます。 ・その他詳しい機能は設定項目のところでも解説しています。 ・イベントコマンドのスクリプトに「clear_all_name_ni」と「identify_all_item」の 二つがあります。前者はランダムで名付けた名前を削除、後者は持っているアイテムを 全て鑑定します。 ・鑑定ショップもついてます。「$scene = Scene_Identify」または「call_identify」で 鑑定ショップを呼び出します。 ◆仕様 ・某不思議っぽいダンジョンみたいなアイテムを作るのは難しいかも。 ◆使用上の注意 ・●……再定義 ○……新規定義 ★……エイリアス ・再定義を多用していますので素材の上の方に置くことを推奨します。 =end module FAI_IdentifyItem # 設定項目:未鑑定アイテムを別個カウントするか # trueにすると未鑑定アイテム一個につき枠を一個消費。 EACH_COUNT = true # 設定項目:適当な名前をつける # EACH_COUNTがtrueの時有効。trueにすると適当な名前がつきます。 EACH_NAME = true # 設定項目:名前リスト # EACH_NAMEがtrueの時有効。アイテムのメモ欄に<アイテム名リスト n>と # 記入すれば、ITEM_NAME_LIST[n]の名前からランダムで名前が付く。 # 0は初期設定。下記の設定に合わせて十分に設定しないとフリーズする。 ITEM_NAME_LIST = [] ITEM_NAME_LIST[0] = ["ナゾ", "アレ", "何か"] ITEM_NAME_LIST[1] = ["キレイな薬","アレな薬","クエエエの薬","ぬるぽ"] # 設定項目:同じアイテムに同じ名前を付ける ITEM_COMMON_NAME = false # 設定項目:ランダムで同じ名前が付いてもよいか RAND_COMMON_NAME = true # 設定項目:未鑑定アイテムの説明文を隠す # trueで全部、falseで名前鑑定済み以外、nilで隠さない HIDE_NI_DESCRIPTION = false # 設定項目:隠した後の説明文 # HIDE_NI_DESCRIPTIONがtrueの時有効。 NI_DESCRIPTION = "なんだか よく わからない!" # 設定項目:未鑑定アイテムの名前に色をつける # trueで黄色、falseで白、Color.new(R, G, B)で色指定。 IDENTIFIED_COLOR = Color.new(255, 255, 0) # 設定項目:鑑定リスト # IDENTIFY_LIST[n]で設定可能。設定は「ID => 確率」で。 # 確率は別に100%じゃなくてもいいです。 # このリストは<鑑定リスト n>でn番目を使うことが出来ます。 # また、<鑑定結果 n p>とも併用が出来ます。 IDENTIFY_LIST = [{2 => 1}] IDENTIFY_LIST[1] = {2=>50, 6=>25, 10=>13, 13=>6, 21=>3, 29=>2, 30=>1} # 設定項目:鑑定費用の文字式 # 100でも@item.price*0.3でも何でも書いとけば計算してくれます。 # スクリプト初心者は初期設定の式をよく読んでからお好みの設定をしてください。 # メモ欄に<鑑定費用 n>と記入すれば@item.price_identifyで呼び出せます。 DEF_PRICE_IDENTIFY = "@item.price_identify.zero? ? (@item.price*0.3).round : @item.price_identify" IDENTIFY = /<鑑定>/ NOT_IDENTIFIED = /<鑑定アイテム>/ NAME_IDENTIFIED = /<名前鑑定済(?:み)*>/ IDENTIFIED_ITEM = /<鑑定結果\s*(\d+)\s*\,\s*(\d+)\s*>/ IDENTIFIED_LIST = /<鑑定リスト\s*(\d+)\s*>/ NAME_LIST_NUM = /<アイテム名リスト\s*(\d+)\s*>/ PRICE_IDENTIFY = /<鑑定費用\s*(\d+)\s*>/ end class RPG::BaseItem #-------------------------------------------------------------------------- # ○ メモ取得 #-------------------------------------------------------------------------- def memo_identify @identified = true @name_identified = !(FAI_IdentifyItem::EACH_COUNT && FAI_IdentifyItem::EACH_NAME) @identified_item = {} @identified_list = -1 @item_name_list = 0 @price_identify = 0 self.note.each_line{|line| case line when FAI_IdentifyItem::NOT_IDENTIFIED @identified = false when FAI_IdentifyItem::NAME_IDENTIFIED @name_identified = true when FAI_IdentifyItem::IDENTIFIED_ITEM @identified_item[$1.to_i] = $2.to_i when FAI_IdentifyItem::IDENTIFIED_LIST @identified_list = $1.to_i when FAI_IdentifyItem::NAME_LIST_NUM @item_name_list = $1.to_i when FAI_IdentifyItem::PRICE_IDENTIFY @price_identify = $1.to_i end } end #-------------------------------------------------------------------------- # ○ 鑑定 #-------------------------------------------------------------------------- def identify i = 0; s = 0; identifed_item.each_value{|v|s += v}; pro = rand(s) identifed_item.each{|k, v|break i = k if pro < v; pro -= v} if is_a?(RPG::Item); item = $data_items[i] elsif is_a?(RPG::Weapon); item = $data_weapons[i] elsif is_a?(RPG::Armor); item = $data_armors[i] end $game_party.lose_item(self, 1); $game_party.gain_item(item, 1); item end #-------------------------------------------------------------------------- # ○ 鑑定済みか? #-------------------------------------------------------------------------- def identified; memo_identify if @identified.nil?; @identified; end #-------------------------------------------------------------------------- # ○ 名前鑑定済みか? #-------------------------------------------------------------------------- def name_identified memo_identify if @name_identified.nil?; @identified || @name_identified end #-------------------------------------------------------------------------- # ○ 鑑定後のアイテム #-------------------------------------------------------------------------- def identifed_item memo_identify if !@identified_item || !@identified_list if @identified_list >= 0 list = FAI_IdentifyItem::IDENTIFY_LIST[@identified_list] else list = {} end; @identified_item.each{|k, v|list[k] = v}; list end #-------------------------------------------------------------------------- # ○ 鑑定に必要な価格 #-------------------------------------------------------------------------- def price_identify memo_identify if @price_identify.nil?; @price_identify end #-------------------------------------------------------------------------- # ● 名前 #-------------------------------------------------------------------------- def name if !$game_system || name_identified; @name else list = FAI_IdentifyItem::ITEM_NAME_LIST[@item_name_list] if FAI_IdentifyItem::ITEM_COMMON_NAME if !$game_system.item_name[id] name = "" loop do name = list[rand(list.size)] include_name = $game_system.item_name.values.include?(name) break if FAI_IdentifyItem::RAND_COMMON_NAME || !include_name end $game_system.item_name[id] = name end $game_system.item_name[id] else @name_ni_n = $game_system.item_name.size if !@name_ni_n if !$game_system.item_name[@name_ni_n] name = "" loop do name = list[rand(list.size)] include_name = $game_system.item_name.values.include?(name) break if FAI_IdentifyItem::RAND_COMMON_NAME || !include_name end $game_system.item_name[@name_ni_n] = name end $game_system.item_name[@name_ni_n] end end end #-------------------------------------------------------------------------- # ● 説明文 #-------------------------------------------------------------------------- def description if (FAI_IdentifyItem::HIDE_NI_DESCRIPTION && !identified) || (!FAI_IdentifyItem::HIDE_NI_DESCRIPTION.nil? && !name_identified) FAI_IdentifyItem::NI_DESCRIPTION else @description end end #-------------------------------------------------------------------------- # ○ アイテム名の初期化 #-------------------------------------------------------------------------- def clear_name_not_identify @name_ni_n = nil end end class RPG::UsableItem < RPG::BaseItem #-------------------------------------------------------------------------- # ○ メモ取得 #-------------------------------------------------------------------------- def memo_identify @act_identify = false super self.note.each_line{|line| case line when FAI_IdentifyItem::IDENTIFY @act_identify = $1.to_i end } end #-------------------------------------------------------------------------- # ○ 鑑定か? #-------------------------------------------------------------------------- def act_identify; memo_identify if @act_identify.nil?; @act_identify; end end #============================================================================== # ■ Game_Interpreter #============================================================================== class Game_Interpreter #-------------------------------------------------------------------------- # ○ アイテム名の初期化 #-------------------------------------------------------------------------- def clear_all_name_ni $data_items.compact.each{|item|item.clear_name_not_identify} $data_weapons.compact.each{|item|item.clear_name_not_identify} $data_armors.compact.each{|item|item.clear_name_not_identify} $game_system.item_name.clear end #-------------------------------------------------------------------------- # ○ 全アイテムの鑑定 #-------------------------------------------------------------------------- def identify_all_item $game_party.items.select{|item|!item.identified}.each{|i|i.identify} end #-------------------------------------------------------------------------- # ○ 鑑定画面を開く #-------------------------------------------------------------------------- def call_identify $game_temp.next_scene = "identify" @index += 1 return false end end #============================================================================== # ■ Game_System #============================================================================== class Game_System #-------------------------------------------------------------------------- # ○ 公開インスタンス変数 #-------------------------------------------------------------------------- attr_accessor :item_name # アイテム名 #-------------------------------------------------------------------------- # ★ オブジェクト初期化 #-------------------------------------------------------------------------- alias fai_ii_initialize initialize def initialize fai_ii_initialize @item_name = {} end end #============================================================================== # ■ Game_Party #============================================================================== class Game_Party < Game_Unit #-------------------------------------------------------------------------- # ● アイテムオブジェクトの配列取得 (武器と防具を含む) #-------------------------------------------------------------------------- def items result = [] for i in @items.keys.sort next if !$data_items[i].identified result.push($data_items[i]) if @items[i] > 0 end for i in @weapons.keys.sort next if !$data_weapons[i].identified result.push($data_weapons[i]) if @weapons[i] > 0 end for i in @armors.keys.sort next if !$data_armors[i].identified result.push($data_armors[i]) if @armors[i] > 0 end if FAI_IdentifyItem::EACH_COUNT for i in @items.keys.sort next if $data_items[i].identified @items[i].times{result.push($data_items[i])} end for i in @weapons.keys.sort next if $data_weapons[i].identified @weapons[i].times{result.push($data_weapons[i])} end for i in @armors.keys.sort next if $data_armors[i].identified @armors[i].times{result.push($data_armors[i])} end else for i in @items.keys.sort next if $data_items[i].identified result.push($data_items[i]) if @items[i] > 0 end for i in @weapons.keys.sort next if $data_weapons[i].identified result.push($data_weapons[i]) if @weapons[i] > 0 end for i in @armors.keys.sort next if $data_armors[i].identified result.push($data_armors[i]) if @armors[i] > 0 end end return result end end if FAI_IdentifyItem::IDENTIFIED_COLOR #============================================================================== # ■ Window_Base #============================================================================== class Window_Base #-------------------------------------------------------------------------- # ● アイテム名の描画 #-------------------------------------------------------------------------- def draw_item_name(item, x, y, enabled = true) if item if FAI_IdentifyItem::IDENTIFIED_COLOR.is_a?(TrueClass) color = Color.new(255, 255, 0) else color = FAI_IdentifyItem::IDENTIFIED_COLOR end draw_icon(item.icon_index, x, y, enabled) self.contents.font.color = item.identified ? normal_color : color self.contents.font.color.alpha = enabled ? 255 : 128 self.contents.draw_text(x + 24, y, 172, WLH, item.name) end end end end # <= if FAI_IdentifyItem::IDENTIFIED_COLOR #============================================================================== # ■ Window_Item #============================================================================== class Window_Item < Window_Selectable #-------------------------------------------------------------------------- # ● 項目の描画 # index : 項目番号 #-------------------------------------------------------------------------- def draw_item(index) rect = item_rect(index) self.contents.clear_rect(rect) item = @data[index] if item != nil if FAI_IdentifyItem::EACH_COUNT && !item.identified number = 1 else number = $game_party.item_number(item) end enabled = enable?(item) rect.width -= 4 draw_item_name(item, rect.x, rect.y, enabled) self.contents.draw_text(rect, sprintf(":%2d", number), 2) end end end #============================================================================== # □ Window_IdentifyItem #============================================================================== class Window_IdentifyItem < Window_Item #-------------------------------------------------------------------------- # ○ オブジェクト初期化 #-------------------------------------------------------------------------- def initialize(x, y, width, height) super(x, y, width, height) @column_max = 1 refresh end #-------------------------------------------------------------------------- # ○ アイテムをリストに含めるかどうか #-------------------------------------------------------------------------- def include?(item); item && !item.identified; end #-------------------------------------------------------------------------- # ○ リフレッシュ #-------------------------------------------------------------------------- def refresh @data = [] for item in $game_party.items next unless include?(item) @data.push(item) end @data.push(nil) if include?(nil) @item_max = @data.size create_contents for i in 0...@item_max draw_item(i) end end #-------------------------------------------------------------------------- # ○ 項目の描画 #-------------------------------------------------------------------------- def draw_item(index) rect = item_rect(index) self.contents.clear_rect(rect) item = @data[index] if item != nil number = $game_party.item_number(item) rect.width -= 4 draw_item_name(item, rect.x, rect.y) end end end #============================================================================== # □ Window_ShopIdentify #============================================================================== class Window_ShopIdentify < Window_IdentifyItem #-------------------------------------------------------------------------- # ○ 項目の描画 #-------------------------------------------------------------------------- def draw_item(index) rect = item_rect(index) self.contents.clear_rect(rect) @item = @data[index] if @item != nil rect.width -= 4 price = eval(FAI_IdentifyItem::DEF_PRICE_IDENTIFY) draw_item_name(@item, rect.x, rect.y, price <= $game_party.gold) self.contents.draw_text(rect, price, 2) end end end #============================================================================== # ■ Scene_Item #============================================================================== class Scene_Item < Scene_Base #-------------------------------------------------------------------------- # ★ 開始処理 #-------------------------------------------------------------------------- alias fai_ii_start start def start fai_ii_start @target_window2 = Window_IdentifyItem.new(0, 0, 272, 416) hide_target_window2 @result_window = Window_Base.new(150, 100, 244, 56) @result_window.visible = false end #-------------------------------------------------------------------------- # ★ 終了処理 #-------------------------------------------------------------------------- alias fai_ii_terminate terminate def terminate fai_ii_terminate @target_window2.dispose @result_window.dispose end #-------------------------------------------------------------------------- # ★ フレーム更新 #-------------------------------------------------------------------------- alias fai_ii_update update def update @target_window2.update @result_window.update if @result_window.visible if Input.trigger?(Input::B) || Input.trigger?(Input::C) @result_window.visible = false @target_window2.refresh @item_window.refresh end elsif @target_window2.active update_target2_selection else fai_ii_update end end #-------------------------------------------------------------------------- # ● アイテムの決定 #-------------------------------------------------------------------------- def determine_item if @item.for_friend? show_target_window(@item_window.index % 2 == 0) if @item.for_all? @target_window.index = 99 else if $game_party.last_target_index < @target_window.item_max @target_window.index = $game_party.last_target_index else @target_window.index = 0 end end elsif @item.act_identify show_target_window2(@item_window.index % 2 == 0) else use_item_nontarget end end #-------------------------------------------------------------------------- # ○ ターゲット選択2の更新 #-------------------------------------------------------------------------- def update_target2_selection if Input.trigger?(Input::B) Sound.play_cancel if $game_party.item_number(@item) == 0 @item_window.refresh end hide_target_window2 elsif Input.trigger?(Input::C) if !$game_party.item_can_use?(@item) || !@target_window2.item Sound.play_buzzer else determine_target2 end end end #-------------------------------------------------------------------------- # ○ ターゲットアイテムの決定 #-------------------------------------------------------------------------- def determine_target2 item = @target_window2.item.identify @result_window.contents.clear @result_window.draw_item_name(item, 0, 0) @result_window.visible = true use_item_nontarget end #-------------------------------------------------------------------------- # ○ ターゲットウィンドウ2の表示 # right : 右寄せフラグ (false なら左寄せ) #-------------------------------------------------------------------------- def show_target_window2(right) @item_window.active = false width_remain = 544 - @target_window2.width @target_window2.x = right ? width_remain : 0 @target_window2.visible = true @target_window2.active = true if right @viewport.rect.set(0, 0, width_remain, 416) @viewport.ox = 0 else @viewport.rect.set(@target_window2.width, 0, width_remain, 416) @viewport.ox = @target_window2.width end end #-------------------------------------------------------------------------- # ○ ターゲットウィンドウ2の非表示 #-------------------------------------------------------------------------- def hide_target_window2 @item_window.active = true @target_window2.visible = false @target_window2.active = false @viewport.rect.set(0, 0, 544, 416) @viewport.ox = 0 end end #============================================================================== # ■ Scene_Skill #============================================================================== class Scene_Skill < Scene_Base #-------------------------------------------------------------------------- # ★ 開始処理 #-------------------------------------------------------------------------- alias fai_ii_start start def start fai_ii_start @target_window2 = Window_IdentifyItem.new(0, 0, 272, 416) hide_target_window2 @result_window = Window_Base.new(150, 100, 244, 56) @result_window.visible = false end #-------------------------------------------------------------------------- # ★ 終了処理 #-------------------------------------------------------------------------- alias fai_ii_terminate terminate def terminate fai_ii_terminate @target_window2.dispose @result_window.dispose end #-------------------------------------------------------------------------- # ★ フレーム更新 #-------------------------------------------------------------------------- alias fai_ii_update update def update @target_window2.update @result_window.update if @result_window.visible if Input.trigger?(Input::B) || Input.trigger?(Input::C) @result_window.visible = false @target_window2.refresh end elsif @target_window2.active update_target2_selection else fai_ii_update end end #-------------------------------------------------------------------------- # ● スキルの決定 #-------------------------------------------------------------------------- def determine_skill if @skill.for_friend? show_target_window(@skill_window.index % 2 == 0) if @skill.for_all? @target_window.index = 99 elsif @skill.for_user? @target_window.index = @actor_index + 100 else if $game_party.last_target_index < @target_window.item_max @target_window.index = $game_party.last_target_index else @target_window.index = 0 end end elsif @skill.act_identify show_target_window2(@skill_window.index % 2 == 0) else use_skill_nontarget end end #-------------------------------------------------------------------------- # ○ ターゲット選択2の更新 #-------------------------------------------------------------------------- def update_target2_selection if Input.trigger?(Input::B) Sound.play_cancel hide_target_window2 elsif Input.trigger?(Input::C) if !@actor.skill_can_use?(@skill) || !@target_window2.item Sound.play_buzzer else determine_target2 end end end #-------------------------------------------------------------------------- # ○ ターゲットアイテムの決定 #-------------------------------------------------------------------------- def determine_target2 item = @target_window2.item.identify @result_window.contents.clear @result_window.draw_item_name(item, 0, 0) @result_window.visible = true use_skill_nontarget end #-------------------------------------------------------------------------- # ○ ターゲットウィンドウ2の表示 # right : 右寄せフラグ (false なら左寄せ) #-------------------------------------------------------------------------- def show_target_window2(right) @skill_window.active = false width_remain = 544 - @target_window2.width @target_window2.x = right ? width_remain : 0 @target_window2.visible = true @target_window2.active = true if right @viewport.rect.set(0, 0, width_remain, 416) @viewport.ox = 0 else @viewport.rect.set(@target_window2.width, 0, width_remain, 416) @viewport.ox = @target_window2.width end end #-------------------------------------------------------------------------- # ○ ターゲットウィンドウ2の非表示 #-------------------------------------------------------------------------- def hide_target_window2 @skill_window.active = true @target_window2.visible = false @target_window2.active = false @viewport.rect.set(0, 0, 544, 416) @viewport.ox = 0 end end #============================================================================== # ■ Scene_Map #============================================================================== class Scene_Map < Scene_Base #-------------------------------------------------------------------------- # ● 画面切り替えの実行 #-------------------------------------------------------------------------- alias fai_ii_update_scene_change update_scene_change def update_scene_change return if $game_player.moving? # プレイヤーの移動中? case $game_temp.next_scene when "identify" call_identify else fai_ii_update_scene_change end end #-------------------------------------------------------------------------- # ● 鑑定画面への切り替え #-------------------------------------------------------------------------- def call_identify $game_temp.next_scene = nil $scene = Scene_Identify.new end end #============================================================================== # □ Scene_Identify #============================================================================== class Scene_Identify < Scene_Base #-------------------------------------------------------------------------- # ○ 開始処理 #-------------------------------------------------------------------------- def start super create_menu_background @help_window = Window_Help.new @gold_window = Window_Gold.new(384, 56) @dummy_window = Window_Base.new(0, 112, 384, 304) @buy_window = Window_ShopIdentify.new(0, 112, 384, 304) @buy_window.active = false @buy_window.visible = false @buy_window.help_window = @help_window create_command_window @result_window = Window_Base.new(150, 100, 244, 56) @result_window.visible = false end #-------------------------------------------------------------------------- # ○ 終了処理 #-------------------------------------------------------------------------- def terminate super dispose_menu_background dispose_command_window @help_window.dispose @gold_window.dispose @dummy_window.dispose @buy_window.dispose end #-------------------------------------------------------------------------- # ○ フレーム更新 #-------------------------------------------------------------------------- def update super update_menu_background @help_window.update @command_window.update @yesno_window.update @gold_window.update @dummy_window.update @buy_window.update if @command_window.active update_command_selection elsif @buy_window.active update_buy_selection elsif @yesno_window.active update_yesno_selection elsif @result_window.active if Input.trigger?(Input::B) || Input.trigger?(Input::C) @result_window.active = false @result_window.visible = false @buy_window.active = true @buy_window.refresh end end end #-------------------------------------------------------------------------- # ○ コマンドウィンドウの作成 #-------------------------------------------------------------------------- def create_command_window s1 = "鑑定する" s2 = Vocab::ShopCancel @command_window = Window_Command.new(384, [s1, s2], 2) @command_window.y = 56 @yesno_window = Window_Command.new(244, ["鑑定する", "やめる"], 2) @yesno_window.x = 150 @yesno_window.y = 200 @yesno_window.active = false @yesno_window.visible = false end #-------------------------------------------------------------------------- # ○ コマンドウィンドウの解放 #-------------------------------------------------------------------------- def dispose_command_window @command_window.dispose @yesno_window.dispose end #-------------------------------------------------------------------------- # ○ コマンド選択の更新 #-------------------------------------------------------------------------- def update_command_selection if Input.trigger?(Input::B) Sound.play_cancel $scene = Scene_Map.new elsif Input.trigger?(Input::C) case @command_window.index when 0 # 購入する Sound.play_decision @command_window.active = false @dummy_window.visible = false @buy_window.active = true @buy_window.visible = true @buy_window.refresh when 1 # やめる Sound.play_decision $scene = Scene_Map.new end end end #-------------------------------------------------------------------------- # ○ 鑑定アイテム選択の更新 #-------------------------------------------------------------------------- def update_buy_selection if Input.trigger?(Input::B) Sound.play_cancel @command_window.active = true @dummy_window.visible = true @buy_window.active = false @buy_window.visible = false @help_window.set_text("") return end if Input.trigger?(Input::C) @item = @buy_window.item if !@item || eval(FAI_IdentifyItem::DEF_PRICE_IDENTIFY)>$game_party.gold Sound.play_buzzer else Sound.play_decision @buy_window.active = false @yesno_window.active = true @yesno_window.visible = true end end end #-------------------------------------------------------------------------- # ○ 鑑定するかどうかの更新 #-------------------------------------------------------------------------- def update_yesno_selection if Input.trigger?(Input::B) cancel_identify elsif Input.trigger?(Input::C) @yesno_window.index.zero? ? decide_identify : cancel_identify end end #-------------------------------------------------------------------------- # ○ 鑑定のキャンセル #-------------------------------------------------------------------------- def cancel_identify Sound.play_cancel @yesno_window.active = false @yesno_window.visible = false @buy_window.active = true end #-------------------------------------------------------------------------- # ○ 鑑定の決定 #-------------------------------------------------------------------------- def decide_identify Sound.play_shop @yesno_window.active = false @yesno_window.visible = false $game_party.lose_gold(eval(FAI_IdentifyItem::DEF_PRICE_IDENTIFY)) item = @item.identify @gold_window.refresh @result_window.contents.clear @result_window.draw_item_name(item, 0, 0) @result_window.active = true @result_window.visible = true end end