neverwinter.nim

CLI tools and nim library used in Neverwinter Nights: Enhanced Edition development

MIT License

Stars
127

Bot releases are visible (Hide)

neverwinter.nim - 1.8.0 Latest Release

Published by github-actions[bot] 7 months ago

[1.8.0] - 2024-03-26

Added

  • The nwsync utilities from beamdog/nwsync have been moved into this repository.
  • nwsync: prune utility will not trim recently-written files (default: 2 weeks).

Fixed

  • nwsync: Will now correctly error out if any lookup path element cannot be found.
  • nwsync: Do not create directories in dryrun mode.
neverwinter.nim - 1.7.3

Published by github-actions[bot] 8 months ago

[1.7.3] - 2024-02-17

Fixed

  • Fixed checksums import when using neverwinter.nim as library (#110).
  • scriptcomp: Fixed regression not utilising all threads when compiling (#109).
neverwinter.nim - 1.7.2

Published by github-actions[bot] 9 months ago

[1.7.2] - 2024-02-04

Changed

  • All binaries now build with stacktraces enabled, to make user reports more useful.

Fixed

  • Fixed installation on nim 1.6 due to changed checksums package upstream.

Performance Improvements

  • scriptcomp: Optimized the common for loop construct for (i = 0; i < N; ++i).
neverwinter.nim - 1.7.1

Published by github-actions[bot] 10 months ago

[1.7.1] - 2023-12-17

Changed

  • ResDir instances now cache their contents on creation time. This is a change from previous behaviour, where additions to a local directory were reflected immediately.

Fixed

  • ResDir is now case-insensitive, same as base game and other ResContainer types.
  • scriptcomp: Messages about encoding are no longer printed multiple times when using threads.
neverwinter.nim - 1.7.0

Published by github-actions[bot] 11 months ago

[1.7.0] - 2023-11-26

Added

  • script_comp: Add cli flag to optionally follow symlinks.
  • script_comp: Add cli flag to allow raising the max include depth.
  • script_comp: Now also prints the full include chain for each error.
  • script_comp: Now prints timing for each handled file; updated some help text to be clearer.

Fixed

  • ResMan/Res: Fix prematurely opening FDs and exhausting allowed pool when sourcing many files (e.g. script_comp *.nss).

This release bumps version to 1.7 due to the minor API change on the Res type.

Windows amd64 binaries might still have file seeking issues due to the prevailing mingw bug. If you run into strange issues related to broken file reads, try the 32bit binaries first.

neverwinter.nim - 1.6.4

Published by github-actions[bot] about 1 year ago

[1.6.4] - 2023-10-14

Added

  • Preliminary support for nim 2.0.

Fixed

  • script_comp: Don't ever compile nwscript.nss.
  • script_comp: Don't link libstdc++ statically on LINUX.
neverwinter.nim - 1.6.3

Published by github-actions[bot] about 1 year ago

[1.6.3] - 2023-08-01

Bytecode Disassembler

  • Canonical op representation separates op and aux with a dot now, to make visual and machine parsing easier.
  • Float formatting is now less noisy.
  • nwn_asm no longer prints relative jump offsets.
  • nwn_asm can now specify padding and term width for printing.

Fixed

  • Fixed encoding not initialising correctly when get*Encoding wasn't called.
neverwinter.nim - 1.6.2

Published by github-actions[bot] about 1 year ago

[1.6.2] - 2023-07-26

Script Compiler

  • Script compiler now supports raw string literals: r".." and R"..", which can also span multiple lines.
  • Temporarily disabled MOVSP merging optimization (fixing STACK_UNDERFLOW errors when using -O2).

Bytecode Disassembler

  • nwn_asm now prints shorter, canonical opcodes.
  • nwn_asm now parses nwscript.nss and prints the names of executed actions.
  • nwn_asm now prints in colour; indicates jump source/target IPs; improved column display.
  • nwn_asm now disassembles the whole file in debug mode (-g), not just known functions.

Fixed

  • Fixed the default steam path for Windows.
  • Fixed a crash when the Beamdog Client settings.json file could not be found.
  • Fixed --language not defaulting to en and overrides not working at all.
  • resman.nim: Fixed sometimes not throwing a ValueError when the requested resref does not exist.

Removed

  • Removed remaining double-byte language support (this is not supported on EE).

Note: [Windows only!] Still unsure about amd64 windows binaries. Mingw fseek bug probably persists and I have no time to look into it. To be safe, or if you run into stream exceptions on known-good data, pick the i386 variant.

neverwinter.nim - 1.6.1

Published by github-actions[bot] over 1 year ago

[1.6.1] - 2023-07-19

Script Compiler

With 1.6.0, the official nwscript compiler source code has been added to the repository, licenced as GPL-3.0. This release builds on this:

  • Parser now understands floating point values such as 0f, .0 and .42f.
  • For loops can now take non-integer expressions in the first and third part of a loop statement. (e.g. floating point values now work).
  • Constant folding: const declarations can now contain any constant expression (such as arithmetics), including previously defined consts.
  • Instruction melding: A second pass over the generated bytecode will now meld some redundant instructions together.
  • Where possible, expressions are now evaluated at compile time (instead of runtime).
  • The CLI utility can now utilise all CPU cores to compile scripts in parallel.
  • The script compiler will ensure no outdated .ndb remains when re/compiling scripts without debugging support enabled.
  • Fixed structures passed using the ?: operator causing a bad compiler state.
  • The script compiler has gained support for enabling optimisations. Currently available:
    • -O0 Turn off all optimisations
    • -O2: Turn on all optimisations:
      • Constant folding
      • Instruction melding
      • Removing all dead/unused code

Bytecode Disassembler

  • nwn_asm can now decode DE_STRUCT instructions.
  • nwn_asm can now disable loading .ndb with a cli flag, if no per-function disassembly is desired.
  • nwn_asm now prints global offsets in addition to per-function offsets when .ndb is enabled.
  • nwn_asm can now optionally weave the originating source code into the disassembly, if both source code and .ndb is available.

Other utilities

  • Fixed regression introduced with 1.6.0 that resulted in GFF files failing to compile with a integer out of range error.
  • All cli utilities now support the flag --silent to hide all output, even errors. Errors can be detected by checking the process exit code.
  • Performance improvements on internal data structures to make utilities start up faster.
  • Added some legacy (currently unused) restypes: .res, .wfx

Note: [Windows only!] Still unsure about amd64 windows binaries. Mingw fseek bug probably persists and I have no time to look into it. To be safe, or if you run into stream exceptions on known-good data, pick the i386 variant.

neverwinter.nim - 1.6.0

Published by github-actions[bot] over 1 year ago

[1.6.0] - 2023-07-06

Added

  • First public release of the game script compiler source code.
  • New CLI utility: nwn_script_comp.

Fixed

  • Builtin resman will no longer warn about missing _loc keytable on startup (they're optional for some languages).

Note: [Windows only!] Still unsure about amd64 windows binaries. Mingw fseek bug probably persists and I have no time to look into it. To be safe, or if you run into stream exceptions on known-good data, pick the i386 variant.

neverwinter.nim - 1.5.9

Published by github-actions[bot] over 1 year ago

[1.5.9] - 2023-03-01

Changed

  • TwoDA library now considers "" cells empty and transforms them into ****.
  • CLI utils: compressedbuf, gff, ssf, tlk, twoda now read input stream fully before writing to it, allowing write back to same file.

Fixed

  • ExoLocStr legacy codepath reader now correctly reads in id field.
neverwinter.nim - 1.5.8

Published by github-actions[bot] almost 2 years ago

  • Fixed a regression with regards to adding erf/dirs to resman utilities introduced in 1.5.7
  • Removed all support for loading 1.69 keybif layouts, as they were bitrotting anyways. If you want to use these utilities with NWN Diamond Edition, use earlier versions of these utilities.
  • Fix divining user root folder on linux and windows @mtijanic

Note: [Windows only!] Still unsure about amd64 windows binaries. Mingw fseek bug probably persists and I have no time to look into it. To be safe, or if you run into stream exceptions on known-good data, pick the i386 variant.

neverwinter.nim - 1.5.7

Published by github-actions[bot] almost 2 years ago

  • NWN_HOME env var is now the primary variant for userdir detection
  • added helper to quickly stand up a ResMan instance that should behave identical to game variant (moved out of shared.nim)
  • copied over manifest reader/writer code from nwsync.nim and made it available in neverwinter/nwsync.
  • Added a simple ncs disasm (not functional yet)
  • gffjson: retcon the strref "id" field of cexolocstr to behave as the game does (where I messed up the nesting, so the lib now needs to follow both data formats)
  • gff: be more verbose about duplicate field errors
  • Cleaned up some stray debug printing
  • Removed all traces of progressbar support - all it managed to do was break terminals

I think mingw amd64 build is still broken. Use with care/use 32bit variant if you run into file/stream issues.

neverwinter.nim - 1.5.6

Published by github-actions[bot] over 2 years ago

  • Added --minify to nwn_2da via #45
neverwinter.nim - 1.5.5

Published by github-actions[bot] over 2 years ago

  • Fixed an issue where a 32bit windows build was was erroring out on needless type conversions in gffjson: #44
  • depend on and build with nim 1.6.4
neverwinter.nim - 1.5.4

Published by github-actions[bot] almost 3 years ago

  • Fixed #42: JSON output of nwn_gff erroneously ending in clrf instead of lf.
  • Some internal API changes, made game/user root finder helpers available to library consumers.
neverwinter.nim - 1.5.3

Published by github-actions[bot] almost 3 years ago

  • Added RESTYPE_JUI.
  • nwn_erf will now error out when the resulting file would exceed 2GB.
  • Attempted fix for windows DLLs.
  • Nim 1.6.0.
neverwinter.nim - 1.4.5

Published by github-actions[bot] about 3 years ago

Added the missing restypes from the previous game builds.

neverwinter.nim - 1.4.4

Published by github-actions[bot] about 3 years ago

Fixed:

  • Floating point json fields now accept json int types.
  • CSV generator was not escaping a,b correctly.
  • TwoDA reader now strips empty rows at file end.

ResMan can now read nwsync manifest data. To enable that, the tooling will now attempt to auto-detect the user directory.

neverwinter.nim - 1.4.3

Published by github-actions[bot] over 3 years ago

  • erf: we now ignore RESTYPE_INVALID from stopping a unpack process (might change later)
  • Update to nim 1.4.8.
  • Drop the frozen docopt in the repo, and use the nimble package instead. This should remove the legacy dependency on the pcre.dll on Windows.