DMM map loader/saver

by NullQuery
Load and save DMM files dynamically
ID:2077432
 
Fork me on GitHub
This library allows you to load and save DMM files at runtime in your projects. It utilizes BYOND's built-in regular expression features to parse the .dmm files.

Note that this library can be slow with larger maps. It is intended primarily to handle smaller maps or to save an existing map to a .DMM file for later editing with Dream Maker.

See "demo.dm" for a demo of the library.

Supplements to this library are appreciated, if you have any suggestions feel free to create a post in the Feature Requests forum of this library.

Note that this library depends on nq_commons library.

Bug reports and suggestions may be reported to the appropriate forum.

Changelog:
Version 1.1
  • Bug fix: Loading maps with multiple z levels did not work.
  • When loading a map you now get an associative list with z-level -> block() of turfs back.
Version 1.0
  • Initial release.
Your contributions are much appreciated.
NullQuery wrote:
Fork me on GitHub

I like this.
/nq_dmm/proc/SaveMap(file, turf/lb, turf/ub)
if(!file) return


If your use this command with null file the code will delete a lot of .dmi files non used in game, included used only in the skin. I recomend add this to prevent.