ID:1840751
 
(See the best response by Ter13.)
Problem description:
I'm assuming it's pretty simple but I can't identify the code in either FA's or SwapMap's Map Instancing libs to add a new z level to the world.

Therefore I need an example of how it's done :
For the curious I plan to release some work I did on a map instancing lib- so far it fixes the problem of turfs not showing up properly when generating maps. Thus far the only things I need to add/fix are:
  1. objects being set to dense turfs and *for some reason not all objects will repop* and
  2. creating a new Z level for the map to be copied upon.


Any pointers in the correct direction would be a great help.

Best response
...I'm not sure if this is the answer to the question you were asking, but...

++world.maxz


As for problem #1, repop() only works to restore the map to the initial state. BYOND simply can't do this for objects added at runtime. My advice would be to avoid repop() in general. It's an implementation that works well for static content, but if you choose to go down the route you are going, you are going to need to handroll your own solution.
In response to Ter13
I said repop but what I did was write my own repopulation proc- I need to fix repopulation of certain objects on the map in my own proc (sorry for the mixup).

It seems to only occur with certain objects, in particular those that have New() overwritten in some way, either that- or they appear to be objects located on top of dense turfs.

Basically trees and such- Any idea on how to fix those not showing up properly?
If it might be because of New() being overwritten make sure that they call ..() or return ..() or .= ..() so it will do the default thing.

In this case it's important because New() in one place not doing this may cause another New() to never be called in code at all because of the one place it was already over-rided at.
In response to Superbike32
I've double checked that to make sure I did it initially- everything seems to be in order. I'm not really sure why it isn't working as expected but it seems to only occur on the dense turfs.
Much Later:

Ah it was something completely dumb on my part -_- *fixed the object population issue * Now onto the final problem.
Yes, a new Z level can be created by incrementing world.maxz.

How might I "load" this map or store it? Maybe hold it in a variable of some type? But it seems like there is some kind of info somewhere containing the data I need.

Is there some kind of built in Map data that can tell me info about a map or perhaps hold info about it or do I need to build one of those as well?
BYOND doesn't support map loading by default. You need to either handroll your own map loading/saving algorithm, or you need to use an existing one. Lummox's swapmaps is okay. Although, there are much faster methods of doing it.

http://www.byond.com/ forum/?post=1450705&page=2#comment8726752

Check out that thread for information on loading/saving maps and some unresolved banter about how to best go about it.