Skip to content

urothis/nwnrs

nwnrs

nwnrs logo

License Crates.io Downloads Docs CI Discord

Rust tools and libraries for Neverwinter Nights

Why This Exists

nwnrs is a workspace for reading, writing, inspecting, and converting NWN data.

It includes:

  • Rust crates for formats like GFF, 2DA, TLK, SSF, ERF, KEY/BIF, MDL, TGA, DDS, PLT, and NWSync
  • a CLI for operational workflows such as inspection, NWScript packing/compilation, conversion, packing, and unpacking

Start Here

The canonical guided documentation now lives in the nwnrs-types crate docs:

Operational and interface-specific docs live here:

Quick Start

CLI

Install:

cargo install --git https://github.com/urothis/nwnrs --bin nwnrs

Use:

nwnrs new --kind utc my_creature
nwnrs inspect path/to/file.utc
nwnrs pack --debug path/to/script.nss out/script.ncs
nwnrs convert input.png output.tga
nwnrs convert path/to/model.mdl out/model_ascii.mdl
nwnrs convert out/model_ascii.mdl rebuilt/model.mdl
nwnrs convert path/to/model.mdl out/model.obj
nwnrs unpack path/to/module.mod -d out/
nwnrs pack out/ rebuilt.mod

Rust

[dependencies]
nwnrs-types = { git = "https://github.com/urothis/nwnrs" }
use nwnrs_types::{
    gff::{GffRoot, GffValue},
    twoda::TwoDa,
};

let mut root = GffRoot::new("UTC ");
root.put_value("Tag", GffValue::CExoString("nw_chicken".to_string()))?;

let mut table = TwoDa::new();
table.set_columns(vec!["Label".to_string()])?;

# let _ = (root, table);
# Ok::<(), Box<dyn std::error::Error>>(())

Main Parts

Development

Install Rust with rustup.

This workspace pins its compiler toolchain through rust-toolchain.toml, so a normal cargo invocation will automatically use the expected nightly once it is installed.

From the repository root, the main validation commands are:

cargo test --workspace
cargo clippy --workspace --all-targets -- -D warnings
cargo fmt --all -- --check

License

GPL-3.0-only

About

No description, website, or topics provided.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Contributors

Languages