Weapon-Driven Skills in MV

'Ello. Forgotten a bit about the MV scene, so my knowledge isn't up to par yet.

I was wondering about how I could make skills driven by the weapons the battler is using. The weapon would determine the damage and chances that the skill performs to an enemy. I'm sure the answer is right in front of me somewhere, but I can't seem to figure out where that somewhere is.

Would anybody mind lending a hand and tell me if it's possible or not? If so, I'd like to know how to do it. Thanks.
Apologies, but bump. I'd like to receive an answer to this as soon as possible.
Yes It can be done.

But it is not something that simple.

Just to make sure I understand you request, what you want is some way to connect equipments with skills, thus when actor have certain equipment equiped, the effects of the connected skills will be changed.

For example, skill Fire Ball regularly deals 50HP damage, but when equip with Fire Wand, Fire Ball's damage output will increase to 100HP.

If I understand correctly, read below.

The core for this function is to create a conditional branch when actor equip the required equipment.
Spoiler
upload_2018-5-31_20-7-21.png

You can find this in the second page under conditional branch.

And for what to put under the conditional branch, with the default functions of MV, the only way I can think of is to make two skills with the same name, but one is the upgrade version of the other one.

For example:
Skill2: Fire Ball is the one deals 50HP damage.
Skill3: Fire Ball is the one deals 100HP damage.

And what you do is, with in the conditional branch, you let actor forget skill2 and learn skill3.
Since the name is the same, player will not notice the change.

You will also need to put in the 'else' condition, when actor unequip the equipment, actor forget skill3 and learn skill2.

Spoiler
upload_2018-5-31_20-18-55.png

So your conditional branch should be something like above.

I think this will do what you need. Now, what you have to think is how you want this conditional branch to be trigger.

Edit: Just one little tip, skill manus show skills in the order of their ID number, not the time they learned. So this is something you may want to keep in mind when you create skills.
You can just put this formula in your damage bar:

a.hasWeapon($dataWeapons[x]) ? 100 : 50

Where x=the ID of the weapon in question. In this formula, 100 would be the damage with the weapon equipped and 50 would be the damage without the weapon equipped.

I believe the only shortcoming that I have had with this formula is that the game will crash if an enemy uses the same skill.
You can just put this formula in your damage bar:



Where x=the ID of the weapon in question. In this formula, 100 would be the damage with the weapon equipped and 50 would be the damage without the weapon equipped.

I believe the only shortcoming that I have had with this formula is that the game will crash if an enemy uses the same skill.

WoW, Nice formula, learned something!

Just one quick question, can the 100 and 50 inside your formula be replace by a formula?

For example, something like:
a.hasWeapon($dataWeapons[x]) ? 200+ a.mat * 2 - b.mdf * 2 : 100+ a.mat * 2 - b.mdf * 2
@AuralPC Happy to help! I'm at work so I don't have the database right in front of me, but yes you should be able to do that just fine!

I believe you can simplify it even further and do something like:
(a.mat+ (a.hasWeapon($dataWeapons[x]) ? 200 : 100) * 2) - (b.mdf * 2)

But I can't test if I have the context there exactly correct.
@AuralPC Happy to help! I'm at work so I don't have the database right in front of me, but yes you should be able to do that just fine!

I believe you can simplify it even further and do something like:


But I can't test if I have the context there exactly correct.

This is more then enough, I can do the test myself, thanks a lot!😂
Thank you guys so much. This helps an awful lot. I would also need to get rid of the Attack option in place of the Skills button. How can I do that?

Original thread: https://forums.rpgmakerweb.com/threads/weapon-driven-skills-in-mv.95721/