Funplayer

Self proclaimed sponge.
Veteran
Joined
Oct 9, 2013
Messages
120
Reaction score
36
First Language
English
Primarily Uses
Introduction

Ever been annoyed at that default window not being resizable?  

 

Maybe you're more advanced, and just want the window bars to disappear, or you want to set the minimize button to be available?  

 

How about that annoying bar at the top that just won't go away while tinkering with fullscreen mods?

WUT IT DO

BY DEFAULT this script makes the window unlocked and resizable, then placed into the center of the screen with the default size of 544x416(width/height of default RPG Maker VX and RPG Maker VX Ace screen resolutions).  Thus allowing, even if you never move it, for the game screen to always exist at the center of the screen itself when you boot the game.

 

What else can you do with it?  Use the variables in the configuration below, and an interpreter call through game_interpreter simple script tinkering, or just simply use a script in an event, and you can resize the window when needed as the game is running. (Possible applications: locked window with option menu to enable a numeric change to size, unlocked window with a size snap in a menu, etc)

 

ZE SCRIPT!

http://pastebin.com/kb3RCpSs

Average Configuration

You can just drop it into your game, and it'll start working.  You don't need to configure it, unless you feel really compelled to configure it.  See advanced configuration.

You can change the resolution in-game via menus or events if you like, by changing $def_x, $def_y, $def_width, and $def_height to a value using an event script call or just using Ruby mathematical operators (the possibilities are almost endless).  The graphics update will automatically pick it up in one frame, and resize/move the window where you told it to be.

Saves your window position to exactly where you left it, inside of a simple text file stored within the game folder you install the script.  (Default: saved_resolution.txt)

Advanced Configuration

Comes pre-loaded with a standard size centered to the screen.  You can just go ahead and edit it how you want, change what you want your functioning window to be in bar thickness, resizeable, etc.  Pretty straight forward and easy once you get the hang of it.

Configure your window with a bit of help from the Microsoft website, and you're in business.

http://msdn.microsoft.com/en-us/library/windows/desktop/ms632600(v=vs.85).aspx

HOW IT DO

For starters it begins when the first script graphics update is called, so your window isn't actually being forced into a new state until during the first graphics update that accepts script updates, thus your visible window when you call the rgss dll file will remain visibly the same as before on boot, then snap into the last window state it was in when you moved the window last.

Every time you run your game, it loads and forces the screen into the last position with the same width and height as before, minus the values from the menu, the bars, and a small buffer value.

Then it checks on every update a simple global variable bool check, to determine if the values are the same or not, and if they are not the procedure to force resolution begins.

It uses a few external calls to the OS using win32 api, and communicates with the found window with the title of "RGSS" to resize and force window x,y,width,height based on the 17:13 wonky resolution built into RPG Maker VX and RPG Maker VX Ace.  

 

Every time you move or change the window, it writes to the save file at the end of the force_resolution method.

 

Potential Changes

I'll include an updated version if someone requests it, to allow you change window resolution math based on a different default resolution such as 4:3 or 16:9. 

Optional Configuration

If you don't want it to force resize to your resolution, you can simply comment out the force resize, and place the save function below where the force resize function was commented out.

 

Compatability

Works in RPG Maker VX, RPG Maker VX Ace.  I have not tested XP, but I assume it'll work if the graphics engine remained similar.
 
Last edited by a moderator:

Diretooth

Lv. 25 Werewolf
Veteran
Joined
Mar 10, 2013
Messages
1,235
Reaction score
449
First Language
English
Primarily Uses
RMMV
I'm not exactly sure what this script does, can you explain, or give a visual example, please?
 

Funplayer

Self proclaimed sponge.
Veteran
Joined
Oct 9, 2013
Messages
120
Reaction score
36
First Language
English
Primarily Uses
I'm not exactly sure what this script does, can you explain, or give a visual example, please?
I have made the post more clear, and concise with how the script functions, and how the user can configure it.
 
Last edited by a moderator:

heyguy

Veteran
Veteran
Joined
Feb 16, 2023
Messages
42
Reaction score
15
First Language
English
Primarily Uses
RMVXA
Sorry to necro this old thread but this script is really cool! Surprised it never got more attention! I'd love to use it in my 16:9 game. Here's a gif showing what it does- for those curious. It lets you scale the game window - something VXA doesn't feature natively!

window test3.gif

I hate to ask but is anyone able to adjust this to work with a 16:9 game? The game res I'm working at is 640x360. I tried to make it work myself but my ruby knowledge is severely lacking. Also, pressing the maximize button doesn't force the game into fullscreen - it just expands the window as large as can be. Is that just the nature of the script? Thanks y'all!
 
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

Ooops ended up trying out making my own A2 tile page instead of testing doors everywhere. Went well so far I think.
I guess I'm done making a blue squirrel's life difficult for posting new threads on different forums.
That's just for today so don't get used to this, squirrel-ish friend! :p
Got new hard drive, now trying to install the softwares I lost to the dead drive, and more than half of them won't install because they're already installed on the dead drive, and uninstallers won't run because they can't find where their programs are installed. So I take it having a drive die on you screws you in more ways than just data loss. >:\
PC got fixed finally. Back online again. Turns out I have no business trying to self repair pcs because it was getting to like 176F / 80C. Shop installed a totally new cooling system and now it runs fine and is super quiet.
When you're making major progress, but have to stop to go to work.

Forum statistics

Threads
131,485
Messages
1,220,209
Members
173,225
Latest member
ZecaVn
Top