diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 941e27b..2bd06d0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,6 +33,13 @@ jobs: - name: Publish Windows application shell: pwsh run: ./scripts/publish.ps1 + - name: Build a two-section scene with the published command line + shell: pwsh + run: | + ./artifacts/app/simplepzmap.exe build examples/CiScene/ci-scene.json --out work/ci/ci.pzworld.json --export work/ci/ci.zip --strict + if ($LASTEXITCODE -ne 0) { throw 'simplepzmap build --strict failed.' } + ./artifacts/app/simplepzmap.exe validate work/ci/ci.pzworld.json --source examples/CiScene/ci-source.geojson + if ($LASTEXITCODE -ne 0) { throw 'simplepzmap validate --source failed.' } - name: Install isolated browser check dependencies shell: pwsh run: | diff --git a/README.md b/README.md index f5a4a80..5cd9438 100644 --- a/README.md +++ b/README.md @@ -308,7 +308,7 @@ History is bounded/sparse, so large actions can remove older entries. A world re 4. Create a **new game** using the exported map. Existing saves are not migrated. 5. Enable overlapping example mods separately, or relocate and re-export them. -Exports include Build 42 `mod.info`, `common/`, native `.lotheader/.lotpack/chunkdata_*.bin`, room/building definitions, spawn points, zones, world map XML, editable project, attribution and installation instructions. Name/seed determine the mod ID; changing either creates a different ID. Origin defaults to native cell 100,100. +Exports include Build 42 `mod.info`, `common/`, native `.lotheader/.lotpack/chunkdata_*.bin`, room/building definitions, spawn points, zones, biome maps (`maps/biomemap_X_Y.png`, which Build 42 needs for foraging zones; squares with buildings, roads, fences, decorations or spawns use the featureless `dirt` biome so WorldGen never replaces authored vegetation there with its own jumbo trees), a 256×256 `thumb.png`, world map XML, editable project, attribution and installation instructions. Generated bedrooms, kitchens, bathrooms and living rooms are furnished with TileZed furniture standing against their walls (map format 14); the distributed housing templates keep their single legacy object per room. Imported streets are dressed with Build 42 street props: a mailbox at the curb in front of each house with a garbage bin beside it, a stop sign on every approach of a lesser road to a junction, a concrete wheel stop in each 3×5 parking stall, one to three yard props (chopping block, rain barrel, composter) behind each village house with no pavement nearby, and a scarecrow on farmland (parking zones snap to whole stalls in the direction the cars face). Like the vanilla maps, `spawnpoints.lua` starts players inside houses (the living room, kitchen or bedroom of every building with a bedroom, up to 256), gives all 25 Build 42 professions a key, and adds workplaces such as a police office or a restaurant kitchen for matching professions. Authored spawns are used only when the map has no house. Name/seed determine the mod ID; changing either creates a different ID. Origin defaults to native cell 100,100. ## Build from source diff --git a/docs/CLI.md b/docs/CLI.md index 8563199..c9a3ec9 100644 --- a/docs/CLI.md +++ b/docs/CLI.md @@ -2,7 +2,9 @@ `simplepzmap` builds, checks and exports maps without the browser editor. It uses the same importer, validators and native exporter as the application, so a scene built here opens unchanged in the editor. -Run it from the repository with `dotnet run --project src/SimplePZMapmaker.Cli -- …`, or build it once with `dotnet build src/SimplePZMapmaker.Cli -c Release` and call `simplepzmap.exe`. +The release package ships it as `artifacts/app/simplepzmap.exe`, next to the editor and with the same bundled runtime. From the repository, run `dotnet run --project src/SimplePZMapmaker.Cli -- …`, or build it once with `dotnet build src/SimplePZMapmaker.Cli -c Release` and call `simplepzmap.exe`. CI builds [examples/CiScene](../examples/CiScene/README.md), a two-section scene with a shared building and a seam-crossing fence, with `build --strict` and checks it with `validate --source`. + +Without `--game`, generated street dressing and vanilla vehicle distributions are accepted from built-in lists of Build 42 tiles and names. Tags that select game resources, such as `roof:colour`, `pz:wall` or `pz:style=tilezed:…`, still need `--game`. | Command | What it does | |---|---| @@ -12,7 +14,9 @@ Run it from the repository with `dotnet run --project src/SimplePZMapmaker.Cli - | `export --out mod.zip` | Writes the Build 42 mod of a map or world. | | `tiles --out tiles.zip` | Builds a tile mod (`.pack` + `.tiles`) from PNG frames. | | `probe --game ` | Loads the exported lots with the installed game's own classes (headers, chunks, rooms, every tile sprite; stairs with `--expect-stairs`). Needs the repository's `scripts/` folder and Java from the game. | -| `server-check --game ` | Starts the installed Build 42 dedicated server (`zombie.network.GameServer`, `-nosteam`) in a temporary cache folder with the mod and a test-only Lua probe. The probe asks the server's own metagrid for buildings at room tiles taken from the archive's authoring source, plus one empty control tile; the server is then stopped with `quit`. Your `Zomboid` folder is not touched. | +| `conflicts --game ` | Lists installed maps that already use one of the map's native cells: the game's own maps (challenge maps excluded), Steam Workshop items next to the installation and the local mods folder (`--mods-dir`), all read only. It fails when the base game is hit. `build --game` runs the same check, and `--strict` then fails on it. | +| `serve --game ` | Starts a dedicated server for playtesting in `work/playtest-server/` (`--server-dir`), never in your `Zomboid` folder: the map loads next to Muldraugh with its spawn regions, the window prints the address and admin login, and `quit` stops it. `--fresh` starts a new world, `--port` sets the port (16261). See the [playtest checklist](PLAYTEST.md). | +| `server-check --game ` | Starts the installed Build 42 dedicated server (`zombie.network.GameServer`, `-nosteam`) in a temporary cache folder with the mod and a test-only Lua probe. The probe asks the server's own metagrid for buildings at room tiles taken from the archive's authoring source, plus one empty control tile, and loads the map's spawn regions as the game does (profession keys, spawn points and how many lie in a building); the server is then stopped with `quit`. Your `Zomboid` folder is not touched. | Common options: diff --git a/docs/PLAYTEST.md b/docs/PLAYTEST.md new file mode 100644 index 0000000..ff32002 --- /dev/null +++ b/docs/PLAYTEST.md @@ -0,0 +1,64 @@ +# Playtest checklist + +The automatic checks already cover a lot: + +- `build --game` confirms that every tile exists in the game and checks for cell conflicts. +- `probe` loads the lots with the game's own classes. +- `server-check` has the dedicated server find buildings, rooms and spawn regions. + +What they cannot see happens only in a client: drawn sprites, chunks streamed around a player, foraging and WorldGen. This list covers that part. Play one character per map and tick each line. + +## Start a server for the map + +```bash +simplepzmap build scene.json --out work/world.pzworld.json --export work/map.zip --strict --game "" +``` + +```bash +simplepzmap serve work/map.zip --game "" +``` + +`serve` installs the mod into `work/playtest-server//mods` and starts the dedicated server there. It never touches your `Zomboid` folder. The map loads next to Muldraugh, KY with the map's own spawn regions. The world is kept between runs; `--fresh` starts a new one, and `--port` changes the port from 16261. + +The window prints: + +- the address to join (`127.0.0.1:16261`); +- the admin login; +- the path of the installed mod. The client needs the same mod in its `Zomboid\mods` folder: copy it there yourself, or export with `--install`. + +The server runs without Steam (`-nosteam`), so start the game with the launch option `-nosteam`. Type `quit` in the server window to save and stop. + +## Arrival + +- [ ] The map appears in the server's spawn selection with its `thumb.png`. +- [ ] A new character starts inside a house: living room, kitchen or bedroom, never outside or in a wall. +- [ ] A doctor, a police officer or a chef can start at a matching workplace when the map has one. + +## Buildings + +- [ ] Walls close at every corner. A square with plain north and west walls shows one corner piece, and outer corners have the SE pillar. +- [ ] Doors and windows of a `pz:wall` set or a `tilezed:` template use that set's own pieces, including the irregular ones such as the diner. +- [ ] Furniture stands against the walls and faces into the room: beds, dressers, kitchen counters, stove, fridge, sink, toilet, bath, sofa and TV. None of it blocks a doorway or the stairs. +- [ ] The stove, fridge and sink work, and containers hold loot that fits the room name (kitchen, bathroom, bakery, barn). +- [ ] Room names in the debug room view match the source tags (shop, amenity, `pz:room`). + +## Outdoors + +- [ ] Fences alternate their two pieces, have posts where asked, and every gate opens and closes. A wicket has its frame. +- [ ] Mailboxes stand at the curb and face the road, with a garbage bin beside them. +- [ ] Stop signs stand on the right side of the lesser road before the junction and face the drivers coming to it. +- [ ] Parking areas spawn cars inside the stalls (sandbox car spawn on). Each stall has its wheel stop at the end the cars face. +- [ ] Village yards have their props clear of the doors, and farms have a scarecrow. + +## Nature and zones + +- [ ] Foraging (debug: zone view or the foraging window) reports Forest/DeepForest in woods, TownZone near houses, FarmLand in open country and ForagingNav on roads. +- [ ] After walking away and back, WorldGen has not put jumbo trees on roads, in yards or against walls, and authored trees and bushes are still there. +- [ ] ZombiesType zones change the zombie outfits inside them. + +## World seams + +- [ ] Walk along a section seam. Buildings, fences and roads that cross it are continuous, with no half buildings and no double walls. +- [ ] The world map (M) shows roads, water, forest and building outlines aligned with the ground. + +Report a failing line with the map coordinates (debug: player position) and a screenshot. diff --git a/docs/STATUS.md b/docs/STATUS.md index 1e1ffb0..343c1f0 100644 --- a/docs/STATUS.md +++ b/docs/STATUS.md @@ -1,3 +1,17 @@ +# Build 42 map depth: 18 items from TileZed, PZ Mapping Tools and the wiki — 2026-10-18 + +- **Biome maps (1):** `maps/biomemap_X_Y.png` per cell gives Build 42 its foraging zones; squares with authored content use the featureless `dirt` biome, so WorldGen does not replace authored vegetation with its own jumbo trees (5). +- **Rooms (2):** 588 room names from TileZed `RoomNames.txt`; shop, amenity, building and `pz:room` tags pick vanilla rooms (bakery, barn, church…). +- **Zones (3, 4, 12):** land use, parking and `pz:zone` become TownZone, Forest/DeepForest, Farm, Vegitation, ParkingStall and ZombiesType zones. Parking snaps to whole 3×5 stalls in the direction the cars face, in the importer and the editor. +- **Walls and fences (7, 8):** the TileZed wall catalog (175 sets, 42 of them irregular) with NW corner pieces and SE pillars; 14 reference fences with alternation, posts, gate frames and matching wickets. +- **Spawns (13):** `spawnpoints.lua` starts players inside houses, has all 25 profession keys and adds workplaces. +- **Map files (6):** a 256×256 `thumb.png`. A separate `worldmap-forest.xml` is not written: the game merges it with `worldmap.xml` from the same folder, and ours already has the forest polygons. +- **Interiors (9, 10):** TileZed furniture against the walls of bedrooms, kitchens, bathrooms and living rooms (map format 14, world format 9); `pz:style=tilezed: