Add editor support for exporting Cyclopedia and CipSoft protobuf assets from the currently loaded map.
Main changes:
- Add File > Client Assets actions for Static House Data export, Cyclopedia minimap and satellite export, and restoring timestamped client asset backups.
- Keep generic minimap and tileset exports under File > Export.
- Export staticdata, staticmapdata, and mapdata protobuf files with content-hashed filenames.
- Update catalog-content.json so generated assets are picked up by the client.
- Merge compatible CipSoft templates when they match the loaded map.
- Fall back to generated data for custom maps instead of failing the export.
- Support filtered house exports.
- Report warnings for missing or failed static map entries.
- Emit aligned MINIMAP and sprite-based SATELLITE assets for the documented scales, including the 1/16 layer.
- Keep Cyclopedia export progress in the status bar instead of using a blocking modal progress dialog.
Performance:
- Precompute floor and chunk plans for global map exports.
- Write BMP output directly.
- Reuse minimap renders for matching satellite assets.
- Parallelize asset hash and LZMA encoding through a bounded worker queue.
- Remove modal progress overhead from the export path.
- Revert the tile-grid satellite optimization after profiling showed it shifted cost without improving total export time.
Documentation:
- Document the export contract in docs/static-data.md.
- Add docs/cyclopedia-export-roadmap.md with deferred optimization candidates and follow-up notes.
Scope:
- Focus this change on the Cyclopedia/staticdata protobuf export path and the export-specific performance work needed for practical global map exports.
- Move unrelated runtime, performance, and UI experiments out of this branch.
Validation:
- Ran static inspection and git diff checks during the export changes.
- Reviewed Visual Studio CPU profiles after each global map export performance pass.
- Verified hash and LZMA work moved into bounded async workers.
- Verified the restore action is labeled as restore and grouped under File > Client Assets, not File > Export.
This adds the editor-side pipeline needed to generate client Cyclopedia assets from a loaded map while keeping the export flow recoverable, documented, and practical for large maps.
Improve OTBM load/save and map view performance
This change improves Remere's Map Editor performance in OTBM load/save paths,
object allocation, binary serialization, tile lookup, and idle map rendering.
Measured impact:
Object pool allocation:
- Slab refill events reduced from 17,830 to 2,230, about 87.5% fewer refills.
- 48-byte class refills reduced from 4,276 to 535, about 87.5% fewer refills.
- 64-byte class refills reduced from 5 to 1, about 80.0% fewer refills.
- 128-byte class refills reduced from 8,776 to 1,097, about 87.5% fewer refills.
- 1024-byte class refills reduced from 4,773 to 597, about 87.5% fewer refills.
- rme::allocatePooledObject sampled CPU share reduced from 20.01% to 14.62%,
about 26.9% lower sampled share.
- Total pooled allocation calls stayed at 42,559,971 for the measured workload.
- Heap fallback allocations stayed at 0, confirming the hot load path remains pooled.
Latest mixed load/save profile:
- GUI::LoadMap remained the dominant sampled cost at 67.02%.
- IOMapOTBM::loadMap accounted for 60.23% total sampled CPU, with 56.34% in
the inner load body.
- GUI::SaveMap and Editor::saveMap accounted for 28.16%.
- IOMapOTBM::saveMap accounted for 27.63%.
- BaseMap::forEachTileLocation during save accounted for 23.01%.
- Tile::Tile accounted for 11.53%.
- Tile::addLoadedItem accounted for 8.15%.
- Item::Create accounted for 6.99%.
- QTreeNode::createFloor accounted for 6.71%.
- BinaryNode::advance and BinaryNode::load accounted for 5.37% and 3.81%.
Map view idle and preview rendering:
- Static map-view sampled CPU dropped from 139,767 sampled units to 126 sampled
units after overlay-only refresh reuse.
- MapCanvas::OnPaint dropped from 46,229 sampled units and 32.20% to 19 sampled
units and 15.08%.
- GLRenderer::flushCommands dropped from 24,321 sampled units and 16.94% to
4 sampled units and 3.17%.
- Performance stats refresh changed from a 16 ms scene-dirty timer to a 500 ms
overlay-only timer.
- Show Preview changed from a 16 ms scene-dirty timer to a 250 ms scene-dirty
timer.
- Position indicator keeps the 16 ms scene-dirty timer because it is expected
to animate smoothly while active.
Main changes:
- Added cached floor and tile lookup while loading OTBM map data and spawn files.
- Added direct TileLocation assignment for parser paths that already resolved
the destination location.
- Added BaseMap::forEachTileLocation for direct save traversal of existing tile
locations.
- Added a small-object slab allocator for hot Item, Tile, and Floor allocations.
- Added pool owner-thread binding and diagnostics for allocation validation.
- Increased slab sizing to reduce refill pressure in large-map loads.
- Improved binary node writing by batching raw bytes and avoiding redundant cache
renewal checks.
- Avoided rewriting XML sidecar files when serialized content only differs by
line endings.
- Fixed invalid ground serialization so placeholder ground id 0 no longer drops
the rest of the tile contents during save.
- Split map canvas refresh into scene-dirty and overlay-only paths.
- Adjusted animation timer behavior for position indicator, Show Preview, and
performance stats.
- Scaled tooltip rendering with map zoom, clamped to 55% minimum.
- Kept review and Sonar cleanups away from hot path regressions with targeted
NOSONAR annotations or FORCEINLINE where needed.
- Added AGENTS.md guidance for future Git, build, and PCH discipline.
Notes:
- The Visual Studio captures are sampling profiles, so percentages represent CPU
sample share, not direct wall-clock speedup.
- The latest profile is a mixed interaction profile, not a strict load-only or
save-only benchmark.
- The allocator counters are the strongest before/after measurement in this
change.
- No OTBM format or map semantics are intended to change.
Bug Fixes:
- Fixed tile merge behavior to properly handle both monster and NPC spawns when importing maps.
- Improved spawn size validation to check input bounds before assignment.
- Removed duplicate NPC transfer logic in tile operations.
Improvements:
- Enhanced diagnostic messages during map loading with contextual information about tile areas and file positions.
- Updated error messaging for tile position parsing failures in map formats.
This commit adds the full Lua scripting API and integrates the Script Manager into the application.
It builds on top of the scripting engine introduced in #158, exposing all the API modules that Lua scripts can use and making everything accessible from the UI.
Changes:
- Added all Lua API modules: map, tile, item, brush, image, position, selection, creature, color, app, dialog, noise, algo, geo, json, http.
- Added map overlay system for scripts to draw on the map view.
- Added event system, context menu registration, persistent storage, and transaction support with undo/redo.
- Added support for package scripts (directory with manifest.lua) and script metadata tags.
- Added Scripts menu to the menubar with per-script execution and reload.
- Connected the Script Manager window to the UI.
- Added missing build dependencies and fixed MSVC compilation errors.
Notes:
- Build dependencies were added for HTTP and noise generation support.
- Some code was adjusted to compile correctly on MSVC.
* Show indicators for pickupable and moveable items
* Fix: drawing always refreshing ui
* Fix crash on invalid friend for wallbrush
* Option to remove empty spawns
* Draws position indicator, some code cleanup
* Teleport copy/paste improvements
* Fix flood fill
* Add function to get minimap/8bit color
* Small code cleanup
* Cleanup Position
* Code cleanup and small optimizations
* Code cleanup
* Code cleanup and small optimizations (#406)
* Cleanup and cast functions.
* Avoid adding a new Unique ID if it already exists
* Code cleanup and small optimizations
* More changes and cleanup
* Changes and cleanup
* Some changes
* Fix copy position.
* Only show uid/aid alert if it really changed
* Add actions history panel
* Does not draw tooltips on minimap mode
* Use constexpr
* Replace items fix (#408)
* Draw grid small optimization
* Small change in selection box and Fix#409
* Fix some xpm
* Ingame box improvements, add lights support.
* Fix go to previous position (#410)
* Fix depot crash (#411)
* Fix XPMs
* Export minimap as .otmm (otclient format) or .png (#413)
* Fix glitch after drawing secondary map
* fix
* Update about_window.cpp
* sonar
* fix Minimap and progress bar
* fix erro load items.xml
* fix
* fix doodad brush
* fix: slightly more accurate house size estimation
* feat: update items.otb and items.xml
* fix: bad merge
* Revert "feat: update items.otb and items.xml"
This reverts commit 40f1edc70f.
---------
Co-authored-by: Nailson <Mignari@users.noreply.github.com>
Co-authored-by: wtver <51377408+maattch@users.noreply.github.com>
Co-authored-by: Majesty <32709570+majestyotbr@users.noreply.github.com>
Co-authored-by: Luan Santos <github@luan.sh>
Created the complete organization of npcs, that way, it is possible to create own files for npcs, no longer depending on being together with the monsters
this pull request was made to be worked together with the canary project: https://github.com/opentibiabr/canary
The spawns npcs is "yellow" and spawns monsters is "red" (the old)
With this change, the map will automatically create an "npc.xml" the first time it is saved.
It is possible to edit only the xml, it is not necessary to add or modify the npc by opening the editor map
Thus, there is a script for npcs, similar to how it works with old spawns
Removed libxml2 to use pugixml.
Fixed a bug with the progress bar.
Changed some things in most xml files that pugixml did not like.
Updated the Visual Studio project.
Any NULL symbol has been changed to nullptr.
This most probably broke the CMake that was recently added.
And probably some other things.
Clean git repository since the old svn / git mess was pretty much
unrecoverable unfortunetly. I would have liked to keep the history
for posterity, but that proved to be a futile quest.