#============================================================================== # ■ RGSS3 アイテムネームカラー自動変更 Ver1.00 by 星潟 #------------------------------------------------------------------------------ # アイテム・スキル名の色を、スキルコストor消費するか否かに応じて変更します。 # 当方のアイテムカラー変更を導入されている場合は # アイテムカラー変更より上の位置に導入して下さい。 # (そうする事で、アイテムカラー変更の個別設定が有効となります。 #  アイテムカラー変更の個別設定は、本スクリプトの効果より優先されます。 #  位置を逆にした場合は、本スクリプトの設定のみが有効となります) #============================================================================== module MTPSC #スキルネームカラー変更有効 SKOK = true #アイテムネームカラー変更有効 ITOK = true #MP・TP消費のないスキルのアイテムカラー NOCS = 0 #MP消費のあるスキルのアイテムカラー MPSC = 3 #TP消費のあるスキルのアイテムカラー TPSC = 4 #MP・TP共に消費するスキルのアイテムカラー MTPC = 6 #消費アイテムのアイテムカラー CONS = 0 #消費しないアイテムのアイテムカラー UNBR = 14 end class Window_Base < Window #-------------------------------------------------------------------------- # ● アイテム名の描画 # enabled : 有効フラグ。false のとき半透明で描画 #-------------------------------------------------------------------------- alias draw_item_name_skill_color draw_item_name def draw_item_name(item, x, y, enabled = true, width = 172) return unless item draw_icon(item.icon_index, x, y, enabled) if item.is_a?(RPG::Skill) && MTPSC::SKOK if item.mp_cost > 0 && item.tp_cost > 0 change_color(text_color(MTPSC::MTPC), enabled) elsif item.mp_cost > 0 change_color(text_color(MTPSC::MPSC), enabled) elsif item.tp_cost > 0 change_color(text_color(MTPSC::TPSC), enabled) else change_color(text_color(MTPSC::NOCS), enabled) end draw_text(x + 24, y, width, line_height, item.name) elsif item.is_a?(RPG::Item) && MTPSC::ITOK if item.consumable change_color(text_color(MTPSC::CONS), enabled) else change_color(text_color(MTPSC::UNBR), enabled) end draw_text(x + 24, y, width, line_height, item.name) else draw_item_name_skill_color(item, x, y, enabled, width) end end end