From b37f57966d8480bed335e8a684ff5c32b04477bd Mon Sep 17 00:00:00 2001 From: KAMKEEL <28842281+KAMKEEL@users.noreply.github.com> Date: Fri, 14 Aug 2026 00:21:31 -0400 Subject: [PATCH] Keep the readable renderings out of the world directories A generated / is meant to drop straight into a save, and Scribe's smoke harness copies a data set's contents into a server's world wholesale -- so anything beside customnpcs/ would be copied in too. The NBTJsonUtil renderings move to _readable// at the output root, which makes each world directory usable as a cnpc_data_sets overlay with no filtering step. --- .../java/kamkeel/npcs/fixtures/Readme.java | 16 +++++++++------- .../java/kamkeel/npcs/fixtures/WorldWriter.java | 5 ++++- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/fixtures/java/kamkeel/npcs/fixtures/Readme.java b/src/fixtures/java/kamkeel/npcs/fixtures/Readme.java index 522f9d05d..fc7a3da25 100644 --- a/src/fixtures/java/kamkeel/npcs/fixtures/Readme.java +++ b/src/fixtures/java/kamkeel/npcs/fixtures/Readme.java @@ -30,15 +30,17 @@ public final class Readme { sb.append("## Layout\n\n"); sb.append("```\n"); for (FixtureWorld world : worlds) { - sb.append(world.name()).append("/\n"); - sb.append(" customnpcs/ <- exactly a CustomNPC+ world directory, and nothing else\n"); - sb.append(" _readable/ <- NBTJsonUtil renderings of the .dat files, for humans\n"); + sb.append(world.name()).append("/customnpcs/ <- a CustomNPC+ world directory, and nothing else\n"); } - sb.append("manifest.json <- which file holds which case, and why\n"); + sb.append("_readable// <- NBTJsonUtil renderings of the .dat files, for humans\n"); + sb.append("manifest.json <- which file holds which case, and why\n"); sb.append("```\n\n"); - sb.append("`customnpcs/` can be dropped straight into a save directory. `_readable/` is a\n"); - sb.append("debugging aid: it is CustomNPC+'s own JSON rendering, which suffixes scalars\n"); - sb.append("with their type (`5b`, `5L`, `1.0f`) and so is deliberately not strict JSON.\n\n"); + sb.append("Each `/` holds `customnpcs/` and nothing else, so it drops straight into\n"); + sb.append("a save directory -- or, in Scribe, works as-is as a `cnpc_data_sets` overlay.\n"); + sb.append("The readable renderings sit outside the world directories for that reason.\n\n"); + sb.append("`_readable/` is a debugging aid, not a fixture: it is CustomNPC+'s own JSON\n"); + sb.append("rendering, which suffixes scalars with their type (`5b`, `5L`, `1.0f`) and is\n"); + sb.append("therefore deliberately not strict JSON. The widths being visible is the point.\n\n"); sb.append("## The worlds\n\n"); for (FixtureWorld world : worlds) { diff --git a/src/fixtures/java/kamkeel/npcs/fixtures/WorldWriter.java b/src/fixtures/java/kamkeel/npcs/fixtures/WorldWriter.java index 99f948561..79dffa3ee 100644 --- a/src/fixtures/java/kamkeel/npcs/fixtures/WorldWriter.java +++ b/src/fixtures/java/kamkeel/npcs/fixtures/WorldWriter.java @@ -47,7 +47,10 @@ public final class WorldWriter { this.world = world; this.root = new File(outputRoot, world); this.customnpcs = new File(root, "customnpcs"); - this.readable = new File(root, "_readable"); + // Outside the world directory, not inside it. A generated / is meant to be usable + // as a drop-in overlay -- Scribe's smoke harness copies a set's contents straight into a + // server's world -- so it must contain customnpcs/ and nothing else. + this.readable = new File(new File(outputRoot, "_readable"), world); this.manifest = manifest; mkdirs(customnpcs); mkdirs(readable);