- 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.
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: