Commit graph

161 commits

Author SHA1 Message Date
Kelsi
d773109b50 feat(editor): WMO-only instance loading (Dire Maul, dungeons, raids)
Many WoW instances (Dire Maul, Blackrock Depths, etc.) are WMO-only
maps with no ADT terrain tiles. The editor now handles these:

- loadWMOInstance(): reads WDT, detects WDTF_GLOBAL_WMO flag, loads
  the root WMO path from MWMO chunk, places it as an object with
  correct position/rotation from MODF chunk
- Automatic fallback: when loadADT fails to find tiles, tries
  WMO-only loading before showing error
- Load dialog: "Find Tile" detects WMO-only instances and shows
  "WMO-only instance — click Load to open" instead of "not found"
- Camera positioned near the WMO for immediate editing
- Blank terrain floor generated as ground reference
2026-05-05 22:44:38 -07:00
Kelsi
92787901d8 feat(editor): tile count button in ADT load dialog
"Count" button next to "Find Tile" scans all 64x64 tile coordinates
and shows how many ADT tiles exist for the selected map. Helps users
understand the scope of a map before loading individual tiles.
2026-05-05 22:23:18 -07:00
Kelsi
e287cc9a78 fix(editor): shrink NPC markers, add show/hide toggle
- NPC markers reduced from 30-unit poles to 8-unit poles (was
  overwhelming and obscuring terrain). Base 1.5u, diamond top 1u
- "Show Position Markers" checkbox in NPC panel to toggle visibility
- Markers hidden when checkbox unchecked — useful when M2 creature
  models are rendering and markers are redundant
- Marker alpha reduced for less visual noise
2026-05-05 22:11:53 -07:00
Kelsi
110f250150 feat(editor): biome vegetation auto-population system
One-click procedural object placement based on biome rules:

- 10 biome vegetation rulesets with density, scale range, and slope
  constraints per asset type (trees, bushes, rocks, ferns, etc.)
- Grassland: pine trees + bushes + rocks
- Forest: ashenvale trees + ferns + forest rocks (dense canopy)
- Jungle: palm trees + ferns + vines (high density)
- Desert: cacti + desert rocks + bones (sparse)
- Barrens: scattered trees + dry bushes + rocks
- Snow: snow pines + snowdrifts + rocks
- Swamp: dark trees + mushrooms + logs
- Rocky: rock formations + rock piles
- Beach: palm trees + beach rocks
- Volcanic: lava rocks + charred trees

Objects panel > Auto-Populate Biome: select biome, set seed, click
"Populate Zone" to fill the entire tile with biome-appropriate
vegetation at rule-defined densities.
2026-05-05 16:42:41 -07:00
Kelsi
0d401c3eb8 docs: document server module generator in CHANGELOG, README, help panel
- CHANGELOG: add server module generator description
- README: add AzerothCore integration paragraph with feature summary
- Help panel (F1): add "File → Generate Server Module" to export section
2026-05-05 16:34:40 -07:00
Kelsi
cceff622b4 feat(editor): AzerothCore server module generator
One-click generation of a complete AzerothCore/TrinityCore server module
from editor zone data. File > Generate Server Module creates:

- sql/01_map.sql: map_dbc + area_table_dbc registration
- sql/02_spawns.sql: creature_template + creature + waypoint_data + quests
- sql/03_teleport.sql: game_tele entry for .tele command
- sql/04_zone_flags.sql: sanctuary/PvP area flags
- conf/mod_wowee.conf.dist: worldserver.conf snippet with zone settings
- README.md: step-by-step server admin installation guide
- module.json: machine-readable module manifest

Server admins can import the SQL files, add the config snippet, and
restart their server to have the custom zone fully operational with
NPC spawns, patrol paths, quests, teleport commands, and zone flags.
2026-05-05 16:31:13 -07:00
Kelsi
b19627d82c feat(editor): SQL spawn export for AzerothCore/TrinityCore
Private server integration: export creature spawns, patrol waypoints,
and quest definitions as ready-to-import SQL for AzerothCore/TrinityCore.

- creature_template: name, level, health, mana, damage, armor, faction,
  npcflag (questgiver/vendor/flightmaster/innkeeper), displayId, scale
- creature: spawn position, orientation, respawn time, wander distance,
  movement type (stationary/wander/patrol)
- creature_addon + waypoint_data: patrol path waypoints with delays
- quest_template: title, description, completion text, level, XP, money
- All use ON DUPLICATE KEY UPDATE for safe re-imports
- Auto-exported as spawns.sql alongside other assets on zone save
- File > Export Server SQL menu item for standalone export
- Map ID from zone metadata panel used in spawn table
2026-05-05 16:06:34 -07:00
Kelsi
84a431880e feat(editor): zone map image export (colored top-down PNG)
- exportZoneMap(): renders terrain as colored top-down image with
  height-based coloring (blue lowlands → green plains → brown hills →
  white peaks), water overlay, hole visualization, doodad markers
- Configurable resolution (128-2048px, default 512)
- Auto-exported as zone_map.png alongside other assets on save
- File > Export Zone Map menu with resolution slider
- Useful for documentation, server admin tools, custom map websites
2026-05-05 16:01:29 -07:00
Kelsi
9db5cced2c feat(editor): zone metadata panel with mapId, displayName, gameplay flags
- Map ID: configurable integer input (0-65535) for private server
  integration. Custom zones default to 9000+ to avoid Blizzard conflicts
- Display Name: editable text field for in-game world map/loading screen
- Description: multi-line text field for zone documentation
- Zone Flags: Allow Flying, PvP Enabled, Indoor, Sanctuary checkboxes
- All fields serialized to zone.json under "flags" key
- Info panel shows quest count alongside objects/NPCs
2026-05-05 15:52:59 -07:00
Kelsi
2136727c68 feat(editor): zone audio configuration panel
- Zone manifest gains audio fields: musicTrack, ambienceDay,
  ambienceNight, musicVolume, ambienceVolume
- Serialized to/from zone.json under "audio" key
- Info panel: collapsable "Zone Audio" section with text inputs for
  music/ambience paths and volume sliders
- Preset selector: Elwynn Forest, Durotar, Darkshore, Dungeon, None
- ZoneManifest stored persistently on EditorApp so audio settings
  survive between exports (was recreated each save)
- Custom zones can now specify their own background music and ambient
  soundscapes via zone.json
2026-05-05 15:48:49 -07:00
Kelsi
36dc9ddef7 feat(editor): PNG/JPG/BMP heightmap image import, undo for all imports
- importHeightmapImage(): loads any resolution PNG/JPG/BMP/TGA via
  stb_image, supports both 8-bit and 16-bit precision, maps to terrain
  vertices with bilinear coordinate mapping
- Both image import and RAW import now wrapped with undo
  (recordGeneratorUndo/commitGeneratorUndo)
- UI: File > Import Heightmap now offers "Import Image" (any format)
  and "Import RAW" (binary) as separate options
- Enables professional terrain workflows: paint in Photoshop/GIMP,
  generate in World Machine/Gaea, import directly as terrain
2026-05-05 15:42:35 -07:00
Kelsi
33042c3a47 feat(editor): collision slope overlay, 7/7 format references
- Minimap slope overlay: toggle "Show Slopes (collision)" to visualize
  steep terrain chunks with red intensity overlay (50 deg threshold)
- Lets zone creators preview walkability before exporting WOC
- About dialog updated to show 7/7 format replacements including WOC
- Help panel documents collision preview and export includes collision
2026-05-05 15:37:08 -07:00
Kelsi
4d5eef480e feat: WOC collision mesh format — 7th novel open format
New format: WOC (Wowee Open Collision) — binary collision mesh for
custom zone walkability. Magic WOC1 (0x31434F57).

- WoweeCollisionBuilder::fromTerrain() generates collision triangles
  from terrain heightmap with slope classification (50 deg threshold)
- Per-triangle flags: walkable (0x01), water (0x02), steep (0x04)
- Respects terrain holes (skips triangles in hole regions)
- Binary save/load with bounds, tile coords, triangle data
- Auto-exported on zone save alongside WOT/WHM/WOM/WOB
- Added to content pack validation (score now 0-7)
- FORMAT_SPEC.md v1.1 updated with WOC binary layout
- 19 new test assertions: flat terrain generation (32k tris all
  walkable), save/load round-trip, hole skipping
- 328 total assertions across 84 test cases
2026-05-05 15:23:58 -07:00
Kelsi
d00ddd1c73 feat(editor): WCP shortcut, help panel overhaul, active path restore
- Ctrl+Shift+E keyboard shortcut for WCP content pack export
- Help panel expanded: object tools (snap/align/flatten/scatter/select
  by type), all terrain generators, stamp save/load, export shortcuts
- ObjectPlacer::loadFromFile restores activePath_ from loaded objects
  so users can continue placing the same type after loading
- WCP export menu item now shows Ctrl+Shift+E hint
2026-05-05 14:38:01 -07:00
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
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
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
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
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
b5a798e53a chore(editor): bump version to 0.9.0 — 180 commits, 11.4k lines 2026-05-05 11:28:22 -07:00
Kelsi
6747456f48 fix(editor): improved WCP inspect toast with version and format info 2026-05-05 11:19:35 -07:00
Kelsi
a3b6653e15 feat(editor): quest count and open format save indicator in Info panel 2026-05-05 10:58:11 -07:00
Kelsi
126567a1d0 feat(editor): show scale and rotation info for selected objects 2026-05-05 10:56:48 -07:00
Kelsi
05d7dcd927 feat(editor): show open format indicator in placed objects count 2026-05-05 10:55:07 -07:00
Kelsi
b29aee062a chore(editor): note all 6 Blizzard formats replaced in About dialog 2026-05-05 10:53:49 -07:00
Kelsi
bf83da61d2 chore(editor): update About dialog with open format stats (11k+ lines, 6 formats) 2026-05-05 10:48:31 -07:00
Kelsi
e191f35ed0 feat(editor): content pack inspector and improved import UI 2026-05-05 10:47:18 -07:00
Kelsi
c532a1a787 chore(editor): bump version to 0.8.0 — full open format pipeline 2026-05-05 10:41:43 -07:00
Kelsi
40561fbe7a fix(editor): correct noise type count in About dialog (3 types: value, voronoi, detail) 2026-05-05 10:10:17 -07:00
Kelsi
b4023e13bf chore(editor): bump version to 0.7.0 — full custom content pipeline 2026-05-05 10:08:49 -07:00
Kelsi
a2b69e8e09 feat(editor): Import Content Pack button for loading shared WCP archives 2026-05-05 10:06:57 -07:00
Kelsi
c05c15f6c9 feat(editor): Load Custom Zone menu discovers and loads WOT/WHM zones
- File > Load Custom Zone scans output/ and custom_zones/ for zone.json
- Lists all discovered custom zones with name and quest indicator [Q]
- Tooltip shows description and author on hover
- Click to load the zone's WOT/WHM terrain into the editor
- Parses tile coords from WOT filename for correct positioning
- Full round-trip: export → discover → reload for iterative editing
2026-05-05 10:04:45 -07:00
Kelsi
94e6d5276e feat(editor): git integration for collaborative expansion development
- File > Project > Git submenu: Init, Commit, Push, Pull operations
- Init Git Repo: initializes git in the project directory with initial commit
- Commit Changes: auto-saves zone then commits all changes
- Push/Pull: sync with remote repositories for team collaboration
- Git Status: shows current repo state directly in the menu
- Teams can collaborate on custom expansions using standard git workflows
2026-05-05 09:45:00 -07:00
Kelsi
6f35081013 feat(editor): switch between project zones via File > Project > Switch Zone
Some checks are pending
Build / Build (arm64) (push) Waiting to run
Build / Build (x86-64) (push) Waiting to run
Build / Build (macOS arm64) (push) Waiting to run
Build / Build (windows-arm64) (push) Waiting to run
Build / Build (windows-x86-64) (push) Waiting to run
Security / CodeQL (C/C++) (push) Waiting to run
Security / Semgrep (push) Waiting to run
Security / Sanitizer Build (ASan/UBSan) (push) Waiting to run
2026-05-05 09:42:58 -07:00
Kelsi
8c648dff85 chore(editor): bump version to 0.6.0 — 10k lines, projects, open formats 2026-05-05 09:41:08 -07:00
Kelsi
18939af73d feat(editor): project management UI in File menu
- File > Project submenu: New/Save/Load project, add zones
- "Add Current Zone to Project" captures loaded map/tile info
- Project path editable in the menu
- Zone count shown for quick reference
- Foundation for multi-zone custom expansion workflow:
  create project → add zones → edit each → export all as WCP
2026-05-05 09:39:01 -07:00
Kelsi
c28d3f8a99 feat(editor): open terrain format integrated into export workflow
- File > Export Open Format (.wot/.whm) menu item for standalone export
- Every zone export (Ctrl+S, Export Zone) now also writes .wot/.whm
  alongside the ADT/WDT — dual format output
- Export package now contains: ADT + WDT + WOT + WHM + JSON files
- Both Blizzard-compatible (for existing servers) and open format
  (for wowee-native loading and redistribution)
2026-05-05 09:34:49 -07:00