Howdy all! nasher is a tool I’ve been working on to make it easier to do script and module development on the command-line. I think it’s finally close to beta, so it’s time to show it off and get feedback and requests.
Who
nasher is intended for script and module (and probably hak) developers who want to version-control their source code and build modules or erfs from those sources. It is not meant for casual users who just want to install a module to play.
As I do not have a Windows box to test on, nasher is currently Linux-only. It may compile and run correctly on Windows, but I can’t guarantee that. I’d love to have assistance here.
What
nasher is used to unpack an erf or module into a source tree, converting gff files into json format. Since json is a text-based format, it can be checked into git or another version-control system to track changes over time and make it easier for multiple people to work on the same project simultaneously. nasher can also rebuild the module or erf from those unpacked source files.
nasher is similar to nwn-devbase, but it has some key differences:
Advantages
- nasher and the tools it uses are written in Nim rather than Ruby, so they should be much faster (handy for large projects) and can be distributed in binary form
- nasher supports non-module projects (including erfs and haks)
- nasher supports multiple build targets (e.g., an installable erf and a demo module)
- nasher supports custom source tree layouts (e.g., dividing scripts into directories based on category)
- nasher can install built targets into the NWN installation directory
Disadvantages
- nasher has not (yet) been tested on Windows (help wanted)
- nasher does not (yet) provide a containerized Docker build
- nasher does not provide tools for local testing with Docker
Neutral
- nasher uses json rather than yaml for storing gff files
How
Requirements
- nim >= 0.20.0
- neverwinter.nim >= 1.2.5
- nwnsc
Installation
If you already have nim installed, you can install nasher through nimble
:
$ nimble install nasher
Or by building from source:
$ git clone https://github.com/squattingmonk/nasher.nim.git nasher
$ cd nasher
$ nimble install
If nimble
has been configured correctly, the binary should be available on
your path.
Usage
Detailed usage can be found in the readme or by running nasher --help
, but here’s a crash course:
# Initialize the current directory as a nasher package
$ nasher init
# Initialize the directory demo using the contents of demo.mod
$ nasher init demo demo.mod
# List build targets
$ nasher list
# Convert, compile, and pack the default build target
$ nasher pack
# Pack and install the "demo" build target to the NWN installation directory
$ nasher install demo
# Unpack somefile.erf into the source tree
$ nasher unpack somefile.erf
Example
To see a project that uses nasher to build, check out the Core Framework.