Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Multi Equip V3.1.4

Status
Not open for further replies.

Tdata

Sponsor

Okay, my new bug is this. I have a BattleMech type suit that my player can put on. It changes him to a new character with the class as Mech. I've tryed to set 5 'hardpoints' to mount weaponry, but even though they are listed as being w3, as i understand you add one to the digit you defined in the hash, but they don't show up. i change them to w2 and they show up but don't equip. What am i doing wrong? Here is the two scripts that i have altered...
Code:
=begin
#==============================================================================
# ●● Multi-Equip + Multi-Attack
#------------------------------------------------------------------------------
# Trickster (tricksterguy@hotmail.com)
# Version 3.1.2
# Date 7/17/07
# Goto rmxp.org for updates/support/bug reports
#==============================================================================
=end
#--------------------------------------------------------------------------
# ● Begin SDK Log
#--------------------------------------------------------------------------
SDK.log('Multi-Equip', 'Trickster', 3.12, '7/17/07')
#--------------------------------------------------------------------------
# Begin SDK Requirement Check
#--------------------------------------------------------------------------
SDK.check_requirements(2.2, [1, 2, 3])
#--------------------------------------------------------------------------
# ● Begin SDK Enabled Check
#--------------------------------------------------------------------------
if SDK.enabled?('Multi-Equip')
  
module Multi_Equip
  #--------------------------------------------------------------------------
  # * Equip Names For Slots for Actors
  #     syntax - actor_id => [names] or %w( names )
  #--------------------------------------------------------------------------
  Actor_Names = {
  1 => %w( Sword Sword Shield Helm Armor/Plate Ring Amulet Head Leg  ),
  2 => %w( Spear Shield Helm Armor/Plate Ring ),
  7 => ['Mace','Hat','Robe','Ring'],
  8 => ['Rod','Hat','Robe','Ring'],
  9 => %w( w2 w2 w2 w2 w2 a8)
  }
  #--------------------------------------------------------------------------
  # * Equip Names For Slots Classes
  #     syntax - class_id => [names] or %w( names )
  #--------------------------------------------------------------------------
  Class_Names = {
  1 => %w( Sword Sword Shield Helm Armor/Plate Ring Amulet Head Leg ),
  2 => %w( Spear Shield Helm Armor/Plate Ring ),
  7 => ['Mace','Hat','Robe','Ring'],
  8 => ['Rod','Hat','Robe','Ring'],
  9 => ['HardPort', 'HardPort', 'HardPort', 'HardPort', 'HardPort', 'Armor']
  }
  #--------------------------------------------------------------------------
  # * Equip Types For Slots
  #     syntax - actor_id = [types] 
  #     note - w = weapon an = armor kind n
  #--------------------------------------------------------------------------
  Actor_Types = {
  }
  #--------------------------------------------------------------------------
  # * Equip Types For Slots
  #     syntax - class_id = [types] or %( types )
  #     note - w = weapon an = armor kind n
  #--------------------------------------------------------------------------
  Class_Types = {
  1 => %w( w w a1 a2 a3 a4 a5 a6 a7 ),
  2 => %w( w a1 a2 a3 a4 ),
  7 => ['w', 'a2', 'a3', 'a4'],
  8 => ['w', 'a2', 'a3', 'a4'],
  9 => %w( w2 w2 w2 w2 w2 a8)
  }
  #--------------------------------------------------------------------------
  # * Initial Equipment
  #     syntax - actor_id => {slot id => equip id}
  #--------------------------------------------------------------------------
  Init_Equip = {
  1 => {0=>1, 2=>1, 3=>5, 4=>13},
  2 => {0=>5, 1=>1, 2=>5, 3=>17},
  7 => {0=>25, 1=>9, 2=>21},
  8 => {0=>29, 1=>9, 2=>21}
  }
  #--------------------------------------------------------------------------
  # * Battle Test Equipment
  #     syntax - actor_id => {slot id => equip id}
  #--------------------------------------------------------------------------
  BT_Equip = {
  1 => {0=>4, 1=>2, 2=>1, 3=>5, 4=>13},
  2 => {0=>5, 1=>1, 2=>5, 3=>17},
  7 => {0=>25, 1=>9, 2=>21},
  8 => {0=>29, 1=>9, 2=>21}
  }
  #--------------------------------------------------------------------------
  # * Fixed Equipment
  #     syntax - actor_id => {slot_id => bool}
  #--------------------------------------------------------------------------
  Equip_Fix = {
  }
  #--------------------------------------------------------------------------
  # * Setup All Default Values (Don't Touch)
  #--------------------------------------------------------------------------
  words = SDK::Scene_Commands::DataSystem.words
  #--------------------------------------------------------------------------
  # * Set Class Types Default to Corresponding words for each slot
  #--------------------------------------------------------------------------
  Class_Names.default = words.weapon, words.armor1, words.armor2, words.armor3, 
  words.armor4
  #--------------------------------------------------------------------------
  # * Set Class Names Default to The Normal Five Slots
  #--------------------------------------------------------------------------
  Class_Types.default = %( w a1 a2 a3 a4 )
end
#--------------------------------------------------------------------------
#  End SDK Enabled Check
#--------------------------------------------------------------------------
end
Code:
=begin
#==============================================================================
# ●● Equipment Types Addon
#------------------------------------------------------------------------------
# Trickster (tricksterguy@hotmail.com)
# Version 1.0
# Date 7/14/07
# Goto rmxp.org for updates/support/bug reports
#------------------------------------------------------------------------------
# This addon adds more Armor kinds and now Adds Weapon kinds so some equipment
# can only be equipped in a certain slot
#------------------------------------------------------------------------------
# Note: For Customization go back to the main Multi-Equip Script and configure
# Actor_Types and Class_Types. You may now use as the values for this
# wn = weapon kind n, an = armor kind n, w = all weapons, a = all armors.
#==============================================================================
=end
#--------------------------------------------------------------------------
# ● Begin SDK Log
#--------------------------------------------------------------------------
SDK.log('Equipment Types Addon', 'Trickster', 1.0, '7/14/07')
#--------------------------------------------------------------------------
# Begin SDK Requirement Check
#--------------------------------------------------------------------------
SDK.check_requirements(2.2, [1, 3], ['Multi-Equip'])
#--------------------------------------------------------------------------
# ● Begin SDK Enabled Check
#--------------------------------------------------------------------------
if SDK.enabled?('Equipment Types Addon')
  
module Multi_Equip
  #--------------------------------------------------------------------------
  # * Weapon_Types
  #   syntax - weapon_id = kind
  #--------------------------------------------------------------------------
  Weapon_Types = {34 => 1,
  36 => 2,
  37 => 2,
  38 => 2,
  }
  #--------------------------------------------------------------------------
  # * Armor_Types
  #   syntax - armor_id = (kind - 1)
  #--------------------------------------------------------------------------
  Armor_Types = {33 => 4,
  35 => 5,
  36 => 6,
  37 => 7,
  }
end

class RPG::Weapon
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :kind
end

class Scene_Title
  #--------------------------------------------------------------------------
  # * Main Database
  #--------------------------------------------------------------------------
  alias_method :trick_multiequip_main_database, :main_database
  def main_database
    # The Usual
    trick_multiequip_main_database
    # Set Default Kind
    $data_weapons.each {|weapon| weapon.kind = 0 if weapon != nil}
    # Run Through Defined Armor Types
    Multi_Equip::Armor_Types.each do |armor_id, kind|
      # Set Kind for armor
      $data_armors[armor_id].kind = kind
    end
    # Run Through Defined Weapon Types
    Multi_Equip::Weapon_Types.each do |weapon_id, kind|
      # Set Kind for weapon
      $data_weapons[weapon_id].kind = kind
    end
  end
end

class Scene_Equip
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    # Get currently equipped item
    item1 = @right_window.item
    # Get Slot
    slot = @actor.slot_types[@right_window.index]
    # Get Type and Kind of Equipment
    type = slot[0..0]
    kind = slot.size > 1 ? slot[1...slot.size].to_i : -1
    # Set Equip
    @item_window.set_equip(type, kind)
    # If right window is active erase parameters for after equipment change
    @left_window.clear_parameters if @right_window.active
    # Get currently equipped item
    item1 = @right_window.item
    # Return if item window isn't active
    return if not @item_window.active
    # Get currently selected item
    item2 = @item_window.item
    # Change Equipment
    last_hp = @actor.hp
    last_sp = @actor.sp
    @actor.equip(@right_window.index, item2 == nil ? 0 : item2.id)
    # Get parameters for after equipment change
    new_str = @actor.str
    new_dex = @actor.dex
    new_agi = @actor.agi
    new_int = @actor.int
    new_atk = @actor.atk
    new_pdef = @actor.pdef
    new_mdef = @actor.mdef
    new_eva = @actor.eva
    # Return equipment
    @actor.equip(@right_window.index, item1 == nil ? 0 : item1.id)
    @actor.hp = last_hp
    @actor.sp = last_sp
    # Draw in left window
    @left_window.set_new_parameters(new_atk, new_pdef, new_mdef, new_str, 
    new_dex, new_agi, new_int, new_eva)
  end
end

class Window_EquipItem
  #--------------------------------------------------------------------------
  # * Set Equip Type
  #--------------------------------------------------------------------------
  def equip_kind=(equip_kind)
    # Return if same
    return if @equip_kind == equip_kind
    # Set new equip kind
    @equip_type = equip_kind
    # Refresh
    refresh
  end
  #--------------------------------------------------------------------------
  # * Set Equip
  #--------------------------------------------------------------------------
  def set_equip(type, kind)
    # Return if same
    return if @equip_kind == kind and @equip_type == type
    # Set New Types
    @equip_type, @equip_kind = type, kind
    # Refresh
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    # Clear Data
    @data.clear
    # Add equippable weapons
    if @equip_type == 'w'
      weapon_set = $data_classes[@actor.class_id].weapon_set
      (1...$data_weapons.size).each do |id|
        if $game_party.weapon_number(id) > 0 and weapon_set.include?(id)
          if $data_weapons[id].kind == @equip_kind or @equip_kind == -1
            @data << $data_weapons[id] 
          end
        end
      end
    end
    # Add equippable armor
    if @equip_type == 'a'
      armor_set = $data_classes[@actor.class_id].armor_set
      (1...$data_armors.size).each do |id|
        if $game_party.armor_number(id) > 0 and armor_set.include?(id)
          if $data_armors[id].kind == @equip_kind - 1 or @equip_kind == -1
            @data << $data_armors[id]
          end
        end
      end
    end
    # Add Blank Item
    @data << nil
    # Make a bit map and draw all items
    @item_max = @data.size
    # If Item count is not 0
    if @item_max > 0
      # If Contents is defined and same height
      if self.contents != nil and row_max * 32 == self.contents.height
        # Clear Contents
        self.contents.clear
      else
        # If Contents is Defined Dispose Contents
        self.contents.dispose unless self.contents.nil?
        # Create Bitmap
        self.contents = Bitmap.new(width - 32, row_max * 32)
        # Set Font Size of Window
        self.contents.font.size = 18
      end
      # Draw Items
      (@item_max-1).times {|i| draw_item(i)}
    else
      # If Contents is Defined Dispose Contents
      self.contents.dispose unless self.contents.nil?
      # Create Bitmap
      self.contents = Bitmap.new(width - 32, height - 32)
    end
  end
end
#--------------------------------------------------------------------------
# ● End SDK Enabled Check
#--------------------------------------------------------------------------
end
 
I think you need to leave the 'w's alone. Apart from the armor, they shold have no numbers next to 'em in your setup. I could be wrong, but if you look at the demo's setup, all the weapons were defined only by 'w'.
 

Tdata

Sponsor

No, having a w means any weapon kind. I'm using it, if it will work, to mount 5 weapons and an armor on my mech class. If I can get it to work, I'll not only have a way to do my augmentation, but a HardPoint System... One that lets me define different types of Hardpoints.
 
@Tdata it should work now
@DerVVulfman - I know you were trying to help and you meant well but if you don't know the answer then it would be better if you didn't post *not trying to be offensive*, thanks for attempting though

Updated to version 3.1.3
Fixes a small bug thanks Mephisto
Fixes an error with the Equipment Types addon thanks Tdata

Updated (Main Script, Non-Hit Addon, and Equipment Types Addon)
 
Sorry to bug you ppl, but this is urgent and I'm not at my pc these few days. Does this script work with SephirothSpawn's Equipment Skills?

(I can already here Trickster drilling me about this question but I have to ask anyway. I'd try it myself if I could :/)
 

Tdata

Sponsor

While i can now equip to my heart's content, I found a new bug. All the attacks either miss or do 0 damge. Every once and a while the last attack will deal damage but it is after maybe 5 attempts...

I'm still having my bug. ^
 
  • Can add 'Cursed' (unremovable) armors and weapons
  • Can make two-handed weapons
  • Can make weapons that deliver multiple strikes
  • Can set up off-hand weapon values #(what this?)
  • Can make fake Equipment (it change if you equip)
  • use Ammo for some Weapons

can you add this or is this added or must i build a patch?
 
Tdata;247490":65tp0k84 said:
While i can now equip to my heart's content, I found a new bug. All the attacks either miss or do 0 damge. Every once and a while the last attack will deal damage but it is after maybe 5 attempts...

I'm still having my bug. ^

Give me time I am already trying to fix it ':|

hanmac;252477":65tp0k84 said:
can you add this or is this added or must i build a patch?

  • Can add 'Cursed' (unremovable) armors and weapons
  • Can make two-handed weapons
  • Can make weapons that deliver multiple strikes
  • Can set up off-hand weapon values #(what this?)
  • Can make fake Equipment (it change if you equip)
  • use Ammo for some Weapons
Blue is already done
Red is what I plan on adding
 
Trickster;146903 said:
Compatibility
...
Incompatible with my equipment weights script NOW A PATCH IS INCLUDED
...
Incompatible with my Equipment Weights system (you can ask for a merge)
yes or no?

@Cursed: i build a little modul, it schould run with yours, with Guillaume777's and without an Equipment script. so you dont think about that.
a little modul is better than a big script (also for others)

PS: in your system: can i have boots or that ever?
 
1#
you said that your script is incompatible with your equipment weights.(2x)
in one sentence you say that you have a patch.
-> so you have 2 sentences:
*One yes you can use
*One no you cant use

2#
i make a modul for curse, so you neednt that in your script (but im not finnish so you think about)

the question is, if you can use more than the Standart 4 Armors (boots at Sample)
 
Yes.


I can't seem to get the weapon types addon to work. When I set Aluxes' second weapon to w1, the equipment messes up, and all the default equipement goes up one notch. By that I mean, the shield (which is in slot 3) will go up to slot 2. And at the end of it, I still can't equip weapon 34 (or whatever weapon you put in there)
 
BrunoTR;252913":tmjnikdc said:
Yes.


I can't seem to get the weapon types addon to work. When I set Aluxes' second weapon to w1, the equipment messes up, and all the default equipement goes up one notch. By that I mean, the shield (which is in slot 3) will go up to slot 2. And at the end of it, I still can't equip weapon 34 (or whatever weapon you put in there)

Please make sure your version is up to date before posting problems it was already fixed -_-

sondance;254467":tmjnikdc said:
the script has an error with the armors elemental set

fix please

I'm not fixing squat if you have to be rude about it. Either be more polite and give me more information or fix it yourself.


Demo updated (Non-Hit Weapons updated to Version 2.0)
 

Vivere

Member

Hi, I decided to switch from the other multi-equip script to this one because I kept getting what I assumed was compatibility errors while using it, but now I'm getting errors with this one, and I don't know enough about scripts to understand what it means, and I'm not even really sure I have it set up right yet...Of the extra things included in the demo, I am using Seph's Multi Damage, Multi-Attack, Colored Damage Addon, and Equipment Types Addon...but anyway, here's the error I'm getting:

Script'Equipment Types Addon'line 88: NoMethodError occurred.
undefined method `set_equip' for nil:NilClass

which is this:

@item_window.set_equip(type, kind)

and the other scripts and addons I have are:

sdk 2.2 1-4, macl 2.0, Moghunter's (Scene Equip, Scene Item, Scene Shop, MPW Map_Name, Scene File, MPW Treasure Name, Scene End, Scene Game Over, Scene Title, Scene Skill, Scene Status, Scene Menu), Trickster Active Timer CBS and all stuff that comes with it, DerVVulfman's Animated Battlers, and Battle Report (FF style one).

Thanks in advance for the help, and sorry to waste your time if this error is the cause of me not understanding the instructions completely.
 
Status
Not open for further replies.

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top