I'm wanting to have a different battle start message (ie. X has emerged) for boss fights, is there a way to change these messages in the middle of the game? I'm open to solutions with or without plugins.
Any way to change the battle messages in the middle of the game?
RPG Maker MV SupportUse Eli Message Actions and put a Javascript escape code in that message field that checks for a switch
hakuenstudio.itch.io
Hakuen Studio MV Museum by Hakuen Studio
All Hakuen Studio MV Plugins! For free!
hakuenstudio.itch.io
You would have to use a plugin, as you can probably see there's no setting in the editor to do that.
Paste the below into a text editor, save as a *.js file, include as a plugin.
Then you should be able to give your bosses a notetag such as
and it will display that instead of the default emerge message.
Paste the below into a text editor, save as a *.js file, include as a plugin.
Code:
Game_Troop.prototype.enemyNames = function() {
var names = [];
this.members().forEach(function(enemy) {
var name = enemy.originalName();
if (enemy.isAlive() && !enemy.enemy().meta.emerge && !names.contains(name)) {
names.push(name);
}
});
return names;
};
BattleManager.displayStartMessages = function() {
$gameTroop.enemyNames().forEach(function(name) {
$gameMessage.add(TextManager.emerge.format(name));
});
$gameTroop.members().forEach(enemy =>
{
if (enemy.enemy().meta.emerge)
$gameMessage.add(enemy.enemy().meta.emerge);
});
if (this._preemptive) {
$gameMessage.add(TextManager.preemptive.format($gameParty.name()));
} else if (this._surprise) {
$gameMessage.add(TextManager.surprise.format($gameParty.name()));
}
};
Then you should be able to give your bosses a notetag such as
Code:
<emerge:The ferocious dragon uncoils itself!>
As @AquaEcho points out, text codes are valid here...including
As you might notice, though, there's a limitation: the format placeholder
In case you're interested, I have a plugin similar to what @ATT_Turan suggested, but with a broader feature set (which you might not need). It's Cae_BattleMessages, found in my MV plugin thread.
\n[x] (name of actor ID x) or \v[x] (value of variable ID x). That means you could store most of the emerge message in an actor or a variable, e.g.- Set Actor Name -> FakeActor:
readies itself for battle!; or - Control Variables -> Script:
"readies itself for battle!".
%1 \n[23]. This would also require you to store a default value in the actor/variable at the start of each playthrough.As you might notice, though, there's a limitation: the format placeholder
%1 gets replaced before any text codes, so it can't be part of the stored message. (Also, that approach as-is won't work for random encounters...but I guess that's not a problem if you're only looking to do this for boss fights.)In case you're interested, I have a plugin similar to what @ATT_Turan suggested, but with a broader feature set (which you might not need). It's Cae_BattleMessages, found in my MV plugin thread.
Original thread: https://forums.rpgmakerweb.com/threads/any-way-to-change-the-battle-messages-in-the-middle-of-the-game.173285/