I want the resolution of my game to be smaller than the standard. Although I can change the overall UI size, I can't find a setting for the size of the window. Plugin needed?
How do I change the size of the window?
RPG Maker MZ SupportThe System 2 tab has options for Screen Height/Width as well as UI Area Height/Width, it's generally recommended to set them both to the same size.
I did a quick test with 416 width and noticed a horizontal scroll-bar...turns out that's because of the game's error printer element. This mini-plugin seemed to fix the issue for me:
The engine's not really designed for smaller resolutions, though. For example, you may also need a plugin of some kind to handle the menu layouts, because the defaults are designed to occupy more space.
I did a quick test with 416 width and noticed a horizontal scroll-bar...turns out that's because of the game's error printer element. This mini-plugin seemed to fix the issue for me:
JavaScript:
/*:
* @target MZ
* @plugindesc Resolution-dependent error printer (for small resolutions).
* @help Free to use and/or modify for any project, no credit required.
*/
Graphics._updateErrorPrinter = function() {
const width = this._stretchWidth() * 0.8;
const height = this._stretchHeight() * 0.8;
this._errorPrinter.style.width = width + "px";
this._errorPrinter.style.height = height + "px";
};
I added the code to the game, but didn't notice any difference. Do I need to edit it to work?
In case you misunderstood my question, I'm looking to make the box itself smaller, like how it is in Omori. I measured it roughly, and it seems to be around 3,5 tiles tall, while the standard is roughly 5,5 tiles. (32x32)
The code is just to get rid of the scroll bar when the window is set to a smaller size.
Did you actually change the screen size in your system tab the way caethyril said? Your screenshot doesn't look like you did.
Yes. They seemed to have misunderstood my question.
I don't think we're misunderstanding your question. The size you set in that screenshot where it says Screen Width and Screen Height is going to be the size of your game's window.
If you're getting black bars on the sides you need to either make your maps wider or make the width of your game window smaller. The window can not adjust itself to the size of your maps.
I'm trying to change the size of the TEXT BOX. The game window is exactly the size I want
Okay...that is literally the first time you said those words in this thread. You just used the words "window" and "box" which would be reasonably interpreted as the game window.
Check out VisuStella's Message Core.
In everything I've read it has referred to the text box as a window, so I just assumed that's what it was called here.
And I've tried Visustella. It only has a setting for standard width it seems. That's better than nothing but I want to edit the STANDARD height.
Ah, I see. VisuStella's Message Core does have a plugin parameter for that:
www.yanfly.moe
👋
[Edit: I notice you've discovered that for yourself in your other thread (link).]
Alternatively you could try a mini-plugin like this (untested):
...but you'll probably want to stick with VisuStella's for the extra features.
For future reference: technically the game has objects (containers) that work in a "window-like" way (the message window is just one of these). However, the application (browser) that runs the game has an OS window. If the context is unclear, you can expect confusion.
To get around this, you can refer to the in-game windows by their purpose or related event command, e.g. "message box" or "Show Text window". You could also consider editing/cropping your screenshots to clearly identify the relevant part.
- General Settings -> Message Window -> Default Rows
Message Core VisuStella MZ - Yanfly.moe Wiki
[Edit: I notice you've discovered that for yourself in your other thread (link).]
Alternatively you could try a mini-plugin like this (untested):
JavaScript:
/*:
* @target MZ
* @plugindesc 3 rows for Show Text.
* @help Free to use and/or modify for any project, no credit required.
*/
// Patch - override message rect height.
void (alias => {
Scene_Message.prototype.messageWindowRect = function() {
const rect = alias.apply(this, arguments);
rect.height = this.calcWindowHeight(3, false) + 8;
return rect;
};
})(Scene_Message.prototype.messageWindowRect);
For future reference: technically the game has objects (containers) that work in a "window-like" way (the message window is just one of these). However, the application (browser) that runs the game has an OS window. If the context is unclear, you can expect confusion.
To get around this, you can refer to the in-game windows by their purpose or related event command, e.g. "message box" or "Show Text window". You could also consider editing/cropping your screenshots to clearly identify the relevant part.
Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-change-the-size-of-the-window.151533/