skip battle window opening animation

So I have an enemy sprite that's just the upper half of an enemy with the rest under the party's window
1676501760144.png
<- basically like this.
But the initial part of battle where the party window is opening shows the entire screen so you can see that the enemy is just half a sprite. I could draw the entire sprite, but MZ doesn't seem to have any way to change where enemy sprites are anchored much less a single sprite, and it effectively doubles the amount of work for sprites that work like this. I ran into a similar problem with bosses I wanted to take up the entire screen which I solved by giving up, making the boss have a custom background with the boss on it and the actual enemy as a blank sprite, which I could use for this too, but it feels like a really janky solution to solve the problem of like 2 frames of a window opening.
You can skip the animation for the battle status window's open function by adding this snippet as a plugin:

JavaScript:
Window_BattleStatus.prototype.open = function() {
    this.openness = 255;
}

If you're using the default battle system, the party command window opens adjacent to the battle status window. That looks a bit weird with the status window opening instantaneously, so you might want to make the party command window skip its animation as well:

JavaScript:
Window_PartyCommand.prototype.open = function() {
    this.openness = 255;
}
You can skip the animation for the battle status window's open function by adding this snippet as a plugin:

JavaScript:
Window_BattleStatus.prototype.open = function() {
    this.openness = 255;
}

If you're using the default battle system, the party command window opens adjacent to the battle status window. That looks a bit weird with the status window opening instantaneously, so you might want to make the party command window skip its animation as well:

JavaScript:
Window_PartyCommand.prototype.open = function() {
    this.openness = 255;
}
Works perfect, thanks!

Original thread: https://forums.rpgmakerweb.com/threads/skip-battle-window-opening-animation.155000/