-
Notifications
You must be signed in to change notification settings - Fork 18
Development Environment Setup
First, use Git to clone the repository:
git clone https://github.com/Ruin0x11/OpenNefia
There are two editors currently recommended for editing the source. These editors both have extensions available which allow for things like code hotloading and documentation, which are really important for iterative mod development. If you use neither of them, then VS Code is recommended.
- VS Code: https://code.visualstudio.com/
- Emacs: https://www.gnu.org/software/emacs/
You can also use an editor not listed here, but note that in order to access the extra features you'll have to manually type out the appropriate commands in the REPL instead. (Of course, it's possible to write a new extension for your favorite editor if you wish.)
For more information on how to use the editor extensions, see [Editor Extensions](Extras/Editor Extensions).
The following details each editor's setup.
- Launch VS Code, then go to
File > Preferences > Extensions
. - Click the three dots (
...
) at the top right corner of the extensions menu and selectInstall from VSIX...
. - In the repository, navigate to
editor/vscode/open-nefia-support-0.0.1.vsix
and select it. This should install the extension.
Verify everything is set by opening the palette commands popup (default Ctrl+Shift+P) and searching for OpenNefia
, to see if the newly added commands appear.
It's also recommended to install these extensions for Lua support:
Once everything is ready, use File > Open Folder...
to open the src
folder in the repository.
Load the file editor/emacs/open-nefia.el
in your init file, like so:
(load "/path/to/OpenNefia/editor/emacs/open-nefia.el")
If you're using Windows, run the OpenNefia.bat
script. If you're using a Unix-like OS, run the OpenNefia
script.
These scripts will automatically download the 1.22 assets if necessary. After the startup process finishes, you should see the title screen.
If you're using the VS code extension, you can use the palette command OpenNefia: Launch game
(Alt-L) after you've run the above script for the first time to launch the game when the repository (OpenNefia/src
) is opened.
Proceed to Getting Familiar With The Code.