Adding chance on hit effects in RMXP

Hello.

So In my project I'm trying to have a sort of weapon proc system where depending on the powerup this character has, his basic attacks will have a chance to trigger additional attacks or effects.

This would be fine and dandy but using events I see no way to check if a character has used a basic attack.

How would you guys suggest I go about doing this? I understand a lot of Ruby and RGSS now, since I learned it over the past few days. So if scripting is necessary, I'll be welcome to that. Just not sure where to look in the scripts or what to do.
You could trying using the enchantment system on my blog maybe, the script locaitons for such things would be in Game_BattleAction and Scene_Battle, will have to work with the 2 of them, maybe a trigger of sorts. Set a random Chance
  1.  
  2.  
  3. chance = rand(100)
  4. if chance.between?(0, 50)
  5.  
  6.  select_action(@actor.weapon_id)
  7.  
  8. end
  9.  
  10.  
Expand to see the code.


Or something similar, then set up the def for the action select the ability from a data array or data base. (doesnt have to be based on weapon just example)

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=77162