MV Critical Popup

Jory4001

Veteran
Veteran
Joined
Feb 16, 2014
Messages
80
Reaction score
18
First Language
English
Introduction


I always thought the little flash of red wasn't enough to signify a critical hit, so I made this!


Features


- This Plugin will add a "Critical" popup above the damage popup.


- Customizable through use of the damage.png in the system graphics



It uses the damage.png graphic, in the purple section.


How to Use
This Plugin requires YEP_BattleEngineCore.js and must be placed below it on the plugin list.
*** All I did was add a line into a function that he already altered, not sure if this counts as re-posting his work as it's only to make my plugin compatible but i have given credit.

/*:
* @plugindesc Adds a Critical Popup.
* @author Jory4001
*
* @help
*
*
* Must be placed below YEP_BattleEngineCore
*
*
*/

// This function taken from Yanfly's YEP_BattleEngineCore.js for compatibility
Sprite_Damage.prototype.setup = function(target) {
var result = target.shiftDamagePopup();
if (result.missed || result.evaded) {
this.createMiss();
} else if (result.hpAffected) {
this.createDigits(0, result.hpDamage);
} else if (target.isAlive() && result.mpDamage !== 0) {
this.createDigits(2, result.mpDamage);
}
if (result.critical) {
this.createCrit(); // My Added line to Yanfly's Function
this.setupCriticalEffect();
}
};

//My Function that draws the Critical graphic
Sprite_Damage.prototype.createCrit = function() {
var w = this.digitWidth();
var h = this.digitHeight();
var sprite = this.createChildSprite();
sprite.setFrame(4 * w, 4 * h, 5 * w, h);
sprite.anchor.y = 2;
sprite.dy = 0;
};
Stand Alone Version
Below is the Stand Alone version, it will create problems if you have Yanfly's YEP_BattleEngineCire plugin.
 

/*:
* @plugindesc Adds a Critical Popup.
* @author Jory4001
*
* @help
*
*
* This version is not compatible with Yanfly's
* YEP_BattleEngineCore.js Please get the compatible
* version if you are using Yanfly.
*
*/



Sprite_Damage.prototype.setup = function(target) {
var result = target.result();
console.log("NewLog");
if (result.missed || result.evaded) {
this.createMiss();
} else if (result.hpAffected) {
this.createDigits(0, result.hpDamage);
} else if (target.isAlive() && result.mpDamage !== 0) {
this.createDigits(2, result.mpDamage);
}
if (result.critical) {
this.createCrit();
this.setupCriticalEffect();
}
};

Sprite_Damage.prototype.createCrit = function() {
var w = this.digitWidth();
var h = this.digitHeight();
var sprite = this.createChildSprite();
sprite.setFrame(4 * w, 4 * h, 5 * w, h);
sprite.anchor.y = 2;
sprite.dy = 0;
};
Credit and Thanks
- Yanfly for making his already awesome Plugins.

Author's Notes


- I might add plugin parameters that alter the positioning of the Critical text


  Usage


- Stand Alone version is free for use with non-commercial and commercial games, credit is nice but not needed.


- Yanfly Compatible version follows Yanfly's Usage rules Here
 
Last edited by a moderator:

Jonassowitsch

Warper
Member
Joined
Nov 29, 2018
Messages
1
Reaction score
0
First Language
German/English
Primarily Uses
RMMV
Hey, how do you download this plugin exactly?
I am having a hard time trying to get it to work...
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,981
Members
137,563
Latest member
cexojow
Top