#==============================================================================# # ▼ Yanfly Engine Ace - Ace Equip Engine v1.06# -- Last Updated: 2014.05.01# -- Level: Normal, Hard# -- Requires: n/a# #==============================================================================$imported = {} if $imported.nil?$imported["YEA-AceEquipEngine"] = true#==============================================================================# ▼ Updates# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# 2014.05.01 - Bug Fixed: Refresh Equip Item List when change slot.# 2012.02.02 - Bug Fixed: Crash when changing classes to different equip slots.# 2012.01.22 - Bug Fixed: <equip slot> notetags updated to factor in spaces.# 2012.01.05 - Compatibility Update: Equip Dynamic Stats# 2011.12.30 - Bug Fixed: Stats didn't update.# 2011.12.23 - Script efficiency optimized.# 2011.12.18 - Script efficiency optimized.# 2011.12.13 - Started Script and Finished.# #==============================================================================# ▼ Introduction# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# The default equipment system in RPG Maker VX is the standard equipment system# seen in all of the previous iterations, which consists of weapon, shield,# headgear, bodygear, and accessory. To break free of that norm, this script# allows users access to giving actors and/or classes dynamic equipment setups# (including having multiples of the same categories). In addition to having# different equip slot setups, newer equipment types can be made to allow for# more diversity in armour types.# #==============================================================================# ▼ Instructions# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# To install this script, open up your script editor and copy/paste this script# to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.# # -----------------------------------------------------------------------------# Actor Notetags - These notetags go in the actors notebox in the database.# -----------------------------------------------------------------------------# <equip slots># string# string# </equip slots># This sets the actor's default slots to whatever is listed in between the two# notetags. An actor's custom equip slots will take priority over a class's# custom equip slots, which will take priority over the default equip slots.# Replace "string" with the proper equipment type name or when in doubt, use# "equip type: x" with x as the equipment type.# # <starting gear: x># <starting gear: x, x># Adds armour x to the actor's list of starting gear. This is used primarily# for the newer pieces of gear that can't be added through the starting set of# equipment through the RPG Maker VX Ace editor by default. Insert multiple of# these notetags to add more pieces of starting gear if so desired.# # <fixed equip: x># <fixed equip: x, x># This will fix the equip type x. Fixed equip slots mean that the equipment# already on it are unable to be exchanged in or out by the player. This tag# has been made so that equip types can be fixed for equip type 5 and above.# Use multiple of these notetags to add more fixed equipment restrictions.# # <sealed equip: x># <sealed equip: x, x># This will seal the equip type x. Sealed equip slots mean that no equipment# can be equipped onto that equip type slot. This tag has been made so that# equip types can be sealed for equip type 5 and above. Use multiple of these# notetags to add more sealed equipment restrictions.# # -----------------------------------------------------------------------------# Class Notetags - These notetags go in the class notebox in the database.# -----------------------------------------------------------------------------# <equip slots># string# string# </equip slots># This sets the class's default slots to whatever is listed in between the two# notetags. An actor's custom equip slots will take priority over a class's# custom equip slots, which will take priority over the default equip slots.# Replace "string" with the proper equipment type name or when in doubt, use# "equip type: x" with x as the equipment type.# # <fixed equip: x># <fixed equip: x, x># This will fix the equip type x. Fixed equip slots mean that the equipment# already on it are unable to be exchanged in or out by the player. This tag# has been made so that equip types can be fixed for equip type 5 and above.# Use multiple of these notetags to add more fixed equipment restrictions.# # <sealed equip: x># <sealed equip: x, x># This will seal the equip type x. Sealed equip slots mean that no equipment# can be equipped onto that equip type slot. This tag has been made so that# equip types can be sealed for equip type 5 and above. Use multiple of these# notetags to add more sealed equipment restrictions.# # -----------------------------------------------------------------------------# Weapon Notetags - These notetags go in the weapons notebox in the database.# -----------------------------------------------------------------------------# <fixed equip: x># <fixed equip: x, x># This will fix the equip type x. Fixed equip slots mean that the equipment# already on it are unable to be exchanged in or out by the player. This tag# has been made so that equip types can be fixed for equip type 5 and above.# Use multiple of these notetags to add more fixed equipment restrictions.# # <sealed equip: x># <sealed equip: x, x># This will seal the equip type x. Sealed equip slots mean that no equipment# can be equipped onto that equip type slot. This tag has been made so that# equip types can be sealed for equip type 5 and above. Use multiple of these# notetags to add more sealed equipment restrictions.# # -----------------------------------------------------------------------------# Armour Notetags - These notetags go in the armour notebox in the database.# -----------------------------------------------------------------------------# <equip type: x># <equip type: string># For the newer equip types, replace x or string with the equip type ID or the# name of the equip type respectively. This will set that armour to that# particular equip type.# # <fixed equip: x># <fixed equip: x, x># This will fix the equip type x. Fixed equip slots mean that the equipment# already on it are unable to be exchanged in or out by the player. This tag# has been made so that equip types can be fixed for equip type 5 and above.# Use multiple of these notetags to add more fixed equipment restrictions.# # <sealed equip: x># <sealed equip: x, x># This will seal the equip type x. Sealed equip slots mean that no equipment# can be equipped onto that equip type slot. This tag has been made so that# equip types can be sealed for equip type 5 and above. Use multiple of these# notetags to add more sealed equipment restrictions.# # -----------------------------------------------------------------------------# State Notetags - These notetags go in the states notebox in the database.# -----------------------------------------------------------------------------# <fixed equip: x># <fixed equip: x, x># This will fix the equip type x. Fixed equip slots mean that the equipment# already on it are unable to be exchanged in or out by the player. This tag# has been made so that equip types can be fixed for equip type 5 and above.# Use multiple of these notetags to add more fixed equipment restrictions.# # <sealed equip: x># <sealed equip: x, x># This will seal the equip type x. Sealed equip slots mean that no equipment# can be equipped onto that equip type slot. This tag has been made so that# equip types can be sealed for equip type 5 and above. Use multiple of these# notetags to add more sealed equipment restrictions.# #==============================================================================# ▼ Compatibility# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# This script is made strictly for RPG Maker VX Ace. It is highly unlikely that# it will run with RPG Maker VX without adjusting.# #==============================================================================module YEA module EQUIP #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # - General Equip Settings - #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # This adjusts the default equip configuration. While actors can have their # own unique equipment configurations, it's recommended to not change too # much as things get really hairy when it comes to proper eventing. # # ID Equip Type # --- ------------ # 0 Weapon # 1 Shield # 2 Headgear # 3 Bodygear # 4 Accessory # # Whatever you set the below slots to, the dual wield setup will be exactly # identical except that the second slot will be changed to a weapon (0). #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # Adjust this array to set the default slots used for all of your actors # and classes if they do not have a custom equipment slot setup. DEFAULT_BASE_SLOTS = [ 0, 1, 2, 3, 4, 6, 6] # This hash adjusts the new equip types (past 4+). Adjust them to match # their names properly. You can choose to allow certain types of equipment # be removable or not, or whether or not optimize will affect them. TYPES ={ # TypeID => ["Type Name", Removable?, Optimize?], 0 => [ "L Hand", true, true], 1 => [ "R Hand", true, true], 2 => [ "Head", true, true], 3 => [ "Body", true, true], 4 => ["Arms", true, true], 5 => [ "Accessory", true, false], 6 => [ "Accessory", true, false], } # Do not remove this. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # - Equip Command List - #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # Here, you can adjust the order at which the commands appear (or even # remove commands as you see fit). Here's a list of which does what: # # ------------------------------------------------------------------------- # :command Description # ------------------------------------------------------------------------- # :equip Activates the manual equip window. Default. # :optimize Optimizes equipment for the actor. Default. # :clear Clears all equipment from the actor. Default # # And that's all of the currently available commands. This list will be # updated as more scripts become available. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # This array arranges the order of which the commands appear in the Equip # Command window in the Equip Scene. COMMAND_LIST =[ :equip, :optimize, :clear, # :custom1, # :custom2, ] # Do not remove this. #-------------------------------------------------------------------------- # - Equip Custom Commands - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # For those who use scripts to that may produce unique effects for # equipping, use this hash to manage the custom commands for the Equip # Command Window. You can disable certain commands or prevent them from # appearing by using switches. If you don't wish to bind them to a switch, # set the proper switch to 0 for it to have no impact. #-------------------------------------------------------------------------- CUSTOM_EQUIP_COMMANDS ={ # :command => ["Display Name", EnableSwitch, ShowSwitch, Handler Method], :custom1 => [ "Custom Name", 0, 0, :command_name1], :custom2 => [ "Custom Text", 13, 0, :command_name2], } # Do not remove this. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # - Misc Window Settings - #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # This section adjusts the minor visuals that you see inside of the newly # organized Equip Scene. Adjust the settings as you see fit. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # This sets the font size used for the status window in the lower right # corner of the screen (which shows stats and comparisons). STATUS_FONT_SIZE = 20 # This sets the remove equip command in the item window. REMOVE_EQUIP_ICON = 0 REMOVE_EQUIP_TEXT = "< Unequip >" # This sets the no-equipment text in the slot window. NOTHING_ICON = 0 NOTHING_TEXT = " " end # EQUIPend # YEA#==============================================================================# ▼ 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.#==============================================================================module YEA module REGEXP module BASEITEM EQUIP_SLOTS_ON = /<(?:EQUIP_SLOTS|equip slots)>/i EQUIP_SLOTS_OFF = /<\/(?:EQUIP_SLOTS|equip slots)>/i EQUIP_TYPE_INT = /<(?:EQUIP_TYPE|equip type):[ ]*(\d+)>/i EQUIP_TYPE_STR = /<(?:EQUIP_TYPE|equip type):[ ]*(.*)>/i STARTING_GEAR = /<(?:STARTING_GEAR|starting gear):[ ](\d+(?:\s*,\s*\d+)*)>/i FIXED_EQUIP = /<(?:FIXED_EQUIP|fixed equip):[ ](\d+(?:\s*,\s*\d+)*)>/i SEALED_EQUIP = /<(?:SEALED_EQUIP|sealed equip):[ ](\d+(?:\s*,\s*\d+)*)>/i end # BASEITEM end # REGEXPend # YEA