The post-battle message window is displayed in the middle of the screen?

I want to simply change the position of the message window after the battle, so that it appears in the middle of the screen instead of the usual bottom. And when the character is upgraded, the message can be added with the face image. But I can't find a solution that fully meets the requirements.




I found a similar question, but it only has the victory screen, not including all the information about leveling up, acquiring skills, team death, etc.... So I would like to ask for help, thank you.
Hey there, try this code:

Ruby:
class Scene_Battle < Scene_Base
  alias :original_display_victory_message :display_victory_message


  def display_victory_message
    $game_message.position = 1
    original_display_victory_message
  end
end

I believe positionType 1 is for 'middle', 0 is for 'top' and 2 is for 'bottom'.

The process for displaying Actor face for level up is a bit more complicated. Bear with me and I'll see if I can find a solution.
not including all the information about leveling up, acquiring skills, team death, etc.

the snippet above only moves the window, it does not include additional information.

If I remember correctly (haven't used Ace in a decade), Yanfly had a script called "Victory Aftermath" that adds all that info.

Just remember that most of the script links on his old Ace Blog are dead, but the scripts themselves have been moved to github.
My apologies. I only have a JavaScript solution for this problem. If you're able to convert it into RGSS3, go ahead. But this works as expected:


JavaScript:
const _Window_Message_processEscapeCharacter =
    Window_Message.prototype.processEscapeCharacter;
  Window_Message.prototype.processEscapeCharacter = function (code, textState) {
    if (code === "A") {
      const actorId = this.obtainEscapeParam(textState);
      const actor = $gameActors.actor(actorId);
      if (actor) {
        $gameMessage.setFaceImage(actor.faceName(), actor.faceIndex());
        this.loadMessageFace();
        textState.x = this.newLineX(textState);
      }
    } else {
      _Window_Message_processEscapeCharacter.call(this, code, textState);
    }
  };

  Game_Actor.prototype.displayLevelUp = function (newSkills) {
    if (SceneManager._scene instanceof Scene_Battle) {
      const actorId = this._actorId;
      const text = TextManager.levelUp.format(
        this._name,
        TextManager.level,
        this._level
      );
      $gameMessage.newPage();
      $gameMessage.add(`\\A[${actorId}]${text}`);
      for (const skill of newSkills) {
        $gameMessage.add(
          `\\A[${actorId}]` + TextManager.obtainSkill.format(skill.name)
        );
      }
    } else {
      _Game_Actor_displayLevelUp.call(this, newSkills);
    }
  };

Basically I create a new text code called \A[x] which gets inserted at the start of the level up message. Whenever this text code is encountered, it will change the Actor's face to whatever actor ID x is.

I tested this on MZ and it works.

Here is a demonstration below.

Untitled-video.gif


I'm sorry that I can't be of much more help. You can try to convert the code into RGSS3 if you'd like (using some AI software).
Hello,

I tried the script from punitdh89 above, but it shows an error message?

25060301.png


I also tried the Yanfly-Victory Aftermath script mentioned by Andar, but it has a QUOTES function, and the character will comment after each battle. Since I don't need it at all, I tried to completely delete the QUOTES window below, but failed....


This is the related topic I found, and the link to the txt script modification part seems to be invalid?

The demonstration below by punitdh89 is indeed the effect I want, but I don't have AI software and I don't understand the code. How do I modify it manually?

I will continue to wait for help, But thanks in advance
Hey there, good news. I rewrote the script in RGSS3, and it worked as expected. Here is a demo.



And here is the script.

Ruby:
class Game_Actor
  alias_method :original_display_level_up, :display_level_up

  def display_level_up(new_skills)
    if SceneManager.scene_is?(Scene_Battle)
      $game_message.position = 1
      prefix = "\\A[#{@actor_id}]"
      text = prefix + sprintf(Vocab::LevelUp, @name, Vocab::level, @level)
      $game_message.new_page
      $game_message.add(text)
      new_skills.each do |skill|
        text = prefix + sprintf(Vocab::ObtainSkill, skill.name)
        $game_message.add(text)
      end
    else
      original_display_level_up(new_skills)
    end
  end
end

class Window_Message < Window_Base
  alias_method :original_process_escape_character, :process_escape_character
 
  def process_escape_character(code, text, pos)
    if code.upcase == 'A'
      actor_id = obtain_escape_param(text)
      actor = $game_actors[actor_id]
      unless actor.nil?
        face_name = actor.face_name
        face_index = actor.face_index
        $game_message.face_name = face_name
        $game_message.face_index = face_index
        draw_face($game_message.face_name, $game_message.face_index, 0, 0)
        pos[:x] = new_line_x
        pos[:new_x] = new_line_x
      end
    else
      original_process_escape_character(code, text, pos)
    end
  end
end
Hey there, good news. I rewrote the script in RGSS3, and it worked as expected. Here is a demo.

Hi, I tested it and it works great, it's exactly what I wanted, but I noticed a small problem, when teammates level up at the same time, the latter one's avatar seems to be stacked on the previous one? Other than that it looks great.
20250604.png
Hi, I tested it and it works great, it's exactly what I wanted, but I noticed a small problem, when teammates level up at the same time, the latter one's avatar seems to be stacked on the previous one? Other than that it looks great.
View attachment 342174
Oh how strange! I didn't even notice that. 😀

Try adding this line:
Ruby:
contents.clear_rect Rect.new(0, 0, 96, 96)

Just before this line:
Ruby:
face_name = actor.face_name

Let me know how that goes.
Oh how strange! I didn't even notice that. 😀

Try adding this line:
Ruby:
contents.clear_rect Rect.new(0, 0, 96, 96)

Just before this line:
Ruby:
face_name = actor.face_name

Let me know how that goes.


Hi, I tested it and it worked, now everything is fine! Thank you very much for your help. : D

Also, I would like to ask, is there a way to center the text of the experience & money and item acquisition messages? I added some blank spaces before the words to achieve the effect. Is it possible to achieve this using a script?
Hey there, it's possible but better if you PM me. The code is a bit complex.
Hey there, it's possible but better if you PM me. The code is a bit complex.
I see, I thought too simply. If it's too complicated, I think I can temporarily use blank space to deal with it.

I also followed the method of centering the message window, and it seems that the item acquisition message box can also be in the middle (although I don't quite understand how it happened), but now the problem has been solved successfully. Thank you again for helping me solve my difficulties : D I couldn’t have done this otherwise.
I see, I thought too simply. If it's too complicated, I think I can temporarily use blank space to deal with it.

I also followed the method of centering the message window, and it seems that the item acquisition message box can also be in the middle (although I don't quite understand how it happened), but now the problem has been solved successfully. Thank you again for helping me solve my difficulties : D I couldn’t have done this otherwise.
All good, happy to help. I do have the script for the center text ready in case you decide you want it.
All good, happy to help. I do have the script for the center text ready in case you decide you want it.
Of course! In that case, do I need to send a private message?
I'll send you a message now.

Original thread: https://forums.rpgmakerweb.com/threads/the-post-battle-message-window-is-displayed-in-the-middle-of-the-screen.178102/