Hero Counterattacks
Moderators: Bob the Hamster, marionline, SDHawk
- Bob the Hamster
- Lord of the Slimes
- Posts: 7660
- Joined: Tue Oct 16, 2007 2:34 pm
- Location: Hamster Republic (Ontario Enclave)
- Contact:
Hero Counterattacks
Starting with tonight's nightly build, you will be able to give heroes counter-attacks:
Later I hope to add the ability to override these with equipment, and maybe override them by being hit with attacks, but that will have to wait for another day.
Later I hope to add the ability to override these with equipment, and maybe override them by being hit with attacks, but that will have to wait for another day.
Also, there's a way to do fake if-elses using attack chaining, and you should be able to emulate any conditional counterattack using tags.
[s]Basically:
* Make an attack that is only used to chain to the real counterattack (i.e. one that does return damage or heals/buffs the counterattacker), and assign this as the counterattack to whatever element.
(e.g. Attack 0 "CSlashChk" will chain to Attack 1 "CntrSlash")
* Set the Regular Chain conditional to a Tag Check corresponding to the piece of equipment that turns on this tag (or any conditional you want)
(e.g. check Tag 2 'Sword is equipped')
* Set the Else Chain to 100% always go to the next "checking attack" that the hero will have available, and have this chain to its corresponding "real" counterattack
(e.g. Attack 2 "CBashCheck", Attack 3 "CountrBash", check Tag 3 'Club is equipped')
* Repeat steps 2 and 3 for each counterattack possibility determined by tags/equipment. The last attack in the series will of course Else Chain to nothing.[/s]
EDIT:
That was actually kind of garbage. Here's a way better method that I just tested with good results.
* Set the counterattack to whatever the first possible attack can be (e.g. CounterSlash, CounterBash, CounterStab)
* Set the Instead Chain for each one to 100% chain to the second possible counterattack, with a Tag Check seeing if the tag required to do that attack is OFF (e.g. Tag 2 'Sword is equipped' is OFF)
* At the very last possible counterattack in the series, have it Instead Chain to Nothing if the appropriate tag is OFF.
This is much better, you don't have to do a "checking" attack and the real attack as well.
[s]Basically:
* Make an attack that is only used to chain to the real counterattack (i.e. one that does return damage or heals/buffs the counterattacker), and assign this as the counterattack to whatever element.
(e.g. Attack 0 "CSlashChk" will chain to Attack 1 "CntrSlash")
* Set the Regular Chain conditional to a Tag Check corresponding to the piece of equipment that turns on this tag (or any conditional you want)
(e.g. check Tag 2 'Sword is equipped')
* Set the Else Chain to 100% always go to the next "checking attack" that the hero will have available, and have this chain to its corresponding "real" counterattack
(e.g. Attack 2 "CBashCheck", Attack 3 "CountrBash", check Tag 3 'Club is equipped')
* Repeat steps 2 and 3 for each counterattack possibility determined by tags/equipment. The last attack in the series will of course Else Chain to nothing.[/s]
EDIT:
That was actually kind of garbage. Here's a way better method that I just tested with good results.
* Set the counterattack to whatever the first possible attack can be (e.g. CounterSlash, CounterBash, CounterStab)
* Set the Instead Chain for each one to 100% chain to the second possible counterattack, with a Tag Check seeing if the tag required to do that attack is OFF (e.g. Tag 2 'Sword is equipped' is OFF)
* At the very last possible counterattack in the series, have it Instead Chain to Nothing if the appropriate tag is OFF.
This is much better, you don't have to do a "checking" attack and the real attack as well.
Last edited by Foxley on Sat Dec 23, 2017 4:42 pm, edited 1 time in total.
- Nathan Karr
- Liquid Metal Slime
- Posts: 1215
- Joined: Fri Jan 25, 2008 3:51 am
- Contact:
Merry sliming Christmas to me!!!!
THANK YOU! Now I can get these ninjas to be comic-book accurate! From your Secret Santa present in Volume 1, you can see firsthand the opportunity of them making a SUPER BULLET!
THANK YOU! Now I can get these ninjas to be comic-book accurate! From your Secret Santa present in Volume 1, you can see firsthand the opportunity of them making a SUPER BULLET!
http://www.redtrianglegames.com
RMZ#4181
RMZ#4181
- The Wobbler
- A Scrambled Egg
- Posts: 2817
- Joined: Mon Oct 15, 2007 8:36 pm
- Location: Underwater
- Contact:
- MorpheusKitami
- Slime Knight
- Posts: 218
- Joined: Wed Nov 30, 2016 8:23 pm
- Location: Somewhere in America
- Bob the Hamster
- Lord of the Slimes
- Posts: 7660
- Joined: Tue Oct 16, 2007 2:34 pm
- Location: Hamster Republic (Ontario Enclave)
- Contact:
The hero counterattacks work just like the enemy counterattacks, and they don't use the counter stat.Foxley wrote:Something I just thought of: will the Counter/Ctr stat become useful now?
Hmmm... Although as soon as I add editor support for zzo38's new "Custom Aim Math" feature, it will become fairly easy to do counterattacks based on the Counter stat
For example, you could give your hero a counterattack that is self-targetting, and has an accuracy based on the counter stat. Then if the attack does not miss, it could chain to the actual counterattack.
I also realize that I really need to add a new attack "Prefer Target" option like "Last enemy to deal damage" or "Last attacker to trigger a counterattack"
You can definitely get your hero and an enemy in an endless counterattack loop. (It was already possible to get two enemies in an endless counterattack loop)MorpheusKitami wrote:This is certainly going to make clones of SMT easier on the player half. Although, if both the enemy and the player have a counter to the same attack, will the game notice this and automatically cut it off?
I'm not sure what the best way is to allow attacks that only have a limited number of counterattacks. I'll have to think about that one.
Last edited by Bob the Hamster on Sat Dec 23, 2017 5:59 pm, edited 1 time in total.
- The Wobbler
- A Scrambled Egg
- Posts: 2817
- Joined: Mon Oct 15, 2007 8:36 pm
- Location: Underwater
- Contact:
- SwordPlay
- Chemical Slime
- Posts: 966
- Joined: Sun Jan 22, 2017 9:32 am
- Location: London, England
- Contact:
I think you can escape an endless loop by setting/checking a tag to check if counter-attacks are occurring. You can Instead-chain to turning this tag off and end the loop. *idea* would be a lot easier with mass-editing entries or being able to define templates.
You could use an element 'counter' to better map your counter chains.
Will multiple counter attacks occur against multiple elements in a single attack? One counter attack for each element?
You could use an element 'counter' to better map your counter chains.
Will multiple counter attacks occur against multiple elements in a single attack? One counter attack for each element?
Last edited by SwordPlay on Sun Dec 24, 2017 2:14 am, edited 3 times in total.
"Imagination. Life is your creation."
- Bob the Hamster
- Lord of the Slimes
- Posts: 7660
- Joined: Tue Oct 16, 2007 2:34 pm
- Location: Hamster Republic (Ontario Enclave)
- Contact: