External Editors

The in-browser editor is nice to use to get a feel for the game, but you'll probably want to set up an external editor for real development. This gets you a local backup of your code, the ability to use version control software (like git or svn), and you can use the editor you're used to. There's a sync utility published to npm which you can use to automatically push code from your computer to NPCA.

First make sure you have nodejs v8.0.0 or later installed, nodejs v6 won't work! Then install the npca-sync package from npm. If you're new to npm (the nodejs package manager) you can do this from the directory you'd like to save your code to:

npm init -y
npm install --save npca-sync

This will install the sync utility to ./node_modules/.bin/npca-sync. Now go get an API key. Then you can run the sync utility like this:

./node_modules/.bin/npca-sync --game sf2 --api-key "your-key-here"

The sync utility will continue running in the foreground, so leave that window open somewhere. You should put your entry point in index.js. If you're using git then npca-sync will read your current branch and use that branch title to publish to NPCA. If you don't have a git repository initialized in the same directory it will just push directly to "master" on NPCA.

The website is kind of finicky if you use both npca-sync and the in-browser editor. So pick one and stick to it, and if you don't see your changes just refresh the page :)