Alright, I have an equipment script, that lets you add new equipment, and you have to tag equipment in the notes section.
Here's the script:
The thing, I don't understand what "/(?:SLOT_KIND|Multi-Slot\s*(.+)/i" even means. ._.
Any help on what characters I need to type? ^^;
~Ikos out
Here's the script:
Code:
#==============================================================================
# ** Multi-Elot Equipment VX
#------------------------------------------------------------------------------
# Section 1: Modules
#==============================================================================
module MS_MOD
#==============================================================================
# *** C O N F I G U R A T I O N S E C T I O N *** #
#==============================================================================
ARMOR_KINDS = [0, 3, 3, 5]
EXTRA_SLOT_NAMES = ["Gauntlet", "Boots", "Amulet"]
CURSED_WEAPONS = []
CURSED_ARMOR = []
CURSED_COLOR = 30
SWITCH_EQUIP_WEAPONS = []
SWITCH_EQUIP_ARMORS = []
end
#==============================================================================
# ** TAG CONSTANT
#------------------------------------------------------------------------------
# Constant value(s) used to gain data from the 'note' section.
#==============================================================================
# Used for 'note-tagged' Multi-Slot Equipment
SLOT_KIND = /(?:SLOT_KIND|Multi-Slot:)\s*(.+)/i
#==============================================================================
# ** RPG
#------------------------------------------------------------------------------
# A module containing RPGVX Data Structures.
#==============================================================================
module RPG
#============================================================================
# ** Armor
#----------------------------------------------------------------------------
# Data class for armor.
#============================================================================
class Armor < RPG::BaseItem
#------------------------------------------------------------------------
# * Alias Listings
#------------------------------------------------------------------------
alias ms_module_kind kind
#------------------------------------------------------------------------
# * Set New Item Types
#------------------------------------------------------------------------
def set_new_item_types
@__type = -1
self.note.split(/[\r\n]+/).each { |line|
if line =~ SLOT_KIND
line_index = MS_MOD::EXTRA_SLOT_NAMES.index($1)
next if line_index == nil
@__type = line_index + 4
end }
end
#------------------------------------------------------------------------
# * Set Advanced 'Slot' Type
#------------------------------------------------------------------------
def type
set_new_item_types if @__type == nil
return (@__type == -1 ? ms_module_kind : @__type)
end
end
end
The thing, I don't understand what "/(?:SLOT_KIND|Multi-Slot\s*(.+)/i" even means. ._.
Any help on what characters I need to type? ^^;
~Ikos out