Attack Boost from Certain Weapon types?

So what i'm looking for is a Script which lets Actors/Classes get an Attack boost from certain Weapon Types. For example, if a Hunter equips a Bow, their Attack goes up. Or if a Warrior equips a Sword they get an Attack boost. Or even maybe if a Mage equips a Staff, they get a Magic attack Boost.

I'm sure i've seen this before, but I can't find it anywhere.
I would probably look at the following script

http://himeworks.com/2013/12/parameter-bonuses/

For Parameter Bonuses, you would want to set up bonuses to ATK for the various classes.

For example, for a Warrior class, you might want to have it so that when an axe or sword is equipped, the bonus to is ATK 1/4th the base, rounded up.

Axes, in the RTP, are weapon type id 1, and Swords are id 4. The param id of ATK is 2.

<param bonus: ATK>value = 0; if (a.wtype_equipped?(1) or a.wtype_equipped?(4)) then value += (a.param_base(2)*0.25).round end; value</param bonus>And then of course you would just redo that process amongst the classes.

Additionally, you could have it so that certain actors get attack boosts for certain weapons even when not the correct class.

Let's say that in this example, the main character is basically the "Katana Paladin" and can get an attack boost from a Katana as a Paladin, which normally just gets a boost from wielding Axes, Swords, and Spears

You would put this in actor 1's notebox

Code:
<param bonus: ATK>value = 0; if (a.class_id == 3 and a.wtype_equipped?(5)) then value += (a.param_base(2) * 0.25).round end; value</param bonus>
Thanks, that works. 🙂

This can be closed now.

Original thread: https://forums.rpgmakerweb.com/threads/attack-boost-from-certain-weapon-types.40442/