So i want my game to have different state messages, for example "Poison afflicts (Name)" instead of "(Name) is afflicted by poison". However, i can't put state messages before the name, and can't find a plugin that lets me do that. Is there any?
MV Plugin to put state messages before actor name?
JS Plugin RequestsYeah something like this should work.
JavaScript:
/*:
* @plugindesc Target name is displayed in state messages with %2.
* @author MechPen
* @help
*
* State Text Formatting
* Version 1.2
* MechPen
*
* Updates states mesaages to reference the target name with %2.
* %1 is used in skill as the skill name and I didn't want to be confusing.
*
*/
Window_BattleLog.prototype.displayAddedStates = function(target) {
target.result().addedStateObjects().forEach(function(state) {
var stateMsg = target.isActor() ? state.message1 : state.message2;
if (state.id === target.deathStateId()) {
this.push('performCollapse', target);
}
if (stateMsg) {
this.push('popBaseLine');
this.push('pushBaseLine');
this.push('addText', stateMsg.format("", target.name()));
this.push('waitForEffect');
}
}, this);
};
Window_BattleLog.prototype.displayRemovedStates = function(target) {
target.result().removedStateObjects().forEach(function(state) {
if (state.message4) {
this.push('popBaseLine');
this.push('pushBaseLine');
this.push('addText', state.message4.format("", target.name()));
}
}, this);
};
Window_BattleLog.prototype.displayCurrentState = function(subject) {
var stateText = subject.mostImportantStateText();
if (stateText) {
this.push('addText', stateText.format("", subject.name()));
this.push('wait');
this.push('clear');
}
};
Game_Actor.prototype.showAddedStates = function() {
this.result().addedStateObjects().forEach(function(state) {
var stateMsg = state.message1;
if (stateMsg) {
$gameMessage.add(stateMsg.format("", this._name));
}
}, this);
};
Game_Actor.prototype.showRemovedStates = function() {
this.result().removedStateObjects().forEach(function(state) {
if (state.message4) {
$gameMessage.add(state.message4.format("", this._name));
}
}, this);
};
That's great! But can you show an example screenshot of how to use it right? And will it work for when the state expires too?
You know how in Skills, %1 in the Message turns into the skiil's name. Well, now in States (only) %2 turns into the (Name).
So just write "Poison afflicts %2" in the State Message box. It works for all of the state messages.
So just write "Poison afflicts %2" in the State Message box. It works for all of the state messages.
Original thread: https://forums.rpgmakerweb.com/threads/plugin-to-put-state-messages-before-actor-name.133645/