Padding one side of message box

Hello all,

I'm looking to pad just the right side of the message box while using word wrap and yanfly's message core.
I have a bust image on the right side of the box and would like to have the word wrap start a new line before it overlaps the picture.

All I've managed is to pad both sides of the box, but I would just like the right side padded. Does anyone know how I would go about doing this?
I believe something like this should work:
Code:
_Window_Base_wordwrapWidth = Window_Base.prototype.wordwrapWidth;		// Alias
Window_Base.prototype.wordwrapWidth = function() {
	return (_Window_Base_wordwrapWidth.call(this) - 200);		// Callback
};
Save it as a .js file (name it whatever you like) and import it like you would a plugin. Make sure it's under YEP_MessageCore in your load order, otherwise it'll cause an error.

Basically, this just says "subtract 200 pixels from the normal word wrap width"; change the 200 to a value that suits your bust images. =)

[Edited as mentioned in my follow-up post.]
Thanks so much for the reply,

I have saved the js file and put it under MessageCore in my load order but I am still getting an error.

It says

TypeError
Cannot read property 'call' of undefined


Sorry for the hassle but any help would still be appreciated!
Whoops, there was a typo, sorry! Should be wordwrapWidth, not wordWrapWidth... 😴

Here's a corrected version, which I've just tested:
Code:
_Window_Base_wordwrapWidth = Window_Base.prototype.wordwrapWidth;		// Alias
Window_Base.prototype.wordwrapWidth = function() {
	return (_Window_Base_wordwrapWidth.call(this) - 200);		// Callback
};
I'll edit my previous post, too. 😅
It worked! Thank you so much.

I'm always so amazed that there are kind people out there willing to sacrifice their time to help strangers.

Your name is on the list! In the miracle event that I actually finish and publish a game shout outs for caethyril!

Original thread: https://forums.rpgmakerweb.com/threads/padding-one-side-of-message-box.95444/