So I downloaded coolmariners98's package for the Ultimate Quest Scene, and everything worked fine in the demo, even after I went through the scripts I did and didn't want. However, when transferred correctly into my own game's script listings, an error showed up when I tried to access a character's skill menu in the main menu, and I can't see to figure out what it really is. This is the error:
http://img514.imageshack.us/my.php?image=errorfb7.png
Does anyone know what this is, or how to fix it?
This is the script where the error is:
http://img514.imageshack.us/my.php?image=errorfb7.png
Does anyone know what this is, or how to fix it?
This is the script where the error is:
Code:
#==============================================================================
# ** KGC_ItemGrouping, Part 5
# ** KGC_SkillGrouping,
# ** Item Detail View,
# ** and
# ** Skill Detail
#------------------------------------------------------------------------------
#
# * WINDOWS *
#
#------------------------------------------------------------------------------
#
# * Scripts Added
# Window_ItemGroup
# Window_ItemDetail
# Window_SkillGroup
# Window_SkillDetail
#
# * Scripts Edited
# Window_Help
# Window_Item
# Window_Skill
#
#==============================================================================
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
#==============================================================================
# ** Window_Help (Script Edit - by Me?)
#------------------------------------------------------------------------------
# This window shows skill and item explanations along with actor status.
#==============================================================================
class Window_Help < Window_Base
#--------------------------------------------------------------------------
# * Set Text
# text : text string displayed in window
# align : alignment (0..flush left, 1..center, 2..flush right)
#--------------------------------------------------------------------------
def set_text(text, align = 0)
# If at least one part of text and alignment differ from last time
# FIX (Originally didn't check for 'nil' text)
if text != @text or align != @align or text != nil
# Redraw text
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, self.width - 40, 32, text, align)
@text = text
@align = align
@actor = nil
end
self.visible = true
end
#--------------------------------------------------------------------------
# * End of Class
#--------------------------------------------------------------------------
end
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
#==============================================================================
# ** Window_Item (Script Edit)
#------------------------------------------------------------------------------
# This window displays items in possession on the item and battle screens.
#==============================================================================
class Window_Item < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
# * Modified by <KGC_Item_Grouping>
#--------------------------------------------------------------------------
alias initialize_KGC_ItemGrouping initialize
def initialize
initialize_KGC_ItemGrouping
if I_GROUP
# <KGC_Item_Grouping> #
unless $game_temp.in_battle
unless $imported["HelpExtension"]
self.y += 64
self.height -= 64
end
self.index = -1
self.active = false
end
# </KGC_Item_Grouping> #
end
end
#--------------------------------------------------------------------------
# * Hide?
# * New Script Segment <KGC_Item_Grouping>
# index : item number
# type : item type (0:general items 1:weapon 2:armor)
#--------------------------------------------------------------------------
def hide?(index, type = 0)
case type
when 0
elements = $data_items[index].element_set.dup
when 1
elements = $data_weapons[index].element_set.dup
when 2
elements = $data_armors[index].guard_element_set.dup
end
return elements.include?($game_special_elements["item_hide"])
end
#--------------------------------------------------------------------------
# * Item List (Battle or No Battle (removed if in battle condition)
# * New Script Segment <KGC_Item_Grouping> / Re-Write of Original "Refresh"
# itemkind : type of item sorted
#--------------------------------------------------------------------------
def itemlist(itemkind)
@data = []
# IF NOT PART OF ANY CATEGORY
if ITEM_GROUP2[itemkind] == 0
if ALL_ON == true
# Add item
for i in 1...$data_items.size
if $game_party.item_number(i) > 0 && !self.hide?(i, 0)
@data.push($data_items[i])
end
end
end
# If Weapons and Armors are visible in "All" items subgroup
if GEAR_ALL == true
# Add item
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0 && !self.hide?(i, 1)
@data.push($data_weapons[i])
end
end
# Add item
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0 && !self.hide?(i, 2)
@data.push($data_armors[i])
end
end
end
# IF A WEAPON
elsif ITEM_GROUP2[itemkind] == -1
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0 && !self.hide?(i, 1)
@data.push($data_weapons[i])
end
end
# IF ARMOR
elsif ITEM_GROUP2[itemkind] == -2
# Add item
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0 && !self.hide?(i, 2)
@data.push($data_armors[i])
end
end
else
# BELONGS TO A USER DEFINED SUBCATEGORY
# Add item
for i in 1...$data_items.size
if $game_party.item_number(i) > 0 && !self.hide?(i, 0) &&
$data_items[i].element_set.include?(ITEM_GROUP2[itemkind])
@data.push($data_items[i])
end
end
# Add Weapon (if applicable)
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0 && !self.hide?(i, 1) &&
$data_weapons[i].element_set.include?(ITEM_GROUP2[itemkind])
@data.push($data_weapons[i])
end
end
# Add Armor (if applicable)
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0 && !self.hide?(i, 2) &&
$data_armors[i].guard_element_set.include?(ITEM_GROUP2[itemkind])
@data.push($data_armors[i])
end
end
end
end
#--------------------------------------------------------------------------
# * Refresh
# * Modified by <KGC_Item_Grouping>
# itemkind : type of item being sorted
#--------------------------------------------------------------------------
def refresh(itemkind = 0)
if self.contents != nil
self.contents.dispose
self.contents = nil
end
self.itemlist(itemkind)
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
for i in 0...@item_max
draw_item(i)
end
end
end
#--------------------------------------------------------------------------
# * Draw Item
# index : item number
#--------------------------------------------------------------------------
def draw_item(index)
item = @data[index]
case item
when RPG::Item
number = $game_party.item_number(item.id)
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
if (item.is_a?(RPG::Item) && item.usable?) ||
($game_temp.in_battle && item.is_a?(RPG::Weapon) && item.usable?)
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
x = 4 + index % 2 * (288 + 32)
y = index / 2 * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(item.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
end
#--------------------------------------------------------------------------
# * Help Update
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(self.item == nil ? "" : self.item.description)
end
#--------------------------------------------------------------------------
# * End of Class
#--------------------------------------------------------------------------
end
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
#==============================================================================
# ** Window_ItemGroup (New Script)
#------------------------------------------------------------------------------
# This window displays the group headings in the items menu.
#==============================================================================
class Window_ItemGroup < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 64, 640, 64)
self.contents = Bitmap.new(width - 32, height - 32)
@commands = []
@command_icon = []
for name in ITEM_GROUP #_NAME
@commands.push(name)
end
for name in ITEM_ICON #_NAME
@command_icon.push(name)
end
@item_max = @commands.size
@column_max = @commands.size
@item_width = (width - 32) / @commands.size
self.index = 0
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
for i in [email=0...@commands.size]0...@commands.size[/email]
if ICONS_T_IGRP == true
rect = Rect.new((@item_width * i)+26, 0, @item_width - 26, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.font.color = system_color
bitmap = RPG::Cache.icon(@command_icon[i])
self.contents.draw_text(rect, @commands[i], 1)
self.contents.blt((@item_width * i)+2, 4, bitmap, Rect.new(0, 0, 24, 24), 255)
else
if ICONS_O_IGRP == true
rect = Rect.new((@item_width) * i, 0, @item_width, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(@command_icon[i])
self.contents.blt((@item_width/2)+(@item_width * i)-12, 4, bitmap, Rect.new(0, 0, 24, 24), 255)
else
rect = Rect.new(@item_width * i, 0, @item_width, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.font.color = system_color
self.contents.draw_text(rect, @commands[i], 1)
end
end
end
end
#--------------------------------------------------------------------------
# * Cursor Rectangle Update
#--------------------------------------------------------------------------
def update_cursor_rect
if index != -1
self.cursor_rect.set(@item_width * index, 0, @item_width, 32)
end
end
#--------------------------------------------------------------------------
# * Help Update
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(ITEM_HELP[self.index])
end
#--------------------------------------------------------------------------
# * End of Class
#--------------------------------------------------------------------------
end
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
#==============================================================================
# ** Item Detail View (New Script)
#------------------------------------------------------------------------------
# This window displays the detailed information about a chosen item.
#==============================================================================
class Window_ItemDetail< Window_Base
#--------------------------------------------------------------------------
# * Global Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontname
self.contents.font.size = $fontsize
self.contents.font.color = normal_color
# z acts as "layer order."
self.z += 10
@itemdetail = []
# ------------------------------
# @leadingcharacters is set for the script to delete X amount of
# characters in each line of the .rxdata
# In this case, the first 5 characters will be deleted in each line.
# ------------------------------
@leadingcharacters = 5
# Clears and resets the window everytime it is requested by Scene_Item.
refresh2
end
#--------------------------------------------------------------------------
# * Refresh2
#--------------------------------------------------------------------------
def refresh2
self.contents.font.name = $fontname
self.contents.font.size = $fontsize
self.contents.font.color = normal_color
self.contents.clear
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
# ---------------------------------------------------------------
# PART 1: Loading data from database
# ---------------------------------------------------------------
# ---------------------------------------------------
# START & HEADER DATA
# ---------------------------------------------------
# This value holds the data regarding the highlighted item.
item = $currenthighlighteditem
# Perform substitution to remove redundant code
# (At this point, all items use the "$data_substitute" value
# and the only reference to it's type will be through the
# $currenthighlighteditem value.)
if $currenthighlighteditem.is_a?(RPG::Item)
$data_substitute = $data_items
item_amount = ($game_party.item_number(item.id)).to_s
end
if $currenthighlighteditem.is_a?(RPG::Weapon)
$data_substitute = $data_weapons
item_amount = ($game_party.weapon_number(item.id)).to_s
end
if $currenthighlighteditem.is_a?(RPG::Armor)
$data_substitute = $data_armors
item_amount = ($game_party.armor_number(item.id)).to_s
end
# ---------------------------------------------------
# GENERAL DATA: Name, Icon, Price
# ---------------------------------------------------
# This loads the name of the highlighted item
item_name = $data_substitute[item.id].name
# This loads the default descriptive text about the item
item_descr = $data_substitute[item.id].description
# This loads the price of the highlighted item
item_price = ($data_substitute[item.id].price).to_s
# This loads the currently highlighted item's icon to display
bitmap = RPG::Cache.icon(item.icon_name)
# ---------------------------------------------------
# ITEM RELATED DATA: Scope, Affect, Variances, etc.
# ---------------------------------------------------
if $currenthighlighteditem.is_a?(RPG::Item)
# Below lines target the items Scope. U might need to add addtional ones
# if u got some script adding additional ones. The line below gets a
# number, wich will be converted to a string.
getitem_scope = $data_items[item.id].scope
case getitem_scope
when 0
getitem_scope = "No Use"
when 1
getitem_scope = "One Enemy"
when 2
getitem_scope = "All Enemies"
when 3
getitem_scope = "One Ally"
when 4
getitem_scope = "Party"
when 5
getitem_scope = "Down Ally (HP = 0)"
when 6
getitem_scope = "Down Allies (HP = 0)"
when 7
getitem_scope = "User"
end
# Below lines target the items ocassion
getitem_occasion = $data_items[item.id].occasion
case getitem_occasion
when 0
getitem_occasion = "Always"
when 1
getitem_occasion = "Only in Battle"
when 2
getitem_occasion = "Only from Menu"
when 3
getitem_occasion = "Never"
end
# Below lines target the items parameter effect
getitem_parafx = $data_items[item.id].parameter_type
item_parafx = $data_items[item.id].parameter_points.to_s
case getitem_parafx
when 0
getitem_parafx = "None"
when 1
getitem_parafx = "Max HP"
when 2
getitem_parafx = "Max SP"
when 3
getitem_parafx = "Strength"
when 4
getitem_parafx = "Dexterity"
when 5
getitem_parafx = "Agility"
when 6
getitem_parafx = "Intelligence"
end
# HP and SP Recovery Rates (1st numeric, 2nd string)
vhp_rate = $data_items[item.id].recover_hp_rate #HP rate %
vhp_amount = $data_items[item.id].recover_hp #HP amount.
vsp_rate = $data_items[item.id].recover_sp_rate #SP rate %
vsp_amount = $data_items[item.id].recover_sp #SP amount.
rhp_rate = $data_items[item.id].recover_hp_rate.to_s #HP rate %
rhp_amount = $data_items[item.id].recover_hp.to_s #HP amount.
rsp_rate = $data_items[item.id].recover_sp_rate.to_s #SP rate %
rsp_amount = $data_items[item.id].recover_sp.to_s #SP amount.
# This stores the hit rate and variance to a variable
item_acc = $data_items[item.id].hit.to_s
item_var = $data_items[item.id].variance.to_s
end
# ---------------------------------------------------
# ATTRIBUTE DATA: Strength, MDEF, Etc.
# ---------------------------------------------------
# Initialize p# variables. (Used to display "+" or "-"
# depending on the item's attribute bonus.)
# Negative signs originate from the value itself, so no
# need to check them with if-then statements.
p1 = ""
p2 = ""
p3 = ""
p4 = ""
p5 = ""
p6 = ""
# ---------------------------------------------------
# Start inserting appropriate variables from database.
# ---------------------------------------------------
if $currenthighlighteditem.is_a?(RPG::Item)
# ITEM only uses pdef & mdef values
item_pdef = $data_items[item.id].pdef_f #.to_s
if item_pdef > 0
p5 = "+"
end
item_pdef = item_pdef.to_s
item_mdef = $data_items[item.id].mdef_f #.to_s
if item_mdef > 0
p6 = "+"
end
item_mdef = item_mdef.to_s
else
if $currenthighlighteditem.is_a?(RPG::Armor)
# Checks armor's type and inserts appropriate string.
type = $data_armors[item.id].kind
case type
when 0
type = "Shield"
when 1
type = "Helmet"
when 2
type = "Armor"
when 3
type = "Accessory"
end
else
item_atk = $data_substitute[item.id].atk.to_s
end
item_pdef = $data_substitute[item.id].pdef
if item_pdef > 0
p5 = "+"
end
item_pdef = item_pdef.to_s
item_mdef = $data_substitute[item.id].mdef
if item_mdef > 0
p6 = "+"
end
item_mdef = item_mdef.to_s
item_str = $data_substitute[item.id].str_plus
if item_str > 0
p1 = "+"
end
item_str = item_str.to_s
item_dex = $data_substitute[item.id].dex_plus
if item_dex > 0
p2 = "+"
end
item_dex = item_dex.to_s
item_agi = $data_substitute[item.id].agi_plus
if item_agi > 0
p3 = "+"
end
item_agi = item_agi.to_s
item_int = $data_substitute[item.id].int_plus
if item_int > 0
p4 = "+"
end
item_int = item_int.to_s
end
# ---------------------------------------------------
# ELEMENT & STATUS DATA: Creates status text or icons
# ---------------------------------------------------
if $currenthighlighteditem.is_a?(RPG::Armor)
# - - - Element States -------------------------------------------------
# if Element display uses icons
if ICON_ON
item_element = []
for i in $data_substitute[item.id].guard_element_set
$data_temp = $data_system.elements[i].clone
c = $data_temp.slice!(/./m)
if c != "$"
item_element.push(RPG::Cache.icon($data_system.elements[i].clone))
end
end
# if Element display uses text
else
item_element = ""
flag = false
for i in $data_substitute[item.id].guard_element_set
$data_temp = $data_system.elements[i].clone
c = $data_temp.slice!(/./m)
if c != "$"
if flag
item_element += "/"
end
item_element += $data_system.elements[i]
flag = true
end
end
# Checks whether item_element is blank. If it is, then sets it
# to "None".
if item_element == ""
item_element = "None"
end
end
# - - Status States ----------------------------------------------------
# if Status display uses icons
if ICON_ON
item_status = []
for i in $data_substitute[item.id].guard_state_set
$data_temp = $data_states[i].name.clone
c = $data_temp.slice!(/./m)
if c != "$"
item_status.push(RPG::Cache.icon($data_states[i].name.clone))
end
end
# if Status display uses text
else
item_status = ""
flag = false
for i in $data_substitute[item.id].guard_state_set
$data_temp = $data_states[i].name.clone
c = $data_temp.slice!(/./m)
if c != "$"
if flag
item_status += "/"
end
item_status += $data_states[i].name
flag = true
end
end
# Checks whether item_element is blank. If it is, then sets it
# to "None".
if item_status == ""
item_status = "None"
end
end
else
# - - - Element States -------------------------------------------------
# if Element display uses icons
if ICON_ON
item_element = []
for i in $data_substitute[item.id].element_set
$data_temp = $data_system.elements[i].clone
c = $data_temp.slice!(/./m)
if c != "$"
item_element.push(RPG::Cache.icon($data_system.elements[i].clone))
end
end
# if Element display uses text
else
item_element = ""
flag = false
for i in $data_substitute[item.id].element_set
$data_temp = $data_system.elements[i].clone
c = $data_temp.slice!(/./m)
if c != "$"
if flag
item_element += "/"
end
item_element += $data_system.elements[i]
flag = true
end
end
# Checks whether item_element is blank. If it is, then sets it
# to "None".
if item_element == ""
item_element = "None"
end
end
# - - - Status States --------------------------------------------------
# if Status display uses icons
if ICON_ON
item_status = []
for i in $data_substitute[item.id].plus_state_set
$data_temp = $data_states[i].name.clone
c = $data_temp.slice!(/./m)
if c != "$"
item_status.push(RPG::Cache.icon($data_states[i].name.clone))
end
end
# if Status display uses text
else
item_status = ""
flag = false
for i in $data_substitute[item.id].plus_state_set
$data_temp = $data_states[i].name.clone
c = $data_temp.slice!(/./m)
if c != "$"
if flag
item_status += "/"
end
item_status += $data_states[i].name
flag = true
end
end
# Checks whether item_element is blank. If it is, then sets it
# to "None".
if item_status == ""
item_status = "None"
end
end
# - - - Status Weaknesses ----------------------------------------------
# if Status display uses icons
if ICON_ON
item_status_m = []
for i in $data_substitute[item.id].minus_state_set
$data_temp = $data_states[i].name.clone
c = $data_temp.slice!(/./m)
if c != "$"
item_status_m.push(RPG::Cache.icon($data_states[i].name.clone))
end
end
# if Status display uses text
else
item_status_m = ""
flag = false
for i in $data_substitute[item.id].minus_state_set
$data_temp = $data_states[i].name.clone
c = $data_temp.slice!(/./m)
if c != "$"
if flag
item_status_m += "/"
end
item_status_m += $data_states[i].name
flag = true
end
end
# Checks whether item_element is blank. If it is, then sets it
# to "None".
if item_status_m == ""
item_status_m = "None"
end
end
end
# ---------------------------------------------------------------
# PART 2: Display Header (Static Text)
# ---------------------------------------------------------------
# NOTE: x and y can be changed to easily affect other attributes.
x = 33
y = 66
# ---------------------------------------------------
# COLUMN 1 HEADERS (Item Effects, Weapon Power, etc.)
# ---------------------------------------------------
self.contents.font.size = $fontsize - 4
if $currenthighlighteditem.is_a?(RPG::Item)
# Display Heading for Item's effectiveness.
self.contents.font.color = system_color
self.contents.draw_text(-16, y - 14, 100, 24, "Effect on:", 2)
if vhp_amount < 0 then
self.contents.draw_text(-16, y + 0, 100, 24, "Inflict(" + $data_system.words.hp + "):", 2)
else
if vhp_rate < 0 then
self.contents.draw_text(-16, y + 0, 100, 24, "Inflict(" + $data_system.words.hp + "):", 2)
else
self.contents.draw_text(-16, y + 0, 100, 24, "Recover(" + $data_system.words.hp + "):", 2)
end
end
if vsp_amount < 0 then
self.contents.draw_text(-16, y + 14, 100, 24, "Inflict(" + $data_system.words.sp + "):", 2)
else
if vsp_rate < 0 then
self.contents.draw_text(-16, y + 14, 100, 24, "Inflict(" + $data_system.words.sp + "):", 2)
else
self.contents.draw_text(-16, y + 14, 100, 24, "Recover(" + $data_system.words.sp + "):", 2)
end
end
self.contents.draw_text(-16, y + 42, 100, 24, "Accuracy:", 2)
end
self.contents.font.color = HLIT_COLOR
if $currenthighlighteditem.is_a?(RPG::Weapon)
# Display Heading for Attack Power of Weapon
self.contents.draw_text(x, y-14, 256, 24, $data_system.words.atk)
end
if $currenthighlighteditem.is_a?(RPG::Armor)
# Display Heading for Armor Type and Protection
self.contents.draw_text(x, y - 14, 256, 24, "Type")
self.contents.draw_text(x, y + 0, 256, 24, $data_system.words.pdef)
self.contents.draw_text(x, y + 14, 256, 24, $data_system.words.mdef)
end
self.contents.font.color = system_color
# ---------------------------------------------------
# COLUMN 2 HEADERS
# ---------------------------------------------------
# Hero's Attribute Headers
self.contents.font.color = system_color
self.contents.font.size = $fontsize - 4
if $currenthighlighteditem.is_a?(RPG::Item)
self.contents.draw_text(200 + x, y - 14, 256, 24, $data_system.words.pdef)
self.contents.draw_text(200 + x, y + 0, 256, 24, $data_system.words.mdef)
self.contents.draw_text(200 + x, y + 14, 256, 24, "VAR")
else
self.contents.draw_text(200 + x, y - 14, 256, 24, $data_system.words.str)
self.contents.draw_text(200 + x, y + 0, 256, 24, $data_system.words.dex)
self.contents.draw_text(200 + x, y + 14, 256, 24, $data_system.words.agi)
self.contents.draw_text(200 + x, y + 28, 256, 24, $data_system.words.int)
self.contents.draw_text(200 + x, y + 42, 256, 24, $data_system.words.pdef)
self.contents.draw_text(200 + x, y + 56, 256, 24, $data_system.words.mdef)
end
self.contents.font.size = $fontsize
# ---------------------------------------------------
# COLUMN 3 HEADERS (Value, Qty & Item Usage)
# ---------------------------------------------------
# Price & Qty
self.contents.font.color = system_color
self.contents.draw_text(364, 8, 100, 24, "Value:", 2)
self.contents.draw_text(364, 32, 100, 24, "Owned No.:", 2)
if $currenthighlighteditem.is_a?(RPG::Item)
# Skill Usage Texts
self.contents.draw_text(380, y + 0, 100, 24, "Type:")
self.contents.draw_text(380, y +14, 100, 24, "Occasion:")
end
self.contents.font.size = $fontsize
# ---------------------------------------------------
# ELEMENT & STATUS HEADERS
# ---------------------------------------------------
# Status Line Headers
self.contents.font.size = $fontsize - 4
if $currenthighlighteditem.is_a?(RPG::Armor)
self.contents.draw_text(x, y + 126, 256, 24, "Elemental Guard:")
self.contents.draw_text(x, y + 154, 256, 24, "Status Guard:")
else
self.contents.draw_text(x, y + 126, 256, 24, "Elemental Attack:")
self.contents.draw_text(x, y + 154, 256, 24, "Status Attack:")
self.contents.draw_text(x, y + 182, 256, 24, "Status Removal:")
end
self.contents.font.size = $fontsize
# ---------------------------------------------------------------
# PART 3: Displaying data from the database
# ---------------------------------------------------------------
# ---------------------------------------------------
# TITLE DATA DISPLAY
# ---------------------------------------------------
# Draws item's icon.
self.contents.blt(5, 8, bitmap, Rect.new(0, 0, 24, 24), 255)
self.contents.font.color = normal_color
# Draw item's name
self.contents.draw_text(33, 8, 256, 24, item_name)
self.contents.font.size = ($fontsize - 6)
# Draws the item's default description.
self.contents.draw_text(33,28,256,14,item_descr)
self.contents.font.size = $fontsize
# ---------------------------------------------------
# COLUMN 1 DATA DISPLAY (Item's Power)
# ---------------------------------------------------
self.contents.font.color = normal_color
self.contents.font.size = $fontsize - 4
if $currenthighlighteditem.is_a?(RPG::Item)
# Below Lines write the Item's Effect on Parameter
self.contents.font.color = normal_color
if getitem_parafx != "None"
self.contents.draw_text(100,y - 14, 250, 24, getitem_parafx + " - " + item_parafx + " Points", 0)
else
self.contents.draw_text(100,y - 14, 250, 24, getitem_parafx, 0)
end
# Alter text color if item damages health
if vhp_amount < 0 then
self.contents.font.color = knockout_color
end
if vhp_rate < 0 then
self.contents.font.color = knockout_color
end
# Draw item's recovery or damage rate
self.contents.draw_text(100, y + 0, 250, 24, rhp_rate + "% - " + rhp_amount + " Points", 0)
self.contents.font.color = normal_color
# Alter text color it item damages sp
if vsp_amount < 0 then
self.contents.font.color = knockout_color
end
if vsp_amount < 0 then
self.contents.font.color = knockout_color
end
# Draw item's recovery or damage rate
self.contents.draw_text(100, y + 14, 250, 24, rsp_rate + "% - " + rsp_amount + " Points", 0)
# Draw item's accuracy
self.contents.draw_text(100, y + 42, 250, 24, item_acc + "%", 0)
end
self.contents.font.color = HLIT_COLOR
if $currenthighlighteditem.is_a?(RPG::Weapon)
# Draw Weapon's attack power
self.contents.draw_text(x + 74, y-14, 64, 24, item_atk, 2)
end
if $currenthighlighteditem.is_a?(RPG::Armor)
# Draw Armor type and effectiveness
self.contents.draw_text(x + 74, y - 14, 64, 24, type, 2)
self.contents.draw_text(x + 74, y + 0, 64, 24, p5 + item_pdef, 2)
self.contents.draw_text(x + 74, y + 14, 64, 24, p6 + item_mdef, 2)
end
# ---------------------------------------------------
# COLUMN 2 DATA DISPLAY
# ---------------------------------------------------
# Draw the Skill's effect on hero's attributes
self.contents.font.color = normal_color
self.contents.font.size = $fontsize - 4
if $currenthighlighteditem.is_a?(RPG::Item)
self.contents.draw_text(x + 254, y - 14, 64, 24, p5 + item_pdef, 2)
self.contents.draw_text(x + 254, y + 0, 64, 24, p6 + item_mdef, 2)
self.contents.draw_text(x + 254, y + 14, 64, 24, item_var, 2)
else
self.contents.draw_text(x + 254, y - 14, 64, 24,p1 + item_str, 2)
self.contents.draw_text(x + 254, y + 00, 64, 24,p2 + item_dex, 2)
self.contents.draw_text(x + 254, y + 14, 64, 24,p3 + item_agi, 2)
self.contents.draw_text(x + 254, y + 28, 64, 24,p4 + item_int, 2)
if $currenthighlighteditem.is_a?(RPG::Weapon)
self.contents.draw_text(x + 254, y + 42, 64, 24,p5 + item_pdef, 2)
self.contents.draw_text(x + 254, y + 56, 64, 24,p6 + item_mdef, 2)
end
end
self.contents.font.size = $fontsize
# ---------------------------------------------------
# COLUMN 3 DATA DISPLAY
# ---------------------------------------------------
cx = contents.text_size(" " + $data_system.words.gold).width
self.contents.draw_text(382, 8, 160, 24, item_price, 2)
self.contents.draw_text(382, 32, 160, 24, item_amount, 2)
self.contents.font.color = system_color
self.contents.draw_text(542 + cx, 8 ,cx, 24, $data_system.words.gold)
self.contents.font.color = normal_color
if $currenthighlighteditem.is_a?(RPG::Item)
# Skill Usage Texts
self.contents.draw_text(456, y + 0, 152, 24, getitem_scope,2)
self.contents.draw_text(456, y + 14, 152, 24, getitem_occasion, 2)
end
self.contents.font.size = $fontsize
# ---------------------------------------------------
# ELEMENT & STATUS DISPLAY
# ---------------------------------------------------
self.contents.font.size = $fontsize - 4
self.contents.font.color = normal_color
# Draw Element State & Element State Icons
# if Element display uses icons
if ICON_ON
for i in 0...item_element.length
rect = Rect.new(130 + x + (i * 26), y + 126, 0, 24)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.blt(130 + x + (i * 26), y + 126, item_element[i], Rect.new(0, 0, 24, 24), 255)
end
else
# if Element display uses text
self.contents.font.color = ELEM_COLOR
self.contents.draw_text(x+120, y + 126, 420, 24, item_element, 0)
end
# Draw Status State & Status State Icons
# if Status display uses icons
if ICON_ON
for i in 0...item_status.length
rect = Rect.new(130 + x + (i * 26), y+ 154, self.width - (32 + 180), 24)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.blt(130 + x + (i * 26), y+154, item_status[i], Rect.new(0, 0, 24, 24), 255)
end
else
# if Status display uses text
self.contents.font.color = SATK_COLOR
self.contents.draw_text(x+120, y + 154, 420, 24, item_status, 0)
end
if $currenthighlighteditem.is_a?(RPG::Armor)
# DO NOT DRAW NEGATIVE STATES
else
# Draw Status State Weakness & Status State Weakness Icons
# if Status (weakness) display uses icons
if ICON_ON
for i in 0...item_status_m.length
rect = Rect.new(130 + x + (i * 26), y+182, self.width - (32 + 180), 24)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.blt(130 + x + (i * 26), y+182, item_status_m[i], Rect.new(0, 0, 24, 24), 255)
end
else
# if Status display (weakness) uses text
self.contents.font.color = SDEF_COLOR
self.contents.draw_text(x+120, y + 182, 420, 24, item_status_m, 0)
end
end
self.contents.font.size = $fontsize
# ---------------------------------------------------------------
# PART 4: Displaying data from the text file
# ---------------------------------------------------------------
# Resets font size & color.
self.contents.font.color = normal_color
self.contents.font.size = $fontsize
# Two lines below calls the two definitions to write the skill's
# detailed description.
get_item_detail(item.id)
write_item_detail(5, 233 + 48 + 24)
end
#--------------------------------------------------------------------------
# * Get Item Details
#--------------------------------------------------------------------------
def get_item_detail(item_id)
# descarray stores the line numbers needed to call the right
# detail description into an array.
descarray =
[
item_id * 7,
item_id * 7 + 1,
item_id * 7 + 2,
item_id * 7 + 3,
item_id * 7 + 4,
item_id * 7 + 5,
item_id * 7 + 6
]
# The if-then statements below checks the highlighted item and use
# the right .rxdata.
if $currenthighlighteditem.is_a?(RPG::Item)
f = File.open("Data/Item_Detail.rxdata")
end
if $currenthighlighteditem.is_a?(RPG::Weapon)
f = File.open("Data/Weapon_Detail.rxdata")
end
if $currenthighlighteditem.is_a?(RPG::Armor)
f = File.open("Data/Armor_Detail.rxdata")
end
# Stores _every_ line of the file into @itemdetail as an array.
@itemdetail = f.readlines
# Clears first seven lines for Lines 1-7 (0..6), as it will never be used.
for i in 0..6
@itemdetail[i] = ""
end
# Crops the first 6 characters in each line.
for i in 0..6
cropheadcharacters(descarray[i])
end
# Stores the cropped lines into description array.
@description = []
for i in 0..6
@description[i] = @itemdetail[descarray[i]]
end
return
end
#--------------------------------------------------------------------------
# * Get Item Details
#--------------------------------------------------------------------------
def get_item_detail(item_id)
# descarray stores the line numbers needed to call the right
# detail description into an array.
descarray =
[
item_id * 7,
item_id * 7 + 1,
item_id * 7 + 2,
item_id * 7 + 3,
item_id * 7 + 4,
item_id * 7 + 5,
item_id * 7 + 6
]
# The if-then statements below checks the highlighted item and use
# the right .rxdata.
if $currenthighlighteditem.is_a?(RPG::Item)
f = File.open("Data/Item_Detail.rxdata")
end
if $currenthighlighteditem.is_a?(RPG::Weapon)
f = File.open("Data/Weapon_Detail.rxdata")
end
if $currenthighlighteditem.is_a?(RPG::Armor)
f = File.open("Data/Armor_Detail.rxdata")
end
# Stores _every_ line of the file into @itemdetail as an array.
@itemdetail = f.readlines
# Clears first seven lines for Lines 1-7 (0..6), as it will never be used.
for i in 0..6
@itemdetail[i] = ""
end
# Crops the first 6 characters in each line.
for i in 0..6
cropheadcharacters(descarray[i])
end
# Stores the cropped lines into description array.
@description = []
for i in 0..6
@description[i] = @itemdetail[descarray[i]]
end
return
end
#--------------------------------------------------------------------------
# * Crop Header Characters
#--------------------------------------------------------------------------
def cropheadcharacters(descarray)
# Checks to see if any lines are nil. If so, then sets them
# as blank lines after cropping.
if @itemdetail[descarray] == nil
@itemdetail[descarray] = "123456 "
end
# Crops the first (@leadingcharacters) characters in each line.
# Default: 5.
@itemdetail[descarray].slice!(0..@leadingcharacters)
return
end
#--------------------------------------------------------------------------
# * Display Item Details
#--------------------------------------------------------------------------
def write_item_detail(x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y - 20, 640, 32, "Description:")
self.contents.font.color = normal_color
self.contents.font.size = $fontsize - 2
# Draws the first six lines in normal color.
for i in 0..5
self.contents.draw_text(x, y, 640, 32, @description[i])
y += 18
end
# Draws the seventh line in another color.
self.contents.font.color = HLIT_COLOR
self.contents.draw_text(x, y, 640, 32, @description[6])
end
#--------------------------------------------------------------------------
# * End of Class
#--------------------------------------------------------------------------
end
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
#==============================================================================
# ** Window_Skill (Script Edit)
#------------------------------------------------------------------------------
# This window displays items in possession on the item and battle screens.
#==============================================================================
class Window_Skill < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
# * Modified by <KGC_Item_Grouping>
#--------------------------------------------------------------------------
alias initialize_KGC_SkillGrouping initialize
def initialize(actor)
initialize_KGC_SkillGrouping(actor)
if S_GROUP
# <KGC_Item_Grouping> #
unless $game_temp.in_battle
unless $imported["HelpExtension"]
self.y += 64
self.height -= 64
end
self.index = -1
self.active = false
end
# </KGC_Item_Grouping> #
end
end
#--------------------------------------------------------------------------
# * Refresh
# * Modified by <KGC_Item_Grouping>
# itemkind : type of item being sorted
#--------------------------------------------------------------------------
def refresh(skillkind = 0)
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
if S_GROUP
# IF NOT PART OF ANY CATEGORY
if SKILL_GROUP2[skillkind] == 0
# Add item
for i in [email=0...@actor.skills.size]0...@actor.skills.size[/email]
@data << $data_skills[@actor.skills[i]]
end
else
# Add item
for i in [email=0...@actor.skills.size]0...@actor.skills.size[/email]
# When it has corresponding attribute,
if $data_skills[@actor.skills[i]].element_set.include?(SKILL_GROUP2[skillkind])
@data << $data_skills[@actor.skills[i]]
end
end
end
else
for i in [email=0...@actor.skills.size]0...@actor.skills.size[/email]
skill = $data_skills[@actor.skills[i]]
if skill != nil
@data.push(skill)
end
end
end
# If item count is not 0, make a bitmap and draw all lines
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
for i in 0...@item_max
draw_item(i)
end
end
end
#--------------------------------------------------------------------------
# * Help Update
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(self.skill == nil ? "" : self.skill.description)
end
#--------------------------------------------------------------------------
# * End of Class
#--------------------------------------------------------------------------
end
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
#==============================================================================
# ** Window_SkillGroup (New Script)
#------------------------------------------------------------------------------
# This window displays the group headings in the items menu.
#==============================================================================
class Window_SkillGroup < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 64, 640, 64)
self.contents = Bitmap.new(width - 32, height - 32)
@commands = []
@command_icon = []
for name in SKILL_GROUP
@commands.push(name)
end
for name in SKILL_ICON
@command_icon.push(name)
end
@item_max = @commands.size
@column_max = @commands.size
@item_width = (width - 32) / @commands.size
self.index = 0
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
for i in [email=0...@commands.size]0...@commands.size[/email]
if ICONS_T_SGRP == true
rect = Rect.new((@item_width * i)+26, 0, @item_width - 26, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.font.color = system_color
bitmap = RPG::Cache.icon(@command_icon[i])
self.contents.draw_text(rect, @commands[i], 1)
self.contents.blt((@item_width * i)+2, 4, bitmap, Rect.new(0, 0, 24, 24), 255)
else
if ICONS_O_SGRP == true
rect = Rect.new((@item_width) * i, 0, @item_width, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(@command_icon[i])
self.contents.blt((@item_width/2)+(@item_width * i)-12, 4, bitmap, Rect.new(0, 0, 24, 24), 255)
else
rect = Rect.new(@item_width * i, 0, @item_width, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.font.color = system_color
self.contents.draw_text(rect, @commands[i], 1)
end
end
end
end
#--------------------------------------------------------------------------
# * Cursor Rectangle Update
#--------------------------------------------------------------------------
def update_cursor_rect
if index != -1
self.cursor_rect.set(@item_width * index, 0, @item_width, 32)
end
end
#--------------------------------------------------------------------------
# * Help Update
#--------------------------------------------------------------------------
def update_help
#@help_window.set_text(" ")
@help_window.set_text(SKILL_HELP[self.index])
end
#--------------------------------------------------------------------------
# * End of Class
#--------------------------------------------------------------------------
end
#==============================================================================
# ** Window_SkillDetail (New Script)
# * <Skill Detail Script>
#------------------------------------------------------------------------------
# This window displays the detailed information about a chosen skill.
#==============================================================================
class Window_SkillDetail < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontname
self.contents.font.size = $fontsize
self.contents.font.color = normal_color
# z acts as "layer order."
self.z += 10
@skilldetail = []
# ------------------------------
# @leadingcharacters is set for the script to delete X amount of
# characters in each line of the .rxdata
# In this case, the first 5 characters will be deleted in each line.
# ------------------------------
@leadingcharacters = 5
# Clears and resets the window everytime it is requested by Scene_Item.
refresh2
end
#--------------------------------------------------------------------------
# * Refresh2
#--------------------------------------------------------------------------
def refresh2
self.contents.font.name = $fontname
self.contents.font.size = $fontsize
self.contents.font.color = normal_color
self.contents.clear
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
# ---------------------------------------------------------------
# PART 1: Loading data from database
# ---------------------------------------------------------------
# ---------------------------------------------------
# START & HEADER DATA
# ---------------------------------------------------
# This value holds the data regarding the highlighted skill.
skill = $currenthighlightedskill
# This loads the currently highlighted skill's icon to display
bitmap = RPG::Cache.icon(skill.icon_name)
# This loads the name of the highlighted skill
skill_name = $data_skills[skill.id].name
# This loads the default descriptive text about the skill
skill_descr = $data_skills[skill.id].description
# ---------------------------------------------------
# COLUMN 1 DATA
# ---------------------------------------------------
# Obtain Skill's SP cost & Attack Power
skill_spc = $data_skills[skill.id].sp_cost.to_s
skill_atk = $data_skills[skill.id].atk_f.to_s
# ---------------------------------------------------
# COLUMN 2 DATA
# ---------------------------------------------------
# Obtain the Skill's effect on Hero's Attributes
skill_eva = $data_skills[skill.id].eva_f.to_s
skill_pwr = $data_skills[skill.id].power.to_s
skill_str = $data_skills[skill.id].str_f.to_s
skill_dex = $data_skills[skill.id].dex_f.to_s
skill_agi = $data_skills[skill.id].agi_f.to_s
skill_int = $data_skills[skill.id].int_f.to_s
skill_acc = $data_skills[skill.id].hit.to_s
# ---------------------------------------------------
# COLUMN 3 DATA
# ---------------------------------------------------
# Obtains the Skill's scope
getskill_scope = $data_skills[skill.id].scope
# Renames the Skill's scope to be displayed.
# The Skill's Scope descriptions can be edited if needed.
case getskill_scope
when 0
getskill_scope = "Nobody"
when 1
getskill_scope = "One Enemy"
when 2
getskill_scope = "All Enemies"
when 3
getskill_scope = "One Ally"
when 4
getskill_scope = "All Allies"
when 5
getskill_scope = "One Dead (hp = 0) Ally"
when 6
getskill_scope = "All Dead (hp = 0) Ally"
when 7
getskill_scope = "User of the Skill"
end
# Obtains the skill's usage occasion.
getskill_occasion = $data_skills[skill.id].occasion
# Renames the Skill's Usage Occasion for display.
# The Skill's Usage Occasion descriptions can be edited if needed.
case getskill_occasion
when 0
getskill_occasion = "Menu + Battle"
when 1
getskill_occasion = "Only in Battle"
when 2
getskill_occasion = "Only in Menu"
when 3
getskill_occasion = "Not Useable"
end
# Obtain the Skill's Defense, Magic Defense & Variances
skill_pdf = $data_skills[skill.id].pdef_f.to_s
skill_mdf = $data_skills[skill.id].mdef_f.to_s
skill_var = $data_skills[skill.id].variance.to_s
# ---------------------------------------------------
# ELEMENT & STATUS DATA (Disallows any data with "%")
# ---------------------------------------------------
# Load Element States & Element State Icons
# If Element display uses icons
if ICON_ON
skill_element = []
for i in $data_skills[skill.id].element_set
$data_temp = $data_system.elements[i].clone
c = $data_temp.slice!(/./m)
if c != "%"
skill_element.push(RPG::Cache.icon($data_system.elements[i].clone))
end
end
# if Element display uses text
else
skill_element = ""
flag = false
for i in $data_skills[skill.id].element_set
$data_temp = $data_system.elements[i].clone
c = $data_temp.slice!(/./m)
if c != "%"
if flag
skill_element += "/"
end
skill_element += $data_system.elements[i]
flag = true
end
end
# Checks whether skill_element is blank. If it is, then sets it
# to "None".
if skill_element == ""
skill_element = "None"
end
end
# Load Status States & Status State Icons
# If Status display uses icons
if ICON_ON
skill_status = []
for i in $data_skills[skill.id].plus_state_set
$data_temp = $data_states[i].name.clone
c = $data_temp.slice!(/./m)
if c != "%"
skill_status.push(RPG::Cache.icon($data_states[i].name.clone))
end
end
# if Status display uses text
else
skill_status = ""
flag = false
for i in $data_skills[skill.id].plus_state_set
$data_temp = $data_states[i].name.clone
c = $data_temp.slice!(/./m)
if c != "%"
if flag
skill_status += "/"
end
skill_status += $data_states[i].name
flag = true
end
end
# Checks whether skill_element is blank. If it is, then sets it
# to "None".
if skill_status == ""
skill_status = "None"
end
end
# Load Status State Weakness & Status State Weakness Icons
# if Status display uses icons
if ICON_ON
skill_status_m = []
for i in $data_skills[skill.id].minus_state_set
$data_temp = $data_states[i].name.clone
c = $data_temp.slice!(/./m)
if c != "%"
skill_status_m.push(RPG::Cache.icon($data_states[i].name.clone))
end
end
# if Status display uses text
else
skill_status_m = ""
flag = false
for i in $data_skills[skill.id].minus_state_set
$data_temp = $data_states[i].name.clone
c = $data_temp.slice!(/./m)
if c != "%"
if flag
skill_status_m += "/"
end
skill_status_m += $data_states[i].name
flag = true
end
end
# Checks whether skill_element is blank. If it is, then sets it
# to "None".
if skill_status_m == ""
skill_status_m = "None"
end
end
# ---------------------------------------------------------------
# PART 2: Displaying Headers
# ---------------------------------------------------------------
# Reset text color to system color
self.contents.font.color = system_color
# x and y can be changed to easily affect other attributes.
x = 33
y = 66
# ---------------------------------------------------
# COLUMN 1 HEADERS
# ---------------------------------------------------
# Skill's SP Cost & Attack Power Headers
self.contents.font.color = system_color
self.contents.font.size = $fontsize - 4
self.contents.font.color = HLIT_COLOR
self.contents.draw_text(x, y - 14, 256, 24, $data_system.words.sp + " Costs")
self.contents.draw_text(x, y, 256, 24, $data_system.words.atk)
self.contents.font.color = system_color
# ---------------------------------------------------
# COLUMN 2 HEADERS
# ---------------------------------------------------
# Hero's Attribute Headers
self.contents.draw_text(180 + x, y - 14, 256, 24, $data_system.words.str)
self.contents.draw_text(180 + x, y + 0, 256, 24, $data_system.words.dex)
self.contents.draw_text(180 + x, y + 14, 256, 24, $data_system.words.agi)
self.contents.draw_text(180 + x, y + 28, 256, 24, $data_system.words.int)
self.contents.draw_text(180 + x, y + 42, 256, 24, $data_system.words.pdef)
self.contents.draw_text(180 + x, y + 56, 256, 24, $data_system.words.mdef)
# ---------------------------------------------------
# COLUMN 3 HEADERS
# ---------------------------------------------------
# Skill Usage Texts
self.contents.draw_text(360, 44, 100, 24, "Type:", 2)
self.contents.draw_text(360, 76, 100, 24, "Occasion:", 2)
# Power Attribute Header Texts
if $data_skills[skill.id].power >= 0
self.contents.draw_text(x + 370, y + 42, 256, 24, "Power")
else if $data_skills[skill.id].power <= 0
self.contents.draw_text(x + 370, y + 42, 256, 24, "Heal Pwr")
end
end
self.contents.draw_text(x + 370, y + 56, 256, 24, "Accuracy")
self.contents.draw_text(x + 370, y + 70, 256, 24, "Variance")
# ---------------------------------------------------
# ELEMENT & STATUS HEADERS
# ---------------------------------------------------
# Status Line Headers
self.contents.draw_text(x, y + 126, 256, 24, "Elemental Attack:")
self.contents.draw_text(x, y + 154, 256, 24, "Status Attack:")
self.contents.draw_text(x, y + 182, 256, 24, "Status Removal:")
# ---------------------------------------------------------------
# PART 3: Displaying data from database
# ---------------------------------------------------------------
# ---------------------------------------------------
# HEADER DATA DISPLAY
# ---------------------------------------------------
# Draws the skill's icon.
self.contents.blt(5, 8, bitmap, Rect.new(0, 0, 24, 24), 255)
self.contents.font.color = normal_color
# Draws the skill's name.
self.contents.draw_text(33, 8, 256, 24, skill_name)
self.contents.font.size = ($fontsize - 6)
# Draws the skill's default description.
self.contents.draw_text(33,28,256,14,skill_descr)
self.contents.font.size = $fontsize
# ---------------------------------------------------
# COLUMN 1 DATA DISPLAY
# ---------------------------------------------------
# Draw the skill's SP cost & Attack Power
self.contents.font.color = HLIT_COLOR
self.contents.draw_text(x + 74, y - 14, 64, 24, skill_spc, 2)
self.contents.draw_text(x + 74, y, 64, 24, skill_atk, 2)
# ---------------------------------------------------
# COLUMN 2 DATA DISPLAY
# ---------------------------------------------------
# Draw the Skill's effect on hero's attributes
self.contents.font.color = normal_color
self.contents.draw_text(x + 254, y - 14, 64, 24, skill_str, 2)
self.contents.draw_text(x + 254, y + 0, 64, 24, skill_dex, 2)
self.contents.draw_text(x + 254, y + 14, 64, 24, skill_agi, 2)
self.contents.draw_text(x + 254, y + 28, 64, 24, skill_int, 2)
self.contents.draw_text(x + 254, y + 42, 64, 24, skill_pdf, 2)
self.contents.draw_text(x + 254, y + 56, 64, 24, skill_mdf, 2)
# ---------------------------------------------------
# COLUMN 3 DATA DISPLAY
# ---------------------------------------------------
# Draw Skill's Scope & Usage Data
self.contents.draw_text(476, 44, 250, 24, getskill_scope, 0)
self.contents.draw_text(476, 76, 250, 24, getskill_occasion, 0)
# Draw the Power Attributes for the skill.
if $data_skills[skill.id].power >= 0
self.contents.draw_text(x + 444, y + 42, 64, 24, skill_pwr, 2)
else if $data_skills[skill.id].power <= 0
skill_pwr = $data_skills[skill.id].power * -1
self.conte