Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - DarK_Camper

1
Thanks KK20! It works great now. :)
2

The bottom code does indeed work, but for some odd reason that is unknown to me, $data_actors[1].armor1_id is not functioning as I'd expect it to.
It stays at 0. Here's the code. I also have not touched this project for a while.  :^_^':

Spoiler: ShowHide
    if Input.trigger?(Input::C)
     sword_id = 0
     ssweapon_id = $data_actors[1].weapon_id
     ssarmor1_id = $data_actors[1].armor1_id # This is not returning the armor1_id for some reason.
     case @sword_offmain.index
       when 0
         sword_id = sword_id_return
         if ($game_variables[10]==sword_id) then
           $game_variables[10] = $game_variables[11]
           $game_variables[11] = 0
           end
         if ($game_variables[11]==sword_id) then $game_variables[11] = 0 end
         $game_party.gain_weapon(sword_id, 1)
         if (ssarmor1_id == sword_id) then $game_actors[1].equip(1,0) end
         $game_actors[1].equip(0, sword_id)
         $scene = Scene_Map.new
         return
       when 1
         sword_id = sword_id_return
         if ($game_variables[12]==sword_id) then
           $game_variables[12] = $game_variables[13]
           $game_variables[13] = 0
           end
         if ($game_variables[13]==sword_id) then $game_variables[13] = 0 end
         $game_party.gain_armor(sword_id, 1)
         if (ssweapon_id == sword_id) then $game_actors[1].equip(0,0) end
         $game_actors[1].equip(1, sword_id)
         $scene = Scene_Map.new
         return
     end
     return
   end

The entire code:
Spoiler: ShowHide
class Scene_Swordsummon
 # // * Initialize
 def initialize(menu_index=0)
   @menu_index = menu_index
 end
 
 def ss_switch_return(switch_id)
   return $game_switches[switch_id]
 end
 
 def main
   # // * Variable Initiations
   # / Choices
   #sword_selection choices
   #this
   if ss_switch_return(DARKCAMPER::SWORDSUMMON::SWORDS[:windsword][4])
     s1 = DARKCAMPER::SWORDSUMMON::SWORDS[:windsword][0]
   else
     s1 = ""
   end
   if ss_switch_return(DARKCAMPER::SWORDSUMMON::SWORDS[:earthsword][4])
     s2 = DARKCAMPER::SWORDSUMMON::SWORDS[:earthsword][0]
   else
     s2 = ""
   end
   if ss_switch_return(DARKCAMPER::SWORDSUMMON::SWORDS[:firesword][4])
     s3 = DARKCAMPER::SWORDSUMMON::SWORDS[:firesword][0]
   else
     s3 = ""
   end
   if ss_switch_return(DARKCAMPER::SWORDSUMMON::SWORDS[:watersword][4])
     s4 = DARKCAMPER::SWORDSUMMON::SWORDS[:watersword][0]
   else
     s4 = ""
   end
   #sword_offmain choices
   c1 = "Main-hand"
   c2 = "Off-hand"
   
   # // * Some Pre-processing
   @spriteset = Spriteset_Map.new
   
   # // * Window Creation
   #create Sword_Offmain window
   @sword_offmain = Window_Command.new(150, [c1, c2])
   @sword_offmain.index = 0
   @sword_offmain.x = 640
   @sword_offmain.y = 0
   @sword_offmain.opacity = 240
   @sword_offmain.active = false
   #main selection window
   @sword_selection = Window_Command.new(150, [s1, s2, s3, s4])#this
   @sword_selection.x = -150
   @sword_selection.y = 0
   @sword_selection.opacity = 240
   #help window
   @sword_help = Window_Help.new
   @sword_help.y = 415
   @sword_help.opacity = 240
   
   @sword_selection.index = @menu_index
   
   #Move Windows
   @sword_selection.move(0,@sword_selection.y)
   @sword_help.move(@sword_help.x,64)
   
   # // * Processing
   Graphics.transition
   loop do
     Graphics.update
     Input.update
     update
     if $scene != self
       break
     end
   end
   
   # // * Dispose Objects
   Graphics.freeze
   @spriteset.dispose
   @sword_selection.dispose unless @sword_selection.nil?
   @sword_offmain.dispose unless @sword_offmain.nil?
   @sword_help.dispose unless @sword_help.nil?
 end
 
 # // * Sword Methods
 def show_offmain(sword_index)
   @sword_equip = sword_index
   @sword_offmain.move(490,0)
   @sword_offmain.active = true
 end
 
 def sword_id_return #this
     case @sword_equip
       when 0 then return DARKCAMPER::SWORDSUMMON::SWORDS[:windsword][1]
       when 1 then return DARKCAMPER::SWORDSUMMON::SWORDS[:earthsword][1]
       when 2 then return DARKCAMPER::SWORDSUMMON::SWORDS[:firesword][1]
       when 3 then return DARKCAMPER::SWORDSUMMON::SWORDS[:watersword][1]
     end
 end
 
 # // * Update Methods  
 def update_command
   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.cancel_se)
     @sword_selection.move(-150,@sword_help.y)
     @sword_help.move(@sword_help.x,-64)
     $scene = Scene_Map.new
     return
   end
   if Input.trigger?(Input::C)
     case @sword_selection.index
       when 0 then
         if ss_switch_return(DARKCAMPER::SWORDSUMMON::SWORDS[:windsword][4])
           @sword_selection.active = false
           show_offmain(0)
         else
           $game_system.se_play($data_system.buzzer_se)
         end
       when 1 then
         if ss_switch_return(DARKCAMPER::SWORDSUMMON::SWORDS[:earthsword][4])
           @sword_selection.active = false
           show_offmain(1)
         else
           $game_system.se_play($data_system.buzzer_se)
         end
       when 2 then
         if ss_switch_return(DARKCAMPER::SWORDSUMMON::SWORDS[:earthsword][4])
           @sword_selection.active = false
           show_offmain(2)
         else
           $game_system.se_play($data_system.buzzer_se)
         end
       when 3 then
         if ss_switch_return(DARKCAMPER::SWORDSUMMON::SWORDS[:earthsword][4])
           @sword_selection.active = false
           show_offmain(3)
         else
           $game_system.se_play($data_system.buzzer_se)
         end
     end
     return
   end
 end
 
 def update_offmain_command
   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.cancel_se)
     @sword_offmain.active = false
     @sword_selection.active = true
     @sword_offmain.move(640,@sword_offmain.y)
     return
   end
   if Input.trigger?(Input::C)
     sword_id = 0
     ssweapon_id = $data_actors[1].weapon_id
     ssarmor1_id = $data_actors[1].armor1_id
     case @sword_offmain.index
       when 0
         sword_id = sword_id_return
         if ($game_variables[10]==sword_id) then
           $game_variables[10] = $game_variables[11]
           $game_variables[11] = 0
           end
         if ($game_variables[11]==sword_id) then $game_variables[11] = 0 end
         $game_party.gain_weapon(sword_id, 1)
         if (ssarmor1_id == sword_id) then $game_actors[1].equip(1,0) end
         $game_actors[1].equip(0, sword_id)
         $scene = Scene_Map.new
         return
       when 1
         sword_id = sword_id_return
         if ($game_variables[12]==sword_id) then
           $game_variables[12] = $game_variables[13]
           $game_variables[13] = 0
           end
         if ($game_variables[13]==sword_id) then $game_variables[13] = 0 end
         $game_party.gain_armor(sword_id, 1)
         if (ssweapon_id == sword_id) then $game_actors[1].equip(0,0) end
         $game_actors[1].equip(1, sword_id)
         $scene = Scene_Map.new
         return
     end
     return
   end
 end
 
 # * // Main Update Method
 def update
   #Updating the windows
   @spriteset.update
   @sword_selection.update
   @sword_offmain.update unless @sword_offmain.nil?
   
   #Updating the Help Window
   case @sword_selection.index
   when 0
     if ss_switch_return(DARKCAMPER::SWORDSUMMON::SWORDS[:windsword][4])
       @sword_help.set_text("The Wind Sword")
     else
       @sword_help.set_text("")
     end
   when 1
     if ss_switch_return(DARKCAMPER::SWORDSUMMON::SWORDS[:earthsword][4])
       @sword_help.set_text("The Earth Sword")
     else
       @sword_help.set_text("")
     end
   when 2
     if ss_switch_return(DARKCAMPER::SWORDSUMMON::SWORDS[:earthsword][4])
       @sword_help.set_text("The Fire Sword")
     else
       @sword_help.set_text("")
     end
   when 3
     if ss_switch_return(DARKCAMPER::SWORDSUMMON::SWORDS[:earthsword][4])
       @sword_help.set_text("The Water Sword")
     else
       @sword_help.set_text("")
     end
   end
   
   #Updating the commands
   if @sword_selection.active
     update_command
     return
   end
   if @sword_offmain.active
     update_offmain_command
     return
   end
 end
end


and I don't remember editing the Game_Actors(I just accessed it to reference), but here it is anyway:(I hope I'm not breaking any rules by doing this.)
Spoiler: ShowHide
#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
#  This class handles the actor. It's used within the Game_Actors class
#  ($game_actors) and refers to the Game_Party class ($game_party).
#==============================================================================

class Game_Actor < Game_Battler
 #--------------------------------------------------------------------------
 # * Public Instance Variables
 #--------------------------------------------------------------------------
 attr_reader   :name                     # name
 attr_reader   :character_name           # character file name
 attr_reader   :character_hue            # character hue
 attr_reader   :class_id                 # class ID
 attr_reader   :weapon_id                # weapon ID
 attr_reader   :armor1_id                # shield ID
 attr_reader   :armor2_id                # helmet ID
 attr_reader   :armor3_id                # body armor ID
 attr_reader   :armor4_id                # accessory ID
 attr_reader   :level                    # level
 attr_reader   :exp                      # EXP
 attr_reader   :skills                   # skills
 #--------------------------------------------------------------------------
 # * Object Initialization
 #     actor_id : actor ID
 #--------------------------------------------------------------------------
 def initialize(actor_id)
   super()
   setup(actor_id)
 end
 #--------------------------------------------------------------------------
 # * Setup
 #     actor_id : actor ID
 #--------------------------------------------------------------------------
 def setup(actor_id)
   actor = $data_actors[actor_id]
   @actor_id = actor_id
   @name = actor.name
   @character_name = actor.character_name
   @character_hue = actor.character_hue
   @battler_name = actor.battler_name
   @battler_hue = actor.battler_hue
   @class_id = actor.class_id
   @weapon_id = actor.weapon_id
   @armor1_id = actor.armor1_id
   @armor2_id = actor.armor2_id
   @armor3_id = actor.armor3_id
   @armor4_id = actor.armor4_id
   @level = actor.initial_level
   @exp_list = Array.new(101)
   make_exp_list
   @exp = @exp_list[@level]
   @skills = []
   @hp = maxhp
   @sp = maxsp
   @states = []
   @states_turn = {}
   @maxhp_plus = 0
   @maxsp_plus = 0
   @str_plus = 0
   @dex_plus = 0
   @agi_plus = 0
   @int_plus = 0
   # Learn skill
   for i in 1..@level
     for j in $data_classes[@class_id].learnings
       if j.level == i
         learn_skill(j.skill_id)
       end
     end
   end
   # Update auto state
   update_auto_state(nil, $data_armors[@armor1_id])
   update_auto_state(nil, $data_armors[@armor2_id])
   update_auto_state(nil, $data_armors[@armor3_id])
   update_auto_state(nil, $data_armors[@armor4_id])
 end
 #--------------------------------------------------------------------------
 # * Get Actor ID
 #--------------------------------------------------------------------------
 def id
   return @actor_id
 end
 #--------------------------------------------------------------------------
 # * Get Index
 #--------------------------------------------------------------------------
 def index
   return $game_party.actors.index(self)
 end
 #--------------------------------------------------------------------------
 # * Calculate EXP
 #--------------------------------------------------------------------------
 def make_exp_list
   actor = $data_actors[@actor_id]
   @exp_list[1] = 0
   pow_i = 2.4 + actor.exp_inflation / 100.0
   for i in 2..100
     if i > actor.final_level
       @exp_list[i] = 0
     else
       n = actor.exp_basis * ((i + 3) ** pow_i) / (5 ** pow_i)
       @exp_list[i] = @exp_list[i-1] + Integer(n)
     end
   end
 end
 #--------------------------------------------------------------------------
 # * Get Element Revision Value
 #     element_id : element ID
 #--------------------------------------------------------------------------
 def element_rate(element_id)
   # Get values corresponding to element effectiveness
   table = [0,200,150,100,50,0,-100]
   result = table[$data_classes[@class_id].element_ranks[element_id]]
   # If this element is protected by armor, then it's reduced by half
   for i in [@armor1_id, @armor2_id, @armor3_id, @armor4_id]
     armor = $data_armors[i]
     if armor != nil and armor.guard_element_set.include?(element_id)
       result /= 2
     end
   end
   # If this element is protected by states, then it's reduced by half
   for i in @states
     if $data_states[i].guard_element_set.include?(element_id)
       result /= 2
     end
   end
   # End Method
   return result
 end
 #--------------------------------------------------------------------------
 # * Get State Effectiveness
 #--------------------------------------------------------------------------
 def state_ranks
   return $data_classes[@class_id].state_ranks
 end
 #--------------------------------------------------------------------------
 # * Determine State Guard
 #     state_id : state ID
 #--------------------------------------------------------------------------
 def state_guard?(state_id)
   for i in [@armor1_id, @armor2_id, @armor3_id, @armor4_id]
     armor = $data_armors[i]
     if armor != nil
       if armor.guard_state_set.include?(state_id)
         return true
       end
     end
   end
   return false
 end
 #--------------------------------------------------------------------------
 # * Get Normal Attack Element
 #--------------------------------------------------------------------------
 def element_set
   weapon = $data_weapons[@weapon_id]
   return weapon != nil ? weapon.element_set : []
 end
 #--------------------------------------------------------------------------
 # * Get Normal Attack State Change (+)
 #--------------------------------------------------------------------------
 def plus_state_set
   weapon = $data_weapons[@weapon_id]
   return weapon != nil ? weapon.plus_state_set : []
 end
 #--------------------------------------------------------------------------
 # * Get Normal Attack State Change (-)
 #--------------------------------------------------------------------------
 def minus_state_set
   weapon = $data_weapons[@weapon_id]
   return weapon != nil ? weapon.minus_state_set : []
 end
 #--------------------------------------------------------------------------
 # * Get Maximum HP
 #--------------------------------------------------------------------------
 def maxhp
   n = [[base_maxhp + @maxhp_plus, 1].max, 9999].min
   for i in @states
     n *= $data_states[i].maxhp_rate / 100.0
   end
   n = [[Integer(n), 1].max, 9999].min
   return n
 end
 #--------------------------------------------------------------------------
 # * Get Basic Maximum HP
 #--------------------------------------------------------------------------
 def base_maxhp
   return $data_actors[@actor_id].parameters[0, @level]
 end
 #--------------------------------------------------------------------------
 # * Get Basic Maximum SP
 #--------------------------------------------------------------------------
 def base_maxsp
   return $data_actors[@actor_id].parameters[1, @level]
 end
 #--------------------------------------------------------------------------
 # * Get Basic Strength
 #--------------------------------------------------------------------------
 def base_str
   n = $data_actors[@actor_id].parameters[2, @level]
   weapon = $data_weapons[@weapon_id]
   armor1 = $data_armors[@armor1_id]
   armor2 = $data_armors[@armor2_id]
   armor3 = $data_armors[@armor3_id]
   armor4 = $data_armors[@armor4_id]
   n += weapon != nil ? weapon.str_plus : 0
   n += armor1 != nil ? armor1.str_plus : 0
   n += armor2 != nil ? armor2.str_plus : 0
   n += armor3 != nil ? armor3.str_plus : 0
   n += armor4 != nil ? armor4.str_plus : 0
   return [[n, 1].max, 999].min
 end
 #--------------------------------------------------------------------------
 # * Get Basic Dexterity
 #--------------------------------------------------------------------------
 def base_dex
   n = $data_actors[@actor_id].parameters[3, @level]
   weapon = $data_weapons[@weapon_id]
   armor1 = $data_armors[@armor1_id]
   armor2 = $data_armors[@armor2_id]
   armor3 = $data_armors[@armor3_id]
   armor4 = $data_armors[@armor4_id]
   n += weapon != nil ? weapon.dex_plus : 0
   n += armor1 != nil ? armor1.dex_plus : 0
   n += armor2 != nil ? armor2.dex_plus : 0
   n += armor3 != nil ? armor3.dex_plus : 0
   n += armor4 != nil ? armor4.dex_plus : 0
   return [[n, 1].max, 999].min
 end
 #--------------------------------------------------------------------------
 # * Get Basic Agility
 #--------------------------------------------------------------------------
 def base_agi
   n = $data_actors[@actor_id].parameters[4, @level]
   weapon = $data_weapons[@weapon_id]
   armor1 = $data_armors[@armor1_id]
   armor2 = $data_armors[@armor2_id]
   armor3 = $data_armors[@armor3_id]
   armor4 = $data_armors[@armor4_id]
   n += weapon != nil ? weapon.agi_plus : 0
   n += armor1 != nil ? armor1.agi_plus : 0
   n += armor2 != nil ? armor2.agi_plus : 0
   n += armor3 != nil ? armor3.agi_plus : 0
   n += armor4 != nil ? armor4.agi_plus : 0
   return [[n, 1].max, 999].min
 end
 #--------------------------------------------------------------------------
 # * Get Basic Intelligence
 #--------------------------------------------------------------------------
 def base_int
   n = $data_actors[@actor_id].parameters[5, @level]
   weapon = $data_weapons[@weapon_id]
   armor1 = $data_armors[@armor1_id]
   armor2 = $data_armors[@armor2_id]
   armor3 = $data_armors[@armor3_id]
   armor4 = $data_armors[@armor4_id]
   n += weapon != nil ? weapon.int_plus : 0
   n += armor1 != nil ? armor1.int_plus : 0
   n += armor2 != nil ? armor2.int_plus : 0
   n += armor3 != nil ? armor3.int_plus : 0
   n += armor4 != nil ? armor4.int_plus : 0
   return [[n, 1].max, 999].min
 end
 #--------------------------------------------------------------------------
 # * Get Basic Attack Power
 #--------------------------------------------------------------------------
 def base_atk
   weapon = $data_weapons[@weapon_id]
   return weapon != nil ? weapon.atk : 0
 end
 #--------------------------------------------------------------------------
 # * Get Basic Physical Defense
 #--------------------------------------------------------------------------
 def base_pdef
   weapon = $data_weapons[@weapon_id]
   armor1 = $data_armors[@armor1_id]
   armor2 = $data_armors[@armor2_id]
   armor3 = $data_armors[@armor3_id]
   armor4 = $data_armors[@armor4_id]
   pdef1 = weapon != nil ? weapon.pdef : 0
   pdef2 = armor1 != nil ? armor1.pdef : 0
   pdef3 = armor2 != nil ? armor2.pdef : 0
   pdef4 = armor3 != nil ? armor3.pdef : 0
   pdef5 = armor4 != nil ? armor4.pdef : 0
   return pdef1 + pdef2 + pdef3 + pdef4 + pdef5
 end
 #--------------------------------------------------------------------------
 # * Get Basic Magic Defense
 #--------------------------------------------------------------------------
 def base_mdef
   weapon = $data_weapons[@weapon_id]
   armor1 = $data_armors[@armor1_id]
   armor2 = $data_armors[@armor2_id]
   armor3 = $data_armors[@armor3_id]
   armor4 = $data_armors[@armor4_id]
   mdef1 = weapon != nil ? weapon.mdef : 0
   mdef2 = armor1 != nil ? armor1.mdef : 0
   mdef3 = armor2 != nil ? armor2.mdef : 0
   mdef4 = armor3 != nil ? armor3.mdef : 0
   mdef5 = armor4 != nil ? armor4.mdef : 0
   return mdef1 + mdef2 + mdef3 + mdef4 + mdef5
 end
 #--------------------------------------------------------------------------
 # * Get Basic Evasion Correction
 #--------------------------------------------------------------------------
 def base_eva
   armor1 = $data_armors[@armor1_id]
   armor2 = $data_armors[@armor2_id]
   armor3 = $data_armors[@armor3_id]
   armor4 = $data_armors[@armor4_id]
   eva1 = armor1 != nil ? armor1.eva : 0
   eva2 = armor2 != nil ? armor2.eva : 0
   eva3 = armor3 != nil ? armor3.eva : 0
   eva4 = armor4 != nil ? armor4.eva : 0
   return eva1 + eva2 + eva3 + eva4
 end
 #--------------------------------------------------------------------------
 # * Get Offensive Animation ID for Normal Attacks
 #--------------------------------------------------------------------------
 def animation1_id
   weapon = $data_weapons[@weapon_id]
   return weapon != nil ? weapon.animation1_id : 0
 end
 #--------------------------------------------------------------------------
 # * Get Target Animation ID for Normal Attacks
 #--------------------------------------------------------------------------
 def animation2_id
   weapon = $data_weapons[@weapon_id]
   return weapon != nil ? weapon.animation2_id : 0
 end
 #--------------------------------------------------------------------------
 # * Get Class Name
 #--------------------------------------------------------------------------
 def class_name
   return $data_classes[@class_id].name
 end
 #--------------------------------------------------------------------------
 # * Get EXP String
 #--------------------------------------------------------------------------
 def exp_s
   return @exp_list[@level+1] > 0 ? @exp.to_s : "-------"
 end
 #--------------------------------------------------------------------------
 # * Get Next Level EXP String
 #--------------------------------------------------------------------------
 def next_exp_s
   return @exp_list[@level+1] > 0 ? @exp_list[@level+1].to_s : "-------"
 end
 #--------------------------------------------------------------------------
 # * Get Until Next Level EXP String
 #--------------------------------------------------------------------------
 def next_rest_exp_s
   return @exp_list[@level+1] > 0 ?
     (@exp_list[@level+1] - @exp).to_s : "-------"
 end
 #--------------------------------------------------------------------------
 # * Update Auto State
 #     old_armor : unequipped armor
 #     new_armor : equipped armor
 #--------------------------------------------------------------------------
 def update_auto_state(old_armor, new_armor)
   # Forcefully remove unequipped armor's auto state
   if old_armor != nil and old_armor.auto_state_id != 0
     remove_state(old_armor.auto_state_id, true)
   end
   # Forcefully add unequipped armor's auto state
   if new_armor != nil and new_armor.auto_state_id != 0
     add_state(new_armor.auto_state_id, true)
   end
 end
 #--------------------------------------------------------------------------
 # * Determine Fixed Equipment
 #     equip_type : type of equipment
 #--------------------------------------------------------------------------
 def equip_fix?(equip_type)
   case equip_type
   when 0  # Weapon
     return $data_actors[@actor_id].weapon_fix
   when 1  # Shield
     return $data_actors[@actor_id].armor1_fix
   when 2  # Head
     return $data_actors[@actor_id].armor2_fix
   when 3  # Body
     return $data_actors[@actor_id].armor3_fix
   when 4  # Accessory
     return $data_actors[@actor_id].armor4_fix
   end
   return false
 end
 #--------------------------------------------------------------------------
 # * Change Equipment
 #     equip_type : type of equipment
 #     id    : weapon or armor ID (If 0, remove equipment)
 #--------------------------------------------------------------------------
 def equip(equip_type, id)
   case equip_type
   when 0  # Weapon
     if id == 0 or $game_party.weapon_number(id) > 0
       $game_party.gain_weapon(@weapon_id, 1)
       @weapon_id = id
       $game_party.lose_weapon(id, 1)
     end
   when 1  # Shield
     if id == 0 or $game_party.armor_number(id) > 0
       update_auto_state($data_armors[@armor1_id], $data_armors[id])
       $game_party.gain_armor(@armor1_id, 1)
       @armor1_id = id
       $game_party.lose_armor(id, 1)
     end
   when 2  # Head
     if id == 0 or $game_party.armor_number(id) > 0
       update_auto_state($data_armors[@armor2_id], $data_armors[id])
       $game_party.gain_armor(@armor2_id, 1)
       @armor2_id = id
       $game_party.lose_armor(id, 1)
     end
   when 3  # Body
     if id == 0 or $game_party.armor_number(id) > 0
       update_auto_state($data_armors[@armor3_id], $data_armors[id])
       $game_party.gain_armor(@armor3_id, 1)
       @armor3_id = id
       $game_party.lose_armor(id, 1)
     end
   when 4  # Accessory
     if id == 0 or $game_party.armor_number(id) > 0
       update_auto_state($data_armors[@armor4_id], $data_armors[id])
       $game_party.gain_armor(@armor4_id, 1)
       @armor4_id = id
       $game_party.lose_armor(id, 1)
     end
   end
 end
 #--------------------------------------------------------------------------
 # * Determine if Equippable
 #     item : item
 #--------------------------------------------------------------------------
 def equippable?(item)
   # If weapon
   if item.is_a?(RPG::Weapon)
     # If included among equippable weapons in current class
     if $data_classes[@class_id].weapon_set.include?(item.id)
       return true
     end
   end
   # If armor
   if item.is_a?(RPG::Armor)
     # If included among equippable armor in current class
     if $data_classes[@class_id].armor_set.include?(item.id)
       return true
     end
   end
   return false
 end
 #--------------------------------------------------------------------------
 # * Change EXP
 #     exp : new EXP
 #--------------------------------------------------------------------------
 def exp=(exp)
   @exp = [[exp, 9999999].min, 0].max
   # Level up
   while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
     @level += 1
     # Learn skill
     for j in $data_classes[@class_id].learnings
       if j.level == @level
         learn_skill(j.skill_id)
       end
     end
   end
   # Level down
   while @exp < @exp_list[@level]
     @level -= 1
   end
   # Correction if exceeding current max HP and max SP
   @hp = [@hp, self.maxhp].min
   @sp = [@sp, self.maxsp].min
 end
 #--------------------------------------------------------------------------
 # * Change Level
 #     level : new level
 #--------------------------------------------------------------------------
 def level=(level)
   # Check up and down limits
   level = [[level, $data_actors[@actor_id].final_level].min, 1].max
   # Change EXP
   self.exp = @exp_list[level]
 end
 #--------------------------------------------------------------------------
 # * Learn Skill
 #     skill_id : skill ID
 #--------------------------------------------------------------------------
 def learn_skill(skill_id)
   if skill_id > 0 and not skill_learn?(skill_id)
     @skills.push(skill_id)
     @skills.sort!
   end
 end
 #--------------------------------------------------------------------------
 # * Forget Skill
 #     skill_id : skill ID
 #--------------------------------------------------------------------------
 def forget_skill(skill_id)
   @skills.delete(skill_id)
 end
 #--------------------------------------------------------------------------
 # * Determine if Finished Learning Skill
 #     skill_id : skill ID
 #--------------------------------------------------------------------------
 def skill_learn?(skill_id)
   return @skills.include?(skill_id)
 end
 #--------------------------------------------------------------------------
 # * Determine if Skill can be Used
 #     skill_id : skill ID
 #--------------------------------------------------------------------------
 def skill_can_use?(skill_id)
   if not skill_learn?(skill_id)
     return false
   end
   return super
 end
 #--------------------------------------------------------------------------
 # * Change Name
 #     name : new name
 #--------------------------------------------------------------------------
 def name=(name)
   @name = name
 end
 #--------------------------------------------------------------------------
 # * Change Class ID
 #     class_id : new class ID
 #--------------------------------------------------------------------------
 def class_id=(class_id)
   if $data_classes[class_id] != nil
     @class_id = class_id
     # Remove items that are no longer equippable
     unless equippable?($data_weapons[@weapon_id])
       equip(0, 0)
     end
     unless equippable?($data_armors[@armor1_id])
       equip(1, 0)
     end
     unless equippable?($data_armors[@armor2_id])
       equip(2, 0)
     end
     unless equippable?($data_armors[@armor3_id])
       equip(3, 0)
     end
     unless equippable?($data_armors[@armor4_id])
       equip(4, 0)
     end
   end
 end
 #--------------------------------------------------------------------------
 # * Change Graphics
 #     character_name : new character file name
 #     character_hue  : new character hue
 #     battler_name   : new battler file name
 #     battler_hue    : new battler hue
 #--------------------------------------------------------------------------
 def set_graphic(character_name, character_hue, battler_name, battler_hue)
   @character_name = character_name
   @character_hue = character_hue
   @battler_name = battler_name
   @battler_hue = battler_hue
 end
 #--------------------------------------------------------------------------
 # * Get Battle Screen X-Coordinate
 #--------------------------------------------------------------------------
 def screen_x
   # Return after calculating x-coordinate by order of members in party
   if self.index != nil
     return self.index * 160 + 80
   else
     return 0
   end
 end
 #--------------------------------------------------------------------------
 # * Get Battle Screen Y-Coordinate
 #--------------------------------------------------------------------------
 def screen_y
   return 464
 end
 #--------------------------------------------------------------------------
 # * Get Battle Screen Z-Coordinate
 #--------------------------------------------------------------------------
 def screen_z
   # Return after calculating z-coordinate by order of members in party
   if self.index != nil
     return 4 - self.index
   else
     return 0
   end
 end
end


As for the scripts I have, here they are: I don't think they modify Game_Actors.
Spoiler: ShowHide

  • Valdred's Pre-title Maps

  • ForeverZer0's ATS

  • Mobius Journal

  • game_guy's Item Storage

  • Moving Windows by Fantasist

  • Ring Command Window

  • My Scripts

  • Blizz-ABS + Add-ons + Easy Party Switcher

  • My Scene_Map

  • ForeverZer0's AW & CCTS

  • Ryex's CCMS



Thanks!  :) :D
3
Hahaha, well. I'm a male with fondness of cute things(I still don't understand why dogs are cute though).
4
Thanks for the warm welcome guys. Makes me really happy. :D
5
Oh crap, I wonder why I put that there. O_O
It works now! :D :D

Thanks a bunch KK20, soulshaker3, and LiTTleDRAgo.  :bow:
6
Well, hello guys of CP. I honestly can't believe I forgot to do this when it was supposed to be the first thing I was supposed to do.  :facepalm:

Anyway, I honestly doubt I will be too active even from now on, but so far I have had a great time at Chaos Project. Everyone is such awesome people here and I have yet to encounter any mishaps.

I am very new in participating in forums and all(which is also why I'm not active all that much.) so please do forgive me if I do something off the line. :_):

I'm a novice programmer, but not completely a noob. I've been programming here and there but not really full-time so I don't know a lot.
I honestly appreciate the help I've been getting from people so far, and I would like to say to you and all of Chaos-Project:

Thank you!

8
Here are the scripts I have installed(and are mentioned in order):


Valdred's Pre-title Maps
ForeverZer0's Advanced Title Screen
Mobius Journal
game_guys item storage

Moving windows by Fantasist(pulled from Ryex's CCMS down below)

My own scripts(has the script above along with another one)

Blizz-ABS
-Party HUD Addon
-Secondary Weapon Addon
-Auto-targeting Addon
-Visual Equipment Addon

Blizz's Easy Party Switcher

My Scene_Map(placed here to make use of the input module in Blizz-ABS)

ForeverZer0's Advanced Weather
ForeverZer0's Complete Climate and Time System

Ryex's Collapsing Custom Menu System



I have barely edited the configs of the scripts. Something may have overwritten $game_actors? Though I don't think that's the case. >.> I honestly am so unsure of what's causing the problem that I have no idea what I should try and do to fix it. D:
9
@soulshaker3
Yea, I intend to store the id of the shield slot in a variable and remove it from being equipped after.

@LiTTleDRAGo
This system was meant to open up a menu showing a choice box of "Mainhand" and "Offhand". Which stores the id of whatever item is in the equip slot(either 0 or 1) in variable 10(when 0) or variable 12(when 1). Though before it stores the id of the wep/armor it passes on its value to variable11(when 0) or variable 13(when 1), after which it will unequip it from the actor. The scene_map is to display the icon of whatever is stored in variables 10-13. >.<

The problem happens when I try to use the system and choose "Offhand". It unequips it properly, but it doesn't store the armor1_id in variable 12. Which is why I'm assuming the problem lies with armor1_id. Though I may be wrong.

Sorry if my code is a mess. D:

Edit: I tried using your code but to no avail(I'm not familiar with the error it was spitting out cause of the dispose method).; I also messed around a bit more with the game and tried to use an event to run the script
$game_variables[12] =  $game_actors[1].armor1_id
and it gave me an error saying "NoMethodError ... undefined method 'armor1_id' for [1]:Array"
10
I have a bit of a problem where I presume armor1_id is not initializing properly.
The problem is when I open a menu_scene and press the button on index 1, the game_variables[12] doesn't update to the new one.

If this is too vague I'm sorry.  D:


 ...

 def initialize(menu_index=0)
   @menu_index = menu_index
   @actor = $game_actors[1]
   @scweapon = @actor.weapon_id
   @scarmor = @actor.armor1_id #I believe the problem originates here.
 end

 ...

 def update_sc_command
   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.cancel_se)
     $scene = Scene_Map.new
     return
   end
   if Input.trigger?(Input::C)
     case @swordcondense.index
     when 0
       $game_variables[11] = $game_variables[10]
       $game_variables[10] = @scweapon
       @actor.equip(0,0)
     when 1
       $game_variables[13] = $game_variables[12]
       $game_variables[12] = @scarmor # this won't change $game_variables[12] for some reason
       @actor.equip(1,0)
     end
     $game_system.se_play($data_system.decision_se)
     $scene = Scene_Map.new
     return
 end

     ...


Entire script(I;m probably doing a lot of things inefficiently...):
Spoiler: ShowHide

module DARKCAMPER
 module SWORDSUMMON
   SWORDS ={
     #:key => ["name to appear", weapon_id, armor_id, icon, switch]
     :windsword => ["Hertia", 1, 253, "001-Weapon01.png", 25],
     :earthsword => ["Ryzheus", 2, 254, "002-Weapon02.png", 26]
   }
 end
end

class Scene_Swordcondense
 def initialize(menu_index=0)
   @menu_index = menu_index
   @actor = $game_actors[1]
   @scweapon = @actor.weapon_id
   @scarmor = @actor.armor1_id
 end
 
 def main
   # Variable Declarations
   c1 = "Main-hand"
   c2 = "Off-hand"
   
   # Object Declarations and Initializations
   @swordcondense = Window_Command.new(150, [c1, c2])
   @schelp = Window_Schelp.new
   
   # Configuring the window(s)
   @swordcondense.y = 150
   @swordcondense.index = @menu_index
   
   #Pre-processing
   @spriteset = Spriteset_Map.new
   
   # Processing
   Graphics.transition
   loop do
     Graphics.update
     Input.update
     update
     if $scene != self
       break
     end
   end
   Graphics.freeze
   @swordcondense.dispose
   @schelp.dispose
   @spriteset.dispose
 end
 
 def sc_return(id)
   case id
   # Weapons
   when 1 then return "Hertia"
   when 2 then return "Ryzheus"
   when 3 then return "Fenix"
   when 4 then return "Elena"
   # Armors
   when 253 then return "Hertia"
   when 254 then return "Ryzheus"
   when 255 then return "Fenix"
   when 256 then return "Elena"
   # else
   else return "None equipped."
   end
 end
 
 #Update Methods
 def update
   @swordcondense.update
   sc_text = ""
   
   case @swordcondense.index
   when 0
     sc_text = sc_return(@scweapon)
     @schelp.update(sc_text)
   when 1
     sc_text = sc_return(@scarmor)
     @schelp.update(sc_text)
   end
   
   if @swordcondense.active
     update_sc_command
   end
 end
 
 def update_sc_command
   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.cancel_se)
     $scene = Scene_Map.new
     return
   end
   if Input.trigger?(Input::C)
     case @swordcondense.index
     when 0
       $game_variables[11] = $game_variables[10]
       $game_variables[10] = @scweapon
       @actor.equip(0,0)
     when 1
       $game_variables[13] = $game_variables[12]
       $game_variables[12] = @scarmor
       @actor.equip(1,0)
     end
     $game_system.se_play($data_system.decision_se)
     $scene = Scene_Map.new
     return
   end
 end
end

# Help Window
class Window_Schelp < Window_Base
 def initialize
   super(0,430,640,50)
   self.contents = Bitmap.new(width-32,height-32)
 end
 
 def update(help_text)
   self.contents.clear
   self.contents.draw_text(0, 0, 90, 20, help_text)
 end

end

#Scene_Map Display
class Sword_Condense_Display < Window_Base
 def initialize
   super(604,0,36,100)
   self.opacity = 100
   self.contents = Bitmap.new(width-32,height-32)
   for i in 11..14
     $game_variables[i] = 0
   end
 end
 
 #returns the icon
 def scs_variable_check(variable_id)
   case $game_variables[variable_id]
     when 1
       return DARKCAMPER::SWORDSUMMON::SWORDS[:windsword][3]
     when 2
       return DARKCAMPER::SWORDSUMMON::SWORDS[:earthsword][3]
     else
       return ""
   end
 end
           
 def scs_return_icon_display(slot)
   case slot
     when 1
       return scs_variable_check(10)
     when 2
       return scs_variable_check(11)
     when 3
       return scs_variable_check(12)
     when 4
       return scs_variable_check(13)
   end
 end
 
 def refresh
   self.contents.clear
   reset_variables
   draw_scs_icons
 end
 
 def reset_variables
   @scs_file1 = scs_return_icon_display(1)
   @scs_file2 = scs_return_icon_display(2)
   @scs_file3 = scs_return_icon_display(3)
   @scs_file4 = scs_return_icon_display(4)
   
   @scs_slot1 = RPG::Cache.icon(@scs_file1)
   @scs_slot2 = RPG::Cache.icon(@scs_file2)
   @scs_slot3 = RPG::Cache.icon(@scs_file3)
   @scs_slot4 = RPG::Cache.icon(@scs_file4)
 end
 
 def draw_scs_icons
   self.contents.blt(2,2, @scs_slot1, Rect.new(0,0,32, 32))
   self.contents.blt(2,34,@scs_slot2, Rect.new(0,0,32, 32))
   self.contents.blt(2,66,@scs_slot3, Rect.new(0,0,32, 32))
   self.contents.blt(2,98,@scs_slot4, Rect.new(0,0,32, 32))
 end
 
 def update
   if(@scs_file1 != scs_return_icon_display(1) or
     @scs_file2 != scs_return_icon_display(2) or
     @scs_file3 != scs_return_icon_display(3) or
     @scs_file4 != scs_return_icon_display(4)
     ) then refresh end
 end
end

class Scene_Map
 alias dkc_ss_main main
 alias dkc_ss_update update
 def main
   @scs_display = Sword_Condense_Display.new
   dkc_ss_main
   @scs_display.dispose
 end
end
 
11
@KK20
Thank you. I've been racking my brains figuring out what the array did.. when i tried printing an element it showed a hexadecimal so I was lost.

Thanks!
12
Hello I am using RMXP, and I would like to know how to check who is the current party leader.

I am using Blizzard ABS if that does indeed change anything. I most likely do not have any other script that modifies the default classes for what I am looking for that I am aware of.

I will be using this to create a button that will do something unique when you're using him/her. Unfortunately I dug through the default scripts, googled it, searched through this forum a bit(I apologize if this was already resolved before) but surprisingly I could not find anything. :\

Thank you for your answer in advance!
13
RMXP Script Database / Re: [XP] Blizz-ABS
February 27, 2014, 08:33:15 am
Thank you very much! :D This should enable me to program what I need. :)

14
RMXP Script Database / Re: [XP] Blizz-ABS
February 23, 2014, 09:04:09 am
Hello, I am a beginner scripter and I would like to know how to change the hotkey assignment via scripts in order for me to use them in a custom scene I am creating(and not publishing... probably).

I have found the update_skill method and I see the conditional for the Input. The comments explain what each thing does but I am still a bit clueless. D:
I am quite sure that $game_player.skill_hotkeys is probably the method to change the hotkey, and the (@index+1)%10 thing inside it is which hotkey(though I still have no idea what this means) and it's setting it to the skill where the cursor is pointed at(?)(@skill_window.skill.id)

I have no idea how to work with this. Could I get some advice..? Thank you very much.