I was trying to find something that would allow me to use some sort of variable to show a the name of the target of a skill. I found this, which worked for a bit but once I started adding more plugins from other things it stopped working and gave a similar error that CardWielder received at the bottom of the thread. The plugins that I believe affected my error were the battle engine core and the damage core. Anyone think there's anything to replace that or change it to work with the others?
MV Can I make a skill use %2 to show the target's name in the message?
Javascript/Plugin Supportare the plugins in the correct order? plugins in the wrong order can cause all kinds of issues.
It's likely that one of the plugins you added later has overridden the method used to add the target name.
Try moving your plugin to the bottom of the list - which may work, but also may cause the other plugins to not work.
Try moving your plugin to the bottom of the list - which may work, but also may cause the other plugins to not work.
Yup that worked. I think I tried putting it above plugins just trying to make my plugin list look nicer. Thx!
So after a bit more testing, I discovered that when one of my enemies was using an attack that targeted multiple people it gave me the error again. I also changed the opacity of battle log window in the rpg_windows.js folder but the plugin also seems to change that back to the default 0. Anyone know a way to fix this?
Here's the js in the plugin:
Here's the js in the plugin:
Window_BattleLog.prototype.startAction = function(subject, action, targets) {var item = action.item();this.push('performActionStart', subject, action);this.push('waitForMovement');this.push('performAction', subject, action);this.push('showAnimation', subject, targets.clone(), item.animationId);this.displayAction(subject, item,targets);};Window_BattleLog.prototype.displayAction = function(subject, item,targets) {var numMethods = this._methods.length; var target = ""; for(var i = 0; i<targets.length-1; i++){ if(i!=0)target += ', '+ targets.name(); else target += targets.name() + " "; } if(targets.length!=1)target += 'and ' + targets[targets.length-1].name(); else target += targets[0].name(); if (DataManager.isSkill(item)) {if (item.message1) {this.push('addText', subject.name() + item.message1.format(item.name,target));}if (item.message2) {this.push('addText', item.message2.format(item.name,target));}} else {this.push('addText', TextManager.useItem.format(subject.name(), item.name,target));}if (this._methods.length === numMethods) {this.push('wait');}}; if(Imported.YEP_BattleEngineCore){ BattleManager.actionDisplayAction = function() { this._logWindow.displayAction(this._subject, this._action.item(), this._targets); return false;};Window_BattleLog.prototype.startAction = function(subject, action, targets) {};Yanfly.BEC.Window_BattleLog_displayAction = Window_BattleLog.prototype.displayAction;Window_BattleLog.prototype.displayAction = function(subject, item,targets) { if (eval(Yanfly.Param.BECFullActText)) { Yanfly.BEC.Window_BattleLog_displayAction.call(this, subject, item,targets); } else { this._actionIcon = item.iconIndex; this.push('addText', '<SIMPLE>' + item.name); if (item.message2) { this.push('addText', '<CENTER>' + item.message2.format(item.name)); } }};}
Moderator note: As this is related to your existing thread, I am merging them.
(the double post is due to merging)
(the double post is due to merging)
Original thread: https://forums.rpgmakerweb.com/threads/can-i-make-a-skill-use-2-to-show-the-targets-name-in-the-message.140364/