weapon breaking mid battle

So I'm pretty much brand new to rpgmaker as I bought VXace about 3 years ago and barely touched it, but I'm trying to get back into it so apologies if this is really simple and I'm just missing something obvious.

My character has a cheap wooden sword early on and I want it to have a random chance to just break after attacking in a battle.
Now I started trying to do this by making a common even that just switches out the sword for the broken one.
But looking around in the weapons features I can't seem to find anything that could trigger the common event to happen during a battle as a random effect upon hitting an opponent, and looking up the issue on here didn't seem to have any results I could use for my situation.

Any and all help is greatly appreciated.

EDIT1: Hey so I found a really simple solution that doesn't use any plugins or scripts, basically I just made a common event and then a conditional branch that checks to see if the wooden sword is in your equipment and then removes it and replaces it with the broken version also allows me to make dialogue for it happening. I just have that common even called on the basic attack skill, so it can happen mid battle. Thanks again to y'all who replied.

EDIT2: 1 minor caveat, make sure enemies don't use the same base attack until after its broken because they can break the sword without the player even using it lol.
theoretically you could attach the common event to the attack skill, have it check which weapon is used and then proceed.

unfortunately that is a lot more complex to do correctly than that sentence makes it seem, so I suggest you search for a weapon durability plugin and use that
Try attaching a variable to the sword, then make it increase every time it hits.
Then set the event to occur when the variable reaches whatever you set it to break at.
My character has a cheap wooden sword early on and I want it to have a random chance to just break after attacking in a battle.
Now I started trying to do this by making a common even that just switches out the sword for the broken one.
This has been done before with instance items and item durability scripts.

XaiL System - Item Durability
$D13x - Equipment Durability
Selchar - Basic Instance Weapon Durability
Hey so I found a really simple solution that doesn't use any plugins or scripts, basically I just made a common event and then a conditional branch that checks to see if the wooden sword is in your equipment and then removes it and replaces it with the broken version also allows me to make dialogue for it happening. I just have that common even called on the basic attack skill, so it can happen mid battle. Thanks again to y'all who replied.
Hey so I found a really simple solution that doesn't use any plugins or scripts, basically I just made a common event and then a conditional branch that checks to see if the wooden sword is in your equipment and then removes it and replaces it with the broken version also allows me to make dialogue for it happening. I just have that common even called on the basic attack skill, so it can happen mid battle. Thanks again to y'all who replied.
1 minor caveat, make sure enemies don't use the same base attack until after its broken because they can break the sword without the player even using it lol.

@Seanp, please avoid double posting, as it is against the forum rules. You can use the "Edit" function on your posts to add additional information you've forgotten or respond to multiple people. You can review our forum rules here. Thank you.

Double-post notice: @Seanp
oh ok my apologies I'll take em down and just copy them into an edit of the original post.
Edit realized that I can't take them down myself lol whoops

Original thread: https://forums.rpgmakerweb.com/threads/weapon-breaking-mid-battle.163270/