How to replace an RPG Maker MV game's runtime with your own local copy of NWJS

Screenshot of Dweller's Empty Path's install directory, on Windows using OneCommander

If you are someone who plays a large amount of (presumably free) RPG Maker MV games, you've probably noticed that A) the game engine runs in the NWJS web browser wrapper (competitor to and predecessor of Electron), and B) the directories of such games (on Windows, at least) are usually cluttered with the same multi-megabyte DLLs and other files. You might also know that, if you have a copy of NWJS by yourself, it is possible to use it to launch and run the game, instead of the game's own packaged runtime. This post describes how to download such a copy, and have every MV game in your possession simply launch that instead of their own copy.

This has a few small benefits:

  1. You save ≈120MB of hard drive space, per game. If you apply this to 10 such games, that's over a gigabyte in savings.
  2. If you use the SDK build of NWJS, you can use Developer Tools (activated by pressing F12) while running the game. Because the MV engine uses a large amount of easily accessed global variables and easily hot-patched global functions (for those familiar with Javascript), the console can be used to cheat by changing character statistics, or increase the number of save files the game offers. (The latter is performed by running DataManager.maxSavefiles=()=>99 in the console, before entering the game's save file list.)

For these examples, I'm using the free game Dweller's Empty Path, however, this example is purely arbitrary. This guide is also Windows only. However, it should be possible to approximate all of these steps in your own OS. Finally, this guide can be used with MZ games instead of MV, but I haven't actually attempted this with any MZ games yet.

1. Download the SDK build of NWJS and place it somewhere on your hard drive.

The difference between the SDK build and the normal build of NWJS is that the SDK build has Developer Tools enabled. There may be some slight performance reductions when using the SDK build on certain games, but I haven't noticed any in my experience.

Now, in order to guarantee compatibility with whatever plugins the game is using, you should specifically download version 0.29.4. However, the latest version has a number of nicer Developer Tools features (such as a dark mode, and the ability to use most post-2019 Javascript syntax in the console). Also, I have played a rather large amount of RPG Maker MV games using the latest NWJS runtime, and only encountered crashes in two games (one of which being Dweller's Empty Path). I advise trying the latest version, and then, if you encounter problems, download 0.29.4 and use it for just those few problematic games. (If you are working with an MZ game, substitute 0.29.4 with 0.44.6.)

2. If the game is wrapped using virtualisation software such as Enigma Virtual Box, extract it.

If the game is a single executable with no www folder in its directory, but is still visibly an RPG Maker MV game, it's highly likely that it uses something like Enigma Virtual Box to bundle its files. You can usually extract all of the files using Enigma VB Unpacker. (In the highly unlikely event that it uses something more sophisticated like Enigma Protector, there is still a way to extract the files using something like Virtual File System Editor, but this is far too tedious to explain here.)

3. Delete every file and folder except www, package.json, and any Read Me files and Extra directories created by the game author.

Same as the previous image, but everything except Credits.txt, General Note and FAQ.txt, Extras, package.json and www have been selected.

Yes, all of that stuff, including the .exe, is completely separate from the game itself, and is only necessary for running NWJS. That being said, make sure you're certain which files and folders were created by the game author. As a rule, NWJS uses no .txt files, and the only folders it uses are locales and swiftshader. Also, credits.html always refers to NWJS's credits - not the game's credits or even the MV engine's credits - and thus can always be disposed of.

4. Edit the package.json file to fix the "name" and optionally add "position": "center"

The package.json file being edited

Now, this is not necessary if you are using NWJS 0.29.4, but on later versions, the "name" field needs to not be blank. You should ideally type the game's name here. These later NWJS versions will create a folder in AppData\Local with the same name as the "name", to store runtime caches and crash logs (not MV save files, however), so take care not to use a "name" value that would result in collisions with existing folders.

Optionally adding "position":"center" to the "window" object ensures that the game window is initially centered on the screen, when playing in non-fullscreen mode. I personally relish this setting.

5. Create a .lnk shortcut pointing to nw.exe with the command-line argument --nwapp

Properties window for a Windows .lnk shortcut

Make sure the Target points to the .exe of the NWJS version downloaded in step 1. Also, "Start In" must either be blank (if you're storing this shortcut in the game's folder), or refer to the game's folder. Use this to launch the game instead of the .exe.

At this point you might notice that the .lnk shortcut will simply have the NWJS icon, instead of any game-specific icons that the .exe might have had. Fortunately, a copy of the .exe's icon is also present in www\icon\icon.png, so you can simply perform the following to adjust the icon:

Personally, though, I don't bother with it, especially given a large number of free MV games simply do not have custom icons.


Despite the seemingly large number of steps involved, I consider this a relatively simple operation. Step 1 only has to be performed once (although you may wish to update your NWJS version periodically), step 2 seldom needs to be performed, and step 5 can be mostly shortcutted by simply copying a similar .lnk that you created for another MV game, and renaming it. This also may sound like it carries a lot of risks and is rather brittle, but I've had remarkably few problems playing games like this.

How toWindows gamesRPG Maker MV
All original content on this site, except where noted, is property of Leon, all rights reserved.