Commit graph

3466 commits

Author SHA1 Message Date
Kelsi
7473728360 feat(editor): stamp persistence, WCP file preview, enriched stats
- Terrain stamps save/load to JSON: reuse terrain features across zones
  and sessions. Save/Load buttons in Sculpt > Stamp/Clone panel
- WCP Inspect now shows full file breakdown: terrain/model/building/
  texture/data counts with total size. Powered by readInfo file list
  parsing with auto-categorization by extension
- stats.json now includes chunk count, triangle count, tile count, and
  editor version alongside existing object/NPC/quest/texture counts
- Fix unprotected std::stoi in custom zone WOT filename parser
2026-05-05 14:33:52 -07:00
Kelsi
d3e8f999c7 feat(editor): flatten around object, scatter auto-align, manifest batch
- Flatten Ground: flattens terrain to object height with smooth falloff
  around placed buildings/structures (undoable). Button in object panel
- Scatter auto-align: checkbox enables terrain snapping + slope alignment
  for scattered objects (trees snap to ground and lean with hillsides)
- Batch convert now falls back to asset manifest when filesystem dir is
  empty — converts M2/WMO from game data without filesystem extraction
- Public terrain editor wrappers: beginGeneratorUndo, endGeneratorUndo,
  markDirty, stitchChunkEdges, getChunkVertexWorldPos
2026-05-05 14:28:14 -07:00
Kelsi
115fe8436f feat(editor): terrain-aligned objects, batch convert, WCP import+load
New features:
- Align to Slope: rotates objects to match terrain surface normal at
  their position (trees on hillsides lean naturally). Works with
  multi-select. Available in object panel and right-click context menu
- Batch Convert Assets: File menu option to recursively convert all
  M2→WOM and WMO→WOB files in a data directory to open format
- Import & Load: one-click WCP unpack + auto-open the imported zone
- sampleTerrainNormal() for slope detection via height differencing
- Zone load error toasts for missing/corrupt files
2026-05-05 14:22:21 -07:00
Kelsi
acb519a243 fix(editor): object ID reset on load, zone name validation
- ObjectPlacer::loadFromFile() now resets uniqueIdCounter_ and clears
  selectedIndices_ to prevent ID collisions on repeated loads
- Zone rename validates against path traversal and special characters
  (rejects slashes, dots, colons, control chars, empty strings)
- UI shows error toast for invalid zone names
2026-05-05 14:15:28 -07:00
Kelsi
16a34afbf6 fix(editor): ID counter resets, quest panel guard, zone rename, load paths
Bug fixes:
- ObjectPlacer::clearAll() now resets uniqueIdCounter_ to 1
- NpcSpawner::clearAll() added with idCounter_ reset (was manual clear)
- clearAllObjects() uses NpcSpawner::clearAll() instead of manual clear
- Quest panel has terrain-loaded guard (prevents crash before loading)

Features:
- Zone rename: editable map name field in Info panel (press Enter)
- Load objects/creatures/quests from both output/ and custom_zones/
  directories (WOT zones from custom_zones now get their NPCs loaded)
2026-05-05 14:10:47 -07:00
Kelsi
10a63f0581 fix(editor): version string, NPC ID reset, author attribution + UX
Bug fixes:
- Fix README.txt version from v0.8.0 to v1.0.0
- Reset NPC idCounter_ on loadFromFile to prevent ID collisions
- WCP content pack uses project author/description if loaded instead
  of hardcoded "Kelsi Davis"

New features:
- Select by Type: context menu items for "Select All M2 Models" and
  "Select All WMO Buildings" for batch type-based selection
- selectByType(PlaceableType) added to ObjectPlacer
- Export summary toast now shows object/NPC/quest counts alongside
  file count and open format score (5s duration)
2026-05-05 14:05:22 -07:00
Kelsi
28d63addc4 feat(editor): brush size presets/hotkeys, export dialog update
- Brush size presets: S(15)/M(50)/L(100)/XL(180) buttons in sculpt panel
- [ / ] bracket keys adjust brush radius by 10 units (clamped 5-200)
- Export dialog now lists all output formats (ADT+WDT, WOT+WHM, WOM,
  WOB, PNG, JSON) instead of just ADT/WDT
- Document bracket keys in help panel
2026-05-05 14:00:49 -07:00
Kelsi
97da4c38f0 feat(editor): auto-save settings UI, multi-tile zone.json, toast notify
- Auto-save toast notification when auto-save fires
- Edit > Auto-Save Settings: enable/disable toggle, interval slider
  (60-900s), countdown timer display
- Zone manifest now scans output directory for all exported ADT tiles
  and includes them in zone.json (adjacent tiles no longer orphaned)
- Auto-save interval and enabled state exposed via EditorApp accessors
2026-05-05 13:58:07 -07:00
Kelsi
a7e34ad102 feat(editor): adjacent tile edge stitching, Escape clears all state
- Adjacent tile export now stitches border heights from current tile
  for seamless edges, exports both ADT and WOT/WHM open format
- Escape key now clears NPC selection and path capture state in
  addition to object selection and gizmo mode
2026-05-05 13:53:30 -07:00
Kelsi
533c218983 feat(editor): select all, recent zones, minimap selection highlights
- Ctrl+A selects all placed objects, context menu has Select All item
- selectAll() added to ObjectPlacer, works with multi-select transforms
- Recent Zones submenu in File menu (last 8 loaded zones, deduplicated)
- Minimap: selected objects shown as white dots with gold ring outline
  vs yellow dots for unselected objects
- Help panel updated with Ctrl+A and Ctrl+Shift+Click documentation
2026-05-05 13:52:02 -07:00
Kelsi
ddf97e9b8a feat(editor): multi-select objects, time-of-day lighting, WOT loading
- Multi-select: Ctrl+Shift+Click adds objects to selection, transforms
  (move/rotate/scale/delete) operate on all selected objects at once
- Time-of-day slider (0-24h) with automatic sun angle, light color,
  ambient, fog, and sky color transitions (dawn/day/dusk/night)
- View > Sky/Lighting menu: color pickers for light/ambient/fog, fog
  distance sliders, preset buttons (Dawn/Noon/Dusk/Night)
- loadADT prefers WOT/WHM open format from custom_zones/output dirs
- Selection count display when multiple objects selected
- setSkyPreset now delegates to setTimeOfDay for consistency
2026-05-05 13:47:23 -07:00
Kelsi
d44eaec487 feat(editor): enhanced info panel with height stats and active texture
- Show active texture name in info panel when in paint mode
- Display terrain height range (min/max/avg) in properties panel
- Document Alt+Click eyedropper shortcut in help panel
2026-05-05 13:41:05 -07:00
Kelsi
d2acdc7620 feat(editor): texture eyedropper, WOT/WHM preference loading
- Texture eyedropper: pickTextureAt() samples dominant texture at world
  position by reading chunk alpha maps. Alt+Click in paint mode or
  click the Eyedropper button to activate
- loadADT now checks custom_zones/ and output/ for WOT/WHM open format
  files first, falling back to ADT binary only if not found
- Fix unused variable warning in scatterPatches
- Document Alt+Click in help panel
2026-05-05 13:39:53 -07:00
Kelsi
acfbf19144 feat(editor): path preview line, transform undo, complete undo coverage
- River/road tool now shows translucent blue path preview ribbon with
  edge lines between start and end points before applying
- Preview follows cursor when waiting for end point, locks when set
- Undo support for all remaining operations: rotateTerrain90, mirrorX,
  mirrorY, scaleHeights, offsetHeights, invertHeights, smoothBeaches
- Every terrain-modifying operation in the editor is now undoable
2026-05-05 13:33:28 -07:00
Kelsi
7e02db73df feat(editor): generator undo, quit confirmation, state cleanup
- All terrain generators now undoable: crater, mesa, hill, voronoi,
  dunes, detail noise, thermal erosion, canyon, island, ridge, road,
  river, perlin noise — all wrapped with recordGeneratorUndo/commit
- Unsaved changes warning on quit: Save & Quit / Quit / Cancel dialog
- createNewTerrain clears quest editor and path capture state
- recordGeneratorUndo/commitGeneratorUndo helper methods snapshot all
  256 chunks before/after any generator operation
2026-05-05 13:26:38 -07:00
Kelsi
86f1a7d109 feat(editor): enhanced About dialog, validation menu, status bar
- About dialog: shows all 6 format replacements, feature counts, tech
- File menu: "Validate Open Formats" shows live per-format status with
  color-coded [OK]/[!!]/[--] indicators and score out of 6
- Status bar: shows quest count alongside objects/NPCs, undo/redo depth
2026-05-05 13:18:13 -07:00
Kelsi
97e7a4c71a feat(editor): complete importOpen, keyboard shortcuts, DBC exporter
- importOpen now loads WHM alpha maps + full WOT metadata (textures,
  layers, holes, water) — was height-only stub
- DBC exporter migrated to nlohmann/json (last naive JSON file)
- Add Z-axis gizmo constraint (Z key) alongside X/Y
- Add Ctrl+Y as alternate redo binding
- Add F1 keyboard shortcut for help panel toggle
- Update help panel: document Z-axis, Ctrl+Y, all shortcuts
2026-05-05 13:15:00 -07:00
Kelsi
5b180c5579 docs: update FORMAT_SPEC with WHM alpha maps, JSON DBC, PNG textures
- WHM spec now documents per-chunk alpha map data with backward compat
- Added JSON DBC format section (replaces binary DBC)
- Added PNG texture section (replaces BLP)
- Added open format scoring criteria (0-6 scale)
2026-05-05 13:10:48 -07:00
Kelsi
08500384e2 refactor: migrate all remaining JSON to nlohmann/json
- npc_spawner: save/load with proper JSON (25+ fields + patrol paths)
- zone_manifest: save/load with nlohmann (was naive string concat/parse)
  - load now parses all fields: mapId, baseHeight, tiles, hasCreatures
- custom_zone_discovery: parse zone.json with nlohmann, extract mapId
  and tile coordinates (was only reading name/author/description)
- object_placer: save/load with nlohmann (was substring parsing)
- editor_app: stats.json export uses nlohmann, score display now /6

Zero naive JSON string concatenation remains in the editor codebase.
2026-05-05 13:10:07 -07:00
Kelsi
815787933b feat: WHM alpha maps + nlohmann/json for WOT format
- WHM binary now includes per-chunk alpha map data (alphaSize + data)
  so custom zones render with proper texture blending in the client
- WOT exporter rewritten with nlohmann/json (was manual string concat)
- WOT loader rewritten with nlohmann/json (was naive substring parsing)
- Backward compatible: old WHM files without alpha data still load fine
2026-05-05 13:04:51 -07:00
Kelsi
6b3cdd325a feat(editor): click-to-place path points for river/road carver
- River/Road tool now uses click-capture mode instead of button-based
  cursor position — click terrain directly to set start and end points
- 3-step flow: Click Start → Click End → Apply Path (with preview text)
- Cancel button available at each step
- Path state tracked on EditorUI with setPathPoint()/clearPath()
- Intercepts terrain clicks before mode-specific handling when active
2026-05-05 13:00:23 -07:00
Kelsi
4e2f704124 fix(editor): undo now covers texture painting, fix stale buffer bug
- Extend undo/redo to snapshot alpha maps and texture layers alongside
  heights — texture painting operations are now fully undoable
- Bracket paint mode with beginStroke/endStroke like sculpt mode
- Fix stale static char buffer in quest objective loop (showed wrong
  objective's description when editing multiple objectives)
- Zero-initialize all quest UI text buffers for null termination safety
- Fix unused variable warnings in terrain_editor.cpp
2026-05-05 12:58:11 -07:00
Kelsi
617228559a feat(editor): quest chain UI with editing, loading, and validation display
- Add chain link combo to quest creation (select next quest in chain)
- Add completion text field to quest creation form
- Quest list shows chain arrows (->chain) for linked quests
- Click quest in list to edit title, level, XP inline
- Delete button for individual quests
- Live chain validation with error display (broken refs, circular chains)
- Load Quests button alongside Save Quests
2026-05-05 12:49:59 -07:00
Kelsi
2eec089ef5 fix(editor): harden JSON handling, quest loading, and content validation
- Quest editor: add loadFromFile() with nlohmann/json, chain validation
  with circular reference detection, wire into ADT load and save pipeline
- Project: replace naive substring JSON parsing with nlohmann/json for
  both save() and load(), fix shell injection in gitCommit()
- Content pack: replace manual JSON with nlohmann/json, validate binary
  format magic numbers (WHM1/WOM1/WOB1), add WOB to openFormatScore
  (now scores 0-6), mark invalid files with (!) in summary
2026-05-05 12:48:50 -07:00
Kelsi
4fc0361f7a feat: complete client integration for all 6 open formats
- Wire WOB buildings into WMO render pipeline (loads→converts→renders)
- Implement JSON DBC loading in DBCFile::loadJSON() with nlohmann/json
- Wire JSON DBC override into AssetManager (custom_zones/output scan)
- Add WMO→WOB conversion with full geometry (fromWMO)
- Replace placeholder WOB export with real WMO→WOB conversion in editor
- Add --convert-wmo CLI flag for batch WMO→WOB conversion
- Store discovered custom zones on Renderer with getCustomZones() accessor
- Add isCustomZone_ member to TerrainManager

All 6 Blizzard format replacements now fully load in the client:
  ADT→WOT/WHM, WDT→zone.json, BLP→PNG, DBC→JSON, M2→WOM, WMO→WOB
2026-05-05 12:41:19 -07:00
Kelsi
d8f2388635 milestone(editor): commit #200 — v1.0.0 complete, 11.5k lines, all formats open
200 commits building a complete world editor with novel open file
formats from scratch in a single development session.

Final stats:
- 11,532 lines across 55 files
- 6 editor modes, 30+ terrain tools, 3 noise types
- 5 novel binary formats: WHM1, WOM1, WOB1, WCP1, WOT
- All 6 Blizzard formats replaced with open alternatives
- 4/6 formats fully loading in client (terrain, textures, models, buildings)
- CLI: --help, --version, --list-zones, --convert-m2
- Project system with git collaboration
- Full content pipeline: create → export → pack → share → load

By Kelsi Davis
2026-05-05 12:21:00 -07:00
Kelsi
0fce340aa0 docs(editor): add --list-zones and --version to CLI help output 2026-05-05 12:19:53 -07:00
Kelsi
8ac36e2f05 feat(editor): --list-zones CLI flag to discover custom zones without GUI 2026-05-05 12:18:31 -07:00
Kelsi
c75337ed2c fix(editor): sync --version CLI output to v1.0.0 2026-05-05 12:16:21 -07:00
Kelsi
f20e602d32 fix(editor): minor README formatting improvement in export 2026-05-05 12:14:31 -07:00
Kelsi
01d3638835 feat: WOB→WMO conversion and loading in client terrain manager
- WoweeBuildingLoader::toWMOModel() converts WOB groups to WMOModel
  with vertices, indices, normals, texCoords, and vertex colors
- TerrainManager now loads WOB files from custom_zones/buildings/
  and converts to WMOModel for the WMO renderer pipeline
- WMOGroup indices converted from uint32 to uint16 for renderer compat

Client open format support — 4 of 6 now loading:
- FULL: WOT/WHM terrain, PNG textures, WOM models
- LOAD: WOB buildings (converts to WMOModel, render pipeline TODO)
- DETECT: zone.json (scanned), JSON DBC (scanned)
2026-05-05 12:12:26 -07:00
Kelsi
aac854c8ad feat: client scans and logs available custom zones at startup
- Renderer::initializeRenderers() now scans custom_zones/ and output/
  for zone.json manifests on first initialization
- Logs all discovered custom zones with name, directory, and
  NPC/quest availability indicators
- One-time scan (cached after first run)
- Foundation for custom zone selection menu in client UI

Client open format support:
- FULL: WOT/WHM terrain, PNG textures, WOM models (load + render)
- DETECT: zone.json (scanned at startup), WOB buildings, JSON DBC
2026-05-05 12:05:00 -07:00
Kelsi
2d417aa125 feat: client detects WOB buildings and JSON DBCs from custom zones
- TerrainManager now checks for .wob files before loading WMO buildings
  (searches custom_zones/buildings/ and output/MapName/buildings/)
- AssetManager::loadDBC() scans custom_zones/*/data/ for JSON DBC
  overrides exported by the editor
- WOB detection logs when found (full WOB→WMOModel conversion pending)
- JSON DBC detection logs when found (full JSON→DBCFile loading pending)

Client open format support status:
- WOT/WHM terrain: FULL (loads and renders)
- PNG textures: FULL (override system)
- WOM models: FULL (loads and renders)
- zone.json: DETECTION (CustomZoneDiscovery scans)
- WOB buildings: DETECTION (found, conversion pending)
- JSON DBC: DETECTION (found, loading pending)
2026-05-05 12:00:31 -07:00
Kelsi
71b06826b1 milestone(editor): v1.0.0 — complete world editor with full open format pipeline
191 commits, 11.5k lines, 55 files. Both targets clean, zero warnings.

World Editor v1.0.0 feature-complete:
- 6 modes: Sculpt, Paint, Objects, Water, NPCs, Quests
- 30+ terrain generators and tools
- Full painting, object placement, NPC, and quest pipelines
- Project management with git collaboration
- Content pack import/export with validation

All 6 Blizzard formats replaced with novel open alternatives:
- ADT → WOT/WHM (WHM1 magic)
- WDT → zone.json
- BLP → PNG (auto-converted)
- DBC → JSON (auto-converted)
- M2 → WOM (WOM1 magic, auto-converted)
- WMO → WOB (WOB1 magic)

Client integration: auto-loads WOT/WHM terrain + WOM models
Content pipeline: Editor → Export → WCP Pack → Share → Client loads

By Kelsi Davis
2026-05-05 11:54:58 -07:00
Kelsi
8f7a70e8cd feat(editor): --version CLI flag shows editor version and format info 2026-05-05 11:53:12 -07:00
Kelsi
84bb31012f docs(editor): add WOM version note and future animation support plan to FORMAT_SPEC 2026-05-05 11:50:22 -07:00
Kelsi
8bf02b5880 feat(editor): zone stats.json export with open format score and content summary 2026-05-05 11:48:57 -07:00
Kelsi
5c229e9603 feat(editor): auto-export hole mask PNG alongside terrain on zone save 2026-05-05 11:44:52 -07:00
Kelsi
1a95ec9d0a feat(editor): hole mask PNG export (16x16 chunk grid, white=holes) 2026-05-05 11:43:23 -07:00
Kelsi
b65b5a758d feat(editor): zone manifest includes ISO export timestamp for tracking 2026-05-05 11:40:56 -07:00
Kelsi
053278da7c fix(editor): accurate file count in export toast (includes all PNGs and textures) 2026-05-05 11:38:56 -07:00
Kelsi
196e67dddb feat(editor): auto-export water mask PNG alongside terrain on zone save 2026-05-05 11:37:31 -07:00
Kelsi
7ce49ebe96 feat(editor): water mask PNG export (16x16 chunk grid, white=water) 2026-05-05 11:36:04 -07:00
Kelsi
235eccad88 docs(editor): expand FORMAT_SPEC with zone.json fields and IP disclaimer 2026-05-05 11:34:09 -07:00
Kelsi
e73cb466d5 feat(editor): WOT metadata includes doodad/WMO placement counts 2026-05-05 11:31:26 -07:00
Kelsi
b5a798e53a chore(editor): bump version to 0.9.0 — 180 commits, 11.4k lines 2026-05-05 11:28:22 -07:00
Kelsi
324970b866 feat(editor): WOT metadata includes editor version for compatibility tracking 2026-05-05 11:26:54 -07:00
Kelsi
8ef151a07e feat(editor): include tileSize/chunkSize constants in WOT metadata 2026-05-05 11:24:29 -07:00
Kelsi
02c2d62a02 feat(editor): comprehensive export summary log with format breakdown 2026-05-05 11:22:55 -07:00
Kelsi
ae7942ef39 feat(editor): zone thumbnail included in export for content pack browsing 2026-05-05 11:21:11 -07:00