Fomar0153 121 Posted December 19, 2011 (edited) Custom Equipment Slots Version 1.2 by Fomar0153 Introduction Allows you to define custom equipment slots to characters, including the ability to add entirely new slot types. Features + Can add multiple types of the same slot, e.g. 3 accessories. + Can have unique slots. Screenshot How to Use Instructions are in the script. Script The most update version of this script can always be found on my blog. Direct Link. F.A.Q. No questions asked. Credits and Thanks Fomar0153 Author's Notes This is the update I had planned for a while. The script is now implemented in a much sleeker fashion and it much more compatible. Edited February 8, 2012 by Fomar0153 3 Shadow Fox, KillerKooK and Darkanine reacted to this Share this post Link to post Share on other sites
Rosenblack 79 Posted December 19, 2011 Nice one, *Added to the Master Script List* Share this post Link to post Share on other sites
DasMoony 10 Posted December 19, 2011 (edited) Okay... I had written a full great formatted answer pointing out all stuff and problems I occur and when I wanted to post it said I'm not logged in T_T So here I go again a bit shorter q.q I can't get this one to work :/ I don't know in your screen it works, so I'm not sure if its me who fails or if there are some bugs I encountered^^' But messing around with puts and trying to be logic it leads me to the 2nd conclusion. On line 61/62 you check item.atype_id...i guess that's why the game will crash with the error that item doesn't have a method atype_id, when I try to equip a weapon. (if I make use of etype instead of atype it works well) Also a soon as I want to select something in an additional slot (even if it's an already existing type like accesory) the game crashes on line 199 of Game_Actor since the object there seems to be nil. I don't know much about the equip processing yet, so I can't tell you what's going on there exactly. About the third problem encountered...I'm pretty sure it will be solved once the others two are. It's about optimizing the equipment. It crashes and I guess it's because of the other two problems. I'd love to get this one running T_T so I'd be happy if you find a way to fix this problems Oh, and I don't know, but maybe it's a nice feature for this script if it would be possible to assign some equip slots to some actors or classes only respective seal them. Edited December 19, 2011 by DasMoony Share this post Link to post Share on other sites
Fomar0153 121 Posted December 19, 2011 On line 61/62 you check item.atype_id...i guess that's why the game will crash with the error that item doesn't have atype_id when I try to equip a weapon. (if I make use of etype instead of atype it works well) Also a soon as I want to select something in an additional slot (even if it's an already existing type like accesory) the game crashes on line 199 of Game_Actor since the object there seems to be nil. I don't know much about the equip processing yet, so I can't tell you what's going on there exactly. About the third problem encountered...I'm pretty sure it will be solved once the others two are. It's about optimizing the equipment. It crashes and I guess it's because of the other two problems. I'd love to get this one running T_T so I'd be happy if you find a way to fix this problems Oh, and I don't know, but maybe it's a nice feature for this script if it would be possible to assign some equip slots to some actors or classes only respective seal them. Whoops, line 61 should have been if item.is_a?(RPG::Armor) As for the second error what did you do to trigger it? How are you loading the script aswell? As for optimisation I think the first error caused that so I think that fixed it. I'll post a walk through of how to set this up so different characters have different equipment slots in due course. For now I'd like to try and fix that second error. Share this post Link to post Share on other sites
DasMoony 10 Posted December 19, 2011 So... I solved problem Number 2 and now is working everyhting fine. Your question aboutthe loading of the script gave me the solution. It's kind of embarassing what the fault was Currently I experiment most times only with several code snippets and until now I never had a problem when loading them as external files after the game started^^' Yaay, I'm looking forward to the character-exclusive slots Share this post Link to post Share on other sites
Fomar0153 121 Posted December 19, 2011 Ah good to hear I'll update the script in the first post in a minute. Anyway here's the tutorial I promised. Part 1: How to set up the script. First you need to add an armour type for the new slot (in Terms in the database). Note: Cannot be 1-4. Also note that Spell Tomes is Armor Type 7 Next when creating new pieces of this armour type make sure you select the correct armour type and make sure the characters have the trait allowing them to equip them. Next you will need to fill in a little bit of code. The 7 refers to the same 7 in the armor type box in the first picture. Finally you need to set up what slots are available to each character. Part 2: Setting up for individual characters/classes This section will require some scripting though not a great deal. Firstly an example of individual character equipment slots: def equip_slots case @actor_id when 1 # First character in the database return [0,0,2,3,4,4,4,7] if dual_wield? return [0,1,2,3,4,4,4,7] when 2 # First character in the database return [0,0,2,3,4,4,4] if dual_wield? return [0,1,2,3,4,4,4] end end Or if you're using my Unique Classes script then you can do something like this: class Game_BlueMage < Game_Actor def equip_slots return [0,0,2,3,4,8,8,8] if dual_wield? return [0,1,2,3,4,8,8,8] end end Which would just affect the blue mages in the party. Hope that helps. 1 DasMoony reacted to this Share this post Link to post Share on other sites
Kite 6 Posted January 6, 2012 (edited) great script! small and really easy to customize!!! grats! Edited January 6, 2012 by Kite 1 Fomar0153 reacted to this Share this post Link to post Share on other sites
Bernkastel 0 Posted January 7, 2012 Is there a way to make it where you get extra slots depending on the armor you have on? In Phantasy star online, armor had a random chance to have 0-4 slots, the slots let you equip addons that give minor stat boosts. (this isnt a request for randomly generated loot, this is a question about if the custom slots can somehow be controlled in this way) Share this post Link to post Share on other sites
Fomar0153 121 Posted January 7, 2012 great script! small and really easy to customize!!! grats! Thanks Is there a way to make it where you get extra slots depending on the armor you have on? In Phantasy star online, armor had a random chance to have 0-4 slots, the slots let you equip addons that give minor stat boosts. (this isnt a request for randomly generated loot, this is a question about if the custom slots can somehow be controlled in this way) Don't worry as Fomar0153 I know exactly what you mean. I shall look into it. 1 Bernkastel reacted to this Share this post Link to post Share on other sites
Oda 2 Posted January 9, 2012 I don't know if is my fault or script fault, but when I equip a L.Habilidad(Spell Tome), it dissapears!!! Nothing is equipped and the item is gone T__T(Sorry for the spelling, but I'm Spanish) Share this post Link to post Share on other sites
Fomar0153 121 Posted January 9, 2012 I don't know if is my fault or script fault, but when I equip a L.Habilidad(Spell Tome), it dissapears!!! Nothing is equipped and the item is gone T__T(Sorry for the spelling, but I'm Spanish) Odd could you post the script so I can just check you've set it up correctly and what other scripts do you have incase it is a compatibility issue? Share this post Link to post Share on other sites
Oda 2 Posted January 9, 2012 This is the script, the notes are translated because is more easy for me to read... =begin Custom Equipment Slots Script by Fomar0153 Version 1.1 ---------------------- Notas ---------------------- No requiere nada Permite cambiar la pantalla de equipaje agregando más opciones e.g. Agrega nuevas ranuras o pones más equipos predeterminados, como 3 accesorios ---------------------- Instrucciones ---------------------- Debes editar 2 secciones que están por la parte de arriba del script estas son: Slots[7] = "Spell Tomes" return [0,0,2,3,4,4,4,7] if dual_wield? Y sigue las instrucciones de sus respectivas partes. ---------------------- Change Log ---------------------- 1.0 -> 1.1 : Se ha reparado un bug cuando equipabas una arma. ---------------------- Known bugs ---------------------- Nada =end #-------------------------------------------------------------------------- # ◠New Module Extra_Slots #-------------------------------------------------------------------------- module Extra_Slots Slots = [] # Edita aqui para agregar nuevas ranuras. # Slots[iD de Tipo de armadura] = "nombre" # Se que está el nombre en la database, pero creo que no se puede llegar # ha este nombre por los Vocablos Slots[7] = "L.Habilidad" end class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # ◠Rewrites equip_slots #-------------------------------------------------------------------------- # Edita aqui para elegir las ranuras a tus aliados # 0 - Arna # 1 - Escudo # 2 - Cabeza # 3 - Cuerpo # 4 - Accesorio # 5+ Ranuras personalizadas def equip_slots return [0,0,7,2,3,4,4] if dual_wield? return [0,1,7,2,3,4,4] end #-------------------------------------------------------------------------- # ◠Rewrites change_equip #-------------------------------------------------------------------------- def change_equip(slot_id, item) return unless trade_item_with_party(item, equips[slot_id]) if item == nil return if item && equip_slots[slot_id] != item.etype_id else if item.is_a?(RPG::Armor) if Extra_Slots::Slots[item.atype_id] == nil return if item && equip_slots[slot_id] != item.etype_id else return if item && equip_slots[slot_id] != item.atype_id end else return if item && equip_slots[slot_id] != item.etype_id end end @equips[slot_id].object = item refresh end #-------------------------------------------------------------------------- # ◠Rewrites release_unequippable_items #-------------------------------------------------------------------------- def release_unequippable_items(item_gain = true) @equips.each_with_index do |item, i| if !equippable?(item.object) || item.object.etype_id != equip_slots if item.is_armor? unless Extra_Slots::Slots[equip_slots] == nil unless item.object.atype_id == equip_slots trade_item_with_party(nil, item.object) if item_gain item.object = nil end else trade_item_with_party(nil, item.object) if item_gain item.object = nil end else trade_item_with_party(nil, item.object) if item_gain item.object = nil end end end end end class Window_EquipSlot < Window_Selectable #-------------------------------------------------------------------------- # ◠Rewrites slot_name #-------------------------------------------------------------------------- def slot_name(index) if @actor.equip_slots[index] >= 5 Extra_Slots::Slots[@actor.equip_slots[index]] else @actor ? Vocab::etype(@actor.equip_slots[index]) : "" end end end class Window_EquipItem < Window_ItemList #-------------------------------------------------------------------------- # ◠Rewrites include? #-------------------------------------------------------------------------- def include?(item) return true if item == nil return false unless item.is_a?(RPG::EquipItem) return false if @slot_id < 0 if item.is_a?(RPG::Armor) if Extra_Slots::Slots[item.atype_id] == nil return false if item.etype_id != @actor.equip_slots[@slot_id] else return false if item.atype_id != @actor.equip_slots[@slot_id] end else return false if item.etype_id != @actor.equip_slots[@slot_id] end return @actor.equippable?(item) end end class Scene_Equip < Scene_MenuBase #-------------------------------------------------------------------------- # ◠Aliases create_slot_window #-------------------------------------------------------------------------- alias custom_slots_create_slot_window create_slot_window def create_slot_window custom_slots_create_slot_window @slot_window.create_contents @slot_window.refresh end #-------------------------------------------------------------------------- # ◠Aliases on_actor_change #-------------------------------------------------------------------------- alias custom_slots_on_actor_change on_actor_change def on_actor_change custom_slots_on_actor_change @slot_window.create_contents @slot_window.refresh end end Well, I use YEA menu system without the equip scene because your equipskill system doesn't shows correctly. Emm...Nothing that modify equip scene or scenes in general. I think the error is a bad configuration. Share this post Link to post Share on other sites
Fomar0153 121 Posted January 9, 2012 That worked fine for me. Does it work for you in a new project? If yes link me to the scripts you are using. Share this post Link to post Share on other sites
Oda 2 Posted January 10, 2012 Okay Man, I give up with this xD. I'll use Shields like SpellTome =P! Well, thanks anyway. Share this post Link to post Share on other sites
DJPrichard 3 Posted January 25, 2012 First of all I want to say thanks to script author, this is good script, it allows me to add what I want (despite the fact I need to change my ideas a bit), only thing I found bit annoying is, for example I want to give my character ability wear, lets say 8rings. This means I need to make 8 new armor types, ring1 and ring2 and so on. This means I can’t just allow player wear all rings in combinations he/she wants, so the player could mix up what ever he/she wants. And that is kind a limiting players freedom from ability to choose what he/she wants, to few combinations that is given already by me. Also when editing items at database I have to set which ring will be at 1st or 2nd armor type. And that’s kind a frustrating, cause I don’t want to set all rings in different types, better would be if all 8 rings could stay under 1 armor type. So I'm just saying, (I don’t know if isn’t already such script allowing player wear many same type items in combinations he/she wants) isn’t there a way how to make this script works different? I would really like to see player’s excitement when character is wearing massive amount of the same type armors, cause this way he could discover new things/make super strong character and so on. Share this post Link to post Share on other sites
Fomar0153 121 Posted January 25, 2012 First of all I want to say thanks to script author, this is good script, it allows me to add what I want (despite the fact I need to change my ideas a bit), only thing I found bit annoying is, for example I want to give my character ability wear, lets say 8rings. This means I need to make 8 new armor types, ring1 and ring2 and so on. This means I can’t just allow player wear all rings in combinations he/she wants, so the player could mix up what ever he/she wants. And that is kind a limiting players freedom from ability to choose what he/she wants, to few combinations that is given already by me. Also when editing items at database I have to set which ring will be at 1st or 2nd armor type. And that’s kind a frustrating, cause I don’t want to set all rings in different types, better would be if all 8 rings could stay under 1 armor type. So I'm just saying, (I don’t know if isn’t already such script allowing player wear many same type items in combinations he/she wants) isn’t there a way how to make this script works different? I would really like to see player’s excitement when character is wearing massive amount of the same type armors, cause this way he could discover new things/make super strong character and so on. Just set the rings as the same type? e.g. module Extra_Slots Slots = [] # Edit here to add new slot types # Slots[armour_type_id] = "name" # I know it is named in the database but I don't believe you can access # that name through Vocab Slots[7] = "Rings" end class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # ◠Rewrites equip_slots #-------------------------------------------------------------------------- # Edit here to change what slots are available to your characters # 0 - Weapon # 1 - Shield # 2 - Head # 3 - Body # 4 - Accessory # 5+ a custom slot def equip_slots return [0,0,2,3,4,7,7,7,7,7,7,7,7,7] if dual_wield? return [0,1,2,3,4,7,7,7,7,7,7,7,7,7] end Share this post Link to post Share on other sites
DJPrichard 3 Posted January 26, 2012 Ty, I woke up last night with the same idea, sorry, my bad, this script is perfect. Share this post Link to post Share on other sites
+ Shadow Fox 5 Posted January 30, 2012 Is there a way for this script to allow 2 handed weapons? Share this post Link to post Share on other sites
Fomar0153 121 Posted January 30, 2012 (edited) Is there a way to make it where you get extra slots depending on the armor you have on? In Phantasy star online, armor had a random chance to have 0-4 slots, the slots let you equip addons that give minor stat boosts. (this isnt a request for randomly generated loot, this is a question about if the custom slots can somehow be controlled in this way) Haven't forgotten, I keep toying with the idea of making this script use note tagging as it would make the script much nicer and increase compatibility. But it would mean having to rewrite the slots add-on. It'll happen at some point. Is there a way for this script to allow 2 handed weapons? This script doesn't alter the method of creating two handed weapons. As far as I'm aware they should work as they always do. Edited January 30, 2012 by Fomar0153 Share this post Link to post Share on other sites
PurpleXCompleX 1 Posted February 3, 2012 Well, a Example: You Equpped a +2 Defense Shoe and if you try to replace that Item with a +1 Defense Shoe it will say in the Description, that that item is +1 Defense better that the another one. It's okay, it's just a Visual Bug, i think. Also: Equip Best won't work with these Slots and Remove All Equips (Unequip all) caused to delete the Extra Slot Items, the Actor was wearing. Share this post Link to post Share on other sites
Fomar0153 121 Posted February 3, 2012 Well, a Example: You Equpped a +2 Defense Shoe and if you try to replace that Item with a +1 Defense Shoe it will say in the Description, that that item is +1 Defense better that the another one. It's okay, it's just a Visual Bug, i think. I don't understand. Also: Equip Best won't work with these Slots and Remove All Equips (Unequip all) caused to delete the Extra Slot Items, the Actor was wearing. I'll fix these when I do the next version of the script. Share this post Link to post Share on other sites
+ Shadow Fox 5 Posted February 5, 2012 (edited) I have noticed that with this script when you create several more armour types, like boots, gloves, belts and cloaks... that type of thing. It does not show in the status screen within the main menu. Is there a script add-on that will show the armour types (and the equipped armour) created by this script in the status screen within the main menu? If not, then may I get instructions on how to modify the status section of the main menu to show the extra armour types that is created by this script? Edited February 5, 2012 by Shadow Fox Share this post Link to post Share on other sites
Fomar0153 121 Posted February 8, 2012 Updated to version 1.2. It should be much more compatible for example you should no longer require the compatibility patch when using either version of my equipment skills script. Also Optimise and Remove All should now work properly. The status screen will now show all equipment but if you use too many slots then it will begin clashing with the character description. Current plans: I might need to update my two equipment skills scripts, I've had a bug report that I need to investigate. After which I will begin looking into equipment adding more equipment slots. 1 Emerald reacted to this Share this post Link to post Share on other sites
Emerald 42 Posted February 8, 2012 Lol @ the changes you made.. Now I'm gonna like this script even more Share this post Link to post Share on other sites
Fomar0153 121 Posted February 19, 2012 To all the people whose belief that I would actually get around to making equipment add further slots was dwindling, it is done. http://cobbtocs.co.uk/wp/?p=132 New Add-On released: Additional Equipment Slots You can attach slots to equipment and then fill them up with even more equipment. Share this post Link to post Share on other sites