Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
815
Reaction score
361
First Language
English
Primarily Uses
N/A
Maliki's Dual Wield MZ



ver 1.0
Introduction:

A release of my Dual Wield Plugin configured for MZ

Features
This plugin allows devs to set weapons as twohanded, disallowing players from equipping weapons to the Off-hand. Also allows for Main or off-hand only weapons.
Enhances traits by specifying main, off(sub), or double grip traits.
Adds an equip "Potential" stat, that can be used when Optimizing equips.

Howto: After installing the plugin, locate any weapon(s) you want to be two-handed in your database and add the tag <twohand> to the weapon's note field. That's it!


Weapons can be designated as off-hand only weapons by placing <shld> in their notebox.


Note that the plugin's file name must not be changed.


(Optional steps as well as detailed instructions can be found in the Help section.)


Plugin Conflicts: There shouldn't be any conflicts with this plugin, however let me know if any are found and I'll try to correct them.


Permissions: This plugin can be used in any project, commercial or otherwise, as long as credit is given.


Download: HERE
 

DMJohn0X

Veteran
Veteran
Joined
Oct 24, 2015
Messages
42
Reaction score
12
First Language
English
Primarily Uses
Does this also change it so you attack twice when dual wielding? Once with the main hand, and again with the off-hand? Because currently even if you dual wield, you only strike the enemy once.
 

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
815
Reaction score
361
First Language
English
Primarily Uses
N/A
Does this also change it so you attack twice when dual wielding? Once with the main hand, and again with the off-hand? Because currently even if you dual wield, you only strike the enemy once.
Current this plugin doesn't do double hits. A way to remedy this is to add a sub trait to all off hand capable weapons adding an attack plus to it. The PC should then attack twice.
 

SpacemanFive

Meteor Mage
Veteran
Joined
Jun 25, 2013
Messages
207
Reaction score
24
First Language
English
Primarily Uses
RMMZ
I'm really glad to see this plugin return for MZ. Thank you!

I also had a question, but I'm not sure if it's too much.
 

DMJohn0X

Veteran
Veteran
Joined
Oct 24, 2015
Messages
42
Reaction score
12
First Language
English
Primarily Uses
Current this plugin doesn't do double hits. A way to remedy this is to add a sub trait to all off hand capable weapons adding an attack plus to it. The PC should then attack twice.

But that double hit would calculate both weapons in the damage though, right? Same as it does currently in the default engine? It would be amazing if this plugin would add double hit and then the first hit only factored in your main hand attack, and the second attack with the offhand.
 

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
815
Reaction score
361
First Language
English
Primarily Uses
N/A
But that double hit would calculate both weapons in the damage though, right? Same as it does currently in the default engine? It would be amazing if this plugin would add double hit and then the first hit only factored in your main hand attack, and the second attack with the offhand.
Ramza's plugin does that.
I don't include it for personal reasons so your options would be to purchase his or use the trait system I have.
 

SpacemanFive

Meteor Mage
Veteran
Joined
Jun 25, 2013
Messages
207
Reaction score
24
First Language
English
Primarily Uses
RMMZ
Glad to hear that! Ask away! All I can say is "no".
It's been a while since I've been more active here, so I'm not sure how reasonable this is. Would it be possible to add functionality for weapons which use ammo in the offhand slot?
 

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
815
Reaction score
361
First Language
English
Primarily Uses
N/A
@SpacemanFive Well, if you intend for the ammo to be consumed automatically, then yes and no...
Let's use a bow and arrows as an example.

You can make the bow a one handed weapon that is a tagged with <mainWeaponOnly>.
And has a trait which allows equipping of Arrow type weapons.
Then create an Arrow type weapon with the tag <shld> which makes it off-hand only.
(You can make it so only the arrows unlock the skills for the weapon combo.)
To make the combo use ammo, you'd have to either find a plugin that does it, or make specific skills do so in the damage formula which isn't perfect, since it will not use ammo if the skill misses.

To do this in the damage formula, try this:

JavaScript:
$gameParty.loseItem($dataWeapons[x], y, true); z,

Where x is the weapon ID in the database, y is the amount and z is the actual damage in the formula.

This is not perfect either because if the arrows can be taken from a different actor's equips if multiple actors have them on at once. (This can be remedied if only one party member can use the equipment.)
Also note that the plugin will not show the amount to ammo the player has. It's not exactly beyond my ability to add, but it's not something I really want to do at the moment.


Hope this helps.
 

SpacemanFive

Meteor Mage
Veteran
Joined
Jun 25, 2013
Messages
207
Reaction score
24
First Language
English
Primarily Uses
RMMZ
@SpacemanFive Well, if you intend for the ammo to be consumed automatically, then yes and no...
Let's use a bow and arrows as an example.

You can make the bow a one handed weapon that is a tagged with <mainWeaponOnly>.
And has a trait which allows equipping of Arrow type weapons.
Then create an Arrow type weapon with the tag <shld> which makes it off-hand only.
(You can make it so only the arrows unlock the skills for the weapon combo.)
To make the combo use ammo, you'd have to either find a plugin that does it, or make specific skills do so in the damage formula which isn't perfect, since it will not use ammo if the skill misses.

To do this in the damage formula, try this:

JavaScript:
$gameParty.loseItem($dataWeapons[x], y, true); z,

Where x is the weapon ID in the database, y is the amount and z is the actual damage in the formula.

This is not perfect either because if the arrows can be taken from a different actor's equips if multiple actors have them on at once. (This can be remedied if only one party member can use the equipment.)
Also note that the plugin will not show the amount to ammo the player has. It's not exactly beyond my ability to add, but it's not something I really want to do at the moment.


Hope this helps.
Ah, thank you! I believe I saw a plugin already that can make skills cost items to use, so I might be able to use that to make ammo work fully. That does help!
 

Nekohime1989

Nekohime
Veteran
Joined
May 31, 2014
Messages
498
Reaction score
227
First Language
English
Primarily Uses
RMMZ
@Maliki79
I cant get this to work.
I get Undefined for the second slot.
Have Dual Wield in my Class Note Tag.
1601018514875.png
 

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
815
Reaction score
361
First Language
English
Primarily Uses
N/A
By chance, did you rename the plugin when saving it? The plugin name must remain
MalMZDualWield.js
 

Frostlord_Icy

Villager
Member
Joined
Jan 16, 2021
Messages
7
Reaction score
3
First Language
English
Primarily Uses
RMMZ
Loving the idea of this plug-in, but I can't seem to get it to work. Not sure if it's because I'm using Yanfly's VisuStella plug-ins or not. I copied and pasted the code into a MalMZDualWield javascript file. But when I go to equip items I get a TypeError this.defensor is not a function.
 
Last edited:

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
815
Reaction score
361
First Language
English
Primarily Uses
N/A
Sorry about that. Leftover code from my personal project.

Try to redownload the plugin. It should work fine now.
 

Frostlord_Icy

Villager
Member
Joined
Jan 16, 2021
Messages
7
Reaction score
3
First Language
English
Primarily Uses
RMMZ
Sorry about that. Leftover code from my personal project.

Try to redownload the plugin. It should work fine now.
Thank you very much. It's working just fine now with the couple items I have it set with. Now just need to tinker with everything so I can hopefully make full use of it.
 

Frostlord_Icy

Villager
Member
Joined
Jan 16, 2021
Messages
7
Reaction score
3
First Language
English
Primarily Uses
RMMZ
Just an interesting update. The only conflict is if this is set below other item changing plugins in the list, they stop appearing in your bags. Or at least for me they did. Moving it up to the top(or near) fixed that little issue. Just wanting to let others know.
 

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
815
Reaction score
361
First Language
English
Primarily Uses
N/A
Good to know!
 

Latest Threads

Latest Posts

Latest Profile Posts

Made the "My Beating Mystery" board today:
3ENFLSC.png

in Grim Trigger episodes 3 & 4, the main characters play a Clue rip-off board game called "My Beating Mystery" (haha), so of course I had to draw the board for it. Can't decide if I wanna add blood or not
Jeez...
I finally decide, after several ppl asking me to, to create a gamethread about project M... And my internet craps out on me halfway through the process :(
making my first game is like trying to stuff all my experience with old games into one
so its slow and painful when i dont get it right... i bet the next game is gonna be finished earlier!
When you don't find any time to work... :kaocry:
First Ten Minutes of my Caretaker inspired game

Forum statistics

Threads
110,401
Messages
1,053,002
Members
143,461
Latest member
fmoviesfmovie2021
Top