Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

这就是我的广撒网策略啊,可惜没在b站也发一份

bro你这个是不是默认在816*624分辨率下放置立绘的?好像其他分辨率会阻挡地图(P.S.:快速vibecoding整了个写死的可选分辨率的插件,你可以试试看

//=============================================================================

// LZ_ChangeScreenRes.js (Minimal hardcoded version, v3.0.1)

// No parameters needed. Safe _centerElement handling.

//=============================================================================

var Imported = Imported || {};

Imported.LZ_ChangeScreenRes = true;

var LZ = LZ || {};

LZ.ChangeScreenRes = LZ.ChangeScreenRes || {};

LZ.ChangeScreenRes.version = "3.0.1";

console.log("LZ_ChangeScreenRes.js v" + LZ.ChangeScreenRes.version + " LOADED");

//=============================================================================

// 硬编码分辨率配置

// 第一个是默认分辨率,必须与 MZ 系统2中的屏幕宽高完全一致!

//=============================================================================

var SCREEN_CONFIGS = [

    { name: "default", width: 816,  height: 624,  label: " (recommended)" },

    { name: "size1",   width: 1104, height: 624,  label: "" },

    { name: "size2",   width: 1280, height: 720,  label: "" },

    { name: "size3",   width: 1920, height: 1080, label: "" }

];

LZ.ChangeScreenRes._currentIndex = 0;

//=============================================================================

// 安全地应用分辨率(自动处理 _centerElement 缺失)

//=============================================================================

LZ.ChangeScreenRes.applyRes = function(index) {

    var cfg = SCREEN_CONFIGS[index];

    Graphics.resize(cfg.width, cfg.height);

    Graphics.boxWidth = cfg.width - 8;

    Graphics.boxHeight = cfg.height - 8;

    // 确保 _centerElement 存在(若缺失则创建)

    var el = Graphics._centerElement;

    if (!el && document.body) {

        el = document.createElement('div');

        el.style.position = 'absolute';

        el.style.overflow = 'hidden';

        document.body.appendChild(el);

        Graphics._centerElement = el;

        if (Graphics._canvas) {

            el.appendChild(Graphics._canvas);

        }

    }

    // 更新样式

    if (el && el.style) {

        el.style.width  = cfg.width  + "px";

        el.style.height = cfg.height + "px";

        el.style.left   = "0px";

        el.style.top    = "0px";

    }

};

//=============================================================================

// 场景启动完成后应用默认分辨率

//=============================================================================

var _Scene_Boot_start = Scene_Boot.prototype.start;

Scene_Boot.prototype.start = function() {

    _Scene_Boot_start.call(this);

    LZ.ChangeScreenRes.applyRes(0);

};

//=============================================================================

// 选项窗口:添加分辨率命令

//=============================================================================

var _Window_Options_makeCommandList = Window_Options.prototype.makeCommandList;

Window_Options.prototype.makeCommandList = function() {

    for (var i = 0; i < SCREEN_CONFIGS.length; i++) {

        var cfg = SCREEN_CONFIGS[i];

        var label = cfg.width + "x" + cfg.height + cfg.label;

        this.addCommand(label, "screenRes" + i);

    }

    _Window_Options_makeCommandList.call(this);

};

// 状态文本显示 "IN USE"

var _Window_Options_statusText = Window_Options.prototype.statusText;

Window_Options.prototype.statusText = function(index) {

    var symbol = this.commandSymbol(index);

    if (symbol && symbol.startsWith("screenRes")) {

        var idx = parseInt(symbol.replace("screenRes", ""));

        return idx === LZ.ChangeScreenRes._currentIndex ? "IN USE" : "";

    }

    return _Window_Options_statusText.call(this, index);

};

// 确定键切换分辨率

var _Window_Options_processOk = Window_Options.prototype.processOk;

Window_Options.prototype.processOk = function() {

    var symbol = this.commandSymbol(this.index());

    if (symbol && symbol.startsWith("screenRes")) {

        var idx = parseInt(symbol.replace("screenRes", ""));

        if (idx !== LZ.ChangeScreenRes._currentIndex) {

            LZ.ChangeScreenRes._currentIndex = idx;

            LZ.ChangeScreenRes.applyRes(idx);

            this.refresh();

        }

        this.playOkSound();

    } else {

        _Window_Options_processOk.call(this);

    }

};

// 禁止左右键调整分辨率选项

var _Window_Options_cursorRight = Window_Options.prototype.cursorRight;

Window_Options.prototype.cursorRight = function() {

    var symbol = this.commandSymbol(this.index());

    if (symbol && symbol.startsWith("screenRes")) return;

    _Window_Options_cursorRight.call(this);

};

var _Window_Options_cursorLeft = Window_Options.prototype.cursorLeft;

Window_Options.prototype.cursorLeft = function() {

    var symbol = this.commandSymbol(this.index());

    if (symbol && symbol.startsWith("screenRes")) return;

    _Window_Options_cursorLeft.call(this);

};

// 更新最大命令数

var _Scene_Options_maxCommands = Scene_Options.prototype.maxCommands;

Scene_Options.prototype.maxCommands = function() {

    return _Scene_Options_maxCommands.call(this) + SCREEN_CONFIGS.length;

};

还真是,默认816x624,结果刚刚不知道为啥出了个完全不知道原因的bug导致立绘贴脸了

我去这么好还有插件可以用,哎这,我这连吃带拿的怪不好意思的草,我喜欢你,基米<3

Deepseek指导,有德啊((啾啾啾