# sow-tools Shared NWN build tooling for Shadows Over Westgate. This repository owns the Go-based `sow-toolkit` binary used by the separate module and assets repositories. ## Build Build the development binary into `tools/sow-toolkit`: ```bash ./build-tool.sh ``` Or run directly with Go: ```bash GOCACHE="$PWD/.cache/go-build" go run ./cmd/nwn-tool --help ``` ## Repository Layout ```text cmd/nwn-tool/ CLI entrypoint internal/app/ command wiring and console UX internal/erf/ ERF/MOD/HAK reading and writing internal/gff/ canonical GFF JSON and binary conversion internal/pipeline/ build, extract, compare, and manifest workflows internal/project/ config loading and repo scanning internal/validator/validation and diagnostics tools/ built development binary output ``` ## Intended Consumers - `sow-module` uses `sow-toolkit` for `build-module`, `extract`, `validate`, `compare`, and `apply-hak-manifest` - `sow-assets` uses `sow-toolkit` for `build-haks` and validation - validation now fails early if duplicate asset resources would collide inside the same generated HAK - duplicate resources split across different HAK groups remain warnings because later HAK order can still override earlier content at runtime - `sow-module` now also uses `sow-toolkit` for topdata: - `validate-topdata` - `build-topdata` - `compare-topdata` - `convert-topdata` During development, sibling repositories can point at `../sow-tools/tools/sow-toolkit`. For pinned releases, each consumer repo can instead carry its own copy at `tools/sow-toolkit`. ## Release Automation This repo publishes: - `sow-toolkit-linux-amd64.tar.gz` - `sow-toolkit-windows-amd64.exe` Consumer repos can fetch those binaries into their local `tools/` directory with: - `install-tool.sh` on Linux/macOS - `install-tool.ps1` on Windows ## TopData The native topdata system is implemented in this repo and authored in `sow-module`. High-level ownership split: - `sow-tools` - owns the `sow-toolkit` implementation - owns topdata validation, build, compare, conversion, and dataset-resolution logic - `sow-module` - owns canonical topdata authored data under `topdata/data/` - owns the user-facing topdata workflow scripts For a human-readable front-to-back explanation of how the native topdata builder works and how to use it, see: - [sow-module/topdata/README.md](../sow-module/topdata/README.md) Important topdata contracts still live here under `internal/topdata/` because they are code-adjacent implementation contracts, not user workflow docs.