nwn-lib-d 0.0.4
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
Features
Command-line tools
[Download nwn-lib-d tools](https://cromfr.github.io/nwn-lib-d/)
nwn-gff
- Read / write GFF files (ifo, are, bic, uti, ...)
Format Parsing Serialization Comment 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 minifiedpretty
:x: :whitecheckmark: Human-readable - Pros
- Fast
- GFF nodes keeps original ordering
- Basic GFF modifications
- Cons
- Limited serialization targets
nwn-tlk
- Serialize TLK files to readable text.
Format Parsing Serialization Comment tlk
:whitecheckmark: :whitecheckmark: NWN TLK binary format text
:x: :whitecheckmark: Human-readable nwn-erf
- Create, extract or view ERF files (hak, erf, mod) in a reproducible manner (same content => same checksum).
- Pros
- By default sets the ERF buildDate field to a 0 value, to create reproducible erf files.
- Cons
- No support for NWN1 ERF
- Not very memory efficient (all files are loaded to memory before the erf file is written)
nwn-bdb
- View/search Bioware/foxpro database content (dbf + ctx + fpt) using regular expressions.
nwn-trn
- TRN/TRX experimental tool:
aswm-strip
: Reduce walkmesh data size by removing non-walkable triangle & related data. Can reduce LZMA-compressed files to 50% of their non-stripped size (depending on the amount of unused triangles of course).aswm-dump
: Dump walkmesh data to textaswm-convert
: Convert some walkmesh data to wavefront OBJ 3d modelaswm-extract
: Uncompress & extract walkmesh raw data (useful for reverse engineering)
Library
[API reference](https://cromfr.github.io/nwn-lib-d/docs)
- GFF
- Read / Write / Modify
- TLK
- Read only
- 2DA
- Read only
- May refuse to parse official 2da when incorrect
Tips & tricks
Generate git diff from GFF & TLK files
- Configure Git to use the tools
- Using git command line:
git config --global diff.gff.textconv "$PATH_TO_NWNLIBD_TOOLS/nwn-gff -i \$1"
git config --global diff.tlk.textconv "$PATH_TO_NWNLIBD_TOOLS/nwn-tlk -i \$1"
- Or by editing .gitconfig:
[diff "gff"]
textconv = 'C:\\Program Files\\nwn-lib-d\\nwn-gff' -i $1
[diff "tlk"]
textconv = 'C:\\Program Files\\nwn-lib-d\\nwn-tlk' -i $1
- Configure your git repository to use GFF / TLK diff by creating
.gitattributes
file:
#Areas
*.[aA][rR][eE] diff=gff
*.[gG][iI][cC] diff=gff
*.[gG][iI][tT] diff=gff
#Dialogs
*.[dD][lL][gG] diff=gff
#Module
*.[fF][aA][cC] diff=gff
*.[iI][fF][oO] diff=gff
*.[jJ][rR][lL] diff=gff
#Blueprints
*.[uU][lL][tT] diff=gff
*.[uU][pP][eE] diff=gff
*.[uU][tT][cC] diff=gff
*.[uU][tT][dD] diff=gff
*.[uU][tT][eE] diff=gff
*.[uU][tT][iI] diff=gff
*.[uU][tT][mM] diff=gff
*.[uU][tT][pP] diff=gff
*.[uU][tT][rR] diff=gff
*.[uU][tT][tT] diff=gff
*.[uU][tT][wW] diff=gff
#Others
*.[pP][fF][bB] diff=gff
*.[tT][lL][kK] diff=tlk
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
- Registered by Thibaut CHARLES
- 0.0.4 released 6 years ago
- CromFr/nwn-lib-d
- GPL-3.0
- Copyright © 2016, Thibaut CHARLES
- Authors:
- Sub packages:
- nwn-lib-d:nwn-gff, nwn-lib-d:nwn-erf, nwn-lib-d:nwn-tlk, nwn-lib-d:nwn-bdb, nwn-lib-d:nwn-trn
- Dependencies:
- gfm:math
- 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 - 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