Skip to main content

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

I don't know if these are all already in your Sketch plugins (I think one is), but this is the patch file ("patches.json") that JoiPlay uses to modify MV so it works properly with one of the games that I worked on.

{
    "rpgmmv": [
        {
            "author": "[ g f y ]",
            "comment": "",
            "key": "this._fadeSprite.opacity = 255 * q;",
            "value": "if (this._fadeSprite) this._fadeSprite.opacity = 255 * q;"
        },
        {
            "author": "[ g f y ]",
            "comment": "",
            "key": "this.updateAllCellSprites(this._cellSprites);",
            "value": "this.updateAllCellSprites(this._animation.frames[frameIndex]);"
        },
        {
            "author": "[ g f y ]",
            "comment": "",
            "key": "this.updateAllCellSprites(this._screenSprites);",
            "value": "this.updateAllCellSprites(this._animation.frames[frameIndex]);"
        },
        {
            "author": "[ g f y ]",
            "comment": "",
            "key": "context.textAlign = align",
            "value": "if (align !== undefined) context.textAlign = align"
        },
        {
            "author": "[ g f y ]",
            "comment": "",
            "key": "var data = this._context.getImageData(x, y, 1, 1).data;",
            "value": "var data = (e => { try { return this._context.getImageData(x, y, 1, 1).data; } catch (e) { return \"FFFFFF\"; } })();"
        }
    ]
}
(2 edits) (+1)

It would be helpful if these came with comments explaining the issue they work around 😅

I believe 1-3 are either plugin-specific or target older versions of the core scripts, since I can’t find their "key" in my project folder.
4 has roughly the same effect as my “Bitmap.drawText CanvasTextAlign Default Fix” sketch plugin.
5 I believe is a workaround for something that can occur on mobile due to texture size limits. It also just masks an error with potentially unintended behaviour instead of really solving it.

I think the additional ones are out of scope for me.

I had much the same response for #4. I'd have to go on the JoiPlay Discord to even start to track this stuff down, and I'm only interested in case these are patches that would help all users and not just one Android-based emulator. Thanks for checking it out, though!