Equipping the dual wield slot

I'm unable to figure out how to equip something to a character's 2nd weapon slot via eventing or script calls. If you use the event command to equip a weapon twice, it will just keep swapping out the first weapon and never equip the second one. You can't select a weapon to equip in the shield slot, and when I tried something like $game_actors[x].equip[1]=17, trying to equip item 17 in the 1 slot (which should be the shield/off hand slot), it doesn't work. It seems that the issue is that the engine basically gives a character two 0 slots, but no way to actually differentiate which is which.


Basically, what I'm trying to do is unequip a character of both weapons who has the dual wield trait (which I haven't been able to do, I can only unequip the main weapon - in fact, if I try to unequip a shield, it removes their dual wield flag and gives them a shield slot), then re-equip them with two weapons. I don't want to get any scripts if I can help it, or at least none of the larger ones that change any functionality. I don't want my dual wield character to be able to equip shields or anything in their off hand slot, I want them to just have the two weapon slots. I'm not looking to add 2-hander functionality to the game. I'm not looking to modify the existing structure of the system if I can help it - but I can't figure out how in the world to force-equip or force-remove something in the second weapon slot for any character with the dual wield flag.


EDIT: Just figured it out. Was browsing through the game_actor section of Game Objects for the change equip commands and came across change_equip_by_id(slot_id, item_id). If I do a script call like,

Code:
$game_actors[x].change_equip_by_id(1, 15)
	$game_actors[x].change_equip_by_id(0, 16)

then it will properly equip weapons to both weapon slots. I can also de-equip those slots by using 0 for the item_id.
So, I dont know if I'm doing this wrong, but Ive tried this, literally 20 times and I cant seem to get it to work to save my life. When I try to run the script command from the event, it just does nothing. Ive replaced the x with the actor number and changed the item ID to 0 but it wont de-equip any weapons on my dual wielding character. Its really frustrating that I cant seem to get this to work. I dont know what Im doing wrong
That should only happen if the slot is locked. Do you have the settings on the actor tab to seal the slot or fix equipment?
Did you use a command to fix equipment to the slot?
Did you set the weapon to seal slot?

I tested that code and it works fine.
What engine are you using?
Code:
$game_actors[x].change_equip_by_id(1, 15)
$game_actors[x].change_equip_by_id(0, 16)

$game_actors[x].change_equip_by_id(1, 0)
$game_actors[x].change_equip_by_id(0, 0)
In your editor, get that Actor's page on the screen. In the right hand column, under "Features", double click a line. go to the Equip Tab and click Slot type. Select Dual Wield.

Then, click on the next line below that and Select Weapon tab. Select Equip Weapon. Choose what you want your 2nd weapon to be.

Original thread: https://forums.rpgmakerweb.com/threads/equipping-the-dual-wield-slot.61211/