//=============================================================================
// CustomSkillMessages.js
//=============================================================================
/*:
* @target MV
* @plugindesc v0.1
*
@Author Kenen @ RPGMakerWeb
*
@Help CustomSkillMessages.js
*
* A simple plugin to allow for custom formatting of specific skill messages.
*/
(() => {
// Start plugin
var customText = false;
_alias_Window_BattleLog_displayAction = Window_BattleLog.prototype.displayAction
Window_BattleLog.prototype.displayAction = function(subject, item) {
// Carrying this over from the default function; not sure what it does!
var numMethods = this._methods.length;
// Check if the current action is a skill and if you've configured custom text for it...
if (DataManager.isSkill(item)) this.checkCustomText(subject, item);
if (customText) {
// I don't actually know what this does, but I'll include it to be safe
if (this._methods.length === numMethods) {
this.push('wait');
}
customText = false;
return;
}
// ...Otherwise, use the default editor text
_alias_Window_BattleLog_displayAction.call(this, subject, item)
};
Window_BattleLog.prototype.checkCustomText = function(subject, item) {
// The user's name
var subject = subject.name();
// The target's name
var target = BattleManager._targets[0].name();
// Begin skill config; do not edit above this line
// Start custom messages for skill id 1
if (item.id === 1) {
// This will print as "(User) attacks (target)!"
var message1 = subject + " attacks " + target + "!";
// This will print as "The Slime A is now solely focused on Harold!"
var message2 = false;
CustomText = true;
}
// End custom messages for skill id 1
if (item.id === 15) {
// This will print as "(User) attacks (target)"
var message1 = subject + " attacks " + target + "!";
// This will print as "The Slime A is now solely focused on Harold!"
var message2 = false;
customText = true;
}
// End custom messages for skill id 15
if (item.id === 16) {
// This will print as "(User) attacks (target)"
var message1 = subject + " attacks " + target + "!";
// This will print as "The Slime A is now solely focused on Harold!"
var message2 = false;
customText = true;
}
// End custom messages for skill id 16
if (item.id === 17) {
// This will print as "(User) attacks (target)"
var message1 = subject + " attacks " + target + "!";
// This will print as "The Slime A is now solely focused on Harold!"
var message2 = false;
customText = true;
}
// End custom messages for skill id 17
if (item.id === 21) {
// This will print as "(User) attacks (target)"
var message1 = subject + " attacks " + target + "!";
// This will print as "The Slime A is now solely focused on Harold!"
var message2 = false;
customText = true;
}
// End custom messages for skill id 21
if (item.id === 4) {
var message1 = subject + " caught " + target + " offgaurd!";
var message2 = false;
customText = true;
}
// End custom messages for skill id 4
if (item.id === 7) {
var message1 = subject + " hugs " + target + ".";
var message2 = false;
customText = true;
}
// End custom messages for skill id 7
if (item.id === 9) {
var message1 = subject + " motivates " + target + "!";
var message2 = false;
customText = true;
}
// End custom messages for skill id 9
if (item.id === 12) {
var message1 = subject + " punishes " + target + " for being too rough!";
var message2 = false;
customText = true;
}
// End custom messages for skill id 12
if (item.id === 23) {
var message1 = subject + " was stepped on by " + target + "!";
var message2 = false;
customText = true;
}
// End custom messages for skill id 23
if (item.id === 25) {
var message1 = target + " tries to grab " + subject + " too hard!";
var message2 = false;
customText = true;
}
// End custom messages for skill id 25
// Repeat here for skills as desired, e.g. if (item.id === 12)
// End skill config; do not edit below this line
if (message1) this.push('addText', message1);
if (message2) this.push('addText', message2);
}
// End plugin
})();