module Blacksmith
#===============================================================================
# BEGIN CONFIGURATION
#===============================================================================
FORGE_SE = ['006-System06', 80, 100]
# SE played when an item is forged. ['FILENAME', VOLUME, PITCH]
EXTRACT_SE = ['020-Teleport03', 80, 100]
# SE played when an item extraction is performed. ['FILENAME', VOLUME, PITCH]
ENCHANT_SE = ['020-Teleport03', 80, 100]
# SE played when an item enchantment is performed. ['FILENAME', VOLUME, PITCH]
USE_ENCHANTMENTS = true
# Set to true to enable the "Enchant" feature of the system.
NO_ENCHANT_WEAPONS = []
NO_ENCHANT_ARMORS = []
# Include IDs of any equipment that cannot be enchanted in the respective
# arrays, seperating by commas. Ignore these if not using enchant feature.
# Define the colors used for the text in the Blacksmith shop.
PLUS_COLOR = Color.new(128, 255, 128)
MINUS_COLOR = Color.new(255, 128, 128)
MAP_BACK = true
# Set to true if you would like slightly opaque windows with the map showing
# through.
#-----------------------------------------------------------------------------
# FORGE DATABASE
#-----------------------------------------------------------------------------
# Define the materials used for each weapon/armor/item that can be forged and
# extracted. They configuration is slightly different than what it was in the
# first version of the script. You can seperately define materials that are
# given during extraction if you like, or ignore it and it will simply return
# the same materials it takes to forge them. It works like this:
#
# STEP 1:
# Create a new "case" in the appropriate method below for the type of item
# you are trying to define. There are three of them, one each for weapons,
# armors, and items. Just use this syntax:
#
# when DATABASE_ID then []
#
# STEP 2:
# Now you can begin to add materials to forge the item. Each material has
# an number which defines what type of item is is. Here is the "key":
#
# 0 = Weapon
# 1 = Armor
# 2 = Item
#
# To define a material for an item, you simply create a three element array
# using this format:
# [ITEM_TYPE, DATABASE_ID, QUANTITY]
#
# ...and add it the appropriate empty array in the case statement you made
# in Step 1. You can add as many different items as you please to forge an
# weapon/armor/item, simply seperate the material arrays with commas. See
# below for a few examples.
#-----------------------------------------------------------------------------
def self.weapon_forges(id)
return case id
when 1 then [[2, 33, 3]] # Bronze Sword
end
end
def self.armor_forges(id)
return case id
when 1 then [[2, 33, 5]]
end
end
def self.item_forges(id)
return case id
when 2 then [[2, 33, 5]]
end
end
#-----------------------------------------------------------------------------
# EXTRACT DATABASE
#-----------------------------------------------------------------------------
# Here you can define the items received when a specific item is extracted.
# It can be setup the same as way as above. Items left undefined will return
# the same items that are required to forge it. You can define an item with an
# empty array to have it return no items, though it can still return gold.
#-----------------------------------------------------------------------------
def self.weapon_extractions(id)
return case id
when 1 then [[2, 33, 1], [2, 42, 1]]
else
self.weapon_forges(id)
end
end
def self.armor_extractions(id)
return case id
when 1 then [[2, 34, 2], [0, 1, 1]]
else
self.armor_forges(id)
end
end
def self.item_extractions(id)
return case id
when 1 then [] # Potion
when 2 then [[2, 1, 2]] # High Potion
when 3 then [[2, 2, 2], [2, 1, 2]] # Full Potion
when 4 then [] # Perfume
when 5 then [[2, 4, 2]] # High Perfume
when 6 then [[2, 4, 2], [2, 5, 2]] # Full Perfume
else
self.item_forges(id)
end
end
#-----------------------------------------------------------------------------
# GOLD DATABASE
#-----------------------------------------------------------------------------
# Here you can define the amount of gold that is required to forge an item,
# and the amount that is given if extracted. There are three methods, one each
# for weapons, armors, and items. Simply follow this pattern for each
# category:
#
# when DATABASE_ID then [FORGE_PRICE, EXTRACT_GOLD,]
#-----------------------------------------------------------------------------
def self.weapon_gold(id)
return case id
when 1 then [200, 50]
when 2 then [450, 225]
else
[0, 0]
end
end
def self.armor_gold(id)
return case id
when 1 then []
when 2 then []
when 3 then []
when 4 then []
when 5 then []
else
[0, 0]
end
end
def self.item_gold(id)
return case id
when 1 then [100, 0]
else
[0, 0]
end
end
#-----------------------------------------------------------------------------
# ENCHANT DATABASE
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# Here you can define what items will alter stats when used to enchant with.
# You need to create a two element array, and add it to the respective array
# below that corresponds with the desired item.
#
# ex.
# when ITEM_ID then [[KEYWORD, VALUE], [KEYWORD, VALUE]]
#
# KEYWORD: See below for a list of possible keywords. Stat changes that
# can affect only weapons will have no effect on armors, and
# vice-versa.
# VALUE : The amount by which to change the stat. Negative values will
# lower the stat.
#-----------------------------------------------------------------------------
# KEYWORDS:
#
# 'ATK' (Weapon Only) 'DEX' 'PDEF'
# 'EVA' (Armor Only) 'AGI' 'MDEF'
# 'STR' 'INT'
#
# ** Keywords have to be written EXACTLY as they appear.
# ex: when 40 then [['STR', 15], ['ATK', 5]] # Behemoth Juice
#-----------------------------------------------------------------------------
def self.enchant_stats(item_id)
return case item_id
when 1 then []
#Enter stats here
end
end
#-----------------------------------------------------------------------------
# Define state altering enchantments.
#
# ex.
# when ITEM_ID then [[VALUE, STATE_ID], [VALUE, STATE_ID]]
#
# VALUE: One of three different values to represent states efficiency.
# -1 = Minus state (Does nothing on armors)
# 0 = Neutral
# 1 = Plus state
# STATE_ID: The ID in the database of the state.
#-----------------------------------------------------------------------------
def self.enchant_states(item_id)
return case item_id
when 1 then []
#when 38 then [[1, 2], [1, 4], [1, 6]] # Chaos Orb
end
end
#-----------------------------------------------------------------------------
# Define element altering enchantments.
#
# ex.
# when ITEM_ID then [[VALUE, ELEMENT_ID], [VALUE, ELEMENT_ID]]
#
# VALUE: One of two different values to represent element efficiency.
# true = Uses element
# false = Doesn't use element (Negates element if present)
# ELEMENT_ID: The ID in the database of the element.
#-----------------------------------------------------------------------------
def self.enchant_elements(item_id)
return case item_id
when 1 then []
#when 36 then [[true, 3], [false, 5]] # Amethyst
#when 37 then [[true, 1]] # Ruby ;)
end
end
#-----------------------------------------------------------------------------
# Define the amount of gold it takes to enchant a weapon or armor with the
# item.
#-----------------------------------------------------------------------------
def self.enchant_gold(item_id)
return case item_id
when 1 then []
#when 36 then 1500
else
0
end
end
#===============================================================================
# END CONFIGURATION
#===============================================================================