Weapon Effects and Set Bonuses

Hello there!

I'm looking for a script that will allow me to add special effects to weapons that aren't usually able to be added. There's only a short list of the effects I need:

Critical Strike

A weapon has a certain percent chance to deal an extra amount of damage by percentage. 

Ex; Weapon Sword has a 45% chance of dealing an extra 50% of the damage it would deal on top of its original damage. Say it deals 100 damage to an enemy and lands a crit, it would deal 150.

I am aware that critical chances exist for skills, but I will not be using them as I want it to strictly be for weapons.

Chain Attack

A weapon has a certain percent chance to deal a certain % of it's damage to a random enemy.

Ex; Weapon Lance has a 50% chance to deal 45% of it's damage to a random target.

Dispel

A weapon has a certain percent chance of removing all helpful effects applied to it. If need be, a certain chance to run a common event to remove all states I consider harmful from a single enemy or all enemies hit by the weapon.

Hocus Pokus

A weapon will heal it's wielder by a certain percent of the HP points it deals in damage.

Ex; Weapon Staff will heal the user by 10% of the damage it deals

These must not only apply to normal attacks, but to any attack that deals damage that the user of the weapon performs.

Thanks for the help if you can give it. You all are awesome!
You could most probably use my skill apply extension script for this... Look for it here: www.lescripts.wordpress.com/rgss3
You could most probably use my skill apply extension script for this... Look for it here: www.lescripts.wordpress.com/rgss3
The script looks like it could work, but I'm a little confused on how to do it properly even after reading. Any suggestions or tips, perhaps an example?
I'll think... I'll try to give an example when I get home.
much appreciated
Can anyone possibly give me instructions on how to tag the weapons to achieve these desired effects? Apologizing for the bump, but I need this resolved.
For first one, something like

<start_damage_ext>if rand(100) < [email hidden]_damage *= 1.5end<end_damage_ext>For second one, you can actually utilize the damage formula for it.Something like (this one can choose the same target though and also dead ones):

Code:
x=damage_formula;if rand(100) < 45;$game_troop.members[rand($game_troop.members.size)].hp -= x*0.45;end; x
If you want bit more limits on the selection, you can put it in a method in a new module in your scripts section and just call that method using the damage formula
Code:
module Damage  def self.chain(a,  #Do stuff here  endend
Then on your damage formula, just put
Code:
Damage.chain(a,
But if you want the chain damage to show a message and pop-up if ur using a script for one, it will be a bit more complex.
The latter (Hocus Pokus) can be done with Yanfly's Convert Damage script.


Dispel can be done with any script which changes the normal attack depending on the weapon equipped. Yanfly got a script for that too (forgot it's name, sorry)


Critical Strike can be easily done by simply using the damage formula box (assuming you want this for skills/items).

45 >= rand(100) ? (base_formula)*1.5 : base_formulaThis means that if the random number is lower than 45, it will deal 1.5x damage. If it is higher, it will deal normal damage.
*base_formula* is the base formula used for the skill.


If you want this to be directly applied to weapons, you can use the script mentioned above (for Dispel).


Chain Attack is trickier, never tried to do that yet, so no idea how could it be done.
Using that method of critical means the critical is applied before other damage calculations (reductions due to resistance etc), while mine means it's done after all calculations. Just wanna point out the difference


And ofc, my method can be applied to a specific weapon to make it affect all skills used while that weapon is equipped
Unfortunately the critical damage effect has to be applied to a weapon so it only has a chance to crit if the weapon is equipped.

Perhaps someone could use Lunatic States to apply a state of the desired critical effect and have the state be applied to an actor if a weapon of a certain type is equipped? I'm not sure about that because then I'd have to make sure the crit state change event would be on every map.

Also, the formula thing cannot work for Chain Attack because it's applied to every skill so long as the weapon itself is equipped. Also I would like it to not target KO'd (dead) enemies.

EDIT:

Yanfly's Convert Damage script is having zero effect on my weapons. I can't get the script to work at all.
Then you would use my extension script too, and apply the same idea/formula...

Original thread: https://forums.rpgmakerweb.com/threads/weapon-effects-and-set-bonuses.43539/