Commit graph

869 commits

Author SHA1 Message Date
Kelsi
408d7a611a refactor(editor): extract quest-reward handlers into cli_quest_reward.cpp
Moves the two quest-reward mutation handlers
(--add-quest-reward-item, --set-quest-reward) out of main.cpp
into a new cli_quest_reward.{hpp,cpp} module. Both operate on
a quest's reward struct in zone.json: the first greedy-consumes
multiple item paths in one invocation, the second uses
order-independent flag/value pairs (--xp / --gold / --silver
/ --copper) with strict 'only changed fields are written'
semantics so partial updates don't clobber unrelated fields.

main.cpp shrinks by 114 lines (6,429 to 6,315).
2026-05-09 08:01:28 -07:00
Kelsi
af3c4f0bd6 feat(editor): add --gen-mesh-signpost wayfinding primitive
45th procedural mesh: 4-box signpost — stone base anchor,
tall vertical pole, thin sign board mounted face-out near
the top, and a small decorative cap. Useful for crossroads,
tavern fronts, town entrances, dungeon area markers, quest
hub indicators.

Sign board's long axis runs along Z so the player reads the
sign when facing parallel to the road. Defaults to a 2.5 m
post with a 0.8 x 0.35 m board (~2.7 m total).
2026-05-09 07:58:45 -07:00
Kelsi
db8d499e8e refactor(editor): extract quest+objective handlers into cli_quest_objective.cpp
Moves three contiguous quest mutation handlers (--add-quest,
--add-quest-objective, --remove-quest-objective) out of
main.cpp into a new cli_quest_objective.{hpp,cpp} module.
All three operate on a zone's quests.json with the same
QuestEditor load-edit-save flow; the objective add/remove
pair includes auto-generated description text from
type+name+count for tooltip-friendly defaults.

main.cpp shrinks by 174 lines (6,603 to 6,429). Reward and
clone-quest handlers stay inline for follow-up extractions.
2026-05-09 07:56:16 -07:00
Kelsi
4189051c09 feat(editor): add --gen-texture-parquet basket-weave wood floor
37th procedural texture: basket-weave parquet flooring done as
a checkerboard of 2N x 2N cells. Half the cells are split into
two horizontal planks (wood A); the other half are split into
two vertical planks (wood B). Adjacent perpendicular pairs
form the classic interlocked basket-weave.

A third "gap" color paints thin lines along plank edges and
the cell midline, giving the inset / wood-joint appearance.
Defaults to 32-px cells with 1-px gaps. Useful for parlour
floors, manor halls, magical libraries, dwarven flooring.
2026-05-09 07:52:29 -07:00
Kelsi
191a821ec8 refactor(editor): move --import-obj into cli_wom_io.cpp
Adds --import-obj as the 5th handler in cli_wom_io.{hpp,cpp},
joining its export-side sibling. The handler is the WOM-side
counterpart to --import-wob-obj (which lives in cli_world_io
because it produces WOB) — together they close the OBJ
round-trip story for both single meshes and multi-group
buildings.

main.cpp shrinks by 183 lines (6,786 to 6,603).
2026-05-09 07:50:02 -07:00
Kelsi
549bdaf191 feat(editor): add --gen-mesh-well village-prop primitive
44th procedural mesh: 7-box water well — 4 stone walls
arranged in a hollow square (interior visible, like a real
well shaft) + 2 vertical roof posts on opposite sides + 1
horizontal cross beam at the top where rope/bucket would
mount. Useful for village squares, courtyards, dungeon
water sources, druidic shrines.

Defaults to 1.4 m square footprint with 0.8 m walls and
1.6 m roof posts (~2.4 m total height). The east/west
walls are shortened so the corner joints line up cleanly
without overlap geometry.
2026-05-09 07:47:15 -07:00
Kelsi
5c350ee0af refactor(editor): extract WOB/WOT/WOC inspectors into cli_world_info.cpp
Moves the three open-format world-asset inspectors
(--info-wob, --info-wot, --info-woc) out of main.cpp into a
new cli_world_info.{hpp,cpp} module. Each prints a quick
structural summary (groups / portals / chunk counts /
triangles / bounds) without paying the full deserialization
cost a viewer would.

main.cpp shrinks by 144 lines (6,926 to 6,786). The
--copy-project handler that interleaved between --info-wob
and --info-wot stays inline -- it isn't an inspector and
belongs with project-mutation operations. All --json output
modes preserved.
2026-05-09 07:44:57 -07:00
Kelsi
a07df23755 feat(editor): add --gen-texture-frost crystal-rosette pattern
36th procedural texture: scattered ice nuclei with 6-spike
rosettes radiating at 60 deg intervals. Each spike's pixel
intensity falls linearly from full at the seed to zero at
the end of the ray, so spikes fade naturally into the
background. Per-seed angular jitter prevents all rosettes
from aligning to the same orientation.

Useful for winter zones, ice biomes, frosted-window decals,
magical cold-effect overlays. Defaults to 80 seeds with
18-px rays in 256x256.
2026-05-09 07:41:17 -07:00
Kelsi
0a1ba6f94b refactor(editor): extract --info-{zone,project}-audio into cli_info_audio.cpp
Moves the two audio-config audit handlers (--info-zone-audio,
--info-project-audio) out of main.cpp into a new
cli_info_audio.{hpp,cpp} module. Both surface the music /
day-ambience / night-ambience / volume settings stored in
zone.json so designers can spot zones still missing audio
assignment before a release pass.

main.cpp shrinks by 127 lines (7,053 to 6,926). Drops the
dead `label` lambda inside info-project-audio that the
unused-but-set-variable warning had been flagging. Both
--json output modes preserved.
2026-05-09 07:38:36 -07:00
Kelsi
55a768f1f3 feat(editor): add --gen-mesh-ladder utility primitive
43rd procedural mesh: 2 vertical rails + N evenly-spaced
horizontal rungs. Sits flat against +Z (the climbing face)
so it can be parented to walls, wagons, ship hulls, mage
tower trapdoors, attic openings, dungeon shafts.

Defaults to 3.0m tall × 0.6m wide with 8 rungs (typical
home/loft ladder). Rung spacing computes as height/(rungs+1)
so the first rung sits a half-step from the floor and the
last rung the same distance from the top — keeps the ladder
visually symmetric regardless of rung count.
2026-05-09 07:36:02 -07:00
Kelsi
30fbd39272 refactor(editor): extract --info-{zone,project}-density into cli_info_density.cpp
Moves the two content-density audit handlers
(--info-zone-density, --info-project-density) out of main.cpp
into a new cli_info_density.{hpp,cpp} module. Both count
creatures/objects/quests per tile to surface sparse zones
(boring) and over-stuffed ones (frame-rate bombs); the project
variant rolls per-zone numbers into a project-wide table with
per-zone averages for content-pacing reviews.

main.cpp shrinks by 201 lines (7,254 to 7,053). Both --json
output modes preserved for balance-audit pipelines.
2026-05-09 07:33:40 -07:00
Kelsi
4ec0c1aea2 feat(editor): add --gen-texture-shingles roof-tile pattern
35th procedural texture: roof shingles done as half-row-staggered
rows of rectangular tiles. Three colors: shingle base, a shadow
band at the top of each row (where the row above overlaps), and
thin vertical seams between adjacent shingles in the same row.

The half-row stagger comes from the standard roofing convention
of offsetting alternate courses by half a tile width — gives the
classic interlocked look that pure brick patterns lack.

Useful for roofs, scale armor close-ups, fish bellies, anywhere
needing tightly-packed offset rectangles. Defaults to 32x24
shingles with 4-px shadow + 1-px seams.
2026-05-09 07:30:50 -07:00
Kelsi
a25961e2dd refactor(editor): extract --info-{zone,project}-water into cli_info_water.cpp
Moves the two water-layer audit handlers (--info-zone-water,
--info-project-water) out of main.cpp into a new
cli_info_water.{hpp,cpp} module. Both aggregate liquid data
(water/ocean/magma/slime) across MH2O chunks; the project
variant rolls per-zone counts into a project-wide total with
height range and per-type histogram.

main.cpp shrinks by 209 lines (7,463 to 7,254). Both --json
output modes preserved for capacity-planning pipelines.
2026-05-09 07:28:15 -07:00
Kelsi
8d71618c28 feat(editor): add --gen-mesh-bed bedroom-prop primitive
42nd procedural mesh: 8-box bed — 4 corner legs, mattress
slab, tall headboard at the +Z end, shorter footboard at the
-Z end, and a small pillow on the mattress near the headboard.
Pairs with --gen-mesh-table / --gen-mesh-bookshelf for inn
rooms, manor bedrooms, barracks, dungeon cells.

Defaults to 2.0 × 1.2 (length × width) with 0.30 leg height
and 0.20 mattress thickness — proportions of a single bed.
Customizable per dimension so the same primitive covers
single, double, and king-size beds plus child cots.
2026-05-09 07:25:11 -07:00
Kelsi
c005396040 refactor(editor): extract --info-{zone,project}-extents into cli_info_extents.cpp
Moves the two spatial-bounds info handlers (--info-zone-extents,
--info-project-extents) out of main.cpp into a new
cli_info_extents.{hpp,cpp} module. Both compute world-space XYZ
bounding boxes from manifest tile coords + per-chunk height
samples; the project variant unions every zone's box into one.

main.cpp shrinks by 232 lines (7,695 to 7,463). Both --json
output modes preserved for camera-framing pipelines.
2026-05-09 07:22:06 -07:00
Kelsi
c572c16114 feat(editor): add --gen-texture-stained-glass voronoi pattern
34th procedural texture: cathedral / magical-window stained
glass done as a Voronoi-cell tessellation. Each pixel snaps to
its nearest seed point; pixels near a cell boundary (small
relative gap to the second-nearest seed) become the lead color
producing the leaded-glass dividers between colored regions.

Three stained colors cycle across cells (cellIdx % 3) for a
balanced palette without per-cell color authoring. Defaults to
32 cells in 256x256, using ratio-based boundary detection so
lead-line thickness scales naturally with cell density.

Useful for cathedral windows, mage tower decals, magical
portals, ritual circle backdrops.
2026-05-09 07:19:02 -07:00
Kelsi
3009f406f8 refactor(editor): extract --info-{zone,project}-bytes into cli_info_bytes.cpp
Moves the two disk-byte audit handlers (--info-zone-bytes,
--info-project-bytes) out of main.cpp into a new
cli_info_bytes.{hpp,cpp} module. Both categorize files by
extension into open / proprietary / derived buckets — the
project-wide variant is the headline metric for tracking
the open-format migration's progress against the .m2/.wmo/
.blp/.dbc baseline.

main.cpp shrinks by 244 lines (7,939 to 7,695). Both --json
output modes preserved for machine-readable reports.
2026-05-09 07:16:27 -07:00
Kelsi
6c9edc8130 feat(editor): add --gen-mesh-lamppost urban-prop primitive
41st procedural mesh: 4-box urban lighting fixture — square
base plinth, tall thin vertical pole, lantern body box around
the pole top (overlaps so the lamp visually caps the pole),
and a slightly-wider cap plate that reads as an awning.

Useful for streets, plazas, courtyards, taverns — anywhere
that wants explicit lighting fixtures without modeling each
one by hand. Defaults to 3-meter pole + 0.5-meter lantern
(~3.6m total). Customizable per dimension to cover everything
from candlestick-stands to tall ornate streetlamps.
2026-05-09 07:12:46 -07:00
Kelsi
7950648943 refactor(editor): extract --info-{zone,project}-tree into cli_info_tree.cpp
Moves the two tree-style content browser handlers
(--info-zone-tree, --info-project-tree) out of main.cpp into
a new cli_info_tree.{hpp,cpp} module. Both render
Unix-`tree`-style hierarchical views — one drilling into a
single zone (manifest, tiles, creatures, objects, quests,
files) and one giving a bird's-eye view of every zone in a
project with bake/viewer status.

main.cpp shrinks by 201 lines (8,140 to 7,939). The remaining
info-zone/-project-* pairs (bytes, extents, water, density,
audio) form the next natural extraction batch.
2026-05-09 07:10:12 -07:00
Kelsi
b783a62289 feat(editor): add --gen-texture-scales overlapping-circle pattern
33rd procedural texture: fish / dragon / chain mail scales done
as a half-row-staggered grid of circles whose centers sit at the
bottom-center of each cell. Adjacent rows offset by half a cell
width, with circle radius slightly larger than half the cell, so
the circles interlock into the classic overlapping-scale look.

Three colors: background fills the gaps, scale body fills most of
each circle, and a rim color highlights the top arc to give the
raised / armored feel.

Defaults to 24×16 cells; scaled by cellW × cellH for fine control
of scale density. Useful for chain mail, dragonhide, fish skin,
roof shingles, anywhere needing tiled curved scales.
2026-05-09 07:06:29 -07:00
Kelsi
e128d91d66 refactor(editor): extract WOB/WHM/WOC IO into cli_world_io.cpp
Moves all six world-asset interchange handlers (--export-wob-glb,
--export-wob-obj, --import-wob-obj, --export-whm-glb,
--export-whm-obj, --export-woc-obj) out of main.cpp into a new
cli_world_io.{hpp,cpp} module. WOB / WHM / WOC are our open
replacements for proprietary WMO / ADT-heightmap / ADT-collision
data; these are the bridge that lets the open formats round-trip
through Blender, MeshLab, Three.js, and the rest of the standard
3D toolchain.

main.cpp shrinks by 858 lines (8,997 to 8,140). The single-mesh
--import-obj handler stays inline for now -- it shadow-mirrors
cli_wom_io's --import-stl semantics and will move there next.
2026-05-09 07:03:14 -07:00
Kelsi
61bc9dfb15 feat(editor): add --gen-mesh-table furniture primitive
40th procedural mesh: simple 5-box table — flat top slab on
4 vertical corner legs. Pairs with --gen-mesh-bench /
--gen-mesh-throne / --gen-mesh-bookshelf for taverns,
dining halls, libraries, and study set dressing.

Defaults to 1.6 × 1.0 base × 0.85 tall, 0.10-square legs,
0.06-thick top — sensible dining-table proportions.
Customizable per dimension so a single primitive covers
desks, end tables, and big banquet tables.
2026-05-09 06:58:38 -07:00
Kelsi
b59c310742 refactor(editor): extract WOM <-> OBJ/GLB/STL into cli_wom_io.cpp
Moves the four WOM interchange-format handlers (--export-obj,
--export-glb, --export-stl, --import-stl) out of main.cpp into
a new cli_wom_io.{hpp,cpp} module. WOM is our open M2
replacement; these are the bridge that lets it round-trip
through every external 3D tool — Blender, Three.js, slicers,
CAD packages — so the open format is actually useful.

main.cpp shrinks by 467 lines (9,464 to 8,997). The five WOB
and WHM exporters (--export-wob-glb, --export-whm-glb, etc.)
remain inline for a follow-up extraction.
2026-05-09 06:55:00 -07:00
Kelsi
c1f3d5aba4 feat(editor): add --gen-texture-herringbone chevron pattern
32nd procedural texture: classic V-shaped herringbone done as
horizontal strips of parallel slanted lines whose slant
direction flips every strip. Implementation is a per-pixel
shear: shifting x by the row's local-y collapses each diagonal
into a vertical band in shifted-x space, so a single modulo
picks line vs background.

Useful for parquet floors, brick patios, fabric weaves, fish
scale-style chain mail, anywhere needing a strong directional
pattern. Two-color, defaults to 32-px strips with 12-px line
spacing and 4-px line width.
2026-05-09 06:49:29 -07:00
Kelsi
9362623297 refactor(editor): extract GLB inspectors into cli_glb_inspect.cpp
Moves all 4 GLB introspection handlers (--validate-glb /
--info-glb shared, --info-glb-tree, --info-glb-bytes,
--check-glb-bounds) out of main.cpp into a new
cli_glb_inspect.{hpp,cpp} module. GLB is our open replacement
for proprietary M2/WMO bake outputs, so these belong with the
other open-format tooling.

main.cpp shrinks by 657 lines (10,121 to 9,464). Every
handler preserves its --json output mode for machine-readable
reports.
2026-05-09 06:46:02 -07:00
Kelsi
ecb97428aa feat(editor): add --gen-mesh-bookshelf cabinet primitive
39th procedural mesh: 5-panel cabinet (back / left / right /
top / bottom) divided into N bays by N-1 horizontal shelves,
with rows of pseudo-random book boxes on each level. Book
widths and heights vary per bay (seeded by bay index so
re-generating the same shelf gives the same layout) so the
result reads as a stocked library instead of a perfect grid.

Defaults to 1.5x2.0x0.4 with 4 shelves (~72 books). Useful
for studies, libraries, mage towers, anywhere that needs
filled-out furniture set dressing.
2026-05-09 06:39:39 -07:00
Kelsi
06a4fdb60f refactor(editor): extract interop --validate-* into cli_validate_interop.cpp
Moves the four structural validators for INTEROP file formats
(--validate-stl, --validate-png, --validate-blp, --validate-jsondbc)
out of main.cpp into a new cli_validate_interop.{hpp,cpp} module.
These check files coming in/out of wowee from third-party tools,
distinct from cli_format_validate.cpp which validates the native
open formats (WOM, WOB, WOC, WHM).

main.cpp shrinks by 524 lines (10,644 to 10,121). Each validator
preserves its --json output mode for machine-readable reports.
2026-05-09 06:36:02 -07:00
Kelsi
8cd6f46aa3 feat(editor): add --gen-texture-argyle sweater-knit pattern
31st procedural texture: classic argyle pattern done by working
in a 45-rotated coord system (u, v) = (x+y, x-y) so lozenges
become axis-aligned squares for the checkerboard step. Diagonal
stitch lines fall out of u%cell and v%cell crossing zero.

Three-color: A/B for the alternating diamond fill, third color
for the diagonal stitch overlay. Defaults to 64-pixel cells with
2-pixel stitches. Useful for sweater fabric, seat cushions,
heraldic banner overlays.
2026-05-09 06:29:16 -07:00
Kelsi
0d2312ec8d refactor(editor): extract single-file --convert-* into cli_convert_single.cpp
Moves the five single-file format converters (--convert-m2,
--convert-wmo, --convert-dbc-json, --convert-json-dbc,
--convert-blp-png) out of two dedicated post-loop blocks in
main.cpp into a new cli_convert_single.{hpp,cpp} module. The
batch wrappers in cli_convert.cpp keep working — they shell
out to wowee_editor with these flags.

main.cpp shrinks by ~335 lines (10,979 → 10,644). The two
trailing for-loops were dead code after wiring the dispatcher
into the main loop, so they're gone too.
2026-05-09 06:25:04 -07:00
Kelsi
2658e8297a feat(editor): add --gen-mesh-coffin hexagonal-prism primitive
38th procedural mesh: classic 6-sided coffin with the
narrow-head / wide-shoulder / tapered-foot top-down profile
that's instantly recognizable from any angle. Built as 6 side
quads + top lid fan + bottom panel fan, all with face-shared
normals so it shades cleanly under any lighting.

Pairs with --gen-mesh-grave for graveyard set dressing.
Defaults to 2.0×0.8×0.6 (length × shoulder-width × height).
2026-05-09 06:18:42 -07:00
Kelsi
f0bbc228ef refactor(editor): extract --migrate-* handlers into cli_migrate.cpp
Moves the four schema-migration handlers (--migrate-wom,
--migrate-zone, --migrate-project, --migrate-jsondbc) out of
main.cpp into a new cli_migrate.{hpp,cpp} module. Same
behavior — they're idempotent in-place upgraders for older
WOM revisions and JSON DBC sidecar schemas. main.cpp shrinks
by 282 lines (11,261 → 10,979).
2026-05-09 06:13:41 -07:00
Kelsi
8fd6df6113 feat(editor): add --gen-texture-tartan plaid pattern
3-color crossing-band pattern: 6-band repeat sequence (A A B
C C B) per axis, with the pixel color at any position being
the average of the horizontal-band and vertical-band colors.
That averaging at intersections produces the characteristic
diamond grid of Scottish tartans without explicit "weave"
math — the band overlap pattern just falls out.

Defaults: bandPx=32 (repeat=192px). Useful for clan banners,
kilts, blanket textures, fabric set dressing. Brings the
procedural texture pattern set to 33.
2026-05-09 06:02:13 -07:00
Kelsi
d03c2dad1f refactor(editor): extract zone/project mesh-bake handlers into cli_bake.cpp
Moves the 3D-export bake handlers out of main.cpp:
  --bake-zone-glb     --bake-zone-stl     --bake-zone-obj
  --bake-project-obj  --bake-project-stl  --bake-project-glb

The STL + GLB project bakes share a combined dispatcher (one
function with internal STL-vs-GLB branching) since they walk
the same per-zone asset list and only differ in the output
emission code.

main.cpp drops 12,119 → 11,261 lines (-858). The combined-OR
opener spanning multiple lines created a parse-error fragment
in the extraction; caught + manually fixed before commit
(same pattern as the WOM info attachments/particles/sequences
extraction).
2026-05-09 05:57:25 -07:00
Kelsi
b75924762e feat(editor): add --gen-mesh-throne regal-seat primitive
5-box composite: low pedestal slab + seat block + tall
vertical backrest at -Z + 2 small armrests on the +X/-X
sides. Pedestal is wider than the seat for a stable
foundation, seat thickness is 30% of total seat height.

Defaults: seatW=0.8, seatH=0.5, backH=1.5, pedSize=1.2.
Useful for throne rooms, hero seats, judgement halls,
royal court set dressing. Brings the procedural mesh
primitive set to 37.
2026-05-09 05:50:23 -07:00
Kelsi
a4d282b588 refactor(editor): extract 9 export handlers + sha256 helper into cli_export.cpp
Moves the report-export handlers (md / csv / html / sha256 /
graphviz) for zone & project audits out of main.cpp:
  --export-zone-summary-md       --export-zone-csv
  --export-zone-checksum         --export-project-checksum
  --validate-project-checksum    --export-zone-html
  --export-project-html          --export-project-md
  --export-quest-graph

Also moves the file-scope wowee_sha256 namespace (the SHA-256
implementation that the checksum exporters use) into the new
module's anonymous namespace — it had no other callers in
main.cpp so no cross-TU coupling needed.

main.cpp drops 13,120 → 12,119 lines (-1,001). Build error
during extraction (missing #include <unordered_set>) caught
and fixed.
2026-05-09 05:45:00 -07:00
Kelsi
e95dd7692b feat(editor): add --gen-texture-flame fire pattern
Vertical color gradient from dark (bottom) to hot (top), mixed
with multi-octave smooth noise so the flame boundary wavers
randomly rather than reading as a clean horizontal line.
Vertical position curve is squared so the dark stays dark
longer and the hot saturates faster — matches real-flame
appearance where most of the body is dark with a bright tip.

Useful for torches, braziers, magical effects, lava-zone set
dressing, fireplace texture details. Brings the procedural
texture pattern set to 32.
2026-05-09 05:38:18 -07:00
Kelsi
c9831b38ff refactor(editor): extract data-tree inspection into cli_extract_info.cpp
Moves the four extracted-Data-tree audit handlers out of main:
  --info-extract           (per-extension counts + bytes)
  --info-extract-tree      (per-directory rollup)
  --info-extract-budget    (proprietary share + open-format gap)
  --list-missing-sidecars  (find unconverted .m2/.wmo/.blp/.dbc)

All four operate on a Blizzard-format extracted Data tree —
they audit what's there and what's missing in the migration
from proprietary formats to open ones.

main.cpp drops 13,485 → 13,120 lines (-365). Behavior verified
by re-running --info-extract on a test zone (same output).
2026-05-09 05:32:27 -07:00
Kelsi
9973da07ab feat(editor): add --gen-mesh-cage prison-cell primitive
Square cage frame: top + bottom thin slabs + 4 corner posts
(thicker than bars) + N evenly-spaced bars per side. Bars on
each side span perpendicular to that side's plane so the
cage reads as enclosed from any viewing angle.

Defaults: width=1.5, height=2.0, barsPerSide=5, barR=0.04.
Useful for prison cells, animal pens, dungeon set dressing,
caged exhibits. Brings the procedural mesh primitive set to 36.
2026-05-09 05:25:39 -07:00
Kelsi
59ae675b78 refactor(editor): extract 5 item read-only handlers into cli_items.cpp
Moves the items.json read-only inspection handlers out of
main.cpp:
  --list-items            --info-item
  --validate-items        --validate-project-items
  --info-project-items

Item editing handlers (--add-item, --set-item, --remove-item,
--add-quest-reward-item) stay in main.cpp since they share
state with quest reward editing logic and would need a
broader extraction.

main.cpp drops 13,887 → 13,485 lines (-402). Behavior
verified by re-running --list-items on a non-items zone
(same error message).
2026-05-09 05:19:04 -07:00
Kelsi
b2cc1b7523 feat(editor): add --gen-texture-coral branching reef pattern
Water-color background with N branching coral structures
that grow from the bottom edge upward. Each branch walks a
curved path (random angle drift) drawing a thick stroke,
splitting into thinner sub-branches at random intervals so
the result reads as organic coral rather than straight lines.

Iterative stack-based growth (no recursion) with split cap
at 256 to bound runtime. Defaults: branchCount=12, seed=1.
Useful for underwater zones, ocean floor, mer-people set
dressing, swamp coral fungi. Brings the procedural texture
pattern set to 31.
2026-05-09 05:11:40 -07:00
Kelsi
83c7fd9bee refactor(editor): extract 8 spawn/snap handlers into cli_spawn_audit.cpp
Moves the NPC spawn / object placer audit + ground-snap
handlers out of main.cpp:
  --snap-zone-to-ground       --snap-project-to-ground
  --audit-zone-spawns         --audit-project-spawns
  --list-zone-spawns          --list-project-spawns
  --diff-zone-spawns          --info-spawn

All operate on creatures.json + objects.json sidecars and
the WHM terrain heightfield via WoweeTerrainLoader.

main.cpp drops 14,628 → 13,887 lines (-741). Behavior verified
by re-running --audit-zone-spawns on a test zone (PASSED with
0 issues, same as before).
2026-05-09 05:05:22 -07:00
Kelsi
47e78d4e08 feat(editor): add --gen-mesh-totem stacked carved totem primitive
Stack of N square blocks with alternating widths: even-indexed
blocks (0, 2, 4...) get full base width, odd blocks (1, 3, 5...)
get 70% — gives the carved-segment look characteristic of
totem poles.

Defaults: baseW=0.5, 5 segments, segH=0.5. Useful for tribal
zones, druid groves, fairgrounds, primitive village markers.
Brings the procedural mesh primitive set to 35.
2026-05-09 04:57:33 -07:00
Kelsi
a23eb420ef refactor(editor): move --info-quests and --info-objects into cli_content_info.cpp
Picks up two stragglers that should have been part of the
content-info family extraction in c519ee3 — they were earlier
in main.cpp (lines 1079, 1139) than the contiguous block I
extracted, so the prior pass missed them. Moving them now
puts the entire creature/object/quest inspection family in
one translation unit (18 handlers total).

main.cpp drops 14,732 → 14,628 lines (-104). Behavior
verified by re-running --info-quests on a non-zone path
(same error message).
2026-05-09 04:50:26 -07:00
Kelsi
3e3ba5012b feat(editor): add --gen-texture-circuit sci-fi PCB pattern
Solid PCB background plus N traces that walk the surface in
orthogonal Manhattan style — each trace alternates random
horizontal + vertical segments (3-6 segments per trace,
8-32 px each), with a 3×3 "via" dot at every corner so the
routing reads as intentional rather than random scribbles.

Defaults: traceCount=24, seed=1. Useful for sci-fi panels,
hacker zones, magitek/arcanocore set dressing, robot
texture details. Brings the procedural texture pattern set
to 30.
2026-05-09 04:42:31 -07:00
Kelsi
3967c8de57 refactor(editor): extract 10 diff handlers into cli_diff.cpp
Moves the file-comparison handlers out of main.cpp into their
own translation unit:
  --diff-wcp        --diff-zone
  --diff-glb        --diff-wom
  --diff-wob        --diff-whm
  --diff-woc        --diff-jsondbc
  --diff-extract    --diff-checksum

main.cpp drops 15,653 → 14,732 lines (-921). One build error
during extraction (missing #include for NpcSpawner /
ObjectPlacer / QuestEditor used by --diff-zone) caught by
build and fixed.
2026-05-09 04:35:08 -07:00
Kelsi
887dce647e feat(editor): add --gen-mesh-shrine canopy primitive
6-component composite: square base slab + 4 cylindrical
pillars (12-segment, inset by pillarR so they sit fully on
the base) + flat roof slab on top with 5% overhang past the
base footprint. Pillars + roof create an open canopy.

Defaults: size=1.5, pillarH=2, pillarR=0.1, roofT=0.15.
Useful for wayside shrines, gazebos, well covers, market
stalls, religious altars in temples. Brings the procedural
mesh primitive set to 34.

Milestone: kArgRequired entries reaches 300.
2026-05-09 04:25:52 -07:00
Kelsi
5f37221179 refactor(editor): extract data-tree audit/migration into cli_data_tree.cpp
Moves the seven proprietary-data-tree handlers out of main.cpp:
  --migrate-data-tree         --bench-migrate-data-tree
  --list-data-tree-largest    --export-data-tree-md
  --info-data-tree            --strip-data-tree
  --audit-data-tree

All operate on a Blizzard-format extracted Data tree (the .m2/
.skin/.wmo/.blp/.dbc files) — they audit, migrate, or strip
proprietary-format files in support of the open-format
migration story.

Original placement spanned two sub-blocks (12546-12892 and
13093-13417 in main.cpp) interrupted by --gen-texture and
--add-texture-to-zone in the middle. Extraction collapses
both sub-blocks into one cohesive translation unit.

main.cpp drops 16,321 → 15,653 lines (-668). Behavior verified
by re-running --info-data-tree against a missing directory.
2026-05-09 04:14:32 -07:00
Kelsi
4df8661017 feat(editor): add --gen-texture-rust oxidized-metal pattern
3-octave smooth noise field thresholded by `coverage` to make
rust blob regions, blended with the metal base color via a
0.12-wide smoothstep so patches feather into clean metal
rather than stepping. Per-pixel grain jitter on top so neither
material reads as flat.

Defaults: coverage=0.4 (~40% rust), seed=1. Useful for
weathered armor, abandoned machinery, ruined castle gates,
shipwreck debris. Brings the procedural texture pattern
set to 29.
2026-05-09 04:01:49 -07:00
Kelsi
67ede85f7f refactor(editor): extract zone/project metadata info into cli_zone_info.cpp
Moves the three zone & project metadata inspection handlers
out of main.cpp:
  --info-zone              (single zone.json print)
  --info-zone-overview     (high-level zone digest)
  --info-project-overview  (per-zone summary table for a project)

All three load zone.json via wowee::editor::ZoneManifest.

main.cpp drops 16,564 → 16,321 lines (-243). Behavior verified
by re-running --info-zone + --info-project-overview against
existing test zones.
2026-05-09 03:52:44 -07:00
Kelsi
0a5f508f4e feat(editor): add --gen-mesh-bench wooden bench primitive
Three-box composite: long thin seat plank on top + 2 leg
slabs at the ends (positioned at 90% along the bench length
to leave a small overhang on each side). Legs are vertical
Y-aligned slabs spanning the full height from floor to
bottom-of-seat, ~5% of bench length thick.

Defaults: length=1.5, seatY=0.5, seatT=0.06, seatW=0.4. Useful
for taverns, plazas, roadside rest stops, council halls.
Brings the procedural mesh primitive set to 33.
2026-05-09 03:43:11 -07:00