Dual wielding in specific combinations

Here's what I want to do:

Certain characters can dual wield, but with two different weapon types. So, for instance, a character might dual wield a knife and a sword. They can equip one of each, but not two of the same kind. If they have a knife and sword equipped, a regular attack results in a strike from both weapons.

From what I've read, dual wielding is kind of bugged anyway, and this is adding a complicated set of conditions on top of that. Can this even be done?

(I'm currently using the Hime Works equip slot scripts, in case that complicates things even further)
I think this is going to require a scripting solution, even if you weren't already using a script, so I'm going to move it over to RGSSx Script Support.


Can you please add a link to the equip slot scripts that you're using so people don't have to search for it to help you?
Yes, of course: currently I'm only using this script to change the number of equip slots certain characters can have.
Someone asked for something like this before and this is the solution I gave


http://forums.rpgmakerweb.com/index.php?/topic/25053-changing-equipment-type-through-weapon-equipment-mostly-for-dual-wield/


However, that was for two different equips, not two of the same.


Ideally it should work even if you're dealing with two of the same, but due to the way the default equip-checking logic works it probably won't.


You might try this


http://www.himeworks.com/2013/04/11/equippable-limits/
Thanks, this is almost exactly what I need.

The only issue is that equipping a weapon now hides all others of that type that are in the equipment menu, and they don't show up until the weapon is unequipped. This makes switching and comparing weapons kind of inconvenient. In your screencaps the disallowed weapon is visible but greyed out. Is there something I'm missing? I wondered at first if the issue only occurred with weapon types, but it seems to happen with specific weapons too. I even tried making a new project using only this script, and the issue still occurs, so it doesn't seem to be any sort of script conflict.

Do you know what might be happening here?
The default scripts hide items that cannot be equipped. I modified that behavior for the purposes of demonstrating what the script does, but I never included that in the script because the script only indicates what can or cannot be equipped, and not how the windows should handle it.
The default scripts hide items that cannot be equipped. I modified that behavior for the purposes of demonstrating what the script does.
Ah! Glad I'm not going crazy... Thanks for the clarification.

Is that modification something you have available as a script?
No but you could probably add something like this somewhere in the script section

Code:
class Window_EquipItem < Window_ItemList  def include?(item)    return true if item == nil    return false unless item.is_a?(RPG::EquipItem)    return false if @slot_id < 0    return false if item.etype_id != @actor.equip_slots[@slot_id]    return true  endend
That seems to work like a charm! Thanks so much for your help!

EDIT: A quick addendum here, in case anyone trying to do the same thing finds this.

Tsukihime's Custom Equip Types script can be used to do this, and bypasses the issue where you can't see/easily switch new weapons. Just make each weapon its own equip type, and give your dual wielders one slot each of the weapons you want them to use. Because each weapon now has a specific slot, you don't have to worry about players equipping the same kind of weapon to both slots.

Thanks again, Hime! One way or another you are solving all my problems today.

Original thread: https://forums.rpgmakerweb.com/threads/dual-wielding-in-specific-combinations.25780/