Skip to content

urothis/nwnrs

Repository files navigation

nwnrs

nwnrs logo

License Crates.io Downloads Docs CI Discord

Rust tools and libraries for Neverwinter Nights: Enhanced Edition.

Start Here

Quick Start

CLI

Install:

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

Usage:

nwnrs new --kind utc my_creature
nwnrs inspect path/to/file.utc
nwnrs compile -g -o out/script.ncs path/to/script.nss
nwnrs compile -R -d out scripts/
nwnrs compile -R -d out --graphviz graphs scripts/
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

  • nwnrs-types: umbrella crate and guided entry point
  • nwnrs-types::resman: shared resource lookup
  • nwnrs-types::install: install discovery and conventional layered resource assembly
  • nwnrs: command-line inspection, conversion, packing, and unpacking workflows
  • nwnrs-nwscript: NWScript frontend and compiler
  • nwnrs-types::mdl: MDL parsing, lowering, composition, and export
  • docker: reproducible Linux AMD64/ARM64 dedicated server container images built from internally staged assets

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

5 stars

Watchers

1 watching

Forks

Contributors

Languages