Redirecting leftover attacks

Ivan_the_Terrible

Devil Hunter
Member
Joined
Mar 20, 2018
Messages
25
Reaction score
3
First Language
English
Primarily Uses
RMVXA
Greetings, fellow bipeds! I have a question regarding multiple attacks in battle.

In the game I am working on, some party characters can attack more than once during turns (meaning, on each turn, they'll attack an enemy two or three times instead of once) and if they defeat the enemy in question with only one attack, their turn is over. I started thinking about games like Lunar: Eternal Blue in which characters with multiple attacks would redirect their leftover attacks on a turn to another enemy when the first enemy died. (Example: Jean typically had three attacks per turn. She would attack Enemy 1 with her first attack; Enemy 1 would die. Instead of her turn ending right then, Jean was able to use her remaining two attacks on Enemy 2 automatically.) I thought it would be really cool if the characters in my game could do the same thing.

The question I have is: is it possible to do this without a script, or would a script be necessary? And would anyone here know how to create said script? Thank you in advance!
 

ZirconStorms

VX & VX Ace Scripts
Veteran
Joined
Dec 22, 2014
Messages
343
Reaction score
110
First Language
English
Primarily Uses
RMVXA
This might help you out. https://github.com/Archeia/YEARepo/blob/master/Gameplay/Target_Manager.rb
Starting at line 122:
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - General Targeting Settings -
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# These settings adjust how targeting operates in your game. Here, you can
# choose to have random targeting redirect to a different target if the
# selected target is dead, change the default settings used for area of
# effects, and more.
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# This setting, if true, will redirect the target of a random attack to an
# alive target if the current target is dead. If there are no alive targets
# then nothing happens.
RANDOM_REDIRECT = true
 

Ivan_the_Terrible

Devil Hunter
Member
Joined
Mar 20, 2018
Messages
25
Reaction score
3
First Language
English
Primarily Uses
RMVXA
This might help you out. https://github.com/Archeia/YEARepo/blob/master/Gameplay/Target_Manager.rb
Starting at line 122:
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - General Targeting Settings -
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# These settings adjust how targeting operates in your game. Here, you can
# choose to have random targeting redirect to a different target if the
# selected target is dead, change the default settings used for area of
# effects, and more.
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# This setting, if true, will redirect the target of a random attack to an
# alive target if the current target is dead. If there are no alive targets
# then nothing happens.
RANDOM_REDIRECT = true
Is the Yanfly Engine necessary to run this? I don't have said engine and I can't seem to make this script work.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
4,637
Reaction score
5,278
First Language
Indonesian
Primarily Uses
RMVXA
Can you explain how you did the attack two/three times?
Are you using action times from actor/class features? Or are you using skill repeat function in skill database?
I might want to figure something out, but I can't promise.
 

Ivan_the_Terrible

Devil Hunter
Member
Joined
Mar 20, 2018
Messages
25
Reaction score
3
First Language
English
Primarily Uses
RMVXA
Can you explain how you did the attack two/three times?
Are you using action times from actor/class features? Or are you using skill repeat function in skill database?
I might want to figure something out, but I can't promise.
I apply it in the Actor features.
 

ZirconStorms

VX & VX Ace Scripts
Veteran
Joined
Dec 22, 2014
Messages
343
Reaction score
110
First Language
English
Primarily Uses
RMVXA
Is the Yanfly Engine necessary to run this? I don't have said engine and I can't seem to make this script work.
I'd imagine this would be the most straightforward way. Unless you're completely against using scripts, in which case you'd have to do some very bizarre conditional branch checking to achieve this effect, I image. On top of that, with some easy script editing you could decide to turn this feature on and off at your own discretion.

You don't need any particular "engine" to make the script work. Simply paste it inside your script editor (f11). Are you getting any error popups, or are you just confused on how to set up/use any scripts?
 

Ivan_the_Terrible

Devil Hunter
Member
Joined
Mar 20, 2018
Messages
25
Reaction score
3
First Language
English
Primarily Uses
RMVXA
I'd imagine this would be the most straightforward way. Unless you're completely against using scripts, in which case you'd have to do some very bizarre conditional branch checking to achieve this effect, I image. On top of that, with some easy script editing you could decide to turn this feature on and off at your own discretion.

You don't need any particular "engine" to make the script work. Simply paste it inside your script editor (f11). Are you getting any error popups, or are you just confused on how to set up/use any scripts?
I'm confused as to how THIS particular script works.
 

ZirconStorms

VX & VX Ace Scripts
Veteran
Joined
Dec 22, 2014
Messages
343
Reaction score
110
First Language
English
Primarily Uses
RMVXA
I'm confused as to how THIS particular script works.
Not able to test it out right now, but it doesn't seem like you'd need to edit any of the code. You just need to add notetags in the database.
https://yanflychannel.wordpress.com/rmvxa/gameplay-scripts/target-manager/
Here's the original page for this script. You'll want to write: <targets: x random foes> (x = number of your choice) on that skill's tab menu, and the target manager script will direct attacks to any alive enemies.
upload_2018-7-14_6-18-4.png
That's the most straightforward method that comes to mind, at least. If you want a script or feature that would let you redirect attacks after you specifically targeted an enemy in particular, this probably won't do, since it's random targeting. You might have to wait for TheoAllen to write something up for you, if they ever decide to try that.
 

Ivan_the_Terrible

Devil Hunter
Member
Joined
Mar 20, 2018
Messages
25
Reaction score
3
First Language
English
Primarily Uses
RMVXA
Not able to test it out right now, but it doesn't seem like you'd need to edit any of the code. You just need to add notetags in the database.
https://yanflychannel.wordpress.com/rmvxa/gameplay-scripts/target-manager/
Here's the original page for this script. You'll want to write: <targets: x random foes> (x = number of your choice) on that skill's tab menu, and the target manager script will direct attacks to any alive enemies.
View attachment 94207
That's the most straightforward method that comes to mind, at least. If you want a script or feature that would let you redirect attacks after you specifically targeted an enemy in particular, this probably won't do, since it's random targeting. You might have to wait for TheoAllen to write something up for you, if they ever decide to try that.
Okay, I'll try it again. Maybe I didn't put it where I thought I had. Thanks!
 

Ivan_the_Terrible

Devil Hunter
Member
Joined
Mar 20, 2018
Messages
25
Reaction score
3
First Language
English
Primarily Uses
RMVXA
Okay, the basic problem with this is, while the actors DO target other foes, they target them all at once after the first hit without the first enemy even dying, and that's not what I'm wanting. I don't want the attack redirected unless the original target is killed.
 

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

Latest Threads

Latest Profile Posts

Finally the new pc is working!! But it seems a lost my license to Windows 10 because of the hardware changing :(
Tune in next time for our newest Episode: "PC issues return! Palm uses every swear in the lexicon!"
gotta update my game project thread page later
So trying out Ultra Mode 7 was a bad idea. How do I not include this in my game? XD
Stumbled upon an RPG Maker game on Steam called 'Boobs vs Zombies' while looking for a zombie themed fantasy RTS. lol

Forum statistics

Threads
93,553
Messages
913,421
Members
123,091
Latest member
ZaGorudan
Top