RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[Request] weapon/herb customization (not standard synthesis)

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 75
Hello everyone ^_^
<weapon/herb customization>
<8/17/2010>



Summary
<I am not looking for a synthesis script (that is not the type of weapon/item customization I am looking for, hopefully I will be able to describe what I want.) I would like to take a weapon that is in my inventory (say, 'Long Sword') and customize it with a certain mineral that is also in my inventory (say, 'Damascus'). There will be a certain % chance of success based upon a stat variable to make a new weapon (say, 'Dark Edge').

I also would like an herb customization system (which is the exact same thing as above, but instead of calling upon a weapon selection followed by a mineral selection, two herb selection screens are called - one after the other). Herbs can be identified by having a note 'herb' - or something)

The only part of this that I need help with is a way to have a list pop up with all of the weapons in my inventory (does not have to include what is equipped), and after one of those is selected, have another list come up with all of the minerals in my inventory (items that are minerals can be identified as such by having a note 'minerals' or something). I would also like the description of the weapon/mineral/herb to show up in a window somewhere on the screen while the selection process is occurring. After that I can configure the success %'s, the resulting weapons/herbs, etc. without a script - should be easy.>

Please see the images in the spoiler for clarification, I'm not too good at explaining things...

Features Desired
  • Customize weapons in inventory with minerals, also from inventory (both are chosen from a list of available weapons/minerals)
  • Customize herbs in the exact same manner as above

Mockups
Spoiler for:
Spoiler for:
Spoiler for:

Games its been in
  • Star Ocean 2 (maybe the others too?)
  • ?
  • ?



Did you search?
<yup yup>

Where did you search?
  • rmrk
  • rpgmakervx.net
  • rpgrevolution

What did you search for?
  • weapon synthesis
  • synthesis
  • item customization
  • customization

Thank you for taking the time to look at this. Please do not hesitate to ask me any questions, I will do my best to respond ASAP ^_^
RPMG2k forever!

**
Rep: +0/-0Level 75
Hello everyone ^_^
Oh c'mon - you know this would be SO cool! ^_^ Anyone? (bump)
RPMG2k forever!

***
Rep:
Level 81
Monster Hunter
Oh c'mon - you know this would be SO cool! ^_^ Anyone? (bump)

look for the "Dark cloud weapons" script by xbroken sins ,or something like that, it'll do what you want ^^


EDIT: i can't find it on the internet myself, so if you can't neither, here's a copy of mine :p
normaly it should be version 1.5 but i guess 1.3 should work too ^^


Spoiler for:
Code: [Select]
#==============================================================================
# ** Dark Cloud Weapons
#------------------------------------------------------------------------------
# Author  : xBrokenSin
# Version : 1.3
#==============================================================================
# History:
#------------------------------------------------------------------------------
# 1.0
#  - 9/23/09  - Script finished.
# 1.1
#  - 9/25/09  - Fixed sell bugs
#             - Fixed 2-sword style & 2-handed weapons
#             - Added default weapon exp
#             - Updated weapon build up display
# 1.11
#  - 9/27/09  - Fixed actor unequiped bugs
#             - Added default max value for weapons
# 1.2
#  - 10/2/09  - Fixed another actor unequiped bug
#             - Added ability to give weapons status effects
#             - Added weapon status effect passover rates
# 1.3
#  - 10/17/09 - Added combatibility fix with Tankentai 3.3c
#             - Fixed 0 weapon max value bug
#             - Added ability to set items as "unsynthasizable"
#             - Added toggle for item descriptions in weapon choices
#==============================================================================
# Info:
#------------------------------------------------------------------------------
#   This script was requested by someone on rpgmakervx.net, and is based off
# of the weapon creating system used in Dark Cloud. Weapons gain experience
# through battle and level up, and using items, the user can fuse those items
# into the weapon for greater strength. Also, when the weapon meets
# certain conditions, you can change the weapon into something even stronger.
#==============================================================================
# Instructions:
#------------------------------------------------------------------------------
#                             SETTING UP WEAPONS:
#
#   Using the weapons "notes" box in the database, the user can set up
# various things that effect this script. They are as followed:
#
# <base_exp n>
#
#   This is used to create the experience table for weapons. It is the main value
# that will be used to calculate the weapon experience for every level. If
# no value is set, it will automatically use the default value set below.
# ex: <base_exp 15> - 15 will be used when calculating experience needed.
#
# <max_atk n>
# <max_def n>
# <max_spi n>
# <max_agi n>
#
#   These are used to set the max amount a weapon can have in that perimeter. If
# no value is set, it will automatically use the default value set below.
# ex: <max_atk 250> - the max attack the weapon could obtain would be 250.
#
# <atk_plus n>
# <def_plus n>
# <spi_plus n>
# <agi_plus n>
#
#   When a weapon levels up, it automatically gains a set amount in each stat.
# Using this, you can set individual weapons to grow in a certain way and at a
# certain rate.  If no value is set, it will automatically use the default
# value set below.
# ex: <atk_plus 3> - once the weapon level increases, the weapon gains 3 atk.
#
# <buildup_to_1 id>
# <buildup_to_2 id>
# <buildup_to_3 id>
#
#   Weapons, once enhanced, can grow and change into newer weapons. This is how
# you set which 3 weapons the item can become. If a certain weapon path isn't
# set, that means the weapon can't be made into something new. Also, if you set
# a new weapon build up path, but don't create the weapon, you'll get an error.
# ex: <buildup_to_1 5> - this will cause whatever weapon is being edited to have
# the 5th weapon in the database be a possible weapon path.
#
# <req_atk n>
# <req_def n>
# <req_spi n>
# <req_agi n>
#
#   These are used to set the requirements for a weaker weapon being made into a
# stronger one. It is coupled with <buildup_to>. If no requirement is set, it
# will automatically be 0.
# ex: <req_spi 15> - the base weapon will have to have a spi of 15 before it can
# be made into the newer, stronger weapon.
#
# <state_passover n>
#
#   The chance that the states on a weapon will be passed on to the weapon you
# are fusing it to. If no value is set, it will be the default set below.
# ex: <state_passover 10> - this means that if that weapon has 1 status effect
# on it, when breaking it down and fusing it onto a new weapon, there will only
# be a 10% chance of the new weapon getting it.
#
#                         SETTING UP ITEMS/ARMORS:
#
#   Using the items/armors "notes" box, you can set how much an item will be
# able to increase a weapons stat when you fuse it into the weapon.
#
# <upgrade_atk n>
# <upgrade_def n>
# <upgrade_spi n>
# <upgrade_agi n>
#
#   When this item is fused into an item, it will raise a certain stat by a
# certain amount.
# ex: <upgrade_def 2> - the item when fused into a weapon will increase the
# attack of the weapon by 2.
#
# <add_states>
#
#   When this item is fused onto another item, the status effects it inflicts
# will be added to the weapon.
# ex: If the item when used causes poison, with <add_states> in its note box,
# when the item is fused onto a weapon, the weapon will now inflict poison.
#
#                       MAKING ITEMS UNSYNTHASIZABLE:
#
# <no_synth>
#
#   If you don't want an item able to be "broken down" simply add this to that
# items note tag, and Voila!
#
#                            SETTING UP MONSTERS:
#
#   Using the enemies "notes" box, you can set how much weapon exp each
# enemy rewards you.
#
# <weapon_exp n>
#
#   When that enemy is defeated, it will reward the party with that amount of
# weapon experience.
# ex: <weapon_exp 3> - this monster will give 3 weapon experience upon death.
#
#                             ADDITIONAL NOTES:
#
#   Because this script was modeled with Dark Cloud 2 in mind, there are various
# "behind the scenes" happenings that I hope to eventually make fully
# customizable.
#
#   For one, when breaking down a weapon, if the item is below level 5 it will
# be "unstable", utilizing only 10% of the weapons full potential. However, if
# OVER level 5, the item will stabalize and retain 50-60% of its power to be
# passed on to a new weapon. This applies to status effects as well. Stable
# spheres have a greater chance of passing on the status than an unstable one.
#
#   When breaking down multiple items, the "cost" for fusing is the amount used.
# With weapons, the cost for fusing is the weapons level.
#
#   When "building up" the item will retain its original stat if
# the "default" stat is lower, and vice versa. Also, when building up, all stats
# are given a 10% increase, making "built up" versions more useful than their
# store bought counterparts. When building up a weapon with status effects, the
# new weapon won't retain the old ones.
#
#==============================================================================
# Credits:
# KGC for Window_Command imports.
#==============================================================================

#==============================================================================
# ** Script Configuration
#==============================================================================

module DarkCloud_Weapons
  # Wether or not this script is accessable through the menu
  MENU_ACCESS = true
  # The ID of the switch which adds/removes this script from the menu
  MENU_SWITCH = 11
  # The location of the script in the menu
  MENU_INDEX = 4 
  # The name of the menu command
  MENU_TITLE = 'Build Up'
 
  # Script command name for equipping weapons
  BUILDUP_EQUIPWORDS = 'Change Weapon'
  # Script command name for fusing items into weapons
  BUILDUP_UPGRADEWORD = 'Synthesize'
  # Script command name for turning item into fusable materal
  BUILDUP_BREAKDOWN = 'Break Down'
  # Script command name for turning the current weapon into a new weapon
  BUILDUP_BUILDUP = 'Build Up'
 
  # Help descriptions
  BUILDUP_EQUIP_HELP = 'Set new weapon as active weapon.'
  BUILDUP_UPGRADE_HELP = 'Upgrade weapon by infusing it with Synth Spheres.'
  BUILDUP_BREAKDOWN_HELP = 'Break down items into Synth Spheres for fusing.'
  BUILDUP_BUILDUP_HELP = 'Build Up your current weapon into something new.'
  # Shows the new weapons info description
  BUILDUP_BUILDUP_DESC = true
 
  # Word for weapon experience
  WEAPONEXP_WORD = 'ABS'
  # Word for experience needed for next weapon level
  WEAPONEXP_NEEDEDWORD = 'Needed'
  # Name of points spent to fuse items into weapon
  WEAPONSP_NAME = 'Weapon FP'
  # Message for weapon experience recieved in battle
  OBTAIN_WEPEXP = "%s ABS were received!"
  # Message for actors weapon increasing in level.
  WEAPON_LEVELUP = "%1$s's %2$s increased to level %3$s!"
 
  # Icon for atk
  ATK_ICON = 132
  # Icon for def
  DEF_ICON = 137
  # Icon for spi
  SPI_ICON = 133
  # Icon for agi
  AGI_ICON = 130
 
  # SFX used in script processes
  BREAKDOWN_SFX = 'Absorb1'
  # Icon for stable broken down item
  BROKEDOWN_ITEM_ICON = 201
  # Description of stable fusing item
  BROKEDOWN_ITEM_DESC = 'Synth Sphere ready for fusing.'
  # Icon for unstable broken down item
  BROKEDOWN_UNSTABLE_ITEM_ICON = 106
  # Description of unstable broken down item
  BROKEDOWN_UNSTABLE_ITEM_DESC = 'Unstable Synth Sphere unrealiable for fusing.'
 
  # Max Weapon Level
  MAX_WEAPONLEVEL = 99
  # Default amount of SP on a new item
  DEFAULT_WEAPONSP = 0
  # Default base exp for weapons
  DEFAULT_BASEEXP = 20
  # Default max weapon attack
  DEFAULT_MAXATK = 20
  # Default max weapon defence
  DEFAULT_MAXDEF = 20
  # Default max weapon spirit
  DEFAULT_MAXSPI = 20
  # Default max weapon agility
  DEFAULT_MAXAGI = 20
  # Default amount of SP gained on weapon level up
  DEFAULT_SPPLUS_ON_LEVEL = 1
  # Default amount of atk gained on weapon level up
  DEFAULT_ATKPLUS_ON_LEVEL = 2
  # Default amount of def gained on weapon level up
  DEFAULT_DEFPLUS_ON_LEVEL = 0
  # Default amount of spi gained on weapon level up
  DEFAULT_SPIPLUS_ON_LEVEL = 0
  # Default amount of agi gained on weapon level up
  DEFAULT_AGIPLUS_ON_LEVEL = 1
  # Default chance out of 100 for weapon status effects to be passed on
  DEFAULT_WEAPONSTATE_PASSOVER = 80 #50
 
  # Default amount of weapon exp gained for monsters
  DEFAULT_MONSTER_WEPEXP = 5
 
  # Weapon exp formula
  def self.weapon_exp_formula(base_exp, level)
    return base_exp + (level - 1) * base_exp / 2
  end
end

#==============================================================================
# ** RPG::BaseItem
#==============================================================================

module RPG
  class BaseItem
    def scan
      upgrade_atk = /<upgrade_atk\s*(\d+)>/i
      upgrade_def = /<upgrade_def\s*(\d+)>/i
      upgrade_spi = /<upgrade_spi\s*(\d+)>/i
      upgrade_agi = /<upgrade_agi\s*(\d+)>/i
      add_states = /<(?:add_states)>/i
      no_synth = /<(?:no_synth)>/i
      @note.each_line { |line|
        case line
        when upgrade_atk
          @upgrade_atk = $1.to_i
        when upgrade_def
          @upgrade_def = $1.to_i
        when upgrade_spi
          @upgrade_spi = $1.to_i
        when upgrade_agi
          @upgrade_agi = $1.to_i
        when add_states
          @add_states = true
        when no_synth
          @no_synth = true
        end
      }
      @upgrade_atk = 0 if @upgrade_atk.nil?
      @upgrade_def = 0 if @upgrade_def.nil?
      @upgrade_spi = 0 if @upgrade_spi.nil?
      @upgrade_agi = 0 if @upgrade_agi.nil?
      @add_states = false if @add_states.nil?
      @no_synth = false if @no_synth.nil?
    end
    attr_accessor :upgrade_atk
    attr_accessor :upgrade_def
    attr_accessor :upgrade_spi
    attr_accessor :upgrade_agi
    attr_accessor :add_states
    attr_accessor :no_synth
  end
end

#==============================================================================
# ** RPG::SynthSphere
#==============================================================================

module RPG
  class SynthSphere < BaseItem
    def initialize
      super
      @price = 0
      @kind = 0
    end
    def set_sphere(item, amount)
      @name = item.name
      if item.is_a?(RPG::Weapon) and item.level < 5
        @icon_index = DarkCloud_Weapons::BROKEDOWN_UNSTABLE_ITEM_ICON
        @description = DarkCloud_Weapons::BROKEDOWN_UNSTABLE_ITEM_DESC
      else
        @icon_index = DarkCloud_Weapons::BROKEDOWN_ITEM_ICON
        @description = DarkCloud_Weapons::BROKEDOWN_ITEM_DESC
      end
      if item.is_a?(RPG::Weapon) or item.is_a?(RPG::Armor)
        @plus_state_set = item.state_set
      else
        @plus_state_set = item.plus_state_set
      end
      if item.is_a?(RPG::Weapon)
        if item.level >= 5
          @upgrade_atk = (item.atk * 0.50).floor
          @upgrade_def = (item.def * 0.60).floor
          @upgrade_spi = (item.spi * 0.60).floor
          @upgrade_agi = (item.agi * 0.60).floor
        else
          @upgrade_atk = (item.atk * 0.05).floor
          @upgrade_def = (item.def * 0.10).floor
          @upgrade_spi = (item.spi * 0.10).floor
          @upgrade_agi = (item.agi * 0.10).floor
        end
      else
        @upgrade_atk = item.upgrade_atk * amount
        @upgrade_def = item.upgrade_def * amount
        @upgrade_spi = item.upgrade_spi * amount
        @upgrade_agi = item.upgrade_agi * amount
      end
      if item.is_a?(RPG::Weapon)
        @sp_cost = item.level == 0 ? 1 : item.level
      else
        @sp_cost = amount
      end
      @add_states = item.add_states
      if item.is_a?(RPG::Weapon) and not item.state_set.empty?
        c = item.state_passover
        c = item.level >= 5 ? c : c / 5
        for state in @plus_state_set
          if rand(100) < c
            next
          else
            @plus_state_set.delete(state)
          end
        end
        @add_states = true unless @plus_state_set.empty?
      end
    end
    attr_accessor :sp_cost
    attr_accessor :price
    attr_accessor :kind
    attr_accessor :plus_state_set
  end
end

#==============================================================================
# ** RPG::Weapon
#==============================================================================

module RPG
  class Weapon < BaseItem
    def scan
      super
      @level = 0
      @exp = 0
      @exp_list = Array.new(101)
      base_exp = /<base_exp\s*(\d+)>/i
      max_atk = /<max_atk\s*(\d+)>/i
      max_def = /<max_def\s*(\d+)>/i
      max_spi = /<max_spi\s*(\d+)>/i
      max_agi = /<max_agi\s*(\d+)>/i
      atk_plus = /<atk_plus\s*(\d+)>/i
      def_plus = /<def_plus\s*(\d+)>/i
      spi_plus = /<spi_plus\s*(\d+)>/i
      agi_plus = /<agi_plus\s*(\d+)>/i
      weapon_sp = /<weapon_sp\s*(\d+)>/i
      sp_plus = /<sp_plus\s*(\d+)>/i
      buildup1 = /<buildup_to_1\s*(\d+)>/i
      buildup2 = /<buildup_to_2\s*(\d+)>/i
      buildup3 = /<buildup_to_3\s*(\d+)>/i
      req_atk = /<req_atk\s*(\d+)>/i
      req_def = /<req_def\s*(\d+)>/i
      req_spi = /<req_spi\s*(\d+)>/i
      req_agi = /<req_agi\s*(\d+)>/i
      state_passover = /<state_passover\s*(\d+)>/i
      @note.each_line { |line|
        case line
        when base_exp
          @base_exp = $1.to_i
        when max_atk
          @max_atk = $1.to_i
        when max_def
          @max_def = $1.to_i
        when max_spi
          @max_spi = $1.to_i
        when max_agi
          @max_agi = $1.to_i
        when atk_plus
          @atk_plus = $1.to_i
        when def_plus
          @def_plus = $1.to_i
        when spi_plus
          @spi_plus = $1.to_i
        when agi_plus
          @agi_plus = $1.to_i
        when weapon_sp
          @sp = $1.to_i
        when sp_plus
          @sp_plus = $1.to_i
        when buildup1
          @buildup1 = $1.to_i
        when buildup2
          @buildup2 = $1.to_i
        when buildup3
          @buildup3 = $1.to_i
        when req_atk
          @req_atk = $1.to_i
        when req_def
          @req_def = $1.to_i
        when req_spi
          @req_spi = $1.to_i
        when req_agi
          @req_agi = $1.to_i
        when state_passover
          @state_passover = $1.to_i
        end
      }
      @base_exp = DarkCloud_Weapons::DEFAULT_BASEEXP if @base_exp.nil?
      @max_atk = DarkCloud_Weapons::DEFAULT_MAXATK if @max_atk.nil?
      @max_def = DarkCloud_Weapons::DEFAULT_MAXDEF if @max_def.nil?
      @max_spi = DarkCloud_Weapons::DEFAULT_MAXSPI if @max_spi.nil?
      @max_agi = DarkCloud_Weapons::DEFAULT_MAXAGI if @max_agi.nil?
      @atk_plus = DarkCloud_Weapons::DEFAULT_ATKPLUS_ON_LEVEL if @atk_plus.nil?
      @def_plus = DarkCloud_Weapons::DEFAULT_DEFPLUS_ON_LEVEL if @def_plus.nil?
      @spi_plus = DarkCloud_Weapons::DEFAULT_SPIPLUS_ON_LEVEL if @spi_plus.nil?
      @agi_plus = DarkCloud_Weapons::DEFAULT_AGIPLUS_ON_LEVEL if @agi_plus.nil?
      @req_atk = 0 if @req_atk.nil?
      @req_def = 0 if @req_def.nil?
      @req_spi = 0 if @req_spi.nil?
      @req_agi = 0 if @req_agi.nil?
      @sp = DarkCloud_Weapons::DEFAULT_WEAPONSP if @sp.nil?
      @sp_plus = DarkCloud_Weapons::DEFAULT_SPPLUS_ON_LEVEL if @sp_plus.nil?
      if @state_passover.nil?
        @state_passover = DarkCloud_Weapons::DEFAULT_WEAPONSTATE_PASSOVER
      end
      @exp_list[0] = @exp_list[100] = 0
      for i in 1..DarkCloud_Weapons::MAX_WEAPONLEVEL
        @exp_list[i - 1] = DarkCloud_Weapons.weapon_exp_formula(@base_exp, i)
      end
      @buildups = [@buildup1, @buildup2, @buildup3]
      @new_state_set = []
      for id in @state_set
        @new_state_set.push(id)
      end
    end
    def gain_exp(amount)
      @exp = [[@exp + amount, 9999999].min, 0].max
      while @exp >= @exp_list[@level] and @exp_list[@level] > 0
        level_up
      end
    end
    def level_up
       @level = [@level + 1, DarkCloud_Weapons::MAX_WEAPONLEVEL].min
      @exp -= @exp_list[@level - 1]
      @atk = [@atk + @atk_plus, @max_atk].min unless @max_atk == @atk
      @def = [@def + @def_plus, @max_def].min unless @max_def == @def
      @spi = [@spi + @spi_plus, @max_spi].min unless @max_spi == @spi
      @agi = [@agi + @agi_plus, @max_agi].min unless @max_agi == @agi
      @sp += @sp_plus
    end
    def exp_needed
      return @exp_list[@level]
    end
    def upgrade(sphere)
      @sp -= sphere.sp_cost
      @atk = [@atk + sphere.upgrade_atk, @max_atk].min
      @def = [@def + sphere.upgrade_def, @max_def].min
      @spi = [@spi + sphere.upgrade_spi, @max_spi].min
      @agi = [@agi + sphere.upgrade_agi, @max_agi].min
      if sphere.add_states
        for id in sphere.plus_state_set
          @new_state_set.push(id) unless @new_state_set.include?(id)
        end
        @add_states = true
      end
    end
    def synch(old_weapon)
      @atk = old_weapon.atk if @atk < old_weapon.atk
      @def = old_weapon.def if @def < old_weapon.def
      @spi = old_weapon.spi if @spi < old_weapon.spi
      @agi = old_weapon.agi if @agi < old_weapon.agi
      @atk = [@atk + (old_weapon.atk * 0.10).floor, @max_atk].min
      @def = [@def + (old_weapon.def * 0.10).floor, @max_def].min
      @spi = [@spi + (old_weapon.spi * 0.10).floor, @max_spi].min
      @agi = [@agi + (old_weapon.agi * 0.10).floor, @max_agi].min
    end
    def state_set
      return @new_state_set.nil? ? @state_set : @new_state_set
    end
    def upgrade_atk
      return @level >= 5 ? (@atk * 0.50).floor : (@atk * 0.05).floor
    end
    def upgrade_def
      return @level >= 5 ? (@def * 0.60).floor : (@def * 0.10).floor
    end
    def upgrade_spi
      return @level >= 5 ? (@spi * 0.60).floor : (@spi * 0.10).floor
    end
    def upgrade_agi
      return @level >= 5 ? (@agi * 0.60).floor : (@agi * 0.10).floor
    end
    attr_accessor :level
    attr_accessor :exp
    attr_accessor :max_atk
    attr_accessor :max_def
    attr_accessor :max_spi
    attr_accessor :max_agi
    attr_accessor :req_atk
    attr_accessor :req_def
    attr_accessor :req_spi
    attr_accessor :req_agi
    attr_accessor :buildups
    attr_accessor :sp
    attr_accessor :state_passover
  end
end

#==============================================================================
# ** RPG::Enemy
#==============================================================================

module RPG
  class Enemy
    def weapon_exp
      regexp = /<weapon_exp\s*(\d+)>/i
      wep_exp = nil
      @note.each_line { |line|
        case line
        when regexp
          wep_exp = $1.to_i
        end
      }
      return wep_exp
    end
  end
end

#==============================================================================
# ** Game_Actor
#==============================================================================

class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_reader   :weapon_1
  attr_reader   :weapon_2
  #--------------------------------------------------------------------------
  # * Setup
  #--------------------------------------------------------------------------
  alias :broken_dcweapons_gmeactr_stp :setup
  def setup(actor_id)
    broken_dcweapons_gmeactr_stp(actor_id)
    @weapon_1 = @weapon_id == 0 ? nil : $data_weapons[@weapon_id].clone
    a1 = @armor1_id
    @weapon_2 = two_swords_style ? a1 == 0 ? nil : $data_weapons[a1].clone : nil
    @weapon_1.scan unless @weapon_1.nil?
    @weapon_2.scan if two_swords_style and not @weapon_2.nil?
  end
  #--------------------------------------------------------------------------
  # * Get Weapon Object Array
  #--------------------------------------------------------------------------
  def weapons
    result = [@weapon_1]
    result.push(@weapon_2) if two_swords_style
    return result
  end
  #--------------------------------------------------------------------------
  # * Change Equipment (designate ID)
  #--------------------------------------------------------------------------
  alias :broken_dcweapons_gmeactr_chngeqpbid :change_equip_by_id
  def change_equip_by_id(equip_type, item_id, test = false)
    if equip_type == 0 or (equip_type == 1 and two_swords_style)
      change_equip(equip_type, $data_weapons[item_id].clone, test)
    else
      broken_dcweapons_gmeactr_chngeqpbid(equip_type, item_id, test)
    end
  end
  #--------------------------------------------------------------------------
  # * Change Equipment (designate object)
  #--------------------------------------------------------------------------
  alias :broken_dcweapons_gmeactr_chngeqp :change_equip
  def change_equip(equip_type, item, test = false, two_hand = false)#two_hand = false
    if equip_type == 0
      last_item = @weapon_1
      unless test
        $game_party.gain_item(last_item, 1)
        $game_party.lose_item(item, 1)
      end
      @weapon_id = item.nil? ? 0 : item.id
      @weapon_1 = item
      unless two_hands_legal?             # If two hands is not allowed
        change_equip(1, nil, test, true)        # Unequip from other hand
      end
    elsif equip_type == 1 and two_hand
      last_item = @weapon_2
      unless test
        $game_party.gain_item(last_item, 1)
        $game_party.lose_item(item, 1)
      end
      @armor1_id = item.nil? ? 0 : item.id
      @weapon_2 = item
      unless two_hands_legal?             # If two hands is not allowed
        change_equip(0, nil, test)        # Unequip from other hand
      end
    else
      broken_dcweapons_gmeactr_chngeqp(equip_type, item, test)
    end
  end
  #--------------------------------------------------------------------------
  # * Discard Equipment
  #--------------------------------------------------------------------------
  alias :broken_dcweapons_gmeactr_dscrdeqp :discard_equip
  def discard_equip(item)
    if item.is_a?(RPG::Weapon)
      if @weapon_1 == item
        @weapon_1 = nil
        @weapon_id = 0
      elsif two_swords_style and @weapon_2 == item
        @weapon_2 = nil
        @armor1_id = 0
      end
    else
      broken_dcweapons_gmeactr_dscrdeqp(item)
    end
  end
end
#==============================================================================
# ** Game_Enemy
#==============================================================================

class Game_Enemy < Game_Battler
  #--------------------------------------------------------------------------
  # * Get Weapon Experience
  #--------------------------------------------------------------------------
  def wep_exp
    default_exp = DarkCloud_Weapons::DEFAULT_MONSTER_WEPEXP
    return enemy.weapon_exp.nil? ? default_exp : enemy.weapon_exp
  end
end

#==============================================================================
# ** Game_Party
#==============================================================================

class Game_Party < Game_Unit
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :built_weapons
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias :broken_dcweapons_gmeparty_int :initialize
  def initialize
    broken_dcweapons_gmeparty_int
    @weapons = []
    @synth_spheres = []
    @built_weapons = []
  end
  #--------------------------------------------------------------------------
  # * Get Item Object Array (including weapons and armor)
  #--------------------------------------------------------------------------
  def items
    result = []
    for i in @items.keys.sort
      result.push($data_items[i]) if @items[i] > 0
    end
    for i in @weapons
      result.push(i)
    end
    for i in @armors.keys.sort
      result.push($data_armors[i]) if @armors[i] > 0
    end
    for i in @synth_spheres
      result.push(i)
    end
    return result
  end
  #--------------------------------------------------------------------------
  # * Get Number of Items Possessed
  #--------------------------------------------------------------------------
  alias :broken_dcweapons_gmeparty_itmnmbr :item_number
  def item_number(item)
    if item.is_a?(RPG::Weapon) or item.is_a?(RPG::SynthSphere)
      return 1
    end
    broken_dcweapons_gmeparty_itmnmbr(item)
  end
  #--------------------------------------------------------------------------
  # * Gain Items (or lose)
  #--------------------------------------------------------------------------
  alias :broken_dcweapons_gmeparty_gnitm :gain_item
  def gain_item(item, n, include_equip = false)
    if item.is_a?(RPG::Weapon)
      n.times do
        if item.level.nil?
          ni = item.clone
          ni.scan
          @weapons.push(ni)
        else
          @weapons.push(item)
        end
      end
    elsif item.is_a?(RPG::SynthSphere)
      @synth_spheres.push(item)
    else
      item.scan unless item.nil?
      broken_dcweapons_gmeparty_gnitm(item, n, include_equip)
    end
  end
  #--------------------------------------------------------------------------
  # * Lose Items
  #--------------------------------------------------------------------------
  alias :broken_dcweapons_gmeparty_lseitm :lose_item
  def lose_item(item, n, include_equip = false)
    if item.is_a?(RPG::Weapon)
      v = @weapons.index(item)
      @weapons.delete_at(v)
    elsif item.is_a?(RPG::SynthSphere)
      @synth_spheres.delete(item)
    else
      broken_dcweapons_gmeparty_lseitm(item, n, include_equip)
    end
  end
end
#==============================================================================
# ** Window_Base
#==============================================================================

class Window_Base < Window
  #--------------------------------------------------------------------------
  # * Draw Item States
  #--------------------------------------------------------------------------
  def draw_item_states(x, y, item)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 124, WLH, Vocab.status + ': ')
    fx = contents.text_size(Vocab.status + ': ').width
    self.contents.font.color = normal_color
    if item.is_a?(RPG::Weapon) or item.is_a?(RPG::Armor)
      if item.state_set.empty?
        self.contents.draw_text(x + fx + 4, y, 124, WLH, 'None')
      else
        i = 0
        for id in item.state_set
          draw_icon($data_states[id].icon_index, x + fx + 24 * i, y)
          i += 1
          break if i == 7
        end
      end
    else
      if item.plus_state_set.empty?
        self.contents.draw_text(x + fx + 4, y, 124, WLH, 'None')
      else
        i = 0
        for id in item.plus_state_set
          draw_icon($data_states[id].icon_index, x + fx + 24 * i, y)
          i += 1
          break if i == 7
        end
      end
    end
  end
end

« Last Edit: August 20, 2010, 01:57:57 PM by Mitsarugi »

***
Rep:
Level 81
Monster Hunter
message to long cause of script

put this at the end of part one (in the same window)
Spoiler for:
Code: [Select]
#==============================================================================
# ** Window_Command (imported from KGC)
#==============================================================================

class Window_Command < Window_Selectable
unless method_defined?(:add_command)
  #--------------------------------------------------------------------------
  # * Add Command
  #--------------------------------------------------------------------------
  def add_command(command)
    @commands << command
    @item_max = @commands.size
    item_index = @item_max - 1
    refresh_command
    draw_item(item_index)
    return item_index
  end
  #--------------------------------------------------------------------------
  # * Refresh Command
  #--------------------------------------------------------------------------
  def refresh_command
    buf = self.contents.clone
    self.height = [self.height, row_max * WLH + 32].max
    create_contents
    self.contents.blt(0, 0, buf, buf.rect)
    buf.dispose
  end
  #--------------------------------------------------------------------------
  # * Insert Command
  #--------------------------------------------------------------------------
  def insert_command(index, command)
    @commands.insert(index, command)
    @item_max = @commands.size
    refresh_command
    refresh
  end
  #--------------------------------------------------------------------------
  # * Remove Command
  #--------------------------------------------------------------------------
  def remove_command(command)
    @commands.delete(command)
    @item_max = @commands.size
    refresh
  end
end
end

#==============================================================================
# ** Window_Item
#==============================================================================

class Window_Item < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias :broken_dcweapons_windowitm_init :initialize
  def initialize(x, y, width, height, buildup = false)
    @buildup = buildup
    if @buildup
      super(x, y, width, height)
      @column_max = 1
      self.index = 0
      self.active = false
      refresh
    else
      broken_dcweapons_windowitm_init(x, y, width, height)
    end
  end
  #--------------------------------------------------------------------------
  # * Whether or not to display in enabled state
  #--------------------------------------------------------------------------
  alias :broken_dcweapons_windowitm_nbl :enable?
  def enable?(item)
    return true if @buildup
    broken_dcweapons_windowitm_nbl(item)
  end
  #--------------------------------------------------------------------------
  # * Draw Item
  #--------------------------------------------------------------------------
  alias :broken_dcweapons_windowitm_drwitm :draw_item
  def draw_item(index)
    item = @data[index]
    if item.is_a?(RPG::Weapon) or item.is_a?(RPG::SynthSphere)
      rect = item_rect(index)
      self.contents.clear_rect(rect)
      enabled = enable?(item)
      rect.width -= 4
      draw_item_name(item, rect.x, rect.y, enabled)
      if item.is_a?(RPG::Weapon) and item.level != 0
        self.contents.font.color = text_color(6)
        add_x = self.contents.text_size(item.name).width + 28
        t = "+#{item.level}"
        self.contents.draw_text(rect.x + add_x, rect.y, 124, WLH, t)
      end
    else
      broken_dcweapons_windowitm_drwitm(index)
    end
  end
end

#==============================================================================
# ** Window_Equip
#==============================================================================

class Window_Equip < Window_Selectable
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  alias :broken_dcweapons_windoweqp_rfrsh :refresh
  def refresh
    broken_dcweapons_windoweqp_rfrsh
    self.contents.font.color = text_color(6)
    if @actor.two_swords_style
      unless @data[0].nil? or @data[0].level == 0
        add_x = self.contents.text_size(@data[0].name).width + 24
        t = "+#{@data[0].level}"
        self.contents.draw_text(96 + add_x, WLH * 0, 92, WLH, t)
      end
      unless @data[1].nil? or @data[1].level == 0
        add_x = self.contents.text_size(@data[1].name).width + 24
        t = "+#{@data[1].level}"
        self.contents.draw_text(96 + add_x, WLH * 1, 92, WLH, t)
      end
    else
      unless @data[0].nil? or @data[0].level == 0
        add_x = self.contents.text_size(@data[0].name).width + 24
        t = "+#{@data[0].level}"
        self.contents.draw_text(96 + add_x, WLH * 0, 92, WLH, t)
      end
    end
  end
end

#==============================================================================
# ** Window_WeaponStatus
#==============================================================================

class Window_WeaponStatus < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(weapon, actor = nil)
    super(0, 56, 272, 232)
    @weapon = weapon
    @actor = actor
    self.z = 0
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh(bu_w = nil)
    self.contents.clear
    @buildup_weapon = bu_w
    draw_item_name(@weapon, 4, 0)
    draw_actor_graphic(@actor, 226, 32) unless @actor.nil?
    add_x = self.contents.text_size(@weapon.name).width + 28
    unless @weapon.level == 0
      self.contents.font.color = text_color(6)
      self.contents.draw_text(4 + add_x, WLH * 0, 124, WLH, "+#{@weapon.level}")
    end
    self.contents.font.color = system_color
    expword = DarkCloud_Weapons::WEAPONEXP_WORD
    self.contents.draw_text(0, WLH * 1, 124, WLH, expword)
    self.contents.font.color = normal_color
    self.contents.draw_text(70, WLH * 1, 124, WLH, @weapon.exp, 2)
    c1 = text_color(17)
    c2 = text_color(21)
    draw_gauge(@weapon.exp, @weapon.exp_needed, 0, WLH * 1 + 2, 200, c1, c2)
    self.contents.font.color = system_color
    expneededword = DarkCloud_Weapons::WEAPONEXP_NEEDEDWORD
    self.contents.draw_text(0, WLH * 2 + 4, 124, WLH, expneededword)
    self.contents.font.color = normal_color
    needed = @weapon.exp_needed - @weapon.exp
    self.contents.draw_text(70, WLH * 2 + 4, 124, WLH, needed, 2)
    #---------------------------------------------------------------------------
    draw_icon(DarkCloud_Weapons::ATK_ICON, 0, WLH * 4 - 10)
    self.contents.font.color = system_color
    self.contents.draw_text(24, WLH * 4 - 10, 124, WLH, Vocab.atk)
    nc = normal_color
    kc = knockout_color
    c = bu_w.nil? ? nc : bu_w.req_atk > @weapon.atk ? kc : nc
    self.contents.font.color = c
    self.contents.draw_text(-20, WLH * 4 - 10, 124, WLH, @weapon.atk, 2) #92
    c1 = text_color(2)
    c2 = text_color(18)
    draw_gauge(@weapon.atk, @weapon.max_atk, 0, WLH * 4 - 6, 104, c1, c2)
    #---------------------------------------------------------------------------
    draw_icon(DarkCloud_Weapons::DEF_ICON, 136, WLH * 4 - 10)
    self.contents.font.color = system_color
    self.contents.draw_text(160, WLH * 4 - 10, 124, WLH, Vocab.def)
    c = bu_w.nil? ? nc : bu_w.req_def > @weapon.def ? kc : nc
    self.contents.font.color = c
    self.contents.draw_text(110, WLH * 4 - 10, 124, WLH, @weapon.def, 2)
    c1 = text_color(3)
    c2 = text_color(11)
    draw_gauge(@weapon.def, @weapon.max_def, 136, WLH * 4 - 6, 104, c1, c2)
    #---------------------------------------------------------------------------
    draw_icon(DarkCloud_Weapons::SPI_ICON, 0, WLH * 5)
    self.contents.font.color = system_color
    self.contents.draw_text(24, WLH * 5, 124, WLH, Vocab.spi)
    c = bu_w.nil? ? nc : bu_w.req_spi > @weapon.spi ? kc : nc
    self.contents.font.color = c
    self.contents.draw_text(-20, WLH * 5, 124, WLH, @weapon.spi, 2)
    c1 = text_color(9)
    c2 = text_color(4)
    draw_gauge(@weapon.spi, @weapon.max_spi, 0, WLH * 5 + 4, 104, c1, c2)
    #---------------------------------------------------------------------------
    draw_icon(DarkCloud_Weapons::AGI_ICON, 136, WLH * 5)
    self.contents.font.color = system_color
    self.contents.draw_text(160, WLH * 5, 124, WLH, Vocab.agi)
    c = bu_w.nil? ? nc : bu_w.req_agi > @weapon.agi ? kc : nc
    self.contents.font.color = c
    self.contents.draw_text(110, WLH * 5, 124, WLH, @weapon.agi, 2)
    c1 = text_color(5)
    c2 = text_color(13)
    draw_gauge(@weapon.agi, @weapon.max_agi, 136, WLH * 5 + 4, 104, c1, c2)
    #---------------------------------------------------------------------------
    draw_item_states(4, WLH * 6 + 12, @weapon)
    #---------------------------------------------------------------------------
    self.contents.font.color = system_color
    weaponsp = DarkCloud_Weapons::WEAPONSP_NAME + ': '
    self.contents.draw_text(4, WLH * 7 + 10, 124, WLH, weaponsp)
    self.contents.font.color = normal_color
    self.contents.draw_text(12, WLH * 7 + 10, 124, WLH, @weapon.sp, 2)
  end
  #--------------------------------------------------------------------------
  # * Draw gauge
  #--------------------------------------------------------------------------
  def draw_gauge(current, max, x, y, width, color1, color2)
    gw = max == 0 ? width : width * current / max
    gc1 = color1
    gc2 = color2
    self.contents.fill_rect(x, y + WLH - 2, width, 6, gauge_back_color)
    self.contents.gradient_fill_rect(x, y + WLH - 2, gw, 6, gc1, gc2)
  end
  #--------------------------------------------------------------------------
  # * Build Up Possible
  #--------------------------------------------------------------------------
  def buildup_possible?
    return false if @buildup_weapon.nil?
    return false if @buildup_weapon.req_atk > @weapon.atk
    return false if @buildup_weapon.req_def > @weapon.def
    return false if @buildup_weapon.req_spi > @weapon.spi
    return false if @buildup_weapon.req_agi > @weapon.agi
    return true
  end
end

#==============================================================================
# ** Window_BuildHelp
#==============================================================================

class Window_BuildHelp < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(x, y, width, height)
    super(x, y, width, height)
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    case @menu_index
    when 1, 2 # Upgrade, Break Down
      unless @item.nil?
        x2 = self.width / 2
        draw_icon(DarkCloud_Weapons::ATK_ICON, 0, WLH * 0)
        self.contents.font.color = system_color
        self.contents.draw_text(28, WLH * 0, 124, WLH, Vocab.atk)
        self.contents.font.color = normal_color
        self.contents.draw_text(0, WLH * 0, 124, WLH, @item.upgrade_atk, 2)
        draw_icon(DarkCloud_Weapons::DEF_ICON, x2, WLH * 0)
        self.contents.font.color = system_color
        self.contents.draw_text(x2 + 24, WLH * 0, 124, WLH, Vocab.def)
        self.contents.font.color = normal_color
        self.contents.draw_text(x2, WLH * 0, 124, WLH, @item.upgrade_def, 2)
        draw_icon(DarkCloud_Weapons::SPI_ICON, 0, WLH * 1)
        self.contents.font.color = system_color
        self.contents.draw_text(28, WLH * 1, 124, WLH, Vocab.spi)
        self.contents.font.color = normal_color
        self.contents.draw_text(0, WLH * 1, 124, WLH, @item.upgrade_spi, 2)
        draw_icon(DarkCloud_Weapons::AGI_ICON, x2, WLH * 1)
        self.contents.font.color = system_color
        self.contents.draw_text(x2 + 24, WLH * 1, 124, WLH, Vocab.agi)
        self.contents.font.color = normal_color
        self.contents.draw_text(x2, WLH * 1, 124, WLH, @item.upgrade_agi, 2)
        draw_item_states(2, WLH * 2, @item)
        if @item.is_a?(RPG::SynthSphere)
          text = "#{DarkCloud_Weapons::WEAPONSP_NAME} Cost: "
          self.contents.font.color = system_color
          self.contents.draw_text(2, WLH * 3, self.width, WLH, text)
          self.contents.font.color = normal_color
          self.contents.draw_text(44, WLH * 3, 124, WLH, @item.sp_cost, 2)
        end
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update(index, weapon = nil, item = nil)
    super()
    if @menu_index != index or @weapon != weapon or @item != item
      @menu_index = index
      @weapon = weapon
      @item = item
      refresh
    end
  end
end

#==============================================================================
# ** Window_BuildChoices
#==============================================================================

class Window_BuildChoices < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(weapon)
    super(200, 288, 344, 128)
    @weapon = weapon
    self.index = 0
    self.active = false
    refresh
  end
  #--------------------------------------------------------------------------
  # * Get Build Up Weapon
  #--------------------------------------------------------------------------
  def buildup_weapon
    return @data[self.index]
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    @data = []
    for id in @weapon.buildups.compact
      next if id.nil?
      weapon = $data_weapons[id].clone
      weapon.scan
      @data.push(weapon)
    end
    @item_max = @data.size
    create_contents
    for i in 0...@item_max
      draw_item(i)
    end
  end
  #--------------------------------------------------------------------------
  # * Draw Item
  #--------------------------------------------------------------------------
  def draw_item(index)
    rect = item_rect(index)
    self.contents.clear_rect(rect)
    weapon = @data[index]
    if weapon != nil
      rect.width -= 4
      if $game_party.built_weapons.include?(weapon.id)
        draw_item_name(weapon, rect.x, rect.y)
      else
        draw_icon(weapon.icon_index, rect.x, rect.y)
        self.contents.draw_text(rect.x + 24, rect.y, 172, WLH, '???')
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Update Help Text
  #--------------------------------------------------------------------------
  def update_help
    show = DarkCloud_Weapons::BUILDUP_BUILDUP_DESC
    if show
      wpn = buildup_weapon
      @help_window.set_text(wpn.nil? ? "" : wpn.description)
    end
  end
end
 
#==============================================================================
# ** Window_SetNumber
#==============================================================================

class Window_SetNumber < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(x, y)
    super(x, y, 108, 64)
    @max = 1
    @number = 1
  end
  #--------------------------------------------------------------------------
  # * Set Max Quantity
  #--------------------------------------------------------------------------
  def set_max(max)
    @max = max
    @number = 1
    refresh
  end
  #--------------------------------------------------------------------------
  # * Set Inputted Quantity
  #--------------------------------------------------------------------------
  def number
    return @number
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    y = 0
    self.contents.clear
    self.contents.font.color = normal_color
    self.contents.draw_text(4, y, 20, WLH, "×")
    self.contents.draw_text(36, y, 20, WLH, @number, 2)
    self.cursor_rect.set(32, y, 28, WLH)
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    if self.active
      last_number = @number
      if Input.repeat?(Input::RIGHT) and @number < @max
        @number += 1
      end
      if Input.repeat?(Input::LEFT) and @number > 1
        @number -= 1
      end
      if Input.repeat?(Input::UP) and @number < @max
        @number = [@number + 10, @max].min
      end
      if Input.repeat?(Input::DOWN) and @number > 1
        @number = [@number - 10, 1].max
      end
      if @number != last_number
        Sound.play_cursor
        refresh
      end
    end
  end
end

#==============================================================================
# ** Scene_Menu
#==============================================================================

class Scene_Menu < Scene_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias :broken_dcweapons_scnmenu_int :initialize
  def initialize(menu_index = 0, force = false)
    broken_dcweapons_scnmenu_int(menu_index)
    @switch = $game_switches[DarkCloud_Weapons::MENU_SWITCH]
    if DarkCloud_Weapons::MENU_ACCESS and not @switch
      if @menu_index >= DarkCloud_Weapons::MENU_INDEX and not force
        @menu_index += 1
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  alias :broken_dcweapons_scnmenu_ccw :create_command_window
  def create_command_window
    broken_dcweapons_scnmenu_ccw
    if DarkCloud_Weapons::MENU_ACCESS and not @switch
      text = DarkCloud_Weapons::MENU_TITLE
      @dcweapons_command = DarkCloud_Weapons::MENU_INDEX
      @command_window.insert_command(@dcweapons_command, text)
      if @command_window.oy > 0
        @command_window.oy -= Window_Base::WLH
      end
    end
    @command_window.index = @menu_index
  end
  #--------------------------------------------------------------------------
  # * Update Command Selection
  #--------------------------------------------------------------------------
  alias :broken_dcweapons_scnmenu_ucs :update_command_selection
  def update_command_selection
    if DarkCloud_Weapons::MENU_ACCESS and not @switch
      changed = false
      if Input.trigger?(Input::C)
        case @command_window.index
        when @dcweapons_command
          Sound.play_decision
          start_actor_selection
          return
        end
      end
      if @command_window.index > @dcweapons_command
        size = @command_window.commands.size
        @command_window.index = (@command_window.index - 1) % size
        changed = true
      end
    end
    broken_dcweapons_scnmenu_ucs
    if DarkCloud_Weapons::MENU_ACCESS and not @switch
      size = @command_window.commands.size
      @command_window.index = (@command_window.index + 1 ) % size if changed
    end
  end
  #--------------------------------------------------------------------------
  # * Update Actor Selection
  #--------------------------------------------------------------------------
  alias :broken_dcweapons_scnmenu_uas :update_actor_selection
  def update_actor_selection
    if Input.trigger?(Input::C)
      $game_party.last_actor_index = @status_window.index
      case @command_window.index
      when @dcweapons_command
        if $game_party.members[@status_window.index].weapon_1.nil?
          Sound.play_buzzer
          return
        end
        Sound.play_decision
        $scene = Scene_BuildUp.new(@status_window.index)
        return
      end
    end
    broken_dcweapons_scnmenu_uas
  end
end

#==============================================================================
# ** Scene_Equip
#==============================================================================

class Scene_Equip < Scene_Base
  #--------------------------------------------------------------------------
  # * Update Status Window
  #--------------------------------------------------------------------------
  alias :broken_dcweapons_scneqp_usw :update_status_window
  def update_status_window
    if not @item_window.nil? and @item_window.active
       if @equip_window.index == 1 and @actor.two_swords_style
        temp_actor = @actor.clone
        temp_actor.change_equip(@equip_window.index,@item_window.item,true,true)
        new_atk = temp_actor.atk
        new_def = temp_actor.def
        new_spi = temp_actor.spi
        new_agi = temp_actor.agi
        @status_window.set_new_parameters(new_atk, new_def, new_spi, new_agi)
        @status_window.update
        return
      end
    end
    broken_dcweapons_scneqp_usw
  end
  #--------------------------------------------------------------------------
  # * Update Item Selection
  #--------------------------------------------------------------------------
  alias :broken_dcweapons_scneqp_uis :update_item_selection
  def update_item_selection
    if Input.trigger?(Input::C)
      if @equip_window.index == 1 and @actor.two_swords_style
        Sound.play_equip
        @actor.change_equip(@equip_window.index, @item_window.item, false, true)
        @equip_window.active = true
        @item_window.active = false
        @item_window.index = -1
        @equip_window.refresh
        for item_window in @item_windows
          item_window.refresh
        end
        return
      end
    end
    broken_dcweapons_scneqp_uis
  end
end

#==============================================================================
# ** Scene_BuildUp
#==============================================================================

class Scene_BuildUp < Scene_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(actor_index = 0)
    @actor_index = actor_index
  end
  #--------------------------------------------------------------------------
  # * Start processing
  #--------------------------------------------------------------------------
  def start
    super
    create_menu_background
    create_command_window
    @actor = $game_party.members[@actor_index]
    @weapon = @actor.weapon_1
    @status_window = Window_WeaponStatus.new(@weapon, @actor)
    @help2_window = Window_Help.new
    h1 = DarkCloud_Weapons::BUILDUP_EQUIP_HELP
    h2 = DarkCloud_Weapons::BUILDUP_UPGRADE_HELP
    h3 = DarkCloud_Weapons::BUILDUP_BREAKDOWN_HELP
    h4 = DarkCloud_Weapons::BUILDUP_BUILDUP_HELP
    @help_choices = [h1, h2, h3, h4]
    @help2_window.set_text(@help_choices[@command_window.index])
    @question_window = Window_Help.new
    @question_window.y = 120
    @question_window.z = 9999
    @question_window.visible = false
    @yesno_window = Window_Command.new(100, ['  Yes', '  No'])
    @yesno_window.x = 218
    @yesno_window.y = 176
    @yesno_window.z = 9999
    @yesno_window.active = false
    @yesno_window.visible = false
    @item_window = Window_Item.new(272, 56, 272, 232, true)
    @item_window.help_window = @help2_window
    @help_window = Window_BuildHelp.new(200, 288, 344, 128)
    @number_window = Window_SetNumber.new(218, 176)
    @number_window.visible = false
    @buildup_window = Window_BuildChoices.new(@weapon)
    @buildup_window.visible = false
    @buildup_window.help_window = @help2_window
  end
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
    super
    dispose_menu_background
    @command_window.dispose
    @status_window.dispose
    @item_window.dispose
    @help_window.dispose
    @help2_window.dispose
    @question_window.dispose
    @yesno_window.dispose
    @number_window.dispose
    @buildup_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Return to Original Screen
  #--------------------------------------------------------------------------
  def return_scene
    $scene = Scene_Menu.new(DarkCloud_Weapons::MENU_INDEX, true)
  end
  #--------------------------------------------------------------------------
  # * Switch to Next Actor Screen
  #--------------------------------------------------------------------------
  def next_actor
    @actor_index += 1
    @actor_index %= $game_party.members.size
    if $game_party.members[@actor_index].weapon_1.nil?
      next_actor
      return
    end
    $scene = Scene_BuildUp.new(@actor_index)
  end
  #--------------------------------------------------------------------------
  # * Switch to Previous Actor Screen
  #--------------------------------------------------------------------------
  def prev_actor
    @actor_index += $game_party.members.size - 1
    @actor_index %= $game_party.members.size
    if $game_party.members[@actor_index].weapon_1.nil?
      prev_actor
      return
    end
    $scene = Scene_BuildUp.new(@actor_index)
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    @command_window.update
    @item_window.update
    @yesno_window.update
    @number_window.update
    @status_window.update
    @question_window.update
    @help2_window.update
    @buildup_window.update
    if @command_window.active
      @help2_window.set_text(@help_choices[@command_window.index])
    elsif @item_window.active
      @help_window.update(@command_window.index, @weapon, @item_window.item)
    elsif @buildup_window.active
      if @rem_index != @buildup_window.index
        @rem_index = @buildup_window.index
        @status_window.refresh(@buildup_window.buildup_weapon)
      end
    end
    if @yesno_window.active
      update_confirm_selection
    elsif @command_window.active
      update_command_selection
    elsif @item_window.active
      update_item_selection
    elsif @buildup_window.active
      update_buildup_selection
    elsif @number_window.active
      update_number_selection
    end
  end
  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  def create_command_window
    s1 = DarkCloud_Weapons::BUILDUP_EQUIPWORDS
    s2 = DarkCloud_Weapons::BUILDUP_UPGRADEWORD
    s3 = DarkCloud_Weapons::BUILDUP_BREAKDOWN
    s4 = DarkCloud_Weapons::BUILDUP_BUILDUP
    @command_window = Window_Command.new(200, [s1, s2, s3, s4])
    @command_window.y = 288
  end
  #--------------------------------------------------------------------------
  # * Update Command Selection
  #--------------------------------------------------------------------------
  def update_command_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      return_scene
    elsif Input.trigger?(Input::R)
      Sound.play_cursor
      next_actor
    elsif Input.trigger?(Input::L)
      Sound.play_cursor
      prev_actor
    elsif Input.trigger?(Input::C)
      Sound.play_decision
      case @command_window.index
      when 0, 1, 2 # Equip, Upgrade, Break Down
        @command_window.active = false
        @item_window.active = true
      when 3 # Build Up
        @buildup_window.active = true
        @buildup_window.visible = true
        @command_window.active = false
        @help_window.visible = false
        @rem_index = nil
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Update Item Selection
  #--------------------------------------------------------------------------
  def update_item_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      @item_window.active = false
      @command_window.active = true
    elsif Input.trigger?(Input::C)
      Sound.play_decision
      item = @item_window.item
      se = RPG::SE.new(DarkCloud_Weapons::BREAKDOWN_SFX, 80)
      case @command_window.index
      when 0 # Equip
        if item.nil? or not item.is_a?(RPG::Weapon) or not
           @actor.equippable?(item) or @actor.fix_equipment
          Sound.play_buzzer
          return
        end
        Sound.play_equip
        @actor.change_equip(0, item)
        @weapon = item
        @buildup_window.dispose
        @buildup_window = Window_BuildChoices.new(@weapon)
        @buildup_window.visible = false
        @rem_index = nil
        @status_window.dispose
        @status_window = Window_WeaponStatus.new(@weapon, @actor)
        @item_window.refresh
        @item_window.active = false
        @item_window.index = 0
        @command_window.active = true
      when 1 # Upgrade
        if item.nil? or not item.is_a?(RPG::SynthSphere) or
           item.sp_cost > @weapon.sp
           Sound.play_buzzer
          return
        end
        @item_window.active = false
        @yesno_window.active = true
        @yesno_window.visible = true
        @question_window.visible = true
        @question_window.set_text('Are you okay with this?')
      when 2 # Break Down
        if item.nil? or item.is_a?(RPG::SynthSphere) or item.no_synth
          Sound.play_buzzer
          return
        end
        if item.is_a?(RPG::Weapon)
          @item_window.active = false
          @yesno_window.active = true
          @yesno_window.visible = true
          @question_window.visible = true
          @question_window.set_text('Are you okay with this?')
        else
          @item_window.active = false
          @number_window.active = true
          @number_window.visible = true
          @number_window.set_max($game_party.item_number(item))
          @question_window.visible = true
          @question_window.set_text('How many?')
        end
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Update Confirm Selection
  #--------------------------------------------------------------------------
  def update_confirm_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      @yesno_window.active = false
      @yesno_window.visible = false
      @question_window.visible = false
      if @command_window.index == 3
        @buildup_window.active = true
      else
        @item_window.active = true
      end
    elsif Input.trigger?(Input::C)
      item = @item_window.item
      se = RPG::SE.new(DarkCloud_Weapons::BREAKDOWN_SFX, 80)
      case @yesno_window.index
      when 0 # Yes
        case @command_window.index
        when  1 # Upgrade
          se.play
          @weapon.upgrade(item)
          $game_party.lose_item(item, nil)
          @item_window.index = [@item_window.index - 1, 0].max
          @item_window.refresh
          @status_window.refresh
          @yesno_window.active = false
          @yesno_window.visible = false
          @item_window.active = true
          @question_window.visible = false
        when 2 # Break down
          se.play
          new_item = RPG::SynthSphere.new
          new_item.set_sphere(item, nil)
          $game_party.lose_item(item, 1)
          $game_party.gain_item(new_item, nil)
          @item_window.refresh
          @yesno_window.active = false
          @yesno_window.visible = false
          @question_window.visible = false
          @item_window.active = true
        when 3 # Build Up
          se.play
          new_weapon = @buildup_window.buildup_weapon
          new_weapon.synch(@weapon)
          @actor.change_equip(0, new_weapon, true)
          @weapon = new_weapon
          unless $game_party.built_weapons.include?(@weapon.id)
            $game_party.built_weapons.push(@weapon.id)
          end
          @status_window.dispose
          @status_window = Window_WeaponStatus.new(@weapon, @actor)
          @yesno_window.active = false
          @yesno_window.visible = false
          @question_window.visible = false
          @buildup_window.dispose
          @buildup_window = Window_BuildChoices.new(@weapon)
          @buildup_window.visible = false
          @rem_index = nil
          @help_window.visible = true
          @command_window.active = true
        end
      when 1 # No
        @yesno_window.active = false
        @yesno_window.visible = false
        @question_window.visible = false
        if @command_window.index == 3
          @buildup_window.active = true
        else
          @item_window.active = true
        end
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Update Build Up Selection
  #--------------------------------------------------------------------------
  def update_buildup_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      @buildup_window.visible = false
      @buildup_window.active = false
      @command_window.active = true
      @help_window.visible = true
      @status_window.refresh
    elsif Input.trigger?(Input::C)
      if @status_window.buildup_possible?
        @buildup_window.active = false
        @yesno_window.active = true
        @yesno_window.visible = true
        @question_window.visible = true
        @question_window.set_text('Are you okay with this?')
      else
        Sound.play_buzzer
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Update Number Selection
  #--------------------------------------------------------------------------
  def update_number_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      @item_window.active = true
      @number_window.active = false
      @number_window.visible = false
      @question_window.visible = false
    elsif Input.trigger?(Input::C)
      item = @item_window.item
      amount = @number_window.number
      case @command_window.index
      when 2 # Break Down
        se = RPG::SE.new(DarkCloud_Weapons::BREAKDOWN_SFX, 80)
        se.play
        new_item = RPG::SynthSphere.new
        new_item.set_sphere(item, amount)
        $game_party.lose_item(item, amount)
        $game_party.gain_item(new_item, nil)
        @item_window.refresh
        @item_window.active = true
        @number_window.active = false
        @number_window.visible = false
        @question_window.visible = false
      end
    end
  end
end

#==============================================================================
# ** Scene_Battle
#==============================================================================

class Scene_Battle < Scene_Base
  #--------------------------------------------------------------------------
  # * Wait Until Message Display has Finished
  #--------------------------------------------------------------------------
  alias :broken_dcweapons_scnbttl_wfm :wait_for_message
  def wait_for_message
    unless @broken_forceignore
      broken_dcweapons_scnbttl_wfm
    end
  end
  #--------------------------------------------------------------------------
  # * Display Gained Experience and Gold
  #--------------------------------------------------------------------------
  alias :broken_dcweapons_scnbttl_deag :display_exp_and_gold
  def display_exp_and_gold
    @broken_forceignore = true
    broken_dcweapons_scnbttl_deag
    weapon_exp = 0
    for enemy in $game_troop.dead_members
      weapon_exp += enemy.wep_exp unless enemy.hidden
    end
    if weapon_exp > 0
      text = sprintf(DarkCloud_Weapons::OBTAIN_WEPEXP, weapon_exp)
      $game_message.texts.push('\.' + text)
    end
    @broken_forceignore = false
    wait_for_message
    for actor in $game_party.existing_members
      for weapon in actor.weapons
        unless weapon.nil?
          old_level = weapon.level
          weapon.gain_exp(weapon_exp)
          if old_level < weapon.level
            an = actor.name
            wp = weapon.name
            wl = weapon.level
            text = sprintf(DarkCloud_Weapons::WEAPON_LEVELUP, an, wp, wl)
            $game_message.texts.push('\.' + text)
          end
        end
      end
    end
    wait_for_message
  end
end

**
Rep: +0/-0Level 75
Hello everyone ^_^
Thanks, I looked up the script this morning and I've been checking it out. It does a lot more than I need (eg. weapon leveling, breaking down items to make new ones that are customizable) and won't allow me to do something I need to do (eg. have a weapon/mineral combination that has a certain % success rate based on a variable, which is the main reason I want this script). Should I just contact xbrokensins to see if he will modify this for me?
RPMG2k forever!

***
Rep:
Level 81
Monster Hunter
Thanks, I looked up the script this morning and I've been checking it out. It does a lot more than I need (eg. weapon leveling, breaking down items to make new ones that are customizable) and won't allow me to do something I need to do (eg. have a weapon/mineral combination that has a certain % success rate based on a variable, which is the main reason I want this script). Should I just contact xbrokensins to see if he will modify this for me?
yeah i think so but i can't seem to find his post or the script so search for him if you want ^^

**
Rep: +0/-0Level 75
Hello everyone ^_^
The Dark Cloud script is http://www.rpgmakervx.net/index.php?showtopic=20543 <-- there, for your interest ^_^. I'll send him a PM and see what he can do for me. the script i want should be relatively easy (especially compared to that dark cloud script) so I'm really hoping someone can do it for me, plus it's going to be a vital part of my game.
RPMG2k forever!

***
Rep:
Level 81
Monster Hunter
hehe -_-' thanks , #Why couldn't i find this...#

**
Rep: +0/-0Level 75
Hello everyone ^_^
um... Because Google is MY best friend ^_^

EDIT: I just sent xBrokensin a PM, If anyone wants to take this on (oh god please) before I hear from him (he hasn't been online in a few weeks) please let me know! Thank you all.
« Last Edit: August 22, 2010, 11:20:39 PM by hikomarukun »
RPMG2k forever!

***
Rep:
Level 81
Monster Hunter
um... Because Google is MY best friend ^_^

EDIT: I just sent xBrokensin a PM, If anyone wants to take this on (oh god please) before I hear from him (he hasn't been online in a few weeks) please let me know! Thank you all.
Ask Zanaziel (TDS) ^^

**
Rep: +0/-0Level 75
Hello everyone ^_^
Sent him the PM yesterday! Now we play the worst game of all... The waiting game. In the mean time, it's time to hammer out the details of items, enemy/character stats, maps, and the rest of the infinitely long list that goes in to making a game! ^_^
RPMG2k forever!

**
Rep: +0/-0Level 75
Hello everyone ^_^
I have not received a reply yet... this is still open to hopefully be worked on. Is this that much  more tricky than I think it should be?  =( *bump*
RPMG2k forever!

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Well, it's not necessarily that it's tricky. Maybe he doesn't want to do it or doesn't have time right away.

In any case, what about mithos' Item Synthesis +. It seems similar to your request.

pokeball TDSOffline
***
Rep:
Level 84
-T D S-
Silver - GIAW 11 (Hard)Silver - Game In A Week VII
It's not really a hard or tricky script.

I just don't feel very well at this moment and I never do requests that are asked directly to me by anyone.

**
Rep: +0/-0Level 75
Hello everyone ^_^
I've checked out Mithos' Item Synth script and the only thing that it has that I want is the ability to pick two items. It's not specific to one weapon/one item, etc. Mithos' script only adds effects based on the items picked. The script I want choses a character, and then takes items that have no effect in and of themselves (the minerals - ores, if you will) and then depending on the weapon and mineral selected it has a certain chance to make a specific weapon (one of, say 3 possible), where the % chance is based on an actor's variable skill level. Thanks though Modern Algebra for the suggestion.

I plan on learning programming/scripting during the school year so I can stop relying on these nice people to do my dirty work, but until then, this is about the only thing that's holding me back from starting actually making my game. Man I can't wait until I learn how to script. Then I might be able to help people like me in the upcoming years! ^_^

I respect the not taking personal requests, because if you did it for one person, you would get 100,000's of requests and that would be a pain. I hope you get better soon tho, thanks TDS - no worries.
RPMG2k forever!

**
Rep: +0/-0Level 75
Hello everyone ^_^
bumpidy bump bump
RPMG2k forever!