Multi Equip V3.1.4

Multi-Equip
Version: 3.1.3


Introduction

This script allows you to configure the equipment slots for each actor or class. This script tweaks the Equip menu to show all stats and changes color depending on the change in stats. Also comes ready merged with my Multi-Attack script.

Screenshots

Yeah just look at Arshes but with two swords Oooh. How about two rings wow.

But Well Here are your screenshots
http://img118.imageshack.us/img118/4578/multiequip1ol8.th.png[/IMG]http://img63.imageshack.us/img63/8103/multiequip2mc3.th.png[/IMG]
http://img292.imageshack.us/img292/140/multiequip3ll9.th.png[/IMG]http://img292.imageshack.us/img292/2576/multiequip4ns3.th.png[/IMG]

Demo

http://www.hbgames.org/forums/downloads.php?do=file&id=8

Script

The families are still sobbing...

Instructions

Okay I am going to make this as clear as possible

Initial Directions
[INDENT]
  1. First Download the Demo via the Download Manager
  2. Get Winzip, Ultimatezip, or some other crazy program to open zip files, and install it.
  3. Find the downloaded file
  4. Right Click on the file and select Extract or Open your Unzipping program and Extract the files from the archive
  5. Open RPG Maker XP if you haven't already
  6. Open the Project File
  7. Copy Each Script from the demo or paste them all into one script and add that, I only have it in multiple script form for organization.
  8. Find the Setup Portion of the Multi Equip Script
  9. Get yourself a snack
[/INDENT]Setup and Customization

Now I am going to explain this a second time, the code in the setup is already commented once with the instructions, but I'm going to explain it again code by code

  1. The Loading of Data System This Line
    $data_system = load_data("Data/System.rxdata")
    Expand to see the code.
    Is one of those "Do Not Touch Lines unless you know what you are doing" lines, but FYI it is used to get the defaults at the end of the setup.
  2.   #--------------------------------------------------------------------------
      # * How Many Weapon Slots Needed (Maximum)
      #--------------------------------------------------------------------------
      Weapon_Slots = 2
    Expand to see the code.
    This is the Maximum Number of weapon slots needed, if you don't set this value correctly you will receive an error (probably a NilClass error)
  3.   #--------------------------------------------------------------------------
      # * How Many Armor Slots Needed (Maximum)
      #--------------------------------------------------------------------------
      Armor_Slots = 6
    Expand to see the code.
    This is the Maximum Number of armor slots needed, if you don't set this value correctly you will receive an error (probably a NilClass error)
  4.   #--------------------------------------------------------------------------
      # * Equip Names For Slots for Actors
      #     syntax - actor_id => [names] or %w( names )
      #--------------------------------------------------------------------------
      Actor_Names = {
      1 => %w( Sword Sword Shield Helm Armor/Plate Ring Ring ),
      2 => %w( Spear Shield Helm Armor/Plate Ring ),
      7 => ['Mace','Hat','Robe','Ring'],
      8 => ['Rod','Hat','Robe','Ring']
      }
    Expand to see the code.
    These are the slot equip names per actor. This is a hash using actor ids as keys and a array of strings as a value. Take the actor ids from the database without leading zeroes, now choose the names of each equip slot now type this (whatever actor id) => %w( name name name name ) or (whatever actor id => ['name', 'name', 'name'] the %w( ) is just a fancy easier way to create an array of strings you don't need the ' ' or " " or commas just use a space to separate elements if you need a space however just type \s
  5.   #--------------------------------------------------------------------------
      # * Equip Names For Slots Classes
      #     syntax - class_id => [names] or %w( names )
      #--------------------------------------------------------------------------
      Class_Names = {
      1 => %w( Sword Sword Shield Helm Armor/Plate Ring Ring ),
      2 => %w( Spear Shield Helm Armor/Plate Ring ),
      7 => ['Mace','Hat','Robe','Ring'],
      8 => ['Rod','Hat','Robe','Ring']
      }
    Expand to see the code.
    See above and subsitute actor_id for class_id and actor with class. I'm not typing all of that again
  6.   #--------------------------------------------------------------------------
      # * Equip Types For Slots
      #     syntax - actor_id = [types]
      #     note - w = weapon an = armor kind n
      #--------------------------------------------------------------------------
      Actor_Types = {
      }
    Expand to see the code.
    This is the Equip Types for each slot. It is setup in the same manner as the Actor_Names and Class_Names except this time you are deciding what can be equipped in each slot. This must correspond to the Slot Names defined. Now if you want to equip a weapon in the slot type w if you want a shield type a1 helmets a2 body armor a3 accessories a4 Hidden feature Other an where n is greater than 4 now I remember a script that lets you configure the database further now if you edit the armor's kind to be another value then maybe you make use of this feature.
  7.   #--------------------------------------------------------------------------
      # * 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 a4 ),
      2 => %w( w a1 a2 a3 a4 ),
      7 => ['w', 'a2', 'a3', 'a4'],
      8 => ['w', 'a2', 'a3', 'a4']
      }
    Expand to see the code.
    See Actor Types replace actor id with class id and actor with class also reread Actor Names and Class Names on the hash setup
  8.   #--------------------------------------------------------------------------
      # * 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}
      }
    Expand to see the code.
    Now Let me tell you something important, the database equipment functions fail with this script added to your project, so you will have to redefine your initial equipment here. Again this is a hash with the actor ids as the key, but the inner values are also hashes as well with their key being the slot id (refer to the Names and Slot types Defined), if you do not define a slot then it is assumed that nothing is equipped in it when you start the game.
  9.   #--------------------------------------------------------------------------
      # * 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}
      }
    Expand to see the code.
    See Init_Equip but replace at the start of game with when battletesting.
  10.   #--------------------------------------------------------------------------
      # * Fixed Equipment
      #     syntax - actor_id => {slot_id => bool}
      #--------------------------------------------------------------------------
      Equip_Fix = {
      }
    Expand to see the code.
    This is the Fixed Equipment Option, again the database equipment functions fail after you add this script, and here you can define which slots are fixed again a hash (see a connection here?) with the actor ids as keys and with the value being another hash with the slot id (refer to Names and Slot Types)
  11. Now Reaching the Do Not Touch Section
      #--------------------------------------------------------------------------
      # * Set Class Types Default to Corresponding words for each slot
      #--------------------------------------------------------------------------
      Class_Names.default = $data_system.words.weapon, $data_system.words.armor1,
      $data_system.words.armor2, $data_system.words.armor3, $data_system.words.armor4
    Expand to see the code.
    Remember that line I pointed out at the beginning well here is where its needed. Its just the lame old Weapon, Shield, Helmet, Body Armor, and Accessory.
  12.   #--------------------------------------------------------------------------
      # * Set Class Names Default to The Normal Five Slots
      #--------------------------------------------------------------------------
      Class_Types.default = %( w a1 a2 a3 a4 )
    Expand to see the code.
    Just the normal five slots here. nothing else.
Sidesteps
[INDENT]I mentioned that the Database's equipment functions fail after adding this script. This means that you can not use the Starting Equipment section in the actor tab in the database, in the battle test menu the Equipment Section, The Event Command Change Equipment, Conditional Branch Section Actor conditions weapon equipped and armor equipped.

Now the first two you can sidestep by the script setup

Now for Changing Equipment use the call script event command
.equip(slot_id, id)
is an instance of Game_Actor (ex $game_party.actors[0], $game_actors[2])
slot_id is the slot id refer to equip slot_types
id is the id of the weapon or armor to equip see slot_types

Now for Conditional Branch Weapon Equipped

Use the Script Condition of the Conditional Branch
.weapon_ids.include?(id)
is an instance of Game_Actor (ex $game_party.actors[0], $game_actors[2])
id is the id of the weapon to check if equipped

Now for Conditional Branch Armor Equipped

Use the Script Condition of the Conditional Branch
.armor_ids.include?(id)
is an instance of Game_Actor (ex $game_party.actors[0], $game_actors[2])
id is the id of the armor to check if equipped
[/INDENT]
FAQ
Awaiting question...

Compatibility

Increased Compatibility with all of my other scripts.
May not be compatible with your CMS, I may merge the two if you ask.
Will be compatible with the next version of Seph's Equipment Skills script. *looks at Seph*
Incompatible with my equipment weights script NOW A PATCH IS INCLUDED
Incompatible with RTAB (don't ask for me to merge)
SDK compliant (don't ask to remove dependancy)
Requires Method and Class Library V1.5 or higher

Credits and Thanks

All Betatesters who tested this script, I forget if anyone tested it *coughRavencough*
Great script!
One minor problem with multi-attack
In the demo, there are two weapon slots
if i equip the bronze sword, but on the second slot, in battle, no damage is inflicted, even though my attack rating is 112.
if i equip the bronze sword, but on the first slot, in battle, it works normally (double-attack), and my attack rating is 112.
is this a bug? or should the player just be wary to equip weapons on the first slot, and not the second?
and also, is it possible to "add" armour (or weapon) slots in game?
for example, lets say you pay 5000 coins and you can equip an extra ring.
I got a little confused in your explanation, so apologies if it's already explained in your instructions
whit this script i can change the number of slot whenever i wont right? Oo
it could be great but how can i change the number?
i need to put 1 weapon slot and other to tipe of slot (armor - accessory) to be change during the game and i need to know what are the script really necessary
i don't need the doble attack or the other script i only need to put 1 weapon and 2 tipe of equipment (like 2 armor and 2 accessory) like now with this script you can put 2 weapon and 2 ring can i know how?

can i make this script indipendent from dhe sdk? becose that script makes crash my own script XD
[QUOTE=boomy;146924]Great script!
One minor problem with multi-attack
In the demo, there are two weapon slots
if i equip the bronze sword, but on the second slot, in battle, no damage is inflicted, even though my attack rating is 112.
if i equip the bronze sword, but on the first slot, in battle, it works normally (double-attack), and my attack rating is 112.
is this a bug? or should the player just be wary to equip weapons on the first slot, and not the second?
and also, is it possible to "add" armour (or weapon) slots in game?
for example, lets say you pay 5000 coins and you can equip an extra ring.
I got a little confused in your explanation, so apologies if it's already explained in your instructions[/QUOTE]

Thanks for the bug report updated script to 2.0.1 due to that

Well no, but you can sidestep this by Changing the class of the actor where the new class has an extra ring slot.

Also the weapons (swords) are set to double hit

What confuses you I spent two hours last night typing all of that making everything as clear as possible, try rereading it look at my examples.

[QUOTE=WiZ`;146968]whit this script i can change the number of slot whenever i wont right? Oo
it could be great but how can i change the number?
i need to put 1 weapon slot and other to tipe of slot (armor - accessory) to be change during the game and i need to know what are the script really necessary
i don't need the doble attack or the other script i only need to put 1 weapon and 2 tipe of equipment (like 2 armor and 2 accessory) like now with this script you can put 2 weapon and 2 ring can i know how?

can i make this script indipendent from dhe sdk? becose that script makes crash my own script XD[/QUOTE]

please use correct grammar/spelling I can hardly understand you

1) the only way that slots can change during game is if you change class and the new class has a different slot setup
2) I SPENT TWO HOURS TYPING ALL OF THIS the least you can do is read
3) Try removing the SDK lines, as I stated (and if you had read) I said not to ask

So please reread the first post, I didn't spend that much time on it for it to be ignored
i'm really sorry trickster X| but i'm not english than my english is orrible @_@ and in the description of the code i can understand only a little XD then... i'm really sorry
i'll try to understand what you've wright XD
Trickster , MY MAN!!!! Nice job. I just wanted to ask you a question pertainning to your wonderful script. Now how would I be able to set up the weapons slots to hold Shields? To elaberate more in the demo I have been trying to set up the weapons slots as "Left Hand" and "Right Hand" I wanted the option of being able to put a weapon in someones left hand and put a shield in their right hand , this would also go viseversa . How do you think I should handle this problem my chum?
[QUOTE=WiZ`;146999]i'm really sorry trickster X| but i'm not english than my english is orrible @_@ and in the description of the code i can understand only a little XD then... i'm really sorry
i'll try to understand what you've wright XD[/QUOTE]

Ok, good :)

[QUOTE=Ultimoore;147056]Trickster , MY MAN!!!! Nice job. I just wanted to ask you a question pertainning to your wonderful script. Now how would I be able to set up the weapons slots to hold Shields? To elaberate more in the demo I have been trying to set up the weapons slots as "Left Hand" and "Right Hand" I wanted the option of being able to put a weapon in someones left hand and put a shield in their right hand , this would also go viseversa . How do you think I should handle this problem my chum?[/QUOTE]

You can't as of now, I was planning on implementing this for version 2.0, but I am still thinking on the best way to go about this.
One question: If I want to add new armor type slots, like adding 'Gauntlets', 'Boots', how can I set them? You may make slots easily, but you need to apply additional armor type to your armors.
Hmm,
Quote:
Now for Changing Equipment use the call script event command
.equip(slot_id, id)
is an instance of Game_Actor (ex $game_party.actors[0], $game_actors[2])
slot_id is the slot id refer to equip slot_types
id is the id of the weapon or armor to equip see slot_types
im getting an error on line 63 as i scroll through the different characters' skill menus with 'Q' and 'W'.
Post the line the error appears on and what type of error. what you said doesn't help me in any way
Well, what I mean is, for example: I made a new armor slot named 'boots'. And I went to database->armors, made an item called 'leather boots'. What I want is, place my new item to 'boots' slot, when equipped. But I have no clue how to do with this script, yet.
This kinda reminds me of what Guillaume777 did with his multi-Equipment script. but your script accounts for different actors. but either way great script none the less.
[QUOTE=Landarma;147928]Well, what I mean is, for example: I made a new armor slot named 'boots'. And I went to database->armors, made an item called 'leather boots'. What I want is, place my new item to 'boots' slot, when equipped. But I have no clue how to do with this script, yet.[/QUOTE]

Can you repeat that. I'm going to respond to what I think you asked


In Slot Names make a slot named Boots
in Slot Types in the corresponding entry be 'a#' where # is the type 1:Shield 2:
Helmet 3: Armor 4: Accessory

that should be it

This was explained in my first post which I spent hours working on :-/
However, that's not enough. You made new slot name, and set new slot type, but how can you assign that new equip type to your new item?(like Bronze sword as Weapon, Fire Ring as Accessory) This is point. For example:
For KGC's, you can make an element tag(which named after new equip slot), and check that, for Guillaume777's, just add (slot number) to your item name to assign equip type. But I have no clue with this, really.
Why didn't you say that earlier?

You can use Yeyinde's data dencrypter for that just set the armor's kind to 1 less than it should be (start at 4 for a new type)

But well I added this to my script, just download the update the Option Armor_Slots is what I added don't have time right now to post new screenshots or to explain how it works (its commented in the demo)
Trickster forced me badly to write this merge. You can now use this lovely script with my Visual Equipment found here.

So erm.. Trickstar happy?

(he tells me he wanted me to, but I can asure you, he FORCED me yeah)
Scripts are the source of all magic...
And magic is hard to learn!

This is ALMOST the script I'm lookin' for, but... How do I make it so that:
1) each weapon only attacks once each
2) if the first attack kills an enemy, the second attack moves on to the next enemy
3) the two Weapon slots are the ONLY slots in the Equip menu.
1) Does this by default make sure you read the instructions for the Multi-Attack part of the script
2) Would require a total rewrite of the script to accomplish
3) See the first post I'm not explaining it again unfortunately
I am extremely sorry, I have no idea what any of the stuff you posted on the first page means. I am very very very very sorry for being such a twerp and I'll hurt myself if it'll make you feel better.

But here's the problem: The weapons automatically attack twice each and I don't know how to change it. I also tried "Armor Slots=0" so I wouldn't have any armor slots but I got an error. Don't worry about my previous 2nd Condition, I'll work around that.

Once again, I am really really really really SORRY for pestering you. Please let me know if there's any way I can make it up to you.
Eh....... excuse me, do you have any plan to add 2-handed weapon feature or any other equip-related features?
First Post wrote:
I am open to suggestions for future versions, if you have something you'd like to say then post and I'll consider it.


Yes, Give me time
I may not have read properly...but I was wondering something...

Is it possible to script it so that it's possible to set that you can either have 2 weapons at the same time or have a weapon and a shield on.

I don't want the setting to be switched back and forth only through an event or call script. I want it to be switched whenever the player wishes to. Like, for example, the hero has a shield and a sword. As soon as the player equips the second sword, the shield comes off.

Is it possible to implement that? I know Guillaume777's script does that...

The problem is...it doesn't work with the 1-scene CMS by Legacy.

That reminds me...does this script work with Legacy's script?

If it doesn't...nevermind then...unless you make it compatible.

Thanks in advance!
Like he said...
Having certain characters/classes able to Dual Wield weapons (effectively removing/replacing the Shield option when you assign the 2nd sword or whatever), or prevent a second weapon if the character cannot dual-wield.
*The coding could prove useful with two-handed weapons as well...

Also, the status menu doesn't reflect the additional weapon/armor slots.
Is it possible to add more slots to a character in-game?
(ie: Arshes starts out not having a shield slot, but gains one at some point in the game)
Ok, so I got the answer to my first question (Thanks DerVVulfman!!! :thumb: )

I'll just have to look deeper into the script.

But...now there is a problem...

Is this script capable of being merged with Legacy's Script? The 1-Scene CMS script?

If it is...can someone please help me with that?

And if not...sorry for the trouble guys...':|
Legacy's CMS is non-SDK if I believe, and this system is SDK.

Now under most circumstances, if you post a non-SDK script UNDER the SDK script itself, you override their functions. So posting a non-SDK Menu system beneath the SDK script will replace/remove the SDK functions and replace them with the Custom Menu's system.

Problem is that adding a "window" system (like a modified equip menu) to a Custom Menu system would normally require the "window" script to be posted below the Custom Menu. That being the case, when you add Legacy's script to the project, the SDK Menu functions will be removed before it even get's to Multi-Equip. If Legacy's script was SDK too, or if Multi-Equip was non-SDK (nope, can't remove the SDK from it)...

EDIT:
In responce to Landarma's post below... oops... Okay, it IS SDK... sorry.
Legacy's CMS is said 'SDK-compatible'. However, since it doesn't use Scene_Save for save screen, so if you want to use any script that adds its own global variables or something to save file with it, you have to edit CMS itself.
I'm a newbie at scripting. However, so far, this is how I understand it.

Legacy's script is compatible with SDK. That should mean that it would not override anything in the SDK script. Correct?

Since it doesn't, it means that the Multi-Equip funtion will still work...theoretically.

However, both the Multi-Equip function by Trickster and the 1-Scene CMS by Legacy change the Window_Equip script (or something like that, i'm not sure of the grammar/terms).

That is where the conflict comes it....I believe anyway.

If everything I said so far is correct...then theoretically, if we change the way the Multi-Equip script modifies the Window_Equip to follow the Window_Equip script that CMS made (or something like that) it should work, right?

I really need to learn more about scripting...

Maybe I'm wrong? I wish I understood better what you guys were talking about ':|

Clearcut Question: Is it possible to merge them? If so, may I request it? If not, what can I do?
[QUOTE=CompletelyAnon;166836]Is it possible to add more slots to a character in-game?
(ie: Arshes starts out not having a shield slot, but gains one at some point in the game)[/QUOTE]

No the slots are fixed if you want them to change then change the actor's class

[QUOTE=dragonade30;167361]I'm a newbie at scripting. However, so far, this is how I understand it.

Legacy's script is compatible with SDK. That should mean that it would not override anything in the SDK script. Correct?

Since it doesn't, it means that the Multi-Equip funtion will still work...theoretically.

However, both the Multi-Equip function by Trickster and the 1-Scene CMS by Legacy change the Window_Equip script (or something like that, i'm not sure of the grammar/terms).

That is where the conflict comes it....I believe anyway.

If everything I said so far is correct...then theoretically, if we change the way the Multi-Equip script modifies the Window_Equip to follow the Window_Equip script that CMS made (or something like that) it should work, right?

I really need to learn more about scripting...

Maybe I'm wrong? I wish I understood better what you guys were talking about ':|

Clearcut Question: Is it possible to merge them? If so, may I request it? If not, what can I do?[/QUOTE]

No the 1-Scene CMS is 1 Scene and I have edits to the Scene_Equip class so no they are not compatible, I will not merge them either. Even though Legacy's CMS is SDK compliant it still breaks compatibility with other scripts by it being 1-Scene

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=14046