REQUEST. Skills that check what skill was last used.

Hi there, 

I was hoping that some sort of plugin may be available that checked what the last command used was. This would be used to give culminating bonuses to attacks or use one skill to boost the damage of the next.

Specifically I was hoping for something that would essentially do this calculation:

damage * (n * 1.15)

Where n equals the amount of times the same ability has been used in sequence.

Thank you for your consideration
The "LastUsedItem" plugin in the KadokawaPlugins that came with the game stores the ID the last used skill or item in a variable.
Thanks for that!

I installed the plugin, however it does not come with any notes on how to utilize it properly. Do I put a notetag in the skill for instance tagging skill A to check if skill B was used last? If so, what tag?
No, there are no tags. Since it saves it to the variable you define in the parameters, you would have to probably check the value of the variable in your Formula in the skill
So then I need to run a common event through the passive skill that says if variable A (last used skill) = Skill ID 1 (attack) then increase parameters by x? Or would it be better to instead add a state that stacked on itself?

How would you get it to cancel if a different skill was used? Or target the user? 

Sorry, I haven't done very much scripting stuff before.
If the plugin only considers actor attacks (not sure), and you are only battling with 1 actor, that actor's last attack ID should be in the variable. You can then enter in a damage formula for the skill that can use this info.

Ex:

mod = (v[x] === y ? 2 : 1); {{formulahere}} * mod;

In this case, v[x] is calling variable x (put in a number for x) and checking if it equals y (put in your attack ID you want here).

If it DOES equal that attack ID, then mod will equal 2, otherwise it will equal 1. (You can change 2 to equal how much stronger you want the attack damage to be when used consecutively); then put your normal formula in the {{formulahere}} spot.

(Full disclosure, I'm a noob at JavaScript as well, but I think this may work for you?)
Thanks for the help once again, the script makes sense to my eyes but it's giving me a syntax error when it hits the * saying it is an unrecognised token.
I should probably have told you (formulahere) instead of {{formulahere}}. You didn't use {{ and }}, did you? Dont use those, use regular ()
Right thanks, as you can guess, I'm a big noob.

Sorry to be a pest but it says Reference Error: V is not defined.

I'm guessing I set it up incorrectly in the plugin, as all I did was define the variables to 1 and 2. Either that or in needs some sort of input before it can start the script; i.e not using the skill straight up.
make sure it is a lowercase v and you are using brackets [] not (). if that doesnt work, you can always try $gameVariables.value(x) where x is the variable id.
The $gameVariables.value(x) worked, however it doesn't register a.atk etc as it's running a common event that isn't specific to an actor.
Oh, yeah, what I was telling you was to put into the damage formula for a skill, not into a common event. That is probably why v[x] also did not work.

mod = (v[x] === y ? 2 : 1); (formulahere) * mod;

That goes into the skill damage formula. It will double (the 2 represents the multiplier) the damage if variable x equals y, otherwise it does normal damage according to the formula. However, this does not help if you want it to keep increasing the more times you use it in a row.

I may just tinker to find out how to help you, but first, Are you only using 1 Actor in your party? or will there be more? Because if you have more than 1, I do not believe this plugin will help you..
I was planning on using 5 if possible but also messed around with making the skill work a different way.

Basically this is to make a berserker type class deal more damage with basic attacks, and increase this bonus while using a second ability that raises stats and causes rage state for a few turns. The idea was to have it last 4 turns, yet still put out more damage than just regular attacking.

I tried to do this by putting hp into the damage formula and increasing hp while in the rage state. It's working ok. I did something like (0.01*a.mhp) + (a.atk - b.def) and buffed up while in the state.

Do you think it would work well?
I'm not sure what you are getting at, but if you can get it to work the way you want it to, then perfect!
Basically my attack formula is a.atk - b.def.

I want this class to have a stronger normal attack, as well as a 4 round buff that increases damage but decreases defence and makes them lose control.

I was thinking if I could modify your script so that if variable x (whether that character has the class equipped) is true then use formula one or if not use formula 2.

Is this possible?

Original thread: https://forums.rpgmakerweb.com/threads/request-skills-that-check-what-skill-was-last-used.48169/