Charas-Project

Game Creation => Requests => Tutorials => Topic started by: Zorzenon on March 30, 2009, 10:13:00 AM

Title: Question, Counter Attack? RM2K3
Post by: Zorzenon on March 30, 2009, 10:13:00 AM
Hey guys, I was tinkering around with the switches and vars and whatnot trying to figure out a way to get a counter attack skill to work and couldnt figure it out. and was very surprised to not find 1 tut on it online.(its in damned near every rpg I figured itd be a built in kinda thing) so If anyone knows of a way a counter attack skill can be made and preferable linked to an item (or maybe linked to a stat to come up with chances for the counter) thatd be great. Thanks again everyone.
Title: Re: Question, Counter Attack? RM2K3
Post by: Prpl_Mage on March 30, 2009, 02:35:06 PM
There's next to no way to do this with the DBS(default battle system).

One way would be to make every monsters attack be a skill and make the counter a Condition called "Counter" or whatever. Just check the box "Reflects enemy skill" and all the "attacks" the enemy makes will be reflected back upon them. BUT with the same animation as they used.
And make the condition abate after being attacked once or such and it will look good.
Title: Re: Question, Counter Attack? RM2K3
Post by: DedlellyDeth on March 30, 2009, 11:34:55 PM
You could do this:

Make "Counter" a condition that doesn't do anything, with the graphic the dude preparing for a counter.

Make "Counter Band" an item that inflicts "Counter" condition, OK?

Then, uh, have a parallel common event that checks if "Counter Band" is equipped. If it is, also check if your dude got "Counter" on.
If he don't, unequip "Counter Band", turn on a switch called "Counter", and re-equip "Counter Band".

Then make a battle event in M. Groups triggered by "Counter" that shows the "Counter" animation, then deletes some HP from that monster,
and turns "Counter" off.
Of course, it'll always be the same damage, not accounting the monster's defense or weaknesses, like 1000 Needles from FFVII.

You could "explain" (You'll need to do a lot of this to look good. ;)) this as catching the monster off-guard, it being a counter-attack. You'll
need to make the animation something non-elemental. If you want to do more work so it looks better, you could have the damage number
multiplied through variables, a parallel common event always looking at his Attack.
Title: Re: Question, Counter Attack? RM2K3
Post by: WarxePB on March 31, 2009, 12:33:29 AM
Unfortunately DedlellyDeth, your method will remove HP every turn, whether the monster attacked or not (or even if the user attacks).

There is, however, a method to do counter-attacks in RPG Maker. However, it's pretty complex, and it's recommended that you do it before you make a lot of monster groups (as there's a lot of copying and pasting involved otherwise).

Actually, I'm just going to post a general tutorial, as I'm sure many people can benefit from it.
Title: Re: Question, Counter Attack? RM2K3
Post by: DedlellyDeth on March 31, 2009, 01:59:39 AM
Unfortunately DedlellyDeth, your method will remove HP every turn, whether the monster attacked or not (or even if the user attacks).

There is, however, a method to do counter-attacks in RPG Maker. However, it's pretty complex, and it's recommended that you do it before you make a lot of monster groups (as there's a lot of copying and pasting involved otherwise).

Actually, I'm just going to post a general tutorial, as I'm sure many people can benefit from it.

Also, I'm horribly ghey and retarded. Please help me.

You turn the switch off after the damage, duh. And I can help you if you really want it, though you should probably see a therapist.
Title: Re: Question, Counter Attack? RM2K3
Post by: Zorzenon on March 31, 2009, 05:27:09 AM
Wow thanks for the replys everyone! I knew there was some way to do it. to prpls reply, wouldnt that make it so all skills get reflected? i looked at that at first and the way it sounds is that all skills get reflected, thatd suck for healing. to dedlydeths reply, that sounds like a kosher way to go about this I tried something simular to no avial albit the way the damage is delt is a bit meh...(from the way I read your method the counter would only do fixed dmg and I have know idea how you got the var for after the enemy hits you to turn off the switch) to Warxe I dont care how complex i want counter attacks! lol get on that tut write away (huh see what I did there?). I look forward to seeing your method for this. and btw... how silly was it for them not to have this skill easier to make, Its an RPG staple for Petes sake!   
Title: Re: Question, Counter Attack? RM2K3
Post by: Prpl_Mage on March 31, 2009, 06:43:33 AM
You turn the switch off after the damage, duh. And I can help you if you really want it, though you should probably see a therapist.

There are no conditional branches or triggers which are based on "enemy attacks: Zack"or something
So if the switch is on. The hero will damage a random enemy or all enemies with your idea.
In other words. You flip the switch, the damage is dealt. The switch is turned off until it's turned on again and then the same happens again.

You might as well just make a skill called "Counter" then- and have it deal 1 dmg and then have the attack influence of 10 and variation of 4. It would be the same thing but it would deal the same damage as your heroes' ordinary attacks.

The counter attack he wants is:
Enemy attacks the hero.
Hero takes the damage and then counter attacks with an attack of his own on the same enemy that hit him.
Like in Final fantasy IX.

And just some advice, claiming people to be ghey and retarded won't get you anywhere nice.
Title: Re: Question, Counter Attack? RM2K3
Post by: Zorzenon on April 01, 2009, 12:38:42 AM
Yeah, thats the kind of counter I want (some other vars in it would be cool be not what I need) IDK if thats how FF9s counter was, only played that game for a few hrs, didnt like it for some reason (or 8 but im not alone on that) but the counter I want is like most other games, guy gets attacked when he has the counter skill/condtion/item on he attacks who attacked him, if it could be run off of attacks and not hits (like if the mob attacked and didnt hit but got countered, which is what a real counter attack would be anyways, enemy attacks, player character damages attacker "before"(I use quotes cause thatd be the switch and unless you wanna fool around with tachyons you cant hit a switch before it gets hit... ok that made sense to me probably not to anyone else) the enemy hits the players character. but I digress... Warxe_ please hurry on that tut!
Title: Re: Question, Counter Attack? RM2K3
Post by: DedlellyDeth on April 01, 2009, 01:19:12 AM
There are no conditional branches or triggers which are based on "enemy attacks: Zack"or something
So if the switch is on. The hero will damage a random enemy or all enemies with your idea.
In other words. You flip the switch, the damage is dealt. The switch is turned off until it's turned on again and then the same happens again.

You might as well just make a skill called "Counter" then- and have it deal 1 dmg and then have the attack influence of 10 and variation of 4. It would be the same thing but it would deal the same damage as your heroes' ordinary attacks.

The counter attack he wants is:
Enemy attacks the hero.
Hero takes the damage and then counter attacks with an attack of his own on the same enemy that hit him.
Like in Final fantasy IX.

And FYI, I can't take a joke.

I see your point. To Zorzenon, if you can find a tutorial on quickly filling a character's battle gauge, you should be able to figure it out from there.
Title: Re: Question, Counter Attack? RM2K3
Post by: Zorzenon on April 01, 2009, 02:38:36 AM
I see your point. To Zorzenon, if you can find a tutorial on quickly filling a character's battle gauge, you should be able to figure it out from there.

Battle gauge?, the "limit bars" in the limit break type events some people have (thankfully I might add) added to the Charas community? I've looked at all the limit break type event codeing (or is it coding? isnt that fishing for cod?) and I saw a glimmer of hope in the way they could track hits but I could not find a way this could be done to create a genuine (like in the commerical game... ummm all of 'em(just a exageration no posts on games with no counter attacks please).) "counter attack" skill. please by all means if you know how please show us the event codeing, *Breaks into a Captain Kirk impersonation* You.. mustsharetheeventcode... with us... ifyou... know how.. to counterattacksoeasyshareit.... wont you? *Channels Capt. Kirk's anger toward Ded* Deeeeeeeeeeeeeeeeedd !!! Deeeeeeeeeeeeeeeeeedd!!!! *Pumps fist angrliy at no one in paticular* ..ahem, sorry bout that but yea thanks everyone.
Title: Re: Question, Counter Attack? RM2K3
Post by: Prpl_Mage on April 01, 2009, 04:00:20 PM
I posted a tut on limit breaks here: http://www.charas-project.net/forum/index.php?topic=24976.0
Made by Tomp.
Title: Re: Question, Counter Attack? RM2K3
Post by: Zorzenon on April 01, 2009, 10:42:21 PM
Maybe ill look at it your tut then and see if it could be altered for what I want, still hoping Warxe well get on that tut of his.
Title: Re: Question, Counter Attack? RM2K3
Post by: Zorzenon on April 02, 2009, 04:27:25 AM
After reading the tuts on the limit breaks I cant see how it could be used as a counter attack really, it would just trigger according to monster turns not hits and/or attacks, interesting and informative read though I suggest people read it even if they dont want a "Limit" system, some good ideas in there for other types of systems as well.
Title: Re: Question, Counter Attack? RM2K3
Post by: Prpl_Mage on April 02, 2009, 06:18:42 AM
The main problem with making a counter system is that there is nothing to check if the monster have attacked the hero.
If there was; easycakes.
But I don't have any ideas at the moment. So I guess you'll have to see if Warxe can figure something out.
Title: Re: Question, Counter Attack? RM2K3
Post by: _JeT_ on April 02, 2009, 08:29:57 PM
The only thing I can think of, which may not even work, is have it store all heroes HP into separate variables on every turn, and on monster turns have it store the HP into different variables. Then check if both of one heroes' HP variables are the same, if not, have an animation, condition, set HP reduction combo, which was previously mentioned.

However, I havent done much in RPG maker for awhile, so I am not sure if this can be done anyway.
Title: Re: Question, Counter Attack? RM2K3
Post by: Prpl_Mage on April 02, 2009, 09:50:34 PM
The only thing I can think of, which may not even work, is have it store all heroes HP into separate variables on every turn, and on monster turns have it store the HP into different variables. Then check if both of one heroes' HP variables are the same, if not, have an animation, condition, set HP reduction combo, which was previously mentioned.

However, I havent done much in RPG maker for awhile, so I am not sure if this can be done anyway.

But that would be the same as the condition.
You would counter: attacks, spells. And hell, even conditions like poison.
And the damage would be set.

So really, going for a condition that reflects everything is probably the safest and less confusing way.
Title: Re: Question, Counter Attack? RM2K3
Post by: Zorzenon on April 04, 2009, 09:18:31 AM
yes, but Prpl wouldnt healing that character equiped with counter would be a problem it would reflect it back.  :-\
Title: Re: Question, Counter Attack? RM2K3
Post by: Prpl_Mage on April 05, 2009, 06:56:45 AM
Nope. Just tried it.
Your own skills aren't reflected it seems.
Title: Re: Question, Counter Attack? RM2K3
Post by: Zorzenon on April 06, 2009, 06:40:19 AM
yer kiddin me... hmmm, well they shouldve worded the help file about it better, well thats certianly a possibility then if Warex doesnt get to that tut. thanks Prpl.
Title: Re: Question, Counter Attack? RM2K3
Post by: zuhane on April 06, 2009, 10:53:17 AM
You're welcome.


















That's what he'll probably say when he comes back.