I am making this how-to somewhat platform agnostic so there may be OS specific paths or settings that need to be tweaked. Such tweaks should be minimum and obvious to users of the OS.
Prerequisites
- Download IntelliJ (Community Edition is free but somewhat limited, EAPs are beta releases but are pretty stable).
Edit: Webstorm is IntelliJ optimized for Web/JS applications so you can/should use that instead if you are just doing RPG Maker development)
- Download NW.js - this is what RPG maker uses to launch Node.js apps inside a web-kit container locally
- In your game project's root directory create a package.json file with the following contents:
{
"name": "KADOKAWA/RPGMV",
"main": "index.html",
"js-flags": "--expose-gc",
"window": {
"title": "",
"toolbar": false,
"width": 816,
"height": 624,
"icon": "icon/icon.png"
}
}
Note: these are probably flexible but this is the exact json used by RPG Maker.
Setup IntelliJ
Note: If this is your first time launching IntelliJ there may be some setup wizards to walk through. You should be able to accept the defaults.
- Preferences -> Plugins -> Browse Repositories -> NodeJS -> Install -> Restart IDE
- File -> Open -> Select your game root directory
- Run -> Edit Configurations -> "+" (top left hand corner) -> Node-Webkit
Name: Your Game Name
- Node-Webkit App: game root directory
- Working Directory: game root directory
- Node-Webkit Interpreter: path to nwjs that was installed above (on OSX for example you may use /Applications/nwjs.app/Contents/MacOS/nwjs)
- Ok
[*]Now you can either Run -> Run "Game Name" or Debug "Game Name"
Now you should be able to launch and debug your game with a power and flexible IDE. IntelliJ has a number of features that make it ideal for Javascript development over other editors and it's debugging tools are far superior to the standard Chrome Dev Tools for most tasks.