Requesting Help w/ "Payback" Skill

teekaloo

Villager
Member
Joined
Aug 29, 2019
Messages
21
Reaction score
4
First Language
English
Primarily Uses
RMVXA
So I was wondering if it was possible to pull off a "payback" skill, like the one featured in the Pokemon franchise, in VX Ace?

For those who aren't familiar with the "payback" skills effect:
If the user attacks before the enemy they will deal the "payback" base damage, but if the user attacks after the enemy they will deal double the "payback" base damage.

Similar to a counterattack skill, but not quite a counterattack skill. I'm trying to use it for a samurai. If he uses "payback" before his enemy attacks, it is as if his focus on the enemy was off and he will deal a small amount of damage. If he uses "payback" after his enemy attacks, it is as if he paid close attention to the enemy's attack and found a weak spot to deal a much more powerful attack.

I couldn't find anything pertaining to this online, but I would greatly appreciate any help! I have no preference with using a formula, a common event, or a script.
 

The_Sarah

Let's make great games together!
Veteran
Joined
Jul 18, 2020
Messages
100
Reaction score
80
First Language
English
Primarily Uses
RMVXA
Gah, I tried.
I know that doesn't exactly help you, but just wanted to say I DID try (for about 2-3 hours lol).

I thought I could make it work based off a similar script I did for custom skills before... but I think I need to work within a different class to the one I set that original one up in.
And I wouldn't know where to start for that as of yet.

Sorry.

Good luck though!
 

Another Fen

Veteran
Veteran
Joined
Jan 23, 2013
Messages
564
Reaction score
274
First Language
German
Primarily Uses
You could try using

( original formula ) * (b.current_action ? 1 : 2)

b.current_action
refers to the next action the target has lined up. If the target has already attacked (or becomes uncontrollable) then no more lined actions exist and the condition is false.
This has the side effect that it would always double damage on confused targets though.


Alternatively you could give all battlers a state at the start of each turn that expires at the end of the next action and either make the state double payback damage or check for its existence in the damage formula (for state 17):

( original formula ) * (b.state?(17) ? 1 : 2)

Unlike the first solution, this would only double damage on stunned/confused targets once they had their turn in battle.


It might be a bit easier to solve by using a script.
 

teekaloo

Villager
Member
Joined
Aug 29, 2019
Messages
21
Reaction score
4
First Language
English
Primarily Uses
RMVXA
Gah, I tried.
I know that doesn't exactly help you, but just wanted to say I DID try (for about 2-3 hours lol).
Wow still, putting that much time in for a stranger’s request. That’s very kind of you. I really appreciate you for trying!

You could try using

( original formula ) * (b.current_action ? 1 : 2)
I’m gonna tinker with this today and see how I like it! I’ll let you know how it goes!
 

kyonides

Reforged is laughable
Veteran
Joined
Nov 17, 2019
Messages
287
Reaction score
71
First Language
English
Primarily Uses
RMXP
Well, if we were talking about a full script, I'd suggest one of the following:

Option 1 - Keep track of all battlers and get your samurai's position inside that array of active battlers that are waiting to perform any action after the next round of attacks actually begins. It's easy for a turn based battle system and I think some active time battle systems already show you such a gauge. If so, we'd just need to get that list and apply the corresponding payback skill effect later on.

Option 2 - Just check if your samurai's target has attacked anybody. If it didn't, your samurai would apply the typical payback skill effect against it. It's the easiest to implement but it lets you attack foes with your default payback skill for not all of them might have picked the samurai as their target. It'd need us to use a variable to store who was its original target.

Plus any other option I couldn't think off at this moment. XD

Hrm, perhaps both options suffer from the same kind of inconvenience... :think:
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Just finished composing a boss battle theme!
Scripted a multi-variable weather system that randomizes wind speed, cloudiness, rain, fogginess, etc, while attempting to realistically account for interactions between them (e.g. wind speed affects fogginess, cloudiness affects rain, etc), the current weather pattern, and the player's biome e.g. swamp, beach, etc. Now I "just" have to tie visuals and sounds to the variables so stuff actually happens...
I'm having a headache balancing the combat using flat defense so I'm gonna use percentual armor, in this pic, Simon has 16 on Defense which means all the incoming damage will be reduced by 16% this will ease my burden a bit.
!Have a nice day everybody¡
SO glad they patched outer worlds for switch! I can finally play it! Weird that other peeps are still having issues. I know it was really chugging on my lite when it first came out.

Forum statistics

Threads
105,555
Messages
1,014,635
Members
137,233
Latest member
hokiterus787
Top