Improve Counter Attack State Snippet

Janusz

Veteran
Veteran
Joined
Jul 4, 2015
Messages
26
Reaction score
4
Primarily Uses
Hi. This is my first script/snippet.

Filename: Hamedo.js

Script Name: Hamedo: Improve Counter Attack System

Version: 1.00

Author: 1224Deko

This script/snippet overrides function BattleManager.invokeAction and counter mechanism by default, so be carefull.

What it does:

- Change default Evade and Counter to Counter-Attack system.

- Adds 5 state types of counter attack:

Default Counter-Attack: countering after taking damage:  added for priority, example if you want nullifies all countering system just put that state on target enemy/battler.

First Strike: Countering before taking damages, so if enemy dies battler no recive damage

Forestall: Countering before taking damage, and taking damages only if counter attack was evaded or dmg =< 0.

Double Strike: First Strike plus second counter attack(if previous wasn't lethal of course).

Evade and Counter: Evade and Counter like without this snippet




In Plugin setup you can also find:

CounterEvenDeath: countering even if damage(s) was lethal, should work now but it isn't finished yet.

Multi States: It is a WIP system. So it do nothing yet. But in future i'm planning making a multiple countering system, so i.e. if actor will have CounterEvenDeath and Double Strike states. It will countering 2 times even if it takes lethal damage before second countering.

Counter Same Skill: Don't know if i can make it work ever. Must testing how work countering magics and skills by default.

This is my first meet with js, so i migh did a few mistakes. If you saw something strange please report it.

Any ideas, how to improve counter system?

Script:

http://pastebin.com/CMa9bqMJ

Terms of uses: Free for both non commercial and commercial uses. But for commercial uses please credit me.
 
Last edited by a moderator:

Siul

Veteran
Veteran
Joined
Nov 19, 2012
Messages
77
Reaction score
14
First Language
Spanish
Primarily Uses
I guess it was Hime who made reaction skills script for VXA. A big improvement for this is to be able to decide wich skill do you want to trigger once the counter happens. Also, it was skill-type responsive: if you hit someone with a type of skill, then the counter happens (countering with the skill you wanted, of course).
 

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
This above and something i'd like is

Counter damage get lowers/higher depending on a SP stat

Those tags can also be used on actors/enemies so states are not needed

The % chance of countering is dependent on the CNT stat
 
Last edited by a moderator:

kranasAngel

Wanderer
Veteran
Joined
May 9, 2014
Messages
128
Reaction score
47
First Language
English
Primarily Uses
RMMV
This is really good.
 

Roguedeus

It's never too late to procrastinate...
Veteran
Joined
Mar 19, 2013
Messages
532
Reaction score
107
First Language
English
Primarily Uses
N/A
Janusz, I'm not 100% familiar with Javascript... Is this plugin overwriting the invokeAction function?
 

Bob423

Warper
Member
Joined
Nov 13, 2015
Messages
2
Reaction score
0
First Language
English
I'm a little big confused on how to use this. Do I need to create special states for each type of counter attacking, or can I just use the default counter attack Ex-Parameter? I'd prefer that one since there's only one type of counter attacking I plan on using, which is where the actor just attacks after being attacked.
 

Janusz

Veteran
Veteran
Joined
Jul 4, 2015
Messages
26
Reaction score
4
Primarily Uses
Janusz, I'm not 100% familiar with Javascript... Is this plugin overwriting the invokeAction function?
Well, it is rewritten Battle Manager.invokeAction... since i didn't find other invokeAction in js files, it looks like it is, but it only change ways of counter-attack mechanism. I'm also not familiar with JS yet.

BTW: I used similar snippet in Ace without complication and i not found other scripts that change this part of engine - don't know why.

I'm a little big confused on how to use this. Do I need to create special states for each type of counter attacking, or can I just use the default counter attack Ex-Parameter? I'd prefer that one since there's only one type of counter attacking I plan on using, which is where the actor just attacks after being attacked.
Adding only Ex-Param. Counter 100% causes that battler will counter after taking damage(like in FF series in example).

Adding any state does nothing if Actor doesn't have Ex-Param Cnt X%.

So, you don't need any states but remeber to change states ID's(in script properties) for unused(ex. 999), to prevent using it in future.

You just need add Ex-Parameter Counter to get countering after damage. If you want use other type you need create states and ex-param cnt.

I'm planning remove ids and add notetags, also i would have to improve magic reflection with counter system(counterspell, deathtouch etc) but i'm still learning javascript and it might take me a little time.
 
Last edited by a moderator:

omen613

Veteran
Veteran
Joined
May 22, 2012
Messages
309
Reaction score
109
First Language
English
Primarily Uses
Great Script! Thank you

Feature Request:

Choose skill to counter with instead of skill 1.
 

Cinnamon

Veteran
Veteran
Joined
Jun 20, 2014
Messages
605
Reaction score
209
First Language
English
Primarily Uses
Great script!

I just have a small issue, only the damage popup for the counter attack shows when using dekodcounter.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

JDgoldvox wrote on Mr. Detective's profile.
hey, could u help me with a problem? basically, How do I delete a character from a map after a cut scene is over? I am really new with RPG maker MV. Please help!
The most rewarding part of making custom body character parts is absolutely not making the masks work. Somebody please put me out of my misery.
Any commercial devs here ever mess with Gamejolt? Been contemplating making my games available there but don't know if it's worth the effort or not.
Social distancing taught me of how much of not a loner I am. Dammit, I miss seeing my friends...
Happy 4th of July all. Anybody have plans? Mine here is staying home away from the virus. Still a nice 3 day weekend.

Forum statistics

Threads
99,262
Messages
963,602
Members
130,856
Latest member
superfluffy
Top