`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>
94 lines
4.6 KiB
Markdown
94 lines
4.6 KiB
Markdown
# wgt01 — Build Status & Notes
|
||
|
||
Progress log for the **Westgate Urban Foundation MVP** tileset (prefix `twu01`).
|
||
Spec: [KICKOFF.md](KICKOFF.md). How NWN needs things shaped: [../AGENTS.md](../AGENTS.md).
|
||
|
||
_Last updated: 2026-07-04._
|
||
|
||
---
|
||
|
||
## What exists — the generator kit (`generator/`)
|
||
|
||
One source of truth (`tiles.py`) feeds four tools; the two NWN emitters need no
|
||
Blender, so they're directly testable.
|
||
|
||
| File | Role | Needs Blender? |
|
||
|---|---|---|
|
||
| `tiles.py` | **Single source of truth**: 40-tile table, 12 materials, the 12×12 test map, and all pure derivations (paint / height / walkmesh quads / `.set` corner+crosser mapping). `PREFIX=twu01`. | no |
|
||
| `build.py` | Builds `westgate_urban_foundation_mvp.blend` — 40 tile collections (`VIS_`/`WOK_`/`BLOCK_` + edge custom props), `TILE_EDGE_METADATA` text block, `PREVIEW_tile_library_grid`, `PREVIEW_12x12_test_district`. | yes (4.0.2) |
|
||
| `export_mdl.py` | Real NWN export via **Neverblender** → 40 `.mdl` + 40 `.wok` (AuroraBase `tile`/`dummy`, `trimesh`, one `aabb` walkmesh; correct surfacemats). | yes + addon |
|
||
| `make_wok.py` | Pure-Python ASCII `.wok` emitter (verts+faces+surfacemat+AABB tree). Fallback when Neverblender absent — format **validated identical** to Neverblender's output. | no |
|
||
| `make_set.py` | First-pass `twu01.set` (INI, **CRLF**) from the tile grammar. | no |
|
||
|
||
`flake.nix` exposes these as apps + a dev shell (pinned **Blender 4.0.2**,
|
||
`neverwinter-nim`, `cleanmodels`).
|
||
|
||
## Pipeline (commands)
|
||
|
||
```sh
|
||
cd wgt01
|
||
nix run .#build -- out.blend # 1. Blender tile library
|
||
nix run .#export -- out.blend mdl/ # 2. real .mdl + .wok (Neverblender)
|
||
nix run .#set -- twu01.set # 3. first-pass .set (CRLF)
|
||
# nix run .#wok -- wok/ # ASCII .wok fallback only (export_mdl preferred)
|
||
```
|
||
|
||
## Verified (2026-07-04)
|
||
|
||
- **build**: 40 collections, 144/144 district cells placed, 0 skipped, 12 materials.
|
||
- **export**: 40 `.mdl` + 40 `.wok`. Surfacemats correct — CP1 all `wok_Stone`(4),
|
||
CN1 all `wok_Nonwalk`(7), BR_1/CE_S walkable+blocker mixed. `.mdl` has
|
||
`newmodel twu01_cp1`, `classification TILE`, AuroraBase name == resref.
|
||
- **Neverblender**: enabled + working **headless** via the flake's
|
||
`blender-4.0.2 --background`, reading `~/.config/blender/4.0` (same config as
|
||
the interactive session). Surfacemat = walkmesh face **material slot index**
|
||
after `nvb_utils.create_wok_materials(mesh)` — not the material name.
|
||
- **`.set`**: CRLF (1224/1224 lines), 40 tiles, 3 terrains (`cobble`/`raised`/
|
||
`canal`), 2 crossers (`ramp`/`canal_edge`). Corners/heights derive from each
|
||
tile's N/E/S/W edge grammar; ramp N-corners → height 1, canal edges →
|
||
`canal_edge` crosser, non-walkable tiles → `PathNode=N`.
|
||
|
||
## Testing in the toolset — no `.hak` needed
|
||
|
||
The toolset reads loose files from **`~/Documents/Neverwinter Nights/development/`**
|
||
(confirmed present). One command does build → export → `.set` → stage:
|
||
|
||
```sh
|
||
cd wgt01
|
||
nix run .#dev-install # -> build/ (inspectable) + installs 40 .mdl/.wok + twu01.set into development/
|
||
```
|
||
|
||
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
|
||
|
||
- **PathNode** is a placeholder (`A` walkable / `N` non-walkable) — verify creature
|
||
routing per tile shape in the toolset; real pathnode letters matter.
|
||
- **No `.itp` palette** yet — tiles may not appear in the toolset palette tree
|
||
until one is authored (GFF; `neverwinter-nim`'s `nwn_gff`). The `.set` still
|
||
loads for area creation.
|
||
- **No minimaps** — `ImageMap2D` refs exist in the `.set` but the `.tga`s don't
|
||
(skipped by decision; Westgate doesn't use them).
|
||
- **Substitutions**: `RA_C` = straight-ramp geometry; `STA` = smooth ramp WOK
|
||
proxy over stepped visual; `SW_C/T/X/E` share the straight-sidewalk visual.
|
||
- `MAT_void_black` is defined but currently unpainted (11/12 materials realised).
|
||
- Corner terrain is a heuristic from edges — hand-tune adjacency in the toolset.
|
||
|
||
## Git
|
||
|
||
Branch **`wgt01-tileset-kit`** (`main` still unborn — `git branch -f main
|
||
wgt01-tileset-kit` to promote). Commits:
|
||
- `60af184` — build guide + 40-tile generator kit
|
||
- `1284f15` — real `.mdl`/`.wok` export via Neverblender
|
||
|
||
## Next passes
|
||
|
||
1. Author `twu01palstd.itp` palette so tiles show in the toolset palette tree.
|
||
2. Walk-test in the toolset (`nix run .#dev-install`) → tune PathNodes, crossers,
|
||
corner terrains.
|
||
3. Pack `.hak` (`nwn_erf`) once validated.
|