MV Is it possible to have a state which makes some of the damage dealt ignore armour?

I want to create something kind of like First Strike from League of Legends, but rather than dealing bonus damage, a portion of the damage ignores armours, I have all the Yanfly plugins so i could do something with that but i want it to be a state which can affect all spells and skills.
Hmmm maybe you could do something that when "First strike" is active.

All Enemies have a state that reduces there Def/MDF to 0 and have it be removed by turn or damage?
Hmmm maybe you could do something that when "First strike" is active.

All Enemies have a state that reduces there Def/MDF to 0 and have it be removed by turn or damage?
My main issue is that if it can be used on any move there will be a different damage amount so i don't know how to get a percentage. I'm using Yanfly's armour core which makes it a little bit tricker. I suppose i could put it into all damage formulas that if i have the first strike state then it gets the value of damage ignoring armour, deals a % of that damage and the remaining is done factoring armour but i feel like there has to be a cleaner option
Since armor is applied in your damage formula, "bypassing armor" will probably look different depending on the type of damage formula you are using.

If you are using
X * a.atk - Y * b.def
then bypassing armor will likely have the same effect as reducing the targets armor.

If you are using
X * a.atk / b.def
then you might want to replace some of the targets armor with a "default" value, otherwise your result will be identical to just increasing your attackers atk.

If you want to reduce the targets armor when attacking it and don't feel like doing the math in every damage formula, you could make use of Yanflys Buffs & States Core and use the states notebox to add an armor debuff to the target before the action:
Code:
<Custom Initiate Effect>
  // Clear the targets result as a safety measure.
  // Otherwise in MV, battlers become immune to a state if their last result shows it has been removed.
  // After that, add the armor reducing state:
  b.clearResult();
  b.addState(17);
</Custom Initiate Effect>

<Custom Conclude Effect>
  // Remove the state again after the hit is completed
  b.removeState(17);
</Custom Conclude Effect>

Edit: "remove" function for Arrays only exists in MZ, changed the code
I mean, bonus damage and ignoring armour is kinda the same effect, so just to be clear,

First Strike is a skill that ignores enemies defences?

Or is First Strike a effect that only happens when you ambush a enemy?

If it's a skill just put the damage formula as "a.atk * 1 - b.def * 0.7"
I mean, bonus damage and ignoring armour is kinda the same effect, so just to be clear,

First Strike is a skill that ignores enemies defences?

Or is First Strike a effect that only happens when you ambush a enemy?

If it's a skill just put the damage formula as "a.atk * 1 - b.def * 0.7"
First strike is an effect that charges up and then allows part of the damage to ignore armour and give gold based on the damage done. Rather than just increased damage it's more effective on enemies with much more def/mdf since with Yanfly's armour scaling they can reduce the damage of attacks quiet substantially. For example if you have 300 attack and magic and hit an enemy with 900 defence and 900 magic defence "(Atk * 2) * 100/(100+(900/3)" would deal 150 damage but with first strike it'd deal 185 and give 60 gold . "(Mat * 6) * 100/(100+(900/3) would give 450 but with first strike it'd be 585 and give 180 gold. The numbers aren't all worked out yet but that's basically how i wan't it to work so it'd be separate from any Armour penetration effects but still benefit from buffs

Since armor is applied in your damage formula, "bypassing armor" will probably look different depending on the type of damage formula you are using.

If you are using
X * a.atk - Y * b.def
then bypassing armor will likely have the same effect as reducing the targets armor.

If you are using
X * a.atk / b.def
then you might want to replace some of the targets armor with a "default" value, otherwise your result will be identical to just increasing your attackers atk.

If you want to reduce the targets armor when attacking it and don't feel like doing the math in every damage formula, you could make use of Yanflys Buffs & States Core and use the states notebox to add an armor debuff to the target before the action:
Code:
<Custom Initiate Effect>
  // Clear the targets result as a safety measure.
  // Otherwise in MV, battlers become immune to a state if their last result shows it has been removed.
  // After that, add the armor reducing state:
  b.clearResult();
  b.addState(17);
</Custom Initiate Effect>

<Custom Conclude Effect>
  // Remove the state again after the hit is completed
  b.removeState(17);
</Custom Conclude Effect>

Edit: "remove" function for Arrays only exists in MZ, changed the code
I'm using Yanfly's armour scailing so it's "damage formula" * 100/100 + def/3. As the amount of armour increases it's worth less but a high armour unit will still have a high resistance which is why i only want part of the damage to ignore armour, so it doesn't trivialise tanky units with lower health but high defences
I think the formula I gave would still work as

Enemy 1
Def = 100 (- 0.3 = 70) Incoming damage is 200 so that attack would deal 130.

Enemy 2
Def = 200 (-0.3. 140) this one would deal 60.

Or do you want it so that Enemy 2 would take more damage?

if that's the case then

"a.atk * 1 + b.def * 0.5 - b.def * 1"
(This would add 50% of the targets def stat to your attack, so the higher their def, the more damage it would deal)

"a.atk * 1 - b.def * 0.5" would give the same damage output too.

To ignore part of the targets defence value, just do any * 0.9 or under
I'm using Yanfly's armour scailing
👋 It's best to give links to plugins that are relevant to your question:
Looks like the plugin has notetags that can be used on States, e.g. <Physical Armor Reduction: x>.

I've moved this thread to Plugin Support (from MV Support). Thank you.

Wouldn't a damage formula like this do the job?
Code:
4 * a.atk - 2 * (a.isStateAffected(123)?1:0.5) * b.def

With 123 being the identifier of your "ignore target's defense" state.
Replace 0.5 by 0.3 if you want 70% reduced defense instead of 50% etc...
And of course adapt it to your usual damage calculation: just replace :

"b.def" by
Code:
(a.isStateAffected(123)?1:0.5) * b.def[CODE]
I'm using Yanfly's armour scailing so it's "damage formula" * 100/100 + def/3
Ah, that makes more sense.

As Caethyril pointed out, the plugin has notetags that would allow your state to ignore a share of the targets armor for any action.
If you were looking for "x% of the damage calculation is done against an armorless target" then this is probably not exactly what you asked for, but it does still offer accelerating returns against heavily armored targets:
Penetrating 67% armor against a 300 DEF target: ~50% damage increase
50% bypassing armor against a 300 DEF target: ~50% damage increase
Penetrating 67% armor against a 900 DEF target: ~100% damage increase
50% bypassing armor against a 900 DEF target: ~150% damage increase

If you are still looking for exactly what you described in your post (or at least my understanding of it), then that effect will probably not cleanly translate to a flat- and/or percentage armor penetration. I do not know if that plugin allows you to modify the default "positive armor scaling" formula in the plugin parameters instead of specific skills, but if it does you could try to modify it like this:
(Here too replace 123 with the First Strike database ID)
Code:
let bypassRate = (user.isStateAffected(123) ? 0.5 : 0);
value *= bypassRate + (1 - bypassRate) * 100 / (100 + armor);

Keep in mind of course that if your average defense goes up over the course of a playthrough, then the value of First Strike will also increase with it, even against average targets.

Edit:
For example if you have 300 attack and magic and hit an enemy with 900 defence and 900 magic defence "(Atk * 2) * 100/(100+(900/3)" would deal 150 damage but with first strike it'd deal 185 and give 60 gold . "(Mat * 6) * 100/(100+(900/3) would give 450 but with first strike it'd be 585 and give 180 gold.
Based on those numbers my interpretation above might be completely off...

If your first strike is supposed to do a fixed amount of additional damage you could maybe use a custom confirm effect (see Buff & States Core) to modify the final damage value. This would ignore other damage modifiers as well though (like element rate, critical modifiers or guard):
Code:
<custom confirm effect>
  if ([1, 5].includes(this.item().damage.type)) {
    value += 135;
  }
</custom confirm effect>

If you want some of the other effects to be included but don't want to modify every single damage formula you may be able to use a custom plugin to modify the "Game_Action.prototype.evalDamageFormula" function (from rpg_objects.js).
Ah, that makes more sense.

As Caethyril pointed out, the plugin has notetags that would allow your state to ignore a share of the targets armor for any action.
If you were looking for "x% of the damage calculation is done against an armorless target" then this is probably not exactly what you asked for, but it does still offer accelerating returns against heavily armored targets:
Penetrating 67% armor against a 300 DEF target: ~50% damage increase
50% bypassing armor against a 300 DEF target: ~50% damage increase
Penetrating 67% armor against a 900 DEF target: ~100% damage increase
50% bypassing armor against a 900 DEF target: ~150% damage increase

If you are still looking for exactly what you described in your post (or at least my understanding of it), then that effect will probably not cleanly translate to a flat- and/or percentage armor penetration. I do not know if that plugin allows you to modify the default "positive armor scaling" formula in the plugin parameters instead of specific skills, but if it does you could try to modify it like this:
(Here too replace 123 with the First Strike database ID)
Code:
let bypassRate = (user.isStateAffected(123) ? 0.5 : 0);
value *= bypassRate + (1 - bypassRate) * 100 / (100 + armor);

Keep in mind of course that if your average defense goes up over the course of a playthrough, then the value of First Strike will also increase with it, even against average targets.
Wouldn't a damage formula like this do the job?
Code:
4 * a.atk - 2 * (a.isStateAffected(123)?1:0.5) * b.def

With 123 being the identifier of your "ignore target's defense" state.
Replace 0.5 by 0.3 if you want 70% reduced defense instead of 50% etc...
And of course adapt it to your usual damage calculation: just replace :

"b.def" by
Code:
(a.isStateAffected(123)?1:0.5) * b.def[CODE]
Wouldn't a damage formula like this do the job?
Code:
4 * a.atk - 2 * (a.isStateAffected(123)?1:0.5) * b.def

With 123 being the identifier of your "ignore target's defense" state.
Replace 0.5 by 0.3 if you want 70% reduced defense instead of 50% etc...
And of course adapt it to your usual damage calculation: just replace :

"b.def" by
Code:
(a.isStateAffected(123)?1:0.5) * b.def[CODE]

I have one big issue and it's the synergy it would have with other forms of armour penetration. The goal of First strike is to be a tool for characters in the Early - Mid game to deal bonus damage when they may not have much/any armour penetration while providing a form of usefulness in the late game by giving bonus gold.
Here is an example of what I mean:-

This is the standard damage formula for a basic attack
1713259288463.png


For this scenario, the ATK = 450 and DEF = 370.

1713259363150.png


After the Armour is factored in the the damage comes out at around 403 damage dealt.

Then If i attack again this time with First strike active, it would deal 20% of the damage ignoring armour. Here we can just use simple 20% armour penetration which would look like this:-
1713259567596.png


It deals around 100 damage more than just a basic attack, nothing over the top powerful but a sizeable chunk. There is 1 main issue however and that is if the character has some form of Armour penetration already, if the character using First Strike has 30% armour penetration the damage would look like this

1713259708389.png

Double damage is too much with First strike, when a stronger skill is used the damage will quickly ramp up.
I'm aiming to have it do less damage when a player has Armour penetration to allow for a more viable system where other characters can use them and not just the one that can negate the most Armour. If we separate the 30% Armour pen from the 20% Firsts trike we end up with:
1713259795870.png

it is still around a 240 damage increase from the base but it is nowhere near double. Additionally when you factor in the damage of just the 30% Armour pen (575) you find that First strike deals less damage. Without the 30% First strike increases damage by 100, with the Armour pen it increases it by 65. Making it have less value on characters with more armour pen.

One that I really want to avoid is having every damage formula for every party member skill to have an additional damage formula for First strike as it's more cluttered and could cause some issues but I think i may have a possible solution, though I've not been able to test it yet. If i have the First Strike state reduce ATK + MAT by 20%, then when damage is calculated. Using the Buff and State core I could put a function to deal the 20% damage, my only issue is would it be possible to store the value of the damage formula before Armour is factored in?
Edit:

Based on those numbers my interpretation above might be completely off...

If your first strike is supposed to do a fixed amount of additional damage you could maybe use a custom confirm effect (see Buff & States Core) to modify the final damage value. This would ignore other damage modifiers as well though (like element rate, critical modifiers or guard):
Code:
<custom confirm effect>
  if ([1, 5].includes(this.item().damage.type)) {
    value += 135;
  }
</custom confirm effect>

If you want some of the other effects to be included but don't want to modify every single damage formula you may be able to use a custom plugin to modify the "Game_Action.prototype.evalDamageFormula" function (from rpg_objects.js).
It is not supposed to do a fixed amount but i definitely think having the damage dealt through Buff & State Core would be the way to go. Do you know of any plugins for modifying damage evaluations or is that something I'd have to look at commissioning?
Here is what I suggest that gives full control over the common RPGm formula of 4x ATT - 2x DEF.

Give each skill a %damage. This is it's potency in relation to other skills. If they are all the same fine, but they should range between 10% and 400% with 100% being the baseline.

Add armor and penetration as new characteristics or parameters. Set each of these to 100. Don't let these grow by levelling. Only let skills, equipment, and passives modify them.

General damage formula: (skill%damage X ATK) + ATK - (DEF x ARM / PEN)

This does what RPG maker already does but allows you to finely specify the skill potency, and modify defense by armor and penetration. To bypass armor you either increase the attacker's penetration, decrease the defenders armor, or choose a skill with a high potency.

For magic skills, should you feel armor is irrelevant, you can substitute Spirit/Spirit for Arm/Pen in the formula. Substitute any stat in anywhere if it makes sense and adds balance to your game. What makes the general formula great is it's output range and balance.

For simple armor penetration could specify 2x PEN in the formula for that skill, or ARM/2, or go with (skill%damage X ATK) and ignore the rest.

This formula is not "Ignore 20% defense", it is only "25% more damage" (you multiply the basic formula by 1/0.8 = 1.25 ).

Usually when you say "ignore defense" the effect is supposed to be useless on zero def enemy.
But with this formula an enemy with zero def will receive more damage if you ignore their defense!

If you want to ignore 20% defense your formula would be something like this :

Code:
Damage = 2 * a.atk * (  100 / ( 100 + b.def * 0.8 / 3 ) )
my only issue is would it be possible to store the value of the damage formula before Armour is factored in?
I cannot check myself, but assuming the Armor Scaling plugin allows you to change the default "Positive Armor Rate" formula in its plugin parameters, that would probably be an ideal place to do your modifications.

Piling on to what TG22 said, according to Yanflys description armor penetration is also stacked multiplicatively (30%pen and 20%pen result in 44%pen), so you got some diminishing returns there as well.

Original thread: https://forums.rpgmakerweb.com/threads/is-it-possible-to-have-a-state-which-makes-some-of-the-damage-dealt-ignore-armour.167762/