Halve skill damage every time skill is used in battle

I want individual skills to do less damage the more you use them to force players to mix up which skills they use. They'd all return to standard damage output at the start of the next battle. What would be the best way to go about this? I'm thinking I'd need separate variables for each skill for each party member that get reset after every battle, but adding that many variables seems bloated.
Attach states onto skills so they get applied to enemies that dilutes the damage? So every time you get into a new fight, the damage resets because you're technically dealing with a new set of enemies?

Either way I'd find this mechanic pretty annoying, because surely there's better ways to balance skills than just making them weaker the more you use them, but that's just me.
That's what they did in some Yakuza games and that worked pretty well, judging by how many people like that mechanic
Seems interesting to me. Also gave me an idea for one of my classes 😛
You could also have a variable and put it in your damage formulas somehow, no? Just have the ability increase it by a certain amount then have it reset when the battle is complete
I give +1 to it being annoying - I would prefer you put the skills on a cooldown so I physically can't use it for some number of turns, rather than make me try to keep track of how often I've used each actor's skills and accidentally choose something that's less effective than I want.

I would also use variables. Just put:
Code:
$gameVariables._data[X]++; then your existing damage formula here
where X is the ID of the variable being used for that skill.

Then put a turn 0 event into your troops that resets all of the variables you're using to 0. Dan's idea of states could work, too, I just think this is a bit less work and you wouldn't need to use any plugins to handle stacking states and stuff.
I was going to do skill cooldowns, but the plugin I found for it is conflicting with the rest of the battle system. The variable solution sounds good, I think I'll try that!
I did something
I was going to do skill cooldowns, but the plugin I found for it is conflicting with the rest of the battle system.
For what it's worth, there are several skill cooldown plugins, and it's usually possible to resolve plugin conflicts if you ask for help with that.
You could tie the two together, make it a psuedo combo system like the Devil May Cry games, but with damage instead of an arbitrary score. Basically, using the same skill CONSECUTIVELY hurts you, you need to vary your moves, but each move you make that's not skill A after using it makes using again less detrimental. Probably a lot more work to pull off, and would probably need a dedicated plugin, but probably less annoying than a til-end-of-battle setup.

Though either way, you'd probably need a lore reason why using attack A twice is worse than using A, then B. For Devil May Cry, Dante was very concerned with being stylish, and using the same attacks repeatedly was boring.
For Devil May Cry, Dante was very concerned with being stylish, and using the same attacks repeatedly was boring.
Is that seriously the in-game justification for the mechanic? That's...so lame 🤣
I was going to do skill cooldowns, but the plugin I found for it is conflicting with the rest of the battle system.

Depending on what plugins/battle system you're using, you could try an alternative method of doing skill cooldowns without using a plugin specifically for that.

If you're using either Victor's Battle Motions or YEP Skill Core, you could have the skill apply a state to the user after use, which seals the skill and lasts for as long as you want the cooldown to be.

Though if you're doing that, might wanna look into getting a plugin which lets you retain states on death, otherwise the cooldown could be removed by letting the character die and reviving them.
Attach states onto skills so they get applied to enemies that dilutes the damage? So every time you get into a new fight, the damage resets because you're technically dealing with a new set of enemies?

Either way I'd find this mechanic pretty annoying, because surely there's better ways to balance skills than just making them weaker the more you use them, but that's just me.

This sounds like a good idea!

You could have a state that halves incoming damage, one that quarters it, one that eighths it, etc... When the spell hits, it checks if any of those states are applied, removes it, applies the next one down the line, and then deals the damage. That way you don't have to deal with state stacking nor variables. But you would have to make a bunch of states for each skill. And for each actor... actually I don't know how you'd use a state to differentiate who the damage came from, unless you made an additional set of states for each actor the same way you would have had to with variables... and then you would have to deal with state stacking.

Hmm... wellp, idk, maybe it can be figured out lol. Variables are probably the way I'd go now that I think this through. But I agree it would be cumbersome. Sucks you can't use a self-variable plugin because you aren't dealing with events.
Is that seriously the in-game justification for the mechanic? That's...so lame 🤣
I don't believe it's ever directly stated in the games, but the combo mechanic uses style terms and contributes to your score for the level. Heck, just watch the intro scene for the first stage of Devil May Cry 3, watch how he moves. He doesn't HAVE to move the way he does, but style wins out. lol

It might be lame, but it IS a justification. Some games just have stuff a certain arbitrary way that makes little sense, and has NO justification other than to force a player to play a certain way. If I'm going to have a gameplay limitation like that, I want an in-universe justification of SOME kind. Even if it's just for style. lol
Sucks you can't use a self-variable plugin because you aren't dealing with events.
You don't need a plugin to put variables on actors - you just do it. If you were going to have multiple actors who could use the same skill, and each of them should independently track how many times they've used it this battle, you'd just do in the damage formula:
Code:
a.slashCounter++;
where I made up that name if your skill is named slash, for example.

Then, again, you have a turn 0 event that sets those variables on each actor equal to 0.
This sounds like a good idea!

You could have a state that halves incoming damage, one that quarters it, one that eighths it, etc... When the spell hits, it checks if any of those states are applied, removes it, applies the next one down the line, and then deals the damage. That way you don't have to deal with state stacking nor variables. But you would have to make a bunch of states for each skill. And for each actor... actually I don't know how you'd use a state to differentiate who the damage came from, unless you made an additional set of states for each actor the same way you would have had to with variables... and then you would have to deal with state stacking.

Hmm... wellp, idk, maybe it can be figured out lol. Variables are probably the way I'd go now that I think this through. But I agree it would be cumbersome. Sucks you can't use a self-variable plugin because you aren't dealing with events.
Could limit it to damage types, if you have different such types. Depending on how many damage types and how many skills of those types you have available, it could drastically cut down that workload.
Just so you guys know, if you put a counter in the damage formula, it will be incremented every time a single enemy is successfully hit, all within a single skill invocation.
So if you have a skill that hits 3 Random Enemies twice, the counter will be incremented six (6) times less the number of misses / evades. All within a single action of the skill user.

If you want to use counters, you should put those somewhere that's called only once per skill invocation e.g. common events, <Custom Execution> from Yanfly's Skill Core, etc.
You may also want to use something like Yanfly's Base Troop Events or Auto Passive States to make resetting counter variables (at the start or at the end of battle, respectively) less tedious. Yanfly's Buffs & States Core can work too, similarly to Auto Passive States.

By the way, the thread title is "Halve skill damage every time skill is used in battle". Unless these skills are certain hits, enemies with high evasion (physical or magical) are overpowered.

On the other hand, if you take into account misses / evades, implementing this mechanic may become more complicated depending on the definition of misses / evades for the purpose of determining damage reduction.
For example, if a skill's scope is All Enemies and it hits some but misses the rest, is that considered a hit (or a miss) for the purpose of determining the skill's damage reduction?

The above are just my opinions though and may not be factual. 😮‍💨
You don't need a plugin to put variables on actors - you just do it.
But... you need to make a whole new independent variable for each actor for each skill, no? I was just saying if these were events, they could have used self-variables to avoid bloating out their variables list that much. But...
If you were going to have multiple actors who could use the same skill, and each of them should independently track how many times they've used it this battle, you'd just do in the damage formula
...this is a thing???
But... you need to make a whole new independent variable for each actor for each skill, no? I was just saying if these were events, they could have used self-variables to avoid bloating out their variables list that much. But...

...this is a thing???
It's a quirk of javascript. If you are assigning a value to a property, javascript will create the property if it doesn't already exist. There are a few caveats for complex values, but simple numbers shouldn't be an issue whatsoever. Since the damage formula is actually a javascript formula that the engine evaluates, you can simply use javascript code to do things. For the damage formula itself there are a few obscure rules to follow if you're gonna use complex stuff in it, but it IS doable.

Basically, when you have a damage formula for a skill, it says to use "a" as the battler using the skill. "a" is a reference to the actual object, whether an enemy or an actor, it doesn't matter. So for a given skill, you can increment a counter for that skill in the formula code. So for, say, a fireball spell, somewhere in the formula you'd say "a.fireball++", which will increase the battler's counter for fireball by 1. Then you can change the damage the fireball does with respect to the counter.

This counter will stay on the object for as long as it's in use. Without a plugin, that value will NOT be saved when the game is saved, and won't exist upon reloading. And you'd need to reset it to 0 between each battle, to avoid starting fight 2 doing no damage even with the first use of the skill.
But... you need to make a whole new independent variable for each actor for each skill, no? I was just saying if these were events, they could have used self-variables to avoid bloating out their variables list that much. But...
Sorry, I'm not really sure what you're asking with this. As you can see from my example, there's no list necessary, except in your single troop event that resets everything.
...this is a thing???
I won't bother duplicating any of Drakkonis' explanation. But yes, it is a thing, and it's used extensively in Yanfly's Tips & Tricks, for example.

Original thread: https://forums.rpgmakerweb.com/threads/halve-skill-damage-every-time-skill-is-used-in-battle.146829/