nwn-lib-d ~trx_tool

Library & tooling for Neverwinter Nights 2 resource files


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

nwn-lib-d

Multi-platform D library & tooling for handling Neverwinter Nights 1 & 2 resource files

Build Status codecov

GitHub license

Features

Command-line tools

  • nwn-gff
  • Read / write GFF files (ifo, are, bic, uti, ...)
    FormatParsingSerializationComment
    gff:whitecheckmark::whitecheckmark:NWN binary. Generated binary file match exactly official NWN2 files (needs to be tested with NWN1)
    json:whitecheckmark::whitecheckmark:Json, compatible with Niv nwn-lib
    json_minified:whitecheckmark::whitecheckmark:Same as json but minified
    pretty:x::whitecheckmark:Human-readable
  • Pros
    • Fast
    • GFF nodes keeps original ordering
    • Basic GFF modifications
  • Cons
    • Limited serialization targets
  • nwn-erf
  • Create / Extract / View ERF files (erf, hak, mod, ...)
  • Pros
    • Allows to set the ERF buildDate field, to create reproducible erf files.
  • Cons
    • No support for NWN1 ERF
    • Not very memory efficient

Library

[API reference](https://cromfr.github.io/nwn-lib-d/)

  • GFF
    • Read / Write / Modify
  • TLK
    • Read only
  • 2DA
    • Read only
    • May refuse to parse official 2da when incorrect

Build

Requirements

  • dmd (D language compiler)
  • dub (D build system)

Build

# Build library
dub build

# Build tools
dub build :nwn-gff

# Eventually you can append --build=release
dub build :nwn-gff --build=release

Command-line usage

./nwn-gff --help

Examples

# Print gff file in console
./nwn-gff -i mycharacter.bic

# Write mycharacter.bic to mycharacter.bic.txt in pretty format
./nwn-gff -i mycharacter.bic -o mycharacter.bic.txt

# Read gff from stdin, write to stdout in pretty format
./nwn-gff -j gff -k pretty
Authors:
  • Thibaut CHARLES (CromFr)
Sub packages:
nwn-lib-d:nwn-gff, nwn-lib-d:nwn-trx, nwn-lib-d:nwn-erf
Dependencies:
none
Versions:
1.1.1 2024-Jan-08
1.1.0 2023-Oct-31
1.0.6 2023-Oct-12
1.0.5 2023-Sep-09
1.0.4 2022-Nov-28
Show all 29 versions
Download Stats:
  • 0 downloads today

  • 2 downloads this week

  • 2 downloads this month

  • 1002 downloads total

Score:
1.4
Short URL:
nwn-lib-d.dub.pm