Dual wielding in specific combinations

Amazoness!

Rank amateur
Member
Joined
Feb 28, 2014
Messages
15
Reaction score
0
First Language
English
Primarily Uses
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)
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
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?
 

Amazoness!

Rank amateur
Member
Joined
Feb 28, 2014
Messages
15
Reaction score
0
First Language
English
Primarily Uses
Yes, of course: currently I'm only using this script to change the number of equip slots certain characters can have.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Last edited by a moderator:

Amazoness!

Rank amateur
Member
Joined
Feb 28, 2014
Messages
15
Reaction score
0
First Language
English
Primarily Uses
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?
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
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.
 
Last edited by a moderator:

Amazoness!

Rank amateur
Member
Joined
Feb 28, 2014
Messages
15
Reaction score
0
First Language
English
Primarily Uses
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?
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
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
 
Last edited by a moderator:

Amazoness!

Rank amateur
Member
Joined
Feb 28, 2014
Messages
15
Reaction score
0
First Language
English
Primarily Uses
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.
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,072
Members
137,578
Latest member
JamesLightning
Top