Do I have to look harder in the database or do I need a script else like that?
The Critical Hits setting on the skill only allows it to crit. The actual chance still comes from the user’s critical rate and the target’s critical evasion, so there isn’t a database setting that makes it guaranteed.
If you don’t need the critical hit message, Ace multiplies critical damage by 3, so you can turn off Critical Hits and multiply the damage formula by 3 instead, like (a.atk * 4 - b.def * 2) * 3. It does the same damage as a crit.
If you want a real crit with the message, a tiny script can do it. Open the Script Editor (F11), insert a new slot under ▼ Materials (above ▼ Main) and paste this:
class Game_Battler
alias always_crit_item_cri item_cri
def item_cri(user, item)
return 1.0 if item.note =~ /<always crit>/i
always_crit_item_cri(user, item)
end
end
Then add <always crit> to the Note box of any skill that should always crit. It ignores the target’s critical evasion too, so it’ll crit every time it hits.
Hey, Baz, I’m looking at a similar situation in MV, and I could really use some help if you have the time.
I’m heavily using the yanfly engine, and I figured I could use BattleCore, CriticalControl, BuffsStatesCore, and DamageCore to cobble together a state (Off Balance) that ensures the afflicted battler will receive a critical hit upon taking damage. I have it set to activate through a global passive Tracking skill that grants the state whenever a physical attack misses.
Now the last part seems to works perfectly using the notetag
<Custom Deselect Effect>
if (this.isPhysical() && (target.result().missed || target.result().evaded)) {
user.addState(13);
}
</Custom Deselect Effect>
My problem of course, is that the critical hits don’t happen when the effect is applied. This is the notetag I have in the Off Balance state
<Custom Select Effect>
// Force the incoming attack to be a critical hit (only if the skill allows criticals)
var skill = this.item();
if (skill && skill.damage.critical) {
this._prevForcedCriticalHit = $gameSystem._forceCritical;
this._prevForcedNoCriticalHit = $gameSystem._forceNoCritical;
BattleManager.actionForceCritical();
}
</Custom Select Effect>
<Custom Deselect Effect>
// Restore the previous critical settings
if (this._prevForcedCriticalHit !== undefined) {
$gameSystem._forceCritical = this._prevForcedCriticalHit;
$gameSystem._forceNoCritical = this._prevForcedNoCriticalHit;
}
</Custom Deselect Effect>
<Custom Respond Effect>
// Remove Off Balance after it successfully causes a critical hit
if (target.result().critical && target.result().hpDamage > 0) {
target.removeState(stateId);
}
</Custom Respond Effect>
Of course, I may be approaching this all wrong. Any help is greatly appreciated.
Your Off Balance notetags match Yanfly’s Critical Vulnerability tip line for line, and the timing checks out too. Select runs on the target before the hit roll, and this in there is the action, so this.item() works. So I’m wondering if the state is fine and the forced crit just never gets read.
Force Critical only gets checked in one place, Critical Control’s modifyCritical, and that only runs from Damage Core’s Damage Step 6. Could you open Damage Core in the Plugin Manager and check Steps 6 and 7? They should read:
Damage Step 6: critical = this.modifyCritical(critical, baseDamage, target);
Damage Step 7: target.result().critical = critical;
Those steps were reworked in Damage Core 1.04, and its changelog says to update them by hand when coming from an older version. If either one is missing or edited, the force gets skipped without any error. Critical Control also needs to sit below Damage Core in the list.
One other thing I’d change once it’s critting. The Respond Effect removes Off Balance before Deselect runs, so the Deselect never gets to put the old settings back. The force stays on until the action ends, and every hit after it in that same action would crit too. Moving the removal into the Deselect, after the restore, avoids that:
<Custom Select Effect>
var skill = this.item();
if (skill && skill.damage.critical) {
this._prevForcedCriticalHit = $gameSystem._forceCritical;
this._prevForcedNoCriticalHit = $gameSystem._forceNoCritical;
BattleManager.actionForceCritical();
}
</Custom Select Effect>
<Custom Deselect Effect>
if (this._prevForcedCriticalHit !== undefined) {
$gameSystem._forceCritical = this._prevForcedCriticalHit;
$gameSystem._forceNoCritical = this._prevForcedNoCriticalHit;
}
if (target.result().critical && target.result().hpDamage > 0) {
target.removeState(stateId);
}
</Custom Deselect Effect>
If Steps 6 and 7 look right and it still won’t crit, a screenshot of your plugin list would help me see if something else is touching the damage flow.
Thank you, Baz! You truly are a pillar of this community. It’s working perfectly!
My problem was in Damage Step 6 which I had somehow replaced with simply the symbol ` . Which explains why I hadn’t seen any critical hits in play testing either.
This was probably something that happened when I sat down to work early in the morning without coffee. Which I should never do.
Thank you again! There’s no telling how long it would’ve taken me to realize where the problem was.
we love you baz
Baz’s formula trick is a great beginner-friendly option — multiplying the damage by 3 gives you crit-level damage without any scripting at all. I did the same for a heavy attack skill in my project and it worked perfectly. The tiny script is worth trying too if you want the actual ‘Critical!’ message to pop up.