wgt01: add dev-install flake app (build -> export -> set -> development/)
`nix run .#dev-install` runs build.py, export_mdl.py and make_set.py into ./build, then stages the loose .mdl/.wok/.set into ~/Documents/Neverwinter Nights/development/ for toolset testing without packing a .hak. Replaces only twu01* files there; keeps build/ for inspection. gitignore build/ + *.blend. Verified: 40 .mdl + 40 .wok + twu01.set (CRLF intact) staged into development/. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
build/
|
||||
*.blend
|
||||
*.blend1
|
||||
+11
-10
@@ -51,17 +51,18 @@ nix run .#set -- twu01.set # 3. first-pass .set (CRLF)
|
||||
## Testing in the toolset — no `.hak` needed
|
||||
|
||||
The toolset reads loose files from **`~/Documents/Neverwinter Nights/development/`**
|
||||
(confirmed present). Drop the build outputs there and they're picked up directly:
|
||||
(confirmed present). One command does build → export → `.set` → stage:
|
||||
|
||||
```sh
|
||||
DEV="$HOME/Documents/Neverwinter Nights/development"
|
||||
cp mdl/twu01_*.mdl mdl/twu01_*.wok "$DEV"/
|
||||
cp twu01.set "$DEV"/
|
||||
cd wgt01
|
||||
nix run .#dev-install # -> build/ (inspectable) + installs 40 .mdl/.wok + twu01.set into development/
|
||||
```
|
||||
|
||||
Then in the toolset: create a small area using the `twu01` tileset, place tiles,
|
||||
walk-test pathing/heights. (Packing a `.hak` with `nwn_erf` is deferred until the
|
||||
set is validated.)
|
||||
It replaces only the `twu01*` files in `development/` (leaves everything else
|
||||
alone) and keeps the intermediate outputs in `./build/` for inspection. Then in
|
||||
the toolset: create a small area using the `twu01` tileset, place tiles, walk-test
|
||||
pathing/heights. (Packing a `.hak` with `nwn_erf` is deferred until the set is
|
||||
validated.)
|
||||
|
||||
## First-pass caveats — tune before shipping
|
||||
|
||||
@@ -87,6 +88,6 @@ wgt01-tileset-kit` to promote). Commits:
|
||||
## Next passes
|
||||
|
||||
1. Author `twu01palstd.itp` palette so tiles show in the toolset palette tree.
|
||||
2. (optional) A `dev-install` flake app to copy build outputs into `development/`.
|
||||
3. Walk-test in the toolset → tune PathNodes, crossers, corner terrains.
|
||||
4. Pack `.hak` (`nwn_erf`) once validated.
|
||||
2. Walk-test in the toolset (`nix run .#dev-install`) → tune PathNodes, crossers,
|
||||
corner terrains.
|
||||
3. Pack `.hak` (`nwn_erf`) once validated.
|
||||
|
||||
@@ -58,6 +58,27 @@
|
||||
--python-exit-code 1 -- "$outdir" "$@"
|
||||
'';
|
||||
};
|
||||
|
||||
# One shot: build -> export -> .set, then stage the loose files into the
|
||||
# toolset's development/ folder (no .hak). Work dir defaults to ./build.
|
||||
mkdev = pkgs.writeShellApplication {
|
||||
name = "wgt-dev-install";
|
||||
runtimeInputs = [ blender py ];
|
||||
text = ''
|
||||
work="''${1:-$PWD/build}"
|
||||
dev="$HOME/Documents/Neverwinter Nights/development"
|
||||
mkdir -p "$work/mdl" "$dev"
|
||||
blend="$work/westgate_urban_foundation_mvp.blend"
|
||||
blender-4.0.2 --background --python ${gen}/build.py --python-exit-code 1 -- "$blend"
|
||||
blender-4.0.2 --background "$blend" --python ${gen}/export_mdl.py --python-exit-code 1 -- "$work/mdl"
|
||||
python ${gen}/make_set.py "$work/twu01.set"
|
||||
# replace only our own prefix in development/, leave everything else alone
|
||||
rm -f "$dev"/twu01_*.mdl "$dev"/twu01_*.wok "$dev"/twu01.set
|
||||
cp "$work"/mdl/twu01_*.mdl "$work"/mdl/twu01_*.wok "$work"/twu01.set "$dev"/
|
||||
n=$(find "$work/mdl" -name 'twu01_*.mdl' | wc -l)
|
||||
echo "installed $n tiles + twu01.set -> $dev"
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
packages.${system}.default = build;
|
||||
@@ -83,6 +104,10 @@
|
||||
type = "app";
|
||||
program = "${mkmdl}/bin/wgt-export";
|
||||
};
|
||||
dev-install = {
|
||||
type = "app";
|
||||
program = "${mkdev}/bin/wgt-dev-install";
|
||||
};
|
||||
};
|
||||
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
|
||||
Reference in New Issue
Block a user