# ╔═══════════════════════════════════════════════╦════════════════════╗
# ║ Title: Equip Scene Detail Stats ║ Version: 1.01 ║
# ║ Author: Roninator2 ║ ║
# ╠═══════════════════════════════════════════════╬════════════════════╣
# ║ Function: ║ Date Created ║
# ║ Adjusts status window to show ╠════════════════════╣
# ║ equipment stats on multiple pages ║ 18 Jan 2026 ║
# ╚═══════════════════════════════════════════════╩════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Requires: Yanfly Ace Equip Engine ║
# ║ ║
# ╚════════════════════════════════════════════════════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Brief Description: ║
# ║ Show stats in status window for equipment ║
# ╚════════════════════════════════════════════════════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Instructions: ║
# ║ Script provides the ability to see equipment stats, ║
# ║ for the item selected to equip, before accepting. ║
# ╚════════════════════════════════════════════════════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Updates: ║
# ║ 1.00 - 18 Jan 2026 - Script finished ║
# ║ 1.01 - 18 Jan 2026 - Added support for BlackMorning VK Equip ║
# ╚════════════════════════════════════════════════════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Credits and Thanks: ║
# ║ Roninator2 ║
# ║ ║
# ╚════════════════════════════════════════════════════════════════════╝
# ╔════════════════════════════════════════════════════════════════════╗
# ║ Terms of use: ║
# ║ Free for all uses in RPG Maker except nudity ║
# ║ Anyone using this script in their project before these terms ║
# ║ were changed are allowed to use this script even if it conflicts ║
# ║ with these new terms. New terms effective 03 Apr 2024 ║
# ║ No part of this code can be used with AI programs or tools ║
# ╚════════════════════════════════════════════════════════════════════╝
module R2_EQUIP_STATS
WPN_STAT = "Weapon Info" # Text for weapon data.
ARM_STAT = "Armour Info" # Text for armour data.
FONTSIZE = 20 # Use 18 or 20 # Font size used for data text.
# text for when an item had effects that change the base stats
EQUIP_STAT_TEXT = "Change Base Stats"
# text for when an equipment adds skills to the player
EQUIP_SKILL_ADD = "Skill(s) Learned"
TEXT_ADD_STATES = "States Added" # States added text
TEXT_RM_STATES = "States Removed" # States removed text
TEXT_SEAL_STATES = "Skill(s) Sealed" # States sealed text
# This part defines the data used for item/equipment properties.
HP_HEAL_TEXT = "HP Effect" # Text used for HP recovery.
HP_HEAL_ICON = 128 # Icon used for HP recovery.
MP_HEAL_TEXT = "MP Effect" # Text used for MP recovery.
MP_HEAL_ICON = 202 # Icon used for MP recovery.
ERASE_STATE = "Removes Status" # Text used for removing states.
APPLY_STATE = "Applies Status" # Text used for applying states.
PARAM_BOOST = "Raises %s" # Text used for parameter raising.
SPELL_EFFECT = "Spell Effect" # Text used for spell effect items.
SPELL_DAMAGE = "%d Base Dmg" # Text used for spell damage.
SPELL_HEAL = "%d Base Heal" # Text used for spell healing.
NO_EQ_STAT = "---" # Text used when no equip
EQ_ELEMENT_W = "Apply Element" # Text used to represent equip elements.
EQ_ELEMENT_A = "Guard Element" # Text used to represent equip elements.
EQ_STATUS_W = "Apply Status" # Text used to represent equip states.
EQ_STATUS_A = "Guard Status" # Text used to represent equip states.
STATE_RESIST = "State Resist" # Text used to represent resist states.
STATS_TEXT = "Item Parameters"
# These are the general icons and text used for various aspects of new
# shop windows. Used for items and equips alike.
ICON_HP = 32 # Icon for MAXHP
ICON_MP = 33 # Icon for MAXMP
ICON_ATK = 34 # Icon for ATK
ICON_DEF = 35 # Icon for DEF
ICON_MAT = 36 # Icon for SPI
ICON_MDF = 37 # Icon for AGI
ICON_AGI = 38 # Icon for HIT
ICON_LUK = 39 # Icon for EVA
TEXT_HP = "HP" # Text for HP
TEXT_MP = "MP" # Text for MP
TEXT_TP = "TP" # Text for TP
ICON_TP = 33 # Icon for MAXMP
# Text for EX parameters
EXSTATS_TEXT = "Extra Parameters"
ICON_HIT = 184 #
TEXT_HIT = "HIT" #
ICON_EVA = 185 #
TEXT_EVA = "EVA" #
ICON_CRI = 186 #
TEXT_CRI = "CRI" #
ICON_CEV = 187 #
TEXT_CEV = "CEV" #
ICON_MEV = 188 #
TEXT_MEV = "MEV" #
ICON_MRF = 189 #
TEXT_MRF = "MRF" #
ICON_CNT = 190 #
TEXT_CNT = "CNT" #
ICON_HRG = 191 #
TEXT_HRG = "HRG" #
ICON_MRG = 192 #
TEXT_MRG = "MRG" #
ICON_TRG = 193 #
TEXT_TRG = "TRG" #
# Text for SP parameters
SPSTATS_TEXT = "Special Parameters"
ICON_TGR = 368 #
TEXT_TGR = "TGR" #
ICON_GRD = 369 #
TEXT_GRD = "GRD" #
ICON_REC = 370 #
TEXT_REC = "REC" #
ICON_PHA = 371 #
TEXT_PHA = "PHA" #
ICON_MCR = 372 #
TEXT_MCR = "MCR" #
ICON_TCR = 373 #
TEXT_TCR = "TCR" #
ICON_PDR = 374 #
TEXT_PDR = "PDR" #
ICON_MDR = 375 #
TEXT_MDR = "MDR" #
ICON_FDR = 376 #
TEXT_FDR = "FDR" #
ICON_EXR = 377 #
TEXT_EXR = "EXR" #
# Text for Elements
ELEMENTS_TEXT = "Item Elements"
# Text for States
STATES_TEXT = "Item States Applied"
# Text for Debuffs
DEBUFF_TEXT = "Equipment Debuff Info"
# Text for stating a debuff rate is applied
EQUIP_DEBUFF_TEXT = "Debuff Rate"
# Text for stating attack states are applied
# Be sure no not have more than 3, otherwise the script will need changing
EQUIP_ATTACK_STATE_TEXT = "Attack state(s)"
# Text for showing attack speed
EQUIP_ATTACK_SPEED_TEXT = "Attack Speed"
# Text for showing attack times value
EQUIP_ATTACK_TIMES_TEXT = "Attack Times"
# Text for showing action times
EQUIP_ACTION_TIMES_TEXT = "Action Times"
# text for attack page
EQUIP_ATTACK_STATE_TITLE = "Attack Abilities"
# text for bonus page
EQUIP_BONUS_TITLE = "Extra Features"
# Button used to toggle the Status Window. Keep in mind that L and R are
# used for moving between actors so it's best to not use those.
INFO_BUTTON = :SHIFT
# This sets the page order in which data is displayed for the player. The
# player can switch pages by pressing L or R.
PAGE_ORDER =[
:parameters,
:stats,
:ex_param,
:sp_param,
:elements,
:states,
:skill,
:buff,
:attack,
:bonus,
] # Do not remove this.
end
#==============================================================================
# ★ Editting anything past this point may potentially result in causing
# computer damage, incontinence, explosion of user's head, coma, death, and/or
# halitosis so edit at your own risk.
#==============================================================================
class Window_EquipStatus < Window_Base
#--------------------------------------------------------------------------
# initialize
#--------------------------------------------------------------------------
alias :r2_init_equip_status_data :initialize
def initialize(dx, dy)
@actor = nil
@temp_actor = nil
@page = 0
@item = nil
r2_init_equip_status_data(dx, dy)
end
#--------------------------------------------------------------------------
# * Set Item Window
#--------------------------------------------------------------------------
def item_window=(item_window)
@item_window = item_window
update
end
#--------------------------------------------------------------------------
# change data
#--------------------------------------------------------------------------
def toggle_info
@page = @page == R2_EQUIP_STATS::PAGE_ORDER.size - 1 ? 0 : @page + 1
refresh
end
#--------------------------------------------------------------------------
# refresh
#--------------------------------------------------------------------------
if $imported[:bm_vk_equip]
def refresh
contents.clear
return unless @actor
draw_actor_name(@actor,0,0)
mini_height = BM::EQUIP::MINI_FONT_SIZE
contents.font.size = mini_height
draw_background_colour(24, line_height+mini_height)
draw_background_colour(48, line_height*5/2+mini_height)
draw_text(0,line_height,172,line_height, "Current Item")
draw_text(24,line_height*5/2,172,line_height, "To New Item")
reset_font_settings
@item = nil
if @slot_id != nil
if @actor
item = @actor.equips[@slot_id]
draw_item_name(item, 24, line_height+mini_height)
end
if @temp_actor
new_item = @temp_actor.equips[@slot_id]
draw_item_name(new_item, 48, line_height*5/2+mini_height)
@item = @temp_actor.equips[@slot_id]
end
end
draw_page(@page)
end
else
def refresh
contents.clear
get_item
draw_page(@page)
end
end
#--------------------------------------------------------------------------
# get item from slot id
#--------------------------------------------------------------------------
def get_item
return nil if !@item_window
@item = @item_window.item
return @item
end
#--------------------------------------------------------------------------
# draw_page
#--------------------------------------------------------------------------
def draw_page(page_id)
case R2_EQUIP_STATS::PAGE_ORDER[page_id]
when :parameters
if $imported[:bm_vk_equip]
base_stats
else
8.times {|i| draw_item(0, line_height * i, i) }
end
when :stats
draw_equip_stats
when :ex_param
draw_ex_param
when :sp_param
draw_sp_param
when :elements
draw_elements
when :states
draw_states
when :skill
draw_skill
when :buff
draw_buff
when :attack
draw_attack
when :bonus
draw_bonus_features
end
end
def base_stats
i = 0
h = contents.height - line_height*4 - 6
size = BM::EQUIP::PARAM_SHOWN.size
dh = [[line_height,h/size].min,22].max
contents.font.size = dh
for param_id in BM::EQUIP::PARAM_SHOWN
case param_id
when :hp,:maxhp then param_id = 0
when :mp,:maxmp then param_id = 1
when :atk then param_id = 2
when :def then param_id = 3
when :mat then param_id = 4
when :mdf then param_id = 5
when :agi then param_id = 6
when :luk then param_id = 7
end
draw_item(0, dh * i + contents.height - h, param_id)
i += 1
return if dh * (i + 1) + contents.height - h > contents.height
end
end
def text_width(str)
temp = Bitmap.new(1, 1)
temp.font.size = R2_EQUIP_STATS::FONTSIZE
width = temp.text_size(str).width
temp.dispose
width
end
##########################################################################
#--------------------------------------------------------------------------
# draw_equip_stats
#--------------------------------------------------------------------------
def draw_equip_stats
return if @item.nil?
sw = self.width - 12
if $imported[:bm_vk_equip]
dy = line_height*4+12
else
dy = 0
end
contents.font.size = R2_EQUIP_STATS::FONTSIZE
change_color(normal_color)
draw_text(0, dy, sw-24, 24, R2_EQUIP_STATS::STATS_TEXT, 1)
dy += 24
count = 0
i = 0
@item.params.each do |param|
if param != 0
text = sprintf("%d", param)
case i
when 0 #---HP---
count += 1
word = Vocab::param(i)
icon = R2_EQUIP_STATS::ICON_HP
when 1 #---MP---
count += 1
word = Vocab::param(i)
icon = R2_EQUIP_STATS::ICON_MP
when 2 #---ATK---
count += 1
word = Vocab::param(i)
icon = R2_EQUIP_STATS::ICON_ATK
when 3 #---DEF---
count += 1
word = Vocab::param(i)
icon = R2_EQUIP_STATS::ICON_DEF
when 4 #---MAT---
count += 1
word = Vocab::param(i)
icon = R2_EQUIP_STATS::ICON_MAT
when 5 #---MDF---
count += 1
word = Vocab::param(i)
icon = R2_EQUIP_STATS::ICON_MDF
when 6 #---AGI---
count += 1
word = Vocab::param(i)
icon = R2_EQUIP_STATS::ICON_AGI
when 7 #---LUK---
count += 1
word = Vocab::param(i)
icon = R2_EQUIP_STATS::ICON_LUK
else
next
end
text = "+" + text if param > 0
change_color(system_color)
draw_text(30, dy, sw/2-24, 24, word)
change_color(normal_color)
draw_icon(icon, 70, dy, icon != 0)
draw_text(sw*1/4+50, dy, sw/5, 24, text, 2)
dy += 24
end
i += 1
end
end
##########################################################################
#--------------------------------------------------------------------------
# draw_ex_param
#--------------------------------------------------------------------------
def draw_ex_param
return if @item.nil?
#------Ex Parameters------
sw = self.width - 12
if $imported[:bm_vk_equip]
dy = line_height*4+12
else
dy = 0
end
count = 0
contents.font.size = R2_EQUIP_STATS::FONTSIZE
change_color(normal_color)
draw_text(0, dy, sw-24, 24, R2_EQUIP_STATS::EXSTATS_TEXT, 1)
dy += 24
@item.features.each do |set|
next unless set.code == 22
num = (set.value * 100).to_i
text = sprintf("%d", num)
case set.data_id
when 0 #---HIT---
count += 1
word = R2_EQUIP_STATS::TEXT_HIT
icon = R2_EQUIP_STATS::ICON_HIT
when 1 #---EVA---
count += 1
word = R2_EQUIP_STATS::TEXT_EVA
icon = R2_EQUIP_STATS::ICON_EVA
when 2 #---CRI---
count += 1
word = R2_EQUIP_STATS::TEXT_CRI
icon = R2_EQUIP_STATS::ICON_CRI
when 3 #---CEV---
count += 1
word = R2_EQUIP_STATS::TEXT_CEV
icon = R2_EQUIP_STATS::ICON_CEV
when 4 #---MEV---
count += 1
word = R2_EQUIP_STATS::TEXT_MEV
icon = R2_EQUIP_STATS::ICON_MEV
when 5 #---MRF---
count += 1
word = R2_EQUIP_STATS::TEXT_MRF
icon = R2_EQUIP_STATS::ICON_MRF
when 6 #---CNT---
count += 1
word = R2_EQUIP_STATS::TEXT_CNT
icon = R2_EQUIP_STATS::ICON_CNT
when 7 #---HRG---
count += 1
word = R2_EQUIP_STATS::TEXT_HRG
icon = R2_EQUIP_STATS::ICON_HRG
when 8 #---MRG---
count += 1
word = R2_EQUIP_STATS::TEXT_MRG
icon = R2_EQUIP_STATS::ICON_MRG
when 9 #---TRG---
count += 1
word = R2_EQUIP_STATS::TEXT_TRG
icon = R2_EQUIP_STATS::ICON_TRG
else
next
end
change_color(system_color)
draw_text(29, dy, sw/2-24, 24, word)
change_color(normal_color)
draw_icon(icon, 0, dy, icon != 0)
draw_text(sw/4, dy, sw/5, 24, text + "%", 2)
dy += 24
end
end
##########################################################################
#--------------------------------------------------------------------------
# draw_sp_param
#--------------------------------------------------------------------------
def draw_sp_param
return if @item.nil?
sw = self.width - 12
if $imported[:bm_vk_equip]
dy = line_height*4+12
else
dy = 0
end
#------SP Parameters------
count = 0
contents.font.size = R2_EQUIP_STATS::FONTSIZE
change_color(normal_color)
draw_text(0, dy, sw-24, 24, R2_EQUIP_STATS::SPSTATS_TEXT, 1)
dy += 24
@item.features.each do |set|
next unless set.code == 23
num = (set.value * 100).to_i
text = sprintf("%d", num)
case set.data_id
when 0 #---TGR---
count += 1
word = R2_EQUIP_STATS::TEXT_TGR
icon = R2_EQUIP_STATS::ICON_TGR
when 1 #---GRD---
count += 1
word = R2_EQUIP_STATS::TEXT_GRD
icon = R2_EQUIP_STATS::ICON_GRD
when 2 #---REC---
count += 1
word = R2_EQUIP_STATS::TEXT_REC
icon = R2_EQUIP_STATS::ICON_REC
when 3 #---PHA---
count += 1
word = R2_EQUIP_STATS::TEXT_PHA
icon = R2_EQUIP_STATS::ICON_PHA
when 4 #---MCR---
count += 1
word = R2_EQUIP_STATS::TEXT_MCR
icon = R2_EQUIP_STATS::ICON_MCR
when 5 #---TCR---
count += 1
word = R2_EQUIP_STATS::TEXT_TCR
icon = R2_EQUIP_STATS::ICON_TCR
when 6 #---PDR---
count += 1
word = R2_EQUIP_STATS::TEXT_PDR
icon = R2_EQUIP_STATS::ICON_PDR
when 7 #---MDR---
count += 1
word = R2_EQUIP_STATS::TEXT_MDR
icon = R2_EQUIP_STATS::ICON_MDR
when 8 #---FDR---
count += 1
word = R2_EQUIP_STATS::TEXT_FDR
icon = R2_EQUIP_STATS::ICON_FDR
when 9 #---EXR---
count += 1
word = R2_EQUIP_STATS::TEXT_EXR
icon = R2_EQUIP_STATS::ICON_EXR
else
next
end
change_color(system_color)
draw_text(29, dy, sw/2-24, 24, word)
change_color(normal_color)
draw_icon(icon, 0, dy, icon != 0)
draw_text(sw/4, dy, sw/5, 24, text + "%", 2)
dy += 24
end
end
##########################################################################
#--------------------------------------------------------------------------
# draw_elements
#--------------------------------------------------------------------------
def draw_elements
return if @item.nil?
sw = self.width - 12
if $imported[:bm_vk_equip]
dy = line_height*4+12
else
dy = 0
end
contents.font.size = R2_EQUIP_STATS::FONTSIZE
change_color(normal_color)
draw_text(0, dy, sw-24, 24, R2_EQUIP_STATS::ELEMENTS_TEXT, 1)
#------ELEMENTS------
drawn_elements = []
elem = false
@item.features.each do |set|
next if set.data_id == 0
case set.code
when 31 # attack element
drawn_elements.push([set.code,set.data_id])
elem = true
when 11 # defense element
drawn_elements.push([set.code,set.data_id])
elem = true
else
next
end
end
if drawn_elements != [] # Draw Elements
drawn_elements = drawn_elements.sort!
dy += 24
elements = $data_system.elements
drawn_elements.each do |cd, ele_id|
if cd == 31
text = R2_EQUIP_STATS::EQ_ELEMENT_W
else
text = R2_EQUIP_STATS::EQ_ELEMENT_A
end
change_color(system_color)
draw_text(0, dy, sw/2, 24, text)
ele = elements[ele_id]
dx = sw - text_width(ele) - 24
change_color(normal_color)
draw_text(dx, dy, sw/2, 24, ele)
dy += 24
end
end
end
##########################################################################
#--------------------------------------------------------------------------
# draw_states
#--------------------------------------------------------------------------
def draw_states
return if @item.nil?
sw = self.width - 12
if $imported[:bm_vk_equip]
dy = line_height*4+12
else
dy = 0
end
contents.font.size = R2_EQUIP_STATS::FONTSIZE
change_color(normal_color)
draw_text(0, dy, sw-24, 24, R2_EQUIP_STATS::STATES_TEXT, 1)
#------STATES------
drawn_states = []
resist_states = []
@item.features.each do |set|
next if set.data_id == 0
case set.code
when 32 # weapons
drawn_states.push(set.data_id)
when 13 # armour
drawn_states.push(set.data_id)
when 14 # armour resist states
resist_states.push(set.data_id)
else
next
end
end
if drawn_states != [] # Draw States
dy += 24
for state_id in drawn_states
if @item.is_a?(RPG::Weapon)
text = R2_EQUIP_STATS::EQ_STATUS_W
else
text = R2_EQUIP_STATS::EQ_STATUS_A
end
change_color(system_color)
draw_text(0, dy, sw/2, 24, text)
name = $data_states[state_id].name
dx = sw - text_width(name) - 24
change_color(normal_color)
draw_text(dx, dy, sw/2, 24, name)
dy += 24
end
end
if resist_states != [] # Draw Resist States (Armour)
dy += 24
text = R2_EQUIP_STATS::STATE_RESIST
change_color(system_color)
draw_text(0, dy, sw/2, 24, text)
dy += 24
for state_id in resist_states
if @item.is_a?(RPG::Weapon)
text = R2_EQUIP_STATS::EQ_STATUS_W
else
text = R2_EQUIP_STATS::EQ_STATUS_A
end
change_color(system_color)
draw_text(0, dy, sw/2, 24, text)
name = $data_states[state_id].name
dx = sw - text_width(name) - 24
change_color(normal_color)
draw_text(dx, dy, sw/2, 24, name)
dy += 24
end
end
end
##########################################################################
#--------------------------------------------------------------------------
# draw_skills
#--------------------------------------------------------------------------
def draw_skill
return if @item.nil?
sw = self.width - 12
if $imported[:bm_vk_equip]
dy = line_height*4+12
else
dy = 0
end
contents.font.size = R2_EQUIP_STATS::FONTSIZE
change_color(normal_color)
draw_text(0, dy, sw-24, 24, R2_EQUIP_STATS::EQUIP_SKILL_ADD, 1)
dy += 24
skills_add = []
skills_seal = []
@item.features.each do |set|
case set.code
when 43 #---Grow Stat---
skills_add.push(set.data_id)
when 44 #---Grow Stat---
skills_seal.push(set.data_id)
else
next
end
end
if skills_add != [] # Draw States
text = R2_EQUIP_STATS::EQUIP_SKILL_ADD
change_color(system_color)
draw_text(0, dy, sw, 24, text)
dy += 24
for skill in skills_add
name = $data_skills[skill].name
change_color(normal_color)
draw_text(0, dy, sw, 24, name)
dy += 24
end
end
if skills_seal != [] # Draw States
text = R2_EQUIP_STATS::TEXT_SEAL_STATES
change_color(system_color)
draw_text(0, dy, sw, 24, text)
dy += 24
for skill in skills_seal
name = $data_skills[skill].name
change_color(normal_color)
draw_text(0, dy, sw, 24, name)
dy += 24
end
end
end
##########################################################################
#--------------------------------------------------------------------------
# draw_buff
#--------------------------------------------------------------------------
def draw_buff
return if @item.nil?
sw = self.width - 12
if $imported[:bm_vk_equip]
dy = line_height*4+12
else
dy = 0
end
contents.font.size = R2_EQUIP_STATS::FONTSIZE
change_color(normal_color)
draw_text(0, dy, sw-24, 24, R2_EQUIP_STATS::DEBUFF_TEXT, 1)
found = false
@item.features.each do |set|
case set.code
when 12 #---DEBUFF RATE---
found = true
end
end
if found == true
dy += 24
debuff = R2_EQUIP_STATS::EQUIP_DEBUFF_TEXT
change_color(system_color)
draw_text(0, dy, sw, 24, debuff)
end
@item.features.each do |set|
case set.code
when 12 #---DEBUFF RATE---
case set.data_id
when 0 #---HP---
word = Vocab::param(set.data_id)
icon = R2_EQUIP_STATS::ICON_HP
when 1 #---MP---
word = Vocab::param(set.data_id)
icon = R2_EQUIP_STATS::ICON_MP
when 2 #---ATK---
word = Vocab::param(set.data_id)
icon = R2_EQUIP_STATS::ICON_ATK
when 3 #---DEF---
word = Vocab::param(set.data_id)
icon = R2_EQUIP_STATS::ICON_DEF
when 4 #---MAT---
word = Vocab::param(set.data_id)
icon = R2_EQUIP_STATS::ICON_MAT
when 5 #---MDF---
word = Vocab::param(set.data_id)
icon = R2_EQUIP_STATS::ICON_MDF
when 6 #---AGI---
word = Vocab::param(set.data_id)
icon = R2_EQUIP_STATS::ICON_AGI
when 7 #---LUK---
word = Vocab::param(set.data_id)
icon = R2_EQUIP_STATS::ICON_LUK
end
num = 0
if set.value != 0
num = set.value.to_f
num = (num * 100).to_i
text = sprintf("%d", num)
text = "+" + text + "%"
end
dy += 24
change_color(system_color)
draw_text(24, dy, sw, 24, word)
change_color(normal_color)
draw_icon(icon, 80, dy, icon != 0)
draw_text(0, dy, sw-24, 24, text, 2)
else
next
end
end
end
##########################################################################
#--------------------------------------------------------------------------
# draw_attack
#--------------------------------------------------------------------------
def draw_attack
return if @item.nil?
sw = self.width - 12
if $imported[:bm_vk_equip]
dy = line_height*4+12
else
dy = 0
end
attack_state = []
attack_numb = []
change_color(normal_color)
text = R2_EQUIP_STATS::EQUIP_ATTACK_STATE_TITLE
draw_text(0, dy, sw, 24, text)
change_color(system_color)
text = R2_EQUIP_STATS::EQUIP_ATTACK_STATE_TEXT
speed_value = 0
times_value = 0
action_value = 0
@item.features.each do |set|
case set.code
when 32 #---Attack State---
attack_state.push(set.data_id)
value = (set.value * 100).round
strng = value.to_s + "%"
attack_numb.push(strng)
when 33 #---Attack speed---
speed_value = set.value.to_i
speed_value = "+" + speed_value.to_s if speed_value > 0
when 34 #---Attack Times---
num = set.value.to_i
times_value = "+" + num.to_s
when 61 #---Action times---
num = (set.value * 100).to_i
action_value = num.to_s + "%"
else
next
end
end
# 32
if attack_state != [] # Draw States
dy += 24
change_color(system_color)
draw_text(0, dy, sw, 24, text)
change_color(normal_color)
n = 0
for i in attack_state
dy += 24
name = $data_states[i].name
draw_text(0, dy, sw-24, 24, name)
numb = attack_numb[n]
draw_text(0, dy, sw-24, 24, numb, 2)
n += 1
end
end
# 33
text = R2_EQUIP_STATS::EQUIP_ATTACK_SPEED_TEXT
if speed_value != 0
dy += 24
change_color(system_color)
draw_text(0, dy, sw/2, 24, text)
change_color(normal_color)
draw_text(0, dy, sw-24, 24, speed_value, 2)
end
# 34
text = R2_EQUIP_STATS::EQUIP_ATTACK_TIMES_TEXT
if times_value != 0
dy += 24
change_color(system_color)
draw_text(0, dy, sw/2+10, 24, text)
change_color(normal_color)
dx = text.size * 10
draw_text(0, dy, sw-24, 24, times_value, 2)
end
# 61
text = R2_EQUIP_STATS::EQUIP_ACTION_TIMES_TEXT
if action_value != 0
dy += 24
change_color(system_color)
draw_text(0, dy, sw/2+10, 24, text)
change_color(normal_color)
draw_text(0, dy, sw-24, 24, action_value, 2)
end
end
##########################################################################
#--------------------------------------------------------------------------
# draw_bonus_features
#--------------------------------------------------------------------------
def draw_bonus_features
return if @item.nil?
sw = self.width - 12
if $imported[:bm_vk_equip]
dy = line_height*4+12
else
dy = 0
end
change_color(normal_color)
text = R2_EQUIP_STATS::EQUIP_BONUS_TITLE
draw_text(0, dy, sw, 24, text)
dy += 24
change_color(system_color)
@item.features.each do |set|
if set.code == 64 # Party Ability
case set.data_id
when 0 #---TGR---
ability = "Encounter Half"
when 1 #---GRD---
ability = "Encounter None"
when 2 #---REC---
ability = "Cancel Surprise"
when 3 #---PHA---
ability = "Raise Preemptive"
when 4 #---MCR---
ability = "Double Gold"
when 5 #---TCR---
ability = "Double Item Drop"
else
next
end
dy += 24
draw_text(0, dy, sw, 24, ability)
end
end
end
end
class Window_Base < Window
#--------------------------------------------------------------------------
# * Draw Item Name
# enabled : Enabled flag. When false, draw semi-transparently.
#--------------------------------------------------------------------------
def draw_item_name(item, x, y, enabled = true, width = 202)
return unless item
draw_icon(item.icon_index, x, y, enabled)
# Support Hime Item Rarity
if $imported[:TH_ItemRarity] == true
change_color(item.rarity_colour, enabled)
end
draw_text(x + 26, y, width, line_height, item.name)
change_color(normal_color, enabled)
end
end
class Scene_Equip < Scene_MenuBase
#--------------------------------------------------------------------------
# update
#--------------------------------------------------------------------------
def update
super
@status_window.toggle_info if Input.trigger?(R2_EQUIP_STATS::INFO_BUTTON)
end
#--------------------------------------------------------------------------
# alias method: create_item_window
#--------------------------------------------------------------------------
alias :r2_item_window_for_status :create_item_window
def create_item_window
r2_item_window_for_status
@status_window.item_window = @item_window
end
end