Text spacing with Face problem

Well, I had a problem with the text spacing when it encounters the face graphic in message box.

what happens is that when you put the Face graphic, the text separates a little from the graphic and I wanted to know how to reduce that size of spacing.
I think these images explain it better:

As it is originally seen:
f6cHhuh.png


how I want it to look (edited image)
PC96eNb.png


but at the same time I do not want that spacing to affect the text without a face graphic.
that when it is without a graph, the spacing is normal.

Normal spacing without face graphic:
8ofYaCJ.png

would it be possible to modify the spacing only in message box?
That happens because the standard padding is applied to both text and face so when you sum them up you get a space that is twice what you need. Of course you can change it editing how faces are handled inside game message window but to do that you have to add a script. I'll check it out when I can access my computer.
That happens because the standard padding is applied to both text and face so when you sum them up you get a space that is twice what you need. Of course you can change it editing how faces are handled inside game message window but to do that you have to add a script. I'll check it out when I can access my computer.

I would really appreciate it, just I try to modify the spacing through Window_Base in the section of:

Code:
   # ------------------------------------------------- -------------------------
   # * Get Standard Padding Size
   # ------------------------------------------------- -------------------------
   def standard_padding
     return 14
   end

but only modifies the spacing when there is no Face graphic.
and when the Face graphic is precentered in text box, it still continues with the text spacing by default.
I would really appreciate it, just I try to modify the spacing through Window_Base

That is because you are looking inside the wrong script. $game_message is an instance of the Window_Message class, which inherits from Window_Base but is a different class.

EDIT: Line 298 of Window_Message contain the new x coordinate when using faces inside your message. Just edit it to be like this:

Code:
#--------------------------------------------------------------------------
# * Get New Line Position
#--------------------------------------------------------------------------
def new_line_x
  $game_message.face_name.empty? ? 0 : (112 - standard_padding)
end

This way you remove the standard padding from that number and it is compatible to other scripts that change your standard padding value.

I added a quote so that you could get a notification about my edit.
That is because you are looking inside the wrong script. $game_message is an instance of the Window_Message class, which inherits from Window_Base but is a different class.

EDIT: Line 298 of Window_Message contain the new x coordinate when using faces inside your message. Just edit it to be like this:

Code:
#--------------------------------------------------------------------------
# * Get New Line Position
#--------------------------------------------------------------------------
def new_line_x
  $game_message.face_name.empty? ? 0 : (112 - standard_padding)
end

This way you remove the standard padding from that number and it is compatible to other scripts that change your standard padding value.

I added a quote so that you could get a notification about my edit.


oh, it has worked perfectly!
Thank you 🙂

Original thread: https://forums.rpgmakerweb.com/threads/text-spacing-with-face-problem.97135/