Electron wrapper for RPG Maker MV. Wrapping MV with Electron gives a handful of benefits. One of the main benefits includes in this wrapper is being able to remember the window position, size and if it was full screened the next time it's opened. See example here: twitter link
- Download or clone the repo
- Copy your projects files into the app folder. Do not accept to overwrite files, if copying into the app folder. Your project should have 5 new files;
app/js/electronMain.js
,app/js/electronRenderer.js
,app/data/winData.json
,app/index.html
,app/package.json
. Do not rename the app folder unless you know what you're doing.
- Install Node.js
- Open the folder containing the first package.json. ( Not the second package.json inside the app folder )
- Install the dependencies, on first time use
npm install
- Once they are installed you can run electron with
npm start
Or by running the included play.bat.
Notes
- If you don't know how to use the cli, I included a
play.bat
file. Just double click that and it will do the steps 3-4 for you. - Hitting play test in the MV Editor will start with nw.js, but the new index.html will close nw.js and restart it with Electron. So you can also play by using the test play in the editor.
If you build you game with the RPG Maker MV editor through deployment, it will be built with nw.js. To build with electron you can use Electron builder. Which is already added in the dev dependencies. It is also configured to build windows 32 and 64bit apps, just run the following cli:
npm run build-w32
for windows 32
npm run build-w64
for windows 64
Notes
- If you don't know how to use the cli, I included a
deploy.bat
file. Run that file and it will help you build it.
You will need to configure 2 files. app/package.json
and app/data/winData.json
.
app/package.json
This file contains data for the exe file when built. In this file you will need to change the values for:
- name - This is the name of the .exe when built
- version - The current version of the game build in x.y.z format
- description - the description of the .exe / app
- author - author of the app
- license - license of the app
app/data/winData.json
This file contains data for the window settings. You will need to change the following values:
- res - The resolution of the game in the format: [width, height]
- resizable - If the window is resizable, set to true or false
- fullscreen - If the window starts fullscreen on first run, set to true or false.
Free to use for all projects.