The Sleeping Leonhart
Member
Equipment Creator
Version: 1.2
Introduction
This script allow you to modify weapons and armors to create a new weapon/armor.
The weapon/armor are affected by the use of objects, first of all choose a weapon/armor to modify,
next choose the ingredients and confirm the result.(It's like the Final Fantasy X Equipment modification)
Features
Screenshot
Demo
Download
Script
Instructions
Inside the script
Compatibility
Dont know.
Version: 1.2
Introduction
This script allow you to modify weapons and armors to create a new weapon/armor.
The weapon/armor are affected by the use of objects, first of all choose a weapon/armor to modify,
next choose the ingredients and confirm the result.(It's like the Final Fantasy X Equipment modification)
Features
- Can modify all the weapon/armor stats
- Can modify the weapon/armore name
- Can change the weapon/armor description
- Can change the weapon/armor icon
- Can change the weapon/armor slot number
- Each ingredient can have different effect on different weapon/armor
Screenshot
http://img241.imageshack.us/img241/3388/79734161qx3.png[/img]
http://img80.imageshack.us/img80/4711/83745890ej3.png[/img]
http://img111.imageshack.us/img111/8971/80281057ev8.png[/img]
Demo
Download
Script
Code:
#==============================================================================
# Equipment Creator
#------------------------------------------------------------------------------
# Autor: The Sleeping Leonhart
# Version: 1.3
# Release Date: 10/07/2008
#------------------------------------------------------------------------------
# Description:
# This script allow you to modify weapons and armors to create a new weapon/armor.
# The weapon/armor are affected by the use of objects, first of all
# choose a weapon/armor to modify, next choose the ingredients and confirm
# the result.
#------------------------------------------------------------------------------
# Istruction:
# To call the scene use the following code:
# $scene = Scene_ItemCreator.new(n)
# If n = 1 modify a weapon, if n = 2 modify an armor.
# Press Esc for remove last ingredient, press right if you want to go
# to the confirmation window, press left if you wanna return to
# the previous window.
# See the Configuration section to customize the script.
#==============================================================================
#==============================================================================
# Configuration
#==============================================================================
module Equip_Creator
#--------------------------------------------------------------------------
# Weapon_Ingredient: Set the ingredients and his effect for each weapon
# If the weapon have at least 1 ingredient it's automatically
# added to the elaborable weapon.
#--------------------------------------------------------------------------
# Sintax:
# Weapon_Ingredient = {Weapon_Id=>{Item_Id=>[atk ,pdef, mdef, str,
# dex, agi, int, element,
# plus_state, minus_state, [n_type, name,]
# [d_type, desc], icon, a_animation],
# ...},...}
# Parameter:
# atk: increase the weapon attack
# pdef: increase the weapon phisical def.
# mdef: increase the weapon magical def.
# str: increase the weapon strenght
# dex: increase the weapon dexterity
# agi: increase the weapon agility
# int: increase the weapon intelligence
# element: array that contain the id of element that own the weapon
# plus_state: array that contain the id status that the weaopon inflict
# minus_state: array that contain the id status that the weaopon remove
# n_type: if 1 the string contained in name is added to the weapon name
# if 2 the string contained in name replace the weapon name
# name: string that modify the weapon name
# d_type: if 1 the string contained in desc is added to the weapon description
# if 1 the string contained in desc replace the weapon description
# desc: string that modify the weapon description
# icon: icon name for the new weapon,if "" the weapon icon remain the old
# a_animation: id of animation for the new weapon,if 0 the weapon animation remain the old
#--------------------------------------------------------------------------
Weapon_Ingredient = {1=>{
33=>[15,0,0,25,10,-5,15,[1],[],[],[1," of fire"],[1, " |Fire|"],"",0],
34=>[20,0,0,15,15,10,-5,[3],[],[],[2,"Thunder Sword"],[2, "An electric sword. |Thunder|"],"044-Skill01",33],
35=>[15,5,5,10,10,10,0,[],[3],[],[1," poisoned"],[1, " |+ Venom|"],"",0],
36=>[75,0,0,40,0,0,0,[],[],[],[1,""],[1, ""],"",0]
},
5=>{
33=>[5,10,10,15,15,0,15,[1],[],[],[1," of fire"],[1, " |Fire|"],"",0],
34=>[10,5,15,10,10,15,0,[3],[],[],[2,"Thunder Spear"],[2, "An electric spear. |Thunder|"],"044-Skill01",33],
35=>[10,10,5,5,10,10,5,[],[3],[],[1," poisoned"],[1, " |+ Venom|"],"",0],
36=>[95,0,0,35,0,0,0,[],[],[],[1,""],[1, ""],"",0]
}
}
#--------------------------------------------------------------------------
# Weapon_Slot: Set the number of slot for the ingredients of each weapon
#--------------------------------------------------------------------------
# Sintax:
# Weapon_Slot = {Weapon_Id => Slot,...}
# Parameter:
# Slot: Number of slot for the weapon
#--------------------------------------------------------------------------
Weapon_Slot = {1=>3}
#--------------------------------------------------------------------------
# Weapon_Slot.default: Set the number of slot for the ingredients for non declared
# Weapon_Slot
#--------------------------------------------------------------------------
# Sintassi:
# Weapon_Slot.default = Slot
# Parametri:
# Slot: Number of slot for the weapon
#--------------------------------------------------------------------------
Weapon_Slot.default = 2
#--------------------------------------------------------------------------
# Weapon_Ingredient: Set the ingredients and his effect for each armor
# If the armor have at least 1 ingredient it's automatically
# added to the elaborable armor.
#--------------------------------------------------------------------------
# Sintassi:
# Armor_Ingredient = {Armor_Id=>{Item_Id=>[eva ,pdef, mdef, str,
# dex, agi, int, element_guard,
# state_guard, auto_state, [n_type, name,]
# [d_type, desc], icon],
# ...},...}
# Parametri:
# Armor_ID: Id dell'armatura nel database
# eva: increase the weapon evasion
# pdef: increase the weapon phisical def.
# mdef: increase the weapon magical def.
# str: increase the weapon strenght
# dex: increase the weapon dexterity
# agi: increase the weapon agility
# int: increase the weapon intelligence
# element_guard: array that contain the id of elements protected by the armor
# state_guard: array that contain the id of status protected by the armor
# auto_state: id of the auto-status that the armor inflict, if 0 the auto-status
# remain the same
# n_type: if 1 the string contained in name is added to the weapon name
# if 2 the string contained in name replace the weapon name
# name: string that modify the weapon name
# d_type: if 1 the string contained in desc is added to the weapon description
# if 1 the string contained in desc replace the weapon description
# desc: string that modify the weapon description
# icon: icon name for the new weapon,if "" the weapon icon remain the old
#--------------------------------------------------------------------------
Armor_Ingredient = {1=>{
33=>[10,20,30,25,10,5,-15,[1],[],0,[1," of fire"],[1, " |Fire Guard|"],""],
34=>[0,0,0,15,15,10,-10,[3],[],0,[2,"Thunder Shield"],[2, "An anti-electricity shield"],"044-Skill01"],
35=>[0,20,40,1,5,15,10,[],[3],0,[1," anti-venom"],[1, "|Venom Guard|"],""],
36=>[0,10,10,50,5,5,0,[],[],0,[1,""],[1, ""],""]
},
13=>{
33=>[10,20,30,25,10,5,-10,[1],[],0,[1,"of fire"],[1, " |Fire Guard|"],""],
34=>[0,5,5,10,10,5,5,[3],[],0,[2,"Thunder Armor"],[2, "An anti-electricity armor"],"044-Skill01"],
35=>[0,20,20,0,10,10,10,[],[3],0,[1," anti-venom"],[1, "|Venom Guard|"],""],
36=>[0,5,5,60,10,0,0,[],[],0,[1,""],[1, ""],""]
}
}
#--------------------------------------------------------------------------
# Armor_Slot: Set the number of slot for the ingredients of each armor
#--------------------------------------------------------------------------
# Sintassi:
# Armor_Slot = {Armor_Id => Slot,...}
# Parametri:
# Slot: Number of slot for the armor
#--------------------------------------------------------------------------
Armor_Slot = {1=>3}
#--------------------------------------------------------------------------
# Armor_Slot.default: Set the number of slot for the ingredients for non declared
# Armor_Slot
#--------------------------------------------------------------------------
# Sintassi:
# Armor_Slot.default = Slot
# Parametri:
# Slot: Number of slot for the armor
#--------------------------------------------------------------------------
Armor_Slot.default = 2
#--------------------------------------------------------------------------
# Help_Type: Set the text showed in the help window
#--------------------------------------------------------------------------
# Sintassi:
# Help_Type = n
# Parametri:
# n: If 1 Show the action to do, if 2 the item description
#--------------------------------------------------------------------------
Help_Type = 1
end
class Game_Party
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :created_weapons
attr_accessor :created_armors
attr_accessor :created_weapon_set
attr_accessor :created_armor_set
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
alias tslec_gameparty_initialize initialize
def initialize
@created_weapons = []
@created_armors = []
@created_weapon_set = {}
@created_armor_set = {}
@created_weapon_set.default = []
@created_armor_set.default = []
tslec_gameparty_initialize
end
end
class Scene_Load < Scene_File
#--------------------------------------------------------------------------
# * Decision Processing
#--------------------------------------------------------------------------
alias tslec_sceneload_on_decision on_decision
def on_decision(filename)
tslec_sceneload_on_decision(filename)
for i in $game_party.created_weapons
$data_weapons.push(i)
end
for i in $game_party.created_armors
$data_armors.push(i)
end
for i in 1...$data_classes.size
for j in $game_party.created_weapon_set[i]
$data_classes[i].weapon_set.push(j)
end
for j in $game_party.created_armor_set[i]
$data_classes[i].armor_set.push(j)
end
end
end
end
class Window_EC_EItem < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(type = 1)
super(0, 64, 320, 232)
@type = type
@column_max = 1
refresh
self.index = 0
end
#--------------------------------------------------------------------------
# * Get Item
#--------------------------------------------------------------------------
def item
return @data[self.index]
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
case @type
when 1
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0 and Equip_Creator::Weapon_Ingredient.keys.include?(i)
@data.push($data_weapons[i])
end
end
when 2
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0 and Equip_Creator::Armor_Ingredient.keys.include?(i)
@data.push($data_armors[i])
end
end
end
@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::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
self.contents.font.color = normal_color
x = 4 + index % @column_max * (288 + 32)
y = index / @column_max * 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)
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
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 Text Update
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(self.item == nil ? "" : self.item.description)
end
end
class Window_EC_IItem < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(item, type = 1)
super(0, 64, 320, 232)
@type = type
@item = item
@column_max = 1
refresh
self.index = 0
end
#--------------------------------------------------------------------------
# * Get Item
#--------------------------------------------------------------------------
def item
return @data[self.index]
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
case @type
when 1
a = Equip_Creator::Weapon_Ingredient[@item]
when 2
a = Equip_Creator::Armor_Ingredient[@item]
end
for i in 1...$data_items.size
if $game_party.item_number(i) > 0 and a.include?(i)
@data.push($data_items[i])
end
end
@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]
number = $game_party.item_number(item.id)
self.contents.font.color = normal_color
x = 4 + index % @column_max * (288 + 32)
y = index / @column_max * 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)
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
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 Text Update
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(self.item == nil ? "" : self.item.description)
end
end
class Window_EC_IUsed < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(type, base = nil, ingredient = [])
super(320, 64, 320, 232)
self.contents = Bitmap.new(width - 32, height - 32)
refresh(type, base, ingredient)
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh(type, base, ingredient)
self.contents.clear
self.contents.font.color = system_color
case type
when 1
self.contents.draw_text(0, 0, 64, 32, "Weapon")
when 2
self.contents.draw_text(0, 0, 64, 32, "Armor")
end
self.contents.draw_text(0, 24, 96, 32, "Ingredients")
self.contents.font.color = normal_color
if base != nil
bitmap = RPG::Cache.icon(base.icon_name)
self.contents.blt(100, 4, bitmap, Rect.new(0, 0, 24, 24))
self.contents.draw_text(124, 0, 212, 32, base.name)
end
if ingredient != []
for i in 0...ingredient.size
bitmap = RPG::Cache.icon(ingredient[i].icon_name)
self.contents.blt(100, 28+24*i, bitmap, Rect.new(0, 0, 24, 24))
self.contents.draw_text(124, 24+24*i, 212, 32, ingredient[i].name)
end
end
end
end
class Window_EC_IParameter < Window_Base
def initialize(type, base,id = nil, ing_size = 0)
super(0, 296, 640, 184)
self.contents = Bitmap.new(width - 32, height - 32)
case type
when 1
w_refresh(id, base, ing_size)
when 2
a_refresh(id, base, ing_size)
end
end
#--------------------------------------------------------------------------
# * Weapon Refresh
#--------------------------------------------------------------------------
def w_refresh(id, base, ing_size)
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(240, 0, 96,32, "Slot")
self.contents.draw_text(0, 0 + 24, 96, 32, "Attack")
self.contents.draw_text(0, 24 + 24, 96, 32, "Phisical Def.")
self.contents.draw_text(0, 48 + 24, 96, 32, "Magical Def.")
self.contents.draw_text(0, 72 + 24, 96, 32, "Strenght")
self.contents.draw_text(0, 96 + 24, 96, 32, "Intelligece")
self.contents.draw_text(240, 0 + 24, 96, 32, "Dexterity")
self.contents.draw_text(240, 24 + 24, 96, 32, "Agility")
self.contents.draw_text(240, 48 + 24, 96, 32, "Element")
self.contents.draw_text(240, 72 + 24, 96, 32, "Status +")
self.contents.draw_text(240, 96 + 24, 96, 32, "Status -")
if id != nil
i = $data_weapons[id]
self.contents.font.color = normal_color
bitmap = RPG::Cache.icon(i.icon_name)
self.contents.blt(0, 0, bitmap, Rect.new(0, 0, 24, 24))
self.contents.draw_text(24, 0, 212, 32, i.name)
self.contents.draw_text(360, 0, 96,32, ing_size.to_s+"/"+Equip_Creator::Weapon_Slot[base.id].to_s)
self.contents.draw_text(120, 0 + 24, 96, 32, i.atk.to_s)
self.contents.draw_text(120, 24 + 24, 96, 32, i.pdef.to_s)
self.contents.draw_text(120, 48 + 24, 96, 32, i.mdef.to_s)
self.contents.draw_text(120, 72 + 24, 96, 32, i.str_plus.to_s)
self.contents.draw_text(120, 96 + 24, 96, 32, i.int_plus.to_s)
self.contents.draw_text(360, 0 + 24, 96, 32, i.dex_plus.to_s)
self.contents.draw_text(360, 24 + 24, 96, 32, i.agi_plus.to_s)
s = ""
for j in i.element_set
s += ", " if s != ""
s += $data_system.elements[j]
end
self.contents.draw_text(360, 48 + 24, 180, 32, s)
s = ""
for j in i.plus_state_set
s += ", " if s != ""
s += $data_states[j].name
end
self.contents.draw_text(360, 72 + 24, 180, 32, s)
s = ""
for j in i.minus_state_set
s += ", " if s != ""
s += $data_states[j].name
end
self.contents.draw_text(360, 96 + 24, 180, 32, s)
end
end
#--------------------------------------------------------------------------
# * Armor Refresh
#--------------------------------------------------------------------------
def a_refresh(id, base, ing_size)
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(240, 0, 96,32, "Slot")
self.contents.draw_text(0, 0 + 24, 96, 32, "Evasion")
self.contents.draw_text(0, 24 + 24, 96, 32, "Phisical Def.")
self.contents.draw_text(0, 48 + 24, 96, 32, "Magical Def.")
self.contents.draw_text(0, 72 + 24, 96, 32, "Strenght")
self.contents.draw_text(0, 96 + 24, 96, 32, "Intelligece")
self.contents.draw_text(240, 0 + 24, 96, 32, "Dexterity")
self.contents.draw_text(240, 24 + 24, 96, 32, "Agility")
self.contents.draw_text(240, 48 + 24, 96, 32, "Elemental Def.")
self.contents.draw_text(240, 72 + 24, 96, 32, "Status Sef.")
self.contents.draw_text(240, 96 + 24, 96, 32, "Auto-Status")
if id != nil
i = $data_armors[id]
self.contents.font.color = normal_color
bitmap = RPG::Cache.icon(i.icon_name)
self.contents.blt(0, 0, bitmap, Rect.new(0, 0, 24, 24))
self.contents.draw_text(24, 0, 212, 32, i.name)
self.contents.draw_text(360, 0, 96,32, ing_size.to_s+"/"+Equip_Creator::Armor_Slot[base.id].to_s)
self.contents.draw_text(120, 0 + 24, 96, 32, i.eva.to_s)
self.contents.draw_text(120, 24 + 24, 96, 32, i.pdef.to_s)
self.contents.draw_text(120, 48 + 24, 96, 32, i.mdef.to_s)
self.contents.draw_text(120, 72 + 24, 96, 32, i.str_plus.to_s)
self.contents.draw_text(120, 96 + 24, 96, 32, i.int_plus.to_s)
self.contents.draw_text(360, 0 + 24, 96, 32, i.dex_plus.to_s)
self.contents.draw_text(360, 24 + 24, 96, 32, i.agi_plus.to_s)
s = ""
for j in i.guard_element_set
s += ", " if s != ""
s += $data_system.elements[j]
end
self.contents.draw_text(360, 48 + 24, 180, 32, s)
s = ""
for j in i.guard_state_set
s += ", " if s != ""
s += $data_states[j].name
end
self.contents.draw_text(360, 72 + 24, 180, 32, s)
self.contents.draw_text(360, 96 + 24, 180, 32, $data_states[i.auto_state_id].name) if i.auto_state_id != 0
end
end
end
class Scene_ItemCreator
#--------------------------------------------------------------------------
# * Object Initialization
# type : type
#--------------------------------------------------------------------------
def initialize(type = 1)
@type = type
@base = nil
@ingredient = []
end
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
@help_window = Window_Help.new
@item_window = Window_EC_EItem.new(@type)
@ingredient_window = Window_Base.new(0,0,0,0)
@status_window = Window_EC_IParameter.new(@type, nil)
@used_window = Window_EC_IUsed.new(@type, @base, @ingredient)
@ingredient_window.visible = false
@ingredient_window.active = false
@choice_window = Window_Command.new(160,["Confirm", "Exit"])
@choice_window.x = 480
@choice_window.y = 296
@choice_window.z += 1
@choice_window.active = false
if Equip_Creator::Help_Type == 1
case @type
when 1
s = "Weapon"
when 2
s = "Armor"
end
@help_window.set_text("Select base "+s)
else
@item_window.help_window = @help_window
end
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@help_window.dispose
@item_window.dispose
@ingredient_window.dispose
@status_window.dispose
@used_window.dispose
@choice_window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
@help_window.update
@item_window.update
@ingredient_window.update
@status_window.update
@used_window.update
@choice_window.update
if Input.trigger?(Input::RIGHT)
$game_system.se_play($data_system.cursor_se)
@choice_window.active = true
if @item_window.visible
@item_window.active = false
elsif @ingredient_window.visible
@ingredient_window.active = false
end
return
end
if @item_window.active
update_item
return
end
if @ingredient_window.active
update_ingredient
return
end
if @choice_window.active
update_choice
end
end
#--------------------------------------------------------------------------
# * Update Item
#--------------------------------------------------------------------------
def update_item
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
if Input.trigger?(Input::C)
if@item_window.item != nil
$game_system.se_play($data_system.decision_se)
@base = @item_window.item
case @type
when 1
$game_party.created_weapons.push($data_weapons[@base.id].dup)
$data_weapons.push($data_weapons[@base.id].dup)
id = $data_weapons.size - 1
$data_weapons[id].id = id
when 2
$game_party.created_armors.push($data_armors[@base.id].dup)
$data_armors.push($data_armors[@base.id].dup)
id = $data_armors.size - 1
$data_armors[id].id = id
end
update_status(id)
update_used
@item_window.active = false
@item_window.visible = false
@ingredient_window.dispose
@ingredient_window = Window_EC_IItem.new(@base.id, @type)
@ingredient_window.active = true
@ingredient_window.visible = true
if Equip_Creator::Help_Type == 1
@help_window.set_text("Select ingredients!")
else
@ingredient_window.help_window = @help_window
end
else
$game_system.se_play($data_system.buzzer_se)
end
return
end
end
#--------------------------------------------------------------------------
# * Update Ingredient
#--------------------------------------------------------------------------
def update_ingredient
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
if @ingredient.size > 0
@ingredient.pop
update_used
case @type
when 1
witem_effect
when 2
aitem_effect
end
else
@item_window.active = true
@item_window.visible = true
@ingredient_window.active = false
@ingredient_window.visible = false
if Equip_Creator::Help_Type == 1
case @type
when 1
s = "Weapon"
$data_weapons.pop
when 2
s = "Armor"
$data_armors.pop
end
@help_window.set_text("Select base "+s)
end
@base = nil
update_used
end
return
end
if Input.trigger?(Input::C)
item = @ingredient_window.item
case @type
when 1
a = Equip_Creator::Weapon_Slot[@base.id]
when 2
a = Equip_Creator::Armor_Slot[@base.id]
end
if @ingredient.size < a and @ingredient_window.item != nil
if @ingredient.include?(item) == false
$game_system.se_play($data_system.decision_se)
@ingredient.push(item)
update_used
case @type
when 1
witem_effect
when 2
aitem_effect
end
else
$game_system.se_play($data_system.buzzer_se)
end
else
$game_system.se_play($data_system.buzzer_se)
end
return
end
end
#--------------------------------------------------------------------------
# * Update Choice
#--------------------------------------------------------------------------
def update_choice
if Input.trigger?(Input::B) or Input.trigger?(Input::LEFT)
$game_system.se_play($data_system.cursor_se)
@choice_window.active = false
if @item_window.visible
@item_window.active = true
elsif @ingredient_window.visible
@ingredient_window.active = true
end
return
end
if Input.trigger?(Input::C)
case @choice_window.index
when 0
if @ingredient.size > 0
$game_system.se_play($data_system.decision_se)
save_result
for i in @ingredient
$game_party.lose_item(i.id, 1)
end
if @type == 1
$game_party.lose_weapon(@base.id, 1)
id = ($data_weapons.size - 1)
$game_party.gain_weapon(id, 1)
elsif @type == 2
$game_party.lose_armor(@base.id, 1)
id = ($data_armors.size - 1)
$game_party.gain_armor(id, 1)
end
$scene = Scene_Map.new
else
$game_system.se_play($data_system.buzzer_se)
end
when 1
$game_system.se_play($data_system.cancel_se)
if @base != nil
case @type
when 1
$data_weapons.pop
when 2
$data_armors.pop
end
end
$scene = Scene_Map.new
end
return
end
end
#--------------------------------------------------------------------------
# * Update Used Window
#--------------------------------------------------------------------------
def update_used
@used_window.dispose
@used_window = Window_EC_IUsed.new(@type, @base, @ingredient)
end
#--------------------------------------------------------------------------
# * Update Status Window
#--------------------------------------------------------------------------
def update_status(id)
@status_window.dispose
@status_window = Window_EC_IParameter.new(@type, @base, id, @ingredient.size)
end
#--------------------------------------------------------------------------
# * Witem Effect
#--------------------------------------------------------------------------
def witem_effect
id = ($data_weapons.size - 1)
$data_weapons[id] = $data_weapons[@base.id].dup
w = $data_weapons[id]
w.element_set = $data_weapons[@base.id].element_set.dup
w.plus_state_set = $data_weapons[@base.id].plus_state_set.dup
w.minus_state_set = $data_weapons[@base.id].minus_state_set.dup
for a in @ingredient
i = Equip_Creator::Weapon_Ingredient[@base.id][a.id]
w.id = id
w.atk += i[0]
w.pdef += i[1]
w.mdef += i[2]
w.str_plus += i[3]
w.dex_plus += i[4]
w.agi_plus += i[5]
w.int_plus += i[6]
for j in i[7]
w.element_set.push(j) if w.element_set.include?(j) == false
end
for j in i[8]
w.plus_state_set.push(j) if w.plus_state_set.include?(j) == false
end
for j in i[9]
w.minus_state_set.push(j) if w.minus_state_set.include?(j) == false
end
if i[10][0] == 1
w.name += i[10][1]
else
w.name = i[10][1]
end
if i[11][0] == 1
w.description += i[11][1]
else
w.description = i[11][1]
end
w.icon_name = i[12] if i[12] != ""
w.animation2_id = i[13] if i[13] != 0
end
update_status(id)
$game_party.created_weapons[($game_party.created_weapons.size-1)] = w.dup
end
#--------------------------------------------------------------------------
# * Aitem Effect
#--------------------------------------------------------------------------
def aitem_effect
id = ($data_armors.size - 1)
$data_armors[id] = $data_armors[@base.id].dup
w = $data_armors[id]
w.guard_element_set = $data_armors[@base.id].guard_element_set.dup
w.guard_state_set = $data_armors[@base.id].guard_state_set.dup
for a in @ingredient
i = Equip_Creator::Armor_Ingredient[@base.id][a.id]
w.id = id
w.eva += i[0]
w.pdef += i[1]
w.mdef += i[2]
w.str_plus += i[3]
w.dex_plus += i[4]
w.agi_plus += i[5]
w.int_plus += i[6]
for j in i[7]
w.guard_element_set.push(j) if w.guard_element_set.include?(j) == false
end
for j in i[8]
w.guard_state_set.push(j) if w.guard_state_set.include?(j) == false
end
w.auto_state_id = i[9] if i[9] != 0
if i[10][0] == 1
w.name += i[10][1]
else
w.name = i[10][1]
end
if i[11][0] == 1
w.description += i[11][1]
else
w.description = i[11][1]
end
w.icon_name = i[12] if i[12] != ""
end
$game_party.created_armors[($game_party.created_armors.size-1)] = w.dup
update_status(id)
end
#--------------------------------------------------------------------------
# * Save Result
#--------------------------------------------------------------------------
def save_result
case @type
when 1
for i in 1...$data_classes.size
if $data_classes[i].weapon_set.include?(@base.id)
$data_classes[i].weapon_set.push(($data_weapons.size-1))
$game_party.created_weapon_set[i].push(($data_weapons.size-1))
end
end
when 2
for i in 1...$data_classes.size
if $data_classes[i].armor_set.include?(@base.id)
$data_classes[i].armor_set.push(($data_armors.size-1))
$game_party.created_armor_set[i].push(($data_armors.size-1))
end
end
end
end
end
Inside the script
Compatibility
Dont know.