MZ Customized Message Background Auto-detecting Message Length

Hi, I've been stuck for a while on this and after searching all over I'm left to nothing else but to make a plugin request thread about it:

I've been planning to use custom backgrounds for my messages, and so far I've been using Galv's Message Background MZ without any particular issues. Now, I have also decided to center in the middle of the screen all message text, and I've been using VisuMZ_MessageCore and the eccellent Naoso_EveryMessageControl with the <center> tag on to accomplish this. I'm also using EliMZ_BitmapFontPro to use a bitmap font, and all these plugins together are working perfectly fine at getting the exact visual result I was aiming for.

Problem is, I'd also like to have the custom backgrounds (in my case, comic baloons pretty much) never be too wider from the actual text shown. Ideally (but I have ZERO code knowledge, mind that) I'm picturing that for every drawn message box the actual message length is calculated and used as a reference (along with the number of rows, 2 tops in my case) to pick and use a custom background .png out of a pool - of course, I'd have to manually drawn something like 20 baloons to approximate every message length possible (starting from a simple "?" to a full screen-wide text message), but it would still look fine to me. In short, something similar to bubble messages (auto-sized to the message length) but letting you use custom message backgrounds.

As I said, I have zero code knowledge - I have no clue how feasible this would be, but I'd be curious at least to know how crazy of an idea it is - thanks!
Hi!
Can you shown some visual examples of what you mean?
Hi!
Can you shown some visual examples of what you mean?
Hi, here's a quick doodle:

example.png


The Walrus himself is just a picture to act as the talking character's portrait, while the message box is handled by Rpg Maker (as I mentioned, it goes through a couple plugins to always center it at the middle of the screen). The baloon here would be a simple pre-drawn .png that, on every dialogue initiated, would be automatically picked from a folder of pre-made baloons to automatically fit with the dialogue's width and act as a background message box. Hope it's clearer now!
You could have a script count the number of characters in the text line as a proxy for length then pick images based on character count
I tried to find an event system that did something like this, by editing the font sizes in the message the words would enter the balloon.
Used in Vx ace
pensa3.png
Window.png

You need to know a little about events to set them up correctly, such as showing images, image opacity, image position, text transparency and line limits.
You could have a script count the number of characters in the text line as a proxy for length then pick images based on character count
I don't know how Rpg Maker would internally calculate the message length, but that sounds like good idea - I do wonder though if using a bitmap font would interfere.

I tried to find an event system that did something like this, by editing the font sizes in the message the words would enter the balloon.
Used in Vx ace
View attachment 313916View attachment 313917
You need to know a little about events to set them up correctly, such as showing images, image opacity, image position, text transparency and line limits.
Something akin to this would probably be fine. I'd be perfectly happy with a complete empty windowskin.png file (well aside for the font colors I guess, but even then with the bitmap font it might be irrelevant) as long as the plugin would be able to calculate the message window length and pick up a baloon accordingly. Again though, I really know next to nothing when it comes to code.

Original thread: https://forums.rpgmakerweb.com/threads/customized-message-background-auto-detecting-message-length.170911/