Shiro1994

Veteran
Veteran
Joined
Aug 1, 2015
Messages
30
Reaction score
6
First Language
German
Primarily Uses
RMMZ
Hello!


I would like to create a class which can use bows (two-handed weapon) and also daggers/swords/axes (one-handed weapons).


The problem is, if I use the dual wield tag the character can also carry two bows. I want to prevent this.  


The other issue: Swords & Axes are also used by other classes and they should only be able to equip those 2 types once. (So I cannot tag the weapon itself with dual-wield)


I am using a lot of Yanfly's plugins so it's very likely that I run into compatibility issues if I use other plugins. Is there a way to accomplish this with the help of Yanfly's plugins? Or is there a trick?


Thank you very much for your help in advance.
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,853
Reaction score
5,424
First Language
English
Primarily Uses
RMVXA
I haven't used Yanfly's Equip scripts (yet), but by looking through them my instinct is that you could probably pull this off using some combination of Equip Core and Equip Requirements - use Lunatic Mode checks to determine whether or not a certain type of equipment is already present on the actor.
 

Shiro1994

Veteran
Veteran
Joined
Aug 1, 2015
Messages
30
Reaction score
6
First Language
German
Primarily Uses
RMMZ

Shiro1994

Veteran
Veteran
Joined
Aug 1, 2015
Messages
30
Reaction score
6
First Language
German
Primarily Uses
RMMZ
Okay, I'm at a loss.

I know I have to use this code from Equip Requirements (http://yanfly.moe/2016/02/27/yep-75-equip-requirements/)

<Custom Equip Requirement Condition>
if (user.name() === ‘Harold’) {
condition = true;
} else {
condition = false;
}
</Custom Equip Requirement Condition>


So I think I have to put this in every weapon which can be used by my class (Adventurer [class id: 8] in this case).


I think it has to look something like that, but I don't have experience in this:

<Custom Equip Requirement Condition>
if (user.class() === ‘Adventurer’) {
condition = true;
}
</Custom Equip Requirement Condition>


And now I have to add "dual wield" to this command, but how?


After that, it should grant the class Adventurer the ability to be dual wield if it equips this weapon so it can equip another weapon. I suppose...


However I think the next problem would be, if someone equips a sword/dagger/axe with this condition then they could equip a bow in the off hand.


Has anyone an idea for this problem and knows how I can add the dual wield command to this above-mentioned code?


Edit: I could also give the class the dual wield and then lock it if it uses a bow. But still, I don't know how I can add the command/trait "disable dual wield" :/
 
Last edited by a moderator:

BlackBoxx

Villager
Member
Joined
Jun 13, 2016
Messages
14
Reaction score
1
First Language
English
Primarily Uses
This should be doable without the use of plugins.  You can add the dual wield trait (and any weapon equip options) to any class you wish.  If the player switches classes, they will lose that ability.  Or, you could attach the trait to a permanent state and add/remove it as conditions change.  As for two-handed weapons, you have the right idea.  Just add an equip slot seal trait to each two-handed weapon and it will automatically remove items equipped in the shield slot, including dual wield weapons.


So basically:


-add the dual wield trait to classes, not weapons


-add an equip slot seal to weapons you want to be two-handed


That really should be all you need to do.
 

Shiro1994

Veteran
Veteran
Joined
Aug 1, 2015
Messages
30
Reaction score
6
First Language
German
Primarily Uses
RMMZ
This should be doable without the use of plugins.  You can add the dual wield trait (and any weapon equip options) to any class you wish.  If the player switches classes, they will lose that ability.  Or, you could attach the trait to a permanent state and add/remove it as conditions change.  As for two-handed weapons, you have the right idea.  Just add an equip slot seal trait to each two-handed weapon and it will automatically remove items equipped in the shield slot, including dual wield weapons.


So basically:


-add the dual wield trait to classes, not weapons


-add an equip slot seal to weapons you want to be two-handed


That really should be all you need to do.





 






 







 

Yes, I added dual wield to my classes but if you add dual wield to the class, it has 2x type: "weapon" and if I add "seal equip: off-hand/shield" then there will be no effect because this equip type was replaced by the type "weapon" and when I say "seal equip: weapon" then you cannot equip the weapon anymore.


I need something that disables the second weapon slot when I use a bow/two-handed weapon. :/


Edit: I also tried to switch back from "dual wield" to "normal" when a bow is equipped but it doesn't work, I think the program handles classes > weapon for this case.
 
Last edited by a moderator:

BlackBoxx

Villager
Member
Joined
Jun 13, 2016
Messages
14
Reaction score
1
First Language
English
Primarily Uses
Oh, right.  Dual wield changes it to another weapon slot.  Been a while since I made a dual wielding character and just plain forgot.  My bad.
 

Shiro1994

Veteran
Veteran
Joined
Aug 1, 2015
Messages
30
Reaction score
6
First Language
German
Primarily Uses
RMMZ
I don't get it.

I tried to do it the other way round: Since I cannot change the class' property from dual wield to "normal" again I tried to set all classes who cannot dual wield to "normal" and added in the weapon the dual wield trait. However, in this case, the weapon's property overwrites the class' trait and the class can dual wield if it equips the weapon although it has the trait "normal" and not dual wield.

It's like the program doesn't let you set up a dual wielding class which can also use two-handed weapons. That's a bit ridiculous.


Where's the logic? I cannot overwrite the class' dual wield trait with a weapon's trait if it's normal but a weapon with dual wield trait can overwrite a class' trait "normal"...


What weighs more now? -.-


Edit: I have another idea, you could add two equipment types to the weapon (Main-hand and off-hand), whereas "off-hand" is actually not the "normal" off-hand but a duplicate which is only used by the classes which dual wield. (Yep_EquipCore)
Then you could equip both slots with the weapons and seal the 2nd if you use a two-handed weapon. So the other classes which cannot use dual wield really cannot use dual wield.

 But... does anybody know a plugin which adds more weapon types to weapons and is compatible with Yanfly's plugins? :/


2.Edit: Another idea ~ Is it possible to restrict a weapon to be only equipped to the first slot? So it can't be equipped to the second slot no matter which type it is?
 
Last edited by a moderator:

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,853
Reaction score
5,424
First Language
English
Primarily Uses
RMVXA
Okay, I'm at a loss.

I know I have to use this code from Equip Requirements (http://yanfly.moe/2016/02/27/yep-75-equip-requirements/)

<Custom Equip Requirement Condition>
if (user.name() === ‘Harold’) {
condition = true;
} else {
condition = false;
}
</Custom Equip Requirement Condition>


So I think I have to put this in every weapon which can be used by my class (Adventurer [class id: 8] in this case).


I think it has to look something like that, but I don't have experience in this:

<Custom Equip Requirement Condition>
if (user.class() === ‘Adventurer’) {
condition = true;
}
</Custom Equip Requirement Condition>


And now I have to add "dual wield" to this command, but how?



I think you'd want to simulate the dual wield logic in the custom equip requirement condition itself.  So you'd check the class, you'd check how many of the user's slots are currently empty, you'd check what types of weapons (one-hand, two-hand, etc.) were equipped in the slots that are equipped (non-empty), and you'd put all that logic together to determine whether it would be legal to equip this weapon at the current time (if legal, return true - otherwise return false, I think).


I've never worked with these plugins before, nor have I done much with Equips in MV, so it wouldn't be easy for me to provide an example of a properly logiced or syntaxed tag.  It could take me hours to figure out because of my lack of expertise in these specific areas... and that's not worth my time.  But I think it would be doable.  Hopefully someone with more knowledge in these specific areas can help you out in this thread, or maybe you can ask for help on the plugin somewhere.  Worst comes to worst, you could probably get help by offering a small commission in the Classifieds subforum (I think it requires 30 posts to see that subforum).
 
Last edited by a moderator:

Arithmetician

Veteran
Veteran
Joined
Jul 11, 2016
Messages
416
Reaction score
651
First Language
English
Primarily Uses
I ran into an issue like this myself when I was experimenting with the Plugins to see what I could do with them.  I had mocked up a rudimentary Job System like that of Final Fantasy V / Final Fantasy Dimensions/ Bravely Default, where you could equip skills learned from other classes.  So naturally, I chose to test if I could make a classic pair of FFV skills: the Knight's Two-Handed, and the Ninja's Dual-Wield.  


I figured out how to disable shields with Two-Handed.  And Dual-Wield worked fine as an equipped ability on its own.  But put them together... and you suddenly have a character Dual-Wielding 2H swords (presumably because the Two-Handed Ability only sealed shields, while Dual-Wield makes that available to another weapon).


In the end, I rolled with it, mainly for rule of cool.  I just tweaked my Two-Handed Ability to "Equip 2H Swords" and gave the swords higher attack power rather than an attack bonus for wielding a 1H weapon with two hands.  But I'd be interested to see how it could be done properly.
 
Last edited by a moderator:

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
815
Reaction score
361
First Language
English
Primarily Uses
N/A
If you aren't over trying different plugins, you could give mine a shot.




If you tag your bow with <twohand>, it will only be equippable in the first equip slot (And nothing else could be put in the second.)


I'm not quite sure why Victor's plugin didn't work for you, but if it's because of YF compatibility issues, mine should work ok.
 

shinyoshi

Warper
Member
Joined
May 3, 2015
Messages
1
Reaction score
0
First Language
English
Primarily Uses
Dual wield can be done without script


Dual Wield.png


Edit: Sorry didn't read the previous replies, but you can still do it without script. You can change the character's class when they equip certain weapon (borrowing the concept of FF XIV)
 
Last edited by a moderator:

Shiro1994

Veteran
Veteran
Joined
Aug 1, 2015
Messages
30
Reaction score
6
First Language
German
Primarily Uses
RMMZ
If you aren't over trying different plugins, you could give mine a shot.





If you tag your bow with <twohand>, it will only be equippable in the first equip slot (And nothing else could be put in the second.)


I'm not quite sure why Victor's plugin didn't work for you, but if it's because of YF compatibility issues, mine should work ok.





 






 



Yeaaah! Thank you very much, I've tested it and it doesn't duplicate the items like the plugin from Victor.


If someone is looking for a nice plugin which can combine two-handed and dual wield in one class then this is the plugin! :)


I placed it above Yanfly's plugins since when I place it below it the interface would not work properly. 


~ Sorry that I didn't answer but I have changed the class a bit in order to make a playable demo first so that I get feedback for my game. Now I can experiment with my game again. I'm glad that I can make the class like I intended it :)


If there is a bug or something which causes problems with other plugins I'll let you know in your thread! ^^
 

Latest Threads

Latest Posts

Latest Profile Posts

I have an idea, I am making low polygon 3D resources for a package in itch. but it occurred to me that I could export these as images and make MV / MZ compatible tilesets. What do you think of this?
I hate seeing threads where less-experienced user's ask for an opinion of their project, and the thread is full of negative feedback by others who are clearly not the target audience. I feel bad for the OP, and I hope they understand that no game can appeal to everyone. :frown:
Hm, just found out I can't use loops, yay.
-Ele
I just wanna Covid to be over and I have my normal life back... Feeling so bad these days, what can I do?

Forum statistics

Threads
109,075
Messages
1,041,869
Members
141,571
Latest member
1a23z11
Top