I need a 'shatter-kill' effect for my Frozen state. Basically, when a target is frozen & is hit with a physical attack, there would be a random chance for that target to die instantly. I need a way to pull this off with a sound effect. I don't care if its done by plugin or damage formula.
Need Shatter Kill effect for Frozen state
RPG Maker MV SupportIf you know a bit of javascript, you might want to take a look at the lunatic mode notetags from Yanfly's Buffs & States Core, in particular the <Custom Respond Effect> notetag (allows something to happen directly after damage is applied).
http://yanfly.moe/2015/12/25/yep-50-buffs-states-core/
http://yanfly.moe/2015/12/25/yep-50-buffs-states-core/
The sound effect is why it can't be done by damage formula alone - otherwise you could enter a conditional check for the state into every physical skills damage formula (which would be a lot of work anyway).
So you'll need a plugin like the one already mentioned.
Well I don't know most functions by hand so what I need is the evaluation statements that checks for a physical attack & produces a random check (assuming I can set a % chance for it to happen) & if it goes off, play a sound effect. I have a Excel Spreadsheet full of JS evaluation codes but its pretty big & it doesn't include every possibility. Its like looking for a needle in a haystack. If someone knows how to pull this off off the top of their head before/if I figure it out I'd appreciate it.
EDIT: I found some reference material for the first time I needed help with this. Found a notetag for the shatter kill effect but it doesn't have a way to do a random number check or a sound effect, but I just found some script calls for playing sound effects but I'm not sure how to implement it:
Code:
<Custom Respond Effect>
// Get the fire element ID.
var fire = 3;
// Check if physical damage is dealt.
if (this.isPhysical() && target.result().hpDamage > 0) {
// Set the target's HP to 0.
target.setHp(0);
// Check if fire damage is dealt.
} else if (this.item().damage.elementId === fire) {
// Get the Freeze status effect ID.
var stateId = 110;
// Remove the status effect from target.
target.removeState(stateId);
}
</Custom Respond Effect>

Ill help you with that.
So basically, you want a state (Frozen) that, does a check, if the check passes, it will shatter the user(insta kill) and plays a shatter sound effect? If the check does not passes, it deals damage normal? It deals 0 dmg?
So basically, you want a state (Frozen) that, does a check, if the check passes, it will shatter the user(insta kill) and plays a shatter sound effect? If the check does not passes, it deals damage normal? It deals 0 dmg?
Checks for 'Physical' damage first. Not the user, the target. If it doesn't pass, normal damage. But yeah, that covers it.
Ok, I´ll work on it. Im assuming you are using Yanfly plug ins? I only know how to code those skills using Yanfly plug ins.
Yeah. The <Custom Respond Effect> works with Yanfly's Buff & States Core.
Original thread: https://forums.rpgmakerweb.com/threads/need-shatter-kill-effect-for-frozen-state.108745/