I'm trying to do something nice for my favorite RPGMaker content creator SierraLee.
Her magnum opus "The Last Sovereign" is a wordy game, and every time she posts an update about half the bugs we find are instances where a string fed into an event pages' "@>Text:" command generates a message box that exceeds the height of the display window and causes it to scroll. It's difficult to prevent these because RPGMaker VX Ace's text preview is not exactly WYSIWYG. Presumably Enterbrain thought this would be unnecessary because Kanji (or whatever, my knowledge of Japanese typography is very thin on the ground) is a fixed width script?
Looking at Shaz's nifty Text Extractor script, and poking around looking for a place in the game project files outside of code where the font and character size used in game is set (there is none, I think), what occurs to me is that it MIGHT be possible to programmatically determine how many lines of a RPGMaker a given string will display in an RPGMaker textbox, and then export the event info of any event or common event that exceeds a fixed number of lines. 4 for standard dialogue, ~16 for the longer fullscreen texts I think.
The tricky part would be coming up with a function that gets the number of RPGMaker lines for a given string and a given font characteristic, and I have no idea where to begin doing that. Once such a function was created though, getting a script to list event pages with overruns would be a fairly straightforward bit code welding into Shaz's already extant Text Extractor script.
Is this even possible, assuming a constant font?
Her magnum opus "The Last Sovereign" is a wordy game, and every time she posts an update about half the bugs we find are instances where a string fed into an event pages' "@>Text:" command generates a message box that exceeds the height of the display window and causes it to scroll. It's difficult to prevent these because RPGMaker VX Ace's text preview is not exactly WYSIWYG. Presumably Enterbrain thought this would be unnecessary because Kanji (or whatever, my knowledge of Japanese typography is very thin on the ground) is a fixed width script?
Looking at Shaz's nifty Text Extractor script, and poking around looking for a place in the game project files outside of code where the font and character size used in game is set (there is none, I think), what occurs to me is that it MIGHT be possible to programmatically determine how many lines of a RPGMaker a given string will display in an RPGMaker textbox, and then export the event info of any event or common event that exceeds a fixed number of lines. 4 for standard dialogue, ~16 for the longer fullscreen texts I think.
The tricky part would be coming up with a function that gets the number of RPGMaker lines for a given string and a given font characteristic, and I have no idea where to begin doing that. Once such a function was created though, getting a script to list event pages with overruns would be a fairly straightforward bit code welding into Shaz's already extant Text Extractor script.
Is this even possible, assuming a constant font?