How do I change the size of the window?

Firegloom

Villager
Member
Joined
Aug 13, 2022
Messages
9
Reaction score
0
First Language
Swedish
Primarily Uses
RMMZ
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?
 

Attachments

  • Skärmbild 2022-09-24 215208.png
    Skärmbild 2022-09-24 215208.png
    119.7 KB · Views: 6

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
4,143
Reaction score
3,195
First Language
EN
Primarily Uses
RMMZ
The 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:
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";
};
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.
 

Firegloom

Villager
Member
Joined
Aug 13, 2022
Messages
9
Reaction score
0
First Language
Swedish
Primarily Uses
RMMZ
The 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:
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";
};
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 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)
 

Attachments

  • Skärmbild 2022-09-24 215506.png
    Skärmbild 2022-09-24 215506.png
    314.7 KB · Views: 2

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
6,298
Reaction score
4,255
First Language
English
Primarily Uses
RMMV
I added the code to the game, but didn't notice any difference. Do I need to edit it to work?
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.
 

Firegloom

Villager
Member
Joined
Aug 13, 2022
Messages
9
Reaction score
0
First Language
Swedish
Primarily Uses
RMMZ
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.
 

Attachments

  • Skärmbild 2022-09-26 221420.png
    Skärmbild 2022-09-26 221420.png
    320.9 KB · Views: 3

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
6,298
Reaction score
4,255
First Language
English
Primarily Uses
RMMV
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.
 

Firegloom

Villager
Member
Joined
Aug 13, 2022
Messages
9
Reaction score
0
First Language
Swedish
Primarily Uses
RMMZ
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
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
6,298
Reaction score
4,255
First Language
English
Primarily Uses
RMMV
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.
 

Firegloom

Villager
Member
Joined
Aug 13, 2022
Messages
9
Reaction score
0
First Language
Swedish
Primarily Uses
RMMZ
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.
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
4,143
Reaction score
3,195
First Language
EN
Primarily Uses
RMMZ
Ah, I see. VisuStella's Message Core does have a plugin parameter for that:
  • General Settings -> Message Window -> Default Rows
It's the first documented plugin parameter, just above Default Width:
:kaohi:
[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);
...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.
 
Last edited:

Latest Threads

Latest Profile Posts

MaryFaces.png
Finally drew a face for my character Triple M, aka, Mary Mars McQueen. She's only ever had the TV thing on here head for her wrestling gimmick.
I have a screenshot from my Legend of Zelda: Breath of the Wild fan remake:
screenshot.png
I wish I'd been able to take a photo of the kittens at work. I love working at the pet shop... also those kittens just wanted my attention all day, but I had to stock the cat food and stick stickers on pet beds.
Of course, I did make some time for those sweet little kitties. They just wouldn't stop meowing!
Slightly late due to PC issues, but come and join me for Throwback Thursday! Tonight we'll be continuing Beneath a Steel Sky. https://twitch.tv/trihanstreams

Forum statistics

Threads
127,111
Messages
1,184,108
Members
167,063
Latest member
crimsoncrimes
Top