设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 88|回复: 0

[转载发布] Unlock RGSS Window - Plug N Play Graphics Add-On

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    慵懒
    3 天前
  • 签到天数: 207 天

    连续签到: 1 天

    [LV.7]常住居民III

    3646

    主题

    862

    回帖

    2万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    21262
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    25800

    灌水之王

    发表于 前天 18:16 | 显示全部楼层 |阅读模式
    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 set value.  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.


    本贴来自国际rpgmaker官方论坛作者:Funplayer处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/unlock-rgss-window-plug-n-play-graphics-add-on.31247/
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-7-10 01:09 , Processed in 0.108951 second(s), 56 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表