Commit graph

179 commits

Author SHA1 Message Date
Kelsi
248dcd4eb4 feat(editor): quest objective limit raised to 10 (matches SQL slot capacity)
UI was capped at 4 but the SQL exporter writes RequiredNpcOrGo[1..4] +
RequiredItemId[1..6] = 10 total slots. Allowing 10 lets users define
mixed kill+collect quests fully.
2026-05-06 03:13:26 -07:00
Kelsi
ce778ed674 feat(editor): patrol waypoint reorder (up/dn) + insert-after-cursor (+after)
Previously waypoints could only be appended or removed; reordering meant
clearing and re-adding the whole path. Now each waypoint row has up/dn
swap buttons and a +after that inserts a new waypoint at the current
brush cursor right after this index — slicing long segments doesn't
require redoing the rest of the path.
2026-05-06 03:12:45 -07:00
Kelsi
7822790c60 feat(editor): status bar asterisk also reflects unsaved object/NPC/quest changes 2026-05-06 03:01:09 -07:00
Kelsi
7b2cbcfc92 feat(editor): status bar shows cursor world position alongside camera
Cam in dim yellow, cursor (when brush is on terrain) in cyan. Useful for
quickly noting positions where to drop spawns/objects without flying over
to read the brush coords manually.
2026-05-06 02:56:10 -07:00
Kelsi
0f42ebab3d feat(editor): quest objectives now have a Target ID field + spawn picker
The SQL exporter writes objective targets to RequiredNpcOrGo/RequiredItem
slots based on the objective's targetName field, but the UI never let
the user fill that field. Added an InputText for Target ID and, for Kill
objectives, a dropdown that auto-fills with the entry of any placed NPC.
2026-05-06 02:51:12 -07:00
Kelsi
469f046db5 feat(editor): NPC list shows hostile/friendly/questgiver/vendor counts
Helps users see at-a-glance the makeup of their zone's creature pop
without having to scroll the list looking at each entry's flags.
2026-05-06 02:41:23 -07:00
Kelsi
22c9bc354c feat(editor): placed-object list also has name filter (parity with NPC list) 2026-05-06 02:34:41 -07:00
Kelsi
590ec6b3a3 feat(editor): NPC spawn list has name filter for fast lookup
A zone with 50+ creatures made finding a specific spawn tedious. Added
a case-insensitive name-filter input above the list, capped at 200
visible entries with a 'refine filter' hint when exceeded.
2026-05-06 02:34:05 -07:00
Kelsi
49b7268dc9 feat(editor): show camera (x,y,z) in status bar
Helpful for navigation and noting positions for spawn placement, plus
diagnostic value when debugging coordinate issues. Shown only after a
terrain is loaded.
2026-05-06 02:10:50 -07:00
Kelsi
f6187e7f9a feat(editor): expose Display ID field in selected-NPC editor
SQL export uses CreatureSpawn.displayId for creature_template.modelid1.
Without it AzerothCore can't render the creature in-game. Added an
InputInt + warning text so users can set the displayId manually until
auto-discovery from CreatureDisplayInfo.dbc lands.
2026-05-06 01:57:49 -07:00
Kelsi
9eae67d574 feat(editor): NPC scatter snaps each spawn to ground when enabled
The scatter tool spawned creatures all at the cursor's z-height which
made them hover when scattered over uneven terrain. Added a Snap to
Ground checkbox (defaults to on) that raycasts each scattered NPC and
places it on the actual surface.
2026-05-06 01:35:26 -07:00
Kelsi
b49cb344ac feat(editor): NPC context menu adds Snap to Ground and Face Camera
Right-click context menu on a selected NPC now mirrors the object menu:
Snap to Ground drops it to terrain elevation, Face Camera rotates the NPC
to face the current camera position. Also annotates Duplicate with the
Ctrl+D shortcut hint.
2026-05-06 01:30:27 -07:00
Kelsi
09f573c6ee feat(editor): patrol UI shows loop length and per-point wait time editor
The patrol list now shows total loop distance and gives each waypoint a
draggable wait-time field (0-60s). Helps tune patrol pacing without re-saving
the JSON manually.
2026-05-06 01:27:50 -07:00
Kelsi
700416b2c7 feat(editor): scale slider in selected-NPC editor
Once an NPC is placed there was no way to resize it without removing and
re-placing. Added a Scale DragFloat in the selected-creature editor with
the same 0.1-50 range used for placed objects.
2026-05-06 01:23:42 -07:00
Kelsi
7c4afdbca4 feat(editor): double-click in NPC/object list flies camera to entry
Single-click selects, double-click also flies to. Removes the trip back to
the side panel to hit the Fly To button when navigating long lists.
2026-05-06 01:22:44 -07:00
Kelsi
f39869ef6a docs(editor): document new shortcuts in F1 Keyboard Shortcuts dialog
Adds Ctrl+D duplicate, Ctrl+Wheel rotation, NPC click-to-select, and
W-for-waypoint to the help text so users discover the new bindings.
2026-05-06 01:17:57 -07:00
Kelsi
35ad340ccc feat(editor): facing arrow on NPC markers + Ctrl+Wheel hint in object panel
NPC markers now show a yellow ground-triangle pointing in the orientation
direction so users can see facing without selecting. Object panel gained
the Ctrl+Wheel rotation hint to match the NPC panel.
2026-05-06 01:08:32 -07:00
Kelsi
191ff9ec16 feat(editor): NPC orientation control + Ctrl+Wheel rotates placement preview
Added orientation slider in NPC panel with random button. Ctrl+Wheel now
rotates the placement preview (objects and NPCs) instead of zooming —
Shift makes the step finer (5 deg vs 15 deg). Ghost preview now shows
the actual orientation that the placed NPC will have.
2026-05-06 00:56:19 -07:00
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