This article was translated using "DeepL Translator".
This article will teach you to deploy your RPG Maker MV/MZ games using Electron.
This tutorial will use the Intel-based macOS 10.15.7 (Catalina) operating system.
Electron does not currently support OS X 10.10 (Yosemite) and older versions of operating systems.
Update Info
2022/05/03 Update part of the article.
2022/05/01 Fix some contents of package.json.
2022/01/04 Add block the feature of capturing screen.
2021/11/12 Added encrypted content about asar files.
1.First, download Node.js for macOS from the following URL and install it on your computer.
https://nodejs.org/en/download/
2.After the installation is complete, for "Spotlight search" the upper right corner,and Run "Terminal", then type node -v
and npm -v
respectively to check if the installation is successful.
Then, because the "Xcode Command Lines Tool" is needed to deploy the game on macOS, type xcode-select --install
in the "Terminal" to download and install this tool.
3.After creating a folder, and add a new file named "package.json" and edit the file to add the following syntax content.
After adding the following syntax, remember to remove // and the comments that follow.
If you need to use the "asarmor" encryption suite, create a file called "myAfterPackHook.js" and put the following code into this file and save it in this output folder.
[Demo]
Then use the cd
command on the "Terminal" to specify the path to the folder, and enter the npm install
command on the "Terminal" to install the required package.
Remember that folder names can only be alphanumeric and do not contain a half-line margin. If you need to use a half-line margin, please replace it with a ( _ ).
4.Open the RPG Maker MV/MZ game project and click "File" → "Deployment…", select "Web Browsers / Android / iOS".
When using RPG Maker MV, select "Web Browsers" and then click "OK" to wait for the deployment to complete.
[RPG Maker MZ]
[RPG Maker MV]
5.Create an "index.js" file ,and enter the following:
6.Go to the output folder ,and copy all the files except “package.json” and paste them into the output folder for this of Electron.
[RPG Maker MZ]
[RPG Maker MV]
7.Next, we will divide it into two projects and modify some of the contents in the js folder.
[RPG Maker MZ]
Modify "main.js", "rmmz_core.js" and "rmmz_managers.js" to the following.
Replace..
Replace..
Replace..
Replace..
Replace..
[RPG Maker MV]
Modify “rpg_core.js” and “rpg_managers.js” to the following.
Replace..
Replace..
Replace..
Replace..
Replace..
Replace..
If the above is very complicated, you can also download quick start template directly from the following GitLab.
https://gitlab.com/MiraiSoSad/rpg_maker_mv_and_mz_electron/-/tree/en_US
8.Go back to "Terminal" and type npm start
to check if the game can run normally. If the game runs OK, type npm run dist
to run the deployment output.
9.Finally, after the deployment is finished, you can find the contents of the deployment in the “dist/mac-universal/” folder and run Game.app.
If the error message "Please move the Game.app to a different folder." pops up on the game screen when you first run the game, you can create a folder and move Gamp.app to this folder and run the game again.
https://github.com/electron/electron-quick-start
https://qiita.com/RaTTiE/items/63f2e351a93f81bc8039
https://a091234765.pixnet.net/blog/post/402450719-[electron學習筆記]electron安裝檔打包攻略補充_el
https://www.npmjs.com/package/asarmor
Mirai - Patreon:
https://www.patreon.com/MiraiDiary
Mirai - Twitter(X):
https://twitter.com/Mirai_so_Sad
Mirai - itch.io:
https://miraisosad.itch.io
Mirai - Instagram
https://www.instagram.com/miraisosad/
貓咪學園
NekoGakuen
macOS
RPG Maker
RPG Maker MV
RPG Maker MZ