roninator2 257 Posted February 13, 2017 Hello everyone. Is there someone with more knowledge on scripts to help with this question? I have an armor that I want removed from the actors equipment. I did not see a way in the default editor settings (Page 1, 2 or 3) to remove equipment, instead it lets you change it. While changing it to nothing may work the problem is that the armor is not one of the 5 categories for equipment. From other sites http://www.rpgmakercentral.com/topic/23954-how-to-add-or-remove-equipment-of-actor-with-a-script-call/ I was able to piece together this - $game_actors[1].remove_equip(1, $data_armor[275]) I'm sure it will not work as the slot (1) is not the correct one and the armor to remove is a slotted item. Which can be slotted into any weapon or armor. So specifying a slot will not work. I am using BlackMorning VK Equip script to have 11 equipment categories. And the slotted item is VE Materia. There is no problem with the scripts therefor I should not need to put the links here. How can I remove the specific armor when it can be attached to any slot, but not actually in a slot? - $game_actors[1].remove_equip($data_armor[275]) Would that work by not specifying a slot? Ideas? Thanks Share this post Link to post Share on other sites
roninator2 257 Posted March 24, 2017 Well I setup a scene to try this. (Sad that nobody has suggested anything). I get an error "undefined method '[]' for nil:NILclass" not suer if it's for the first [1] or the second [275] Share this post Link to post Share on other sites
dinhbat3 57 Posted April 10, 2017 Soooo.. I am not entirely sure if I understood your request and also not sure if you solved this, but thought I'd try to help. I am not a scripter myself, but there are ways around without too much scripting. Assuming you are running this via an event, I would go about it this way: 1. Run a conditional check to see if the item is in an actors item slot first: $game_actors[x].equips[y].id == 275 ​ - x is actor ID - y is the slot ID (weapon = 0, shield = 1, etc) ​ - 275 is the ID of the item you want removed ​2. If it is true, have it remove the item. ​$game_actors[x].remove_equip(y, $data_armor[275]) - x is actor ID - y is the slot ID (weapon = 0, shield = 1, etc) ​ - 275 is the ID of the item you want removed This method however is most effective when the equipment is only equip-able by one or a small number of possible actors and you don't have TOO many equipment slots to check. It's not the most efficient I'm sure, but it should work. Hope this helps! ~ Dinhbat3 Share this post Link to post Share on other sites
roninator2 257 Posted May 19, 2017 I kind of left this, as it doesn't seem to be possible. While what you suggest may work in certain circumstances, it would not work in my case. The issue is the materia script, it is armor items that you equip on top of other armor that you have equipped, but the materia could also be on a weapon. With myself having 11 equipment slots also presents a challenge. I can only see what you suggested working if I was to use multi layered conditional branches to check all slots and then recording those slots to run the command to remove armor. And I have 18 actors. Plus the item would only get removed under certain conditions in battle. And I don't think I could specify an armor slot on top of another armor slot to remove. All put together, it's not really worth the effort for one thing. So I removed that materia from my game. Not going to try. Thanks though. Share this post Link to post Share on other sites