Escolar Documentos
Profissional Documentos
Cultura Documentos
Equipment Levels Up
by Fomar0153
Version 1.0
---------------------Notes
---------------------This script allows weapons to grow stronger and level up when they
gain exp or ap.
---------------------Instructions
---------------------Requires my individual equipment script. (Make sure it is version 1.1+)
Requires an AP script if leveling weapons using AP.
Customise the variables in the module below to set up the script to your
liking.
Notetags
<maxlevel x> - adds a non-default max level to the tagged equipment.
---------------------Known bugs
---------------------None
=end
module Fomar
# If you only want to implement this for weapons or armours set
# the following to false as you see fit
WLU_WEAPONS_LEVEL_UP = true
WLU_ARMOURS_LEVEL_UP = true
# This script can be set up to use either EXP or AP
# For AP you will also need an AP system.
# true -> uses AP
# false -> uses EXP
WLU_USE_AP = false
# Determines the order of the substitutions
# true -> level, name
# false -> name, level
WLU_PREFIX = false
# the %s are replaced by the level and name of the weapon
WLU_VOCAB_WEAPON_NAME = "%s LV %s"
# Default max level
# set to 0 to only allow chosen weapons to level up
WLU_DEF_MAX_LEVEL = 5
# Default stat increase per level (percentage)
WLU_DEF_PARAM_INC = 25
# Set to false if you want the price of the item to be unaffected
# by leveling up
WLU_PRICE_LEVEL_UP = true
# Default experience per level
# I have provided two defaults, one designed for EXP and one for AP
def self.WLU_EXP_FOR_LEVEL(item); return item.performance * 10; end
def self.WLU_AP_FOR_LEVEL(item); return item.performance; end
end
class Game_CustomEquip < Game_BaseItem
end
class Window_Base < Window
alias wlu_draw_item_name draw_item_name
def draw_item_name(item, x, y, enabled = true, width = 172)
return unless item
if item.is_a?(Game_CustomEquip)
return if item.is_nil?
end
wlu_draw_item_name(item, x, y, enabled = true, width)
end
end
class Window_EquipSlot < Window_Selectable
# rewrites draw_item
def draw_item(index)
return unless @actor
rect = item_rect_for_text(index)
change_color(system_color, enable?(index))
draw_text(rect.x, rect.y, 92, line_height, slot_name(index))
draw_item_name(@actor.custom_equips[index], rect.x + 92, rect.y, enable?(ind
ex))
end
end