[LZ] Change Screen Resolution Ingame


LZ Plugin - Change Screen Resolution Ingame v1.0
Lanzy
​

Introduction

This gives the options and convencience of changing screen resolutions ingame,
while not having to worry about hard coding the resolution. Also a nice feature
if you want to test the screen resolution compatibilies in your game without
having to restart and change screen resolutions everytime.

In total you can use up to 4 different screen resolutions. The default
resolution, which is set in the System 2 config in MZ is selected by default.
There is no restriction on setting the screen resolution. MZ is the limit
however, I'm sure there are boundaries.

Note: Changing the game resolution ingame will keep the resolution on the next
game start. Like with other audio or game options, the screen resolution is
also saved in the config files.

Features
Adds up to 4 different screen resolution options ingame.

How to Use
Example

Config A to options - Whether or not Config A should be shown in the game options
Width - Screen width in pixels
Height - Screen height in pixels

Note: Default Config is always seen in the options.

Screenshots
1654793511605.png


Make sure to use the same screen dimensions set in System 2 for your default screen size in the Display Config default in the plugin settings (pic below). Otherwise in the game options the default recommended button will show the wrong resolution.

1654793747709.png



1654793295133.png

Ingame view


1654793320770.png

The selected Resolution is immediately used.

Download

Github:
https://github.com/CodeRedLancer/LZ_ChangeScreenRes

Terms and Credits
Free to use, just mention me in the credits and I'm happy.
This Plugin is exactly what I need! Really cool.
But this plugin sadly seems to not work with the latest version of MZ.
some way to add it to main menu core?
Sadly it gave me error "this.screenScale is not a function" whenever I click on any option.
Edit: Nvm, I managed to fix it by adding this part to the plugin (below line
LZ.Scene = LZ.Scene || {};):

Scene_Boot.prototype.adjustWindow = function() { return };

To change window size to the same as screen size, change the whole
Window_Options.prototype.changeResolution part to:

Window_Options.prototype.changeResolution = function(symbol) { const value = this.getConfigValue(symbol); if (ConfigManager[symbol].selected) { this.setConfigValue(symbol, value); LZ.ChangeScreenRes.restartSceneOptions(); // Add these lines to resize the game window if (Utils.isNwjs()) { // Check if running in NW.js const { width, height } = value; window.resizeTo(width, height); } } this.redrawItem(this.findSymbol(symbol)); this.playCursorSound(); }

I attached the fixed version below. It also fixes the issue of the game starting as the default window size.

Original thread: https://forums.rpgmakerweb.com/threads/lz-change-screen-resolution-ingame.148368/