Evening All,
I know that I can store the Last Skill Used as a Variable, however I assume that will be the last skill overall in the battle log.
What I need to be able to do is check the last skill used by "this" actor. Essentially the current battler. As well as the ability to specifically check for an actors last skill used by Actor Id.
Anyone know how I'd tackle these? It would make for some useful bits for skill proficiency in my project.
Would having multiple variables work?
One per actor to store the last skill used id.
Yup, I think you got it. Set the corresponding variable at the end of the action, as long as your skills are unique per actor.
Now to just figure out how to set the last skill id as a variable via script
Is the skill completely VS Action Sequenced?
Oooh that’s neat. Now what if instead of 1.5… you made the damage keep growing and growing every time the same skill is used.
That was my original plan, but that would mean having to set every single skill to an action sequence with Ifs to update the actor specific variables (god forbid its a combo move!)
If i do a straight "change variable" based on last skill ID used, it'll always check based on the last skill by anyone rather than "this" actor.
Its going to take some finagling
Already got the JS Note Tag going to store skill ID as variable going:
<JS Post-End Action>
$gameVariables.setValue(11, $gameTemp.lastActionData(0));
</JS Post-End Action>
This is set as an Actor Note tag on each party member so it tracks after each turn (the variable is different fpr each actors). Going to set a post battle Common Event that sets the variables back down to 0 at the end of battle so they aren't stacking damage based on the last battles last attack used.
What I'm trying to sort out now is a way to run at the beginning of each actors turn to run a common event that sets variable I'll be using in the damage calculation. Im thinking a passive state
Was overthinking this! Just gonna have an additional notetag for each Actor that sets the variable!
So each actor will essentially get their own form of:
<JS Pre-Start Action>
$gameVariables.setValue(15, $gameVariables.value(11));
</JS Pre-Start Action>
<JS Post-End Action>
$gameVariables.setValue(11, $gameTemp.lastActionData(0));
</JS Post-End Action>
All that's left to work out is the Damage Formula.
What I want to work it out as is:
If variable 15 = (this skills ID) var n = 1.5, else, var n = 1.5. Proceeded by regular damage calc of
10 * n + a.mat * 2 - b.mdf * 2
The idea being that consecutive use of the same skill will have an increased hit.
What I have is :
if(v[15] === 99){var n = 3};{var n = 1} 10 * n + a.mat * 2 - b.mdf * 2
But the damage remains the same each consecutive attack.
Anyone thoughts?
Perhaps it should be Pre-Start turn instead of Pre Start Action?
Got it with help on discord. I was missing an else -_-
Corrected Set up to Store Last Used Skill ID Per Actor using BattleCore VS:
Actor Note Tags
<JS Pre-Start Action>
$gameVariables.setValue(15, $gameVariables.value(11));
</JS Pre-Start Action>
<JS Post-End Action>
$gameVariables.setValue(11, $gameTemp.lastActionData(0));
</JS Post-End Action>
Damage Formula for Skill to check consecutive use.
if(v[15] === this.item().id){var n = 3;}else{var n = 1;} 10 * n + a.mat * 2 - b.mdf * 2
This thread is being closed due to being solved. If you would like it reopened, report it to let us know. Thank you!