Counter Proofing Weapons

I searched around but it seems like I am thr first to ponder this, although maybe I didn't search enough. I literally made this account for this one question...

So some of my enemies can counter. I was wondering if anyone knows of a script or method to make a weapon immune to being countered. For example, lets say Enemy A is wielding a sword and no shield and Character A is wielding a crossbow. Now unless Enemy A is a Jedi master they're not like to slice a fired arrow out of the air and counter attack. So how would I go about making the crossbow reduce Enemy A's counter trate or simply negate it without effecting Enemy A's ability to counter other attacks like sword attacks?

I'm slowly learning to script but the last time I ever scripted anything was 6 years ago when I learned bash scripting in highschool.

Right now I surpassed this issue by making sure every enemy with a counter trait has a shield so that they can logically block arrows. Eventually I will be able to figure this out on my own but it will help me learn to script if a script for this issue already exists as I learn best by seeing how it is done and then reverse engineering the script to see how it all works as a whole.

Don't sweat it if a script doesn't exist. I am the type of person who has to answer every little "what of" question I can come up with.
Perhaps you can give the weapons that cannot counter, a negative counter-chance rate? (like -100% CNT so it becomes completely null) Or just have shields provide CNT?

Wait hold on, it's almost 3am and it's hard for me to think straight.

Anyways just want to confirm the following.

  1. Enemy A has a base 30% CNT, let's say for example
  2. Enemy A's CNT becomes not-accounted-for if the attacker is using a specific weapon-type? (Crossbow)

    If this is the case then a script is definitely needed.
I believe that will affect the user of the weapon, not the target... and what he wants is to make weapons that cannot be countered... I think the sword and shield are just enemy visuals, since enemies don't have weapons by default. + the no-counter is basically based on both Enemy "weapons" + the Attacker weapons, and not just 1 sided...


It's like


An enemy with a sword can counter sword attacks, but not bow attacks.


and not,


an enemy has this sword, he cannot counter any attack
Okay so

I think a proper solution would be a script that let's you tag enemies with something like "Sword" or "Shield"

And when an actor attacks that target, it would check the actor's weapon type or if a shield is equipped.

If the weapon type is "sword" (ID X), and the enemy has the "sword" tag, then counter chance is checked. (sword can only counter sword)

If the weapon type is "crossbow" (ID Y), and the enemy has the "Sword" tag, then counter chance is ignored. (sword cannot counter crossbow)

If the enemy has a "Shield" tag, then counter chance is applied no matter what. (Shield can counter anything)
yeah, something like that... Maybe Hime's tag manager is a good base to have for this.


though I'd go with Shield blocks any weapon attack, but not counter everything. A shield still cannot counter a ranged attack anyways, unless you throw the shield. XD


Maybe you can do this using Hime's Tag Manager + Victor's Counter Options
Ace Intermediate, your first post blew my mind.  It didn't solve my issue but it solved one I hadn't encountered yet!  I'll make sure to disable countering for character weapons that logically should work (like blocking a sword with your bow then instantly being able to fire an arrow).  So cheers to you for solving problems before they become problems!

Thanks for the comments to everyone.  I'll check Hime's Tag Manager.

Unless anyone has a script at hand I'm considering this issue solved!  Well, seemingly solved 😛

Original thread: https://forums.rpgmakerweb.com/threads/counter-proofing-weapons.25068/