Here's what happens usually when a Pokémon has a very long nickname:
And here's what happens after making the changes in this tutorial:
In a code editor (or Notepad or whatever), open
In the line underneath the one you just deleted, change
Next, open
I'm working my way through my game's UI one screen at a time, so I can't say whether or not this would work for (e.g.) the Party screen. (I mean, I haven't even figured out how to use
)
Also, I'm not much of a coder, so there's probably a way more efficient way of pulling this off. But it fixes a weird oversight in Essentials so I thought I'd share my progress anyway, in the hope that people can use it as a jumping-off point for their own fixes.

And here's what happens after making the changes in this tutorial:

In a code editor (or Notepad or whatever), open
Data\Scripts\011_Battle\004_Scene\006_Battle_Scene_Objects.rb
. Find the following function, and completely delete line 4 (nameOffset = nameWidth - 116 if nameWidth > 116
).
Ruby:
def draw_name
nameWidth = self.bitmap.text_size(@battler.name).width
nameOffset = 0
nameOffset = nameWidth - 116 if nameWidth > 116
pbDrawTextPositions(self.bitmap, [[@battler.name, @spriteBaseX + 8 - nameOffset, 12, :left,
NAME_BASE_COLOR, NAME_SHADOW_COLOR]]
)
end
In the line underneath the one you just deleted, change
pbDrawTextPositions
to pbDrawTextPositionsPokeName
.Next, open
Data\Scripts\007_Objects and windows\010_DrawText.rb
and find the pbDrawTextPositions
function. After the function (i.e. after the last end
), copy and paste this new function:
Ruby:
def pbDrawTextPositionsPokeName(bitmap, textpos)
textpos.each do |i|
textsize = bitmap.text_size(i[0])
x = i[1]
y = i[2]
case i[3]
when :right, true, 1 # right align
x -= textsize.width
when :center, 2 # centered
x -= (textsize.width / 2)
end
i[6] = :none if !i[5] # No shadow color given, draw plain text
if textsize.width > 116
drawsize = 116
else
drawsize = textsize.width
end
pbDrawShadowText(bitmap, x, y, drawsize, textsize.height, i[0], i[4], i[5])
end
end
I'm working my way through my game's UI one screen at a time, so I can't say whether or not this would work for (e.g.) the Party screen. (I mean, I haven't even figured out how to use
pbSetNarrowFont
for the "What will ◯◯◯◯◯◯◯◯◯◯ do?" text, yet. 
Also, I'm not much of a coder, so there's probably a way more efficient way of pulling this off. But it fixes a weird oversight in Essentials so I thought I'd share my progress anyway, in the hope that people can use it as a jumping-off point for their own fixes.
- Credits
- No credit required.