ID:169343
 
I want to add some randomness to my game, and for that I need more zs for my map. How do I add a block of atoms to somewhere, where isn't anything?
Don't be surprised if this doesn't work, but try setting world.maxz to a higher value.
As Dark Weasel said you can add more z levels by simply adding to world.maxz. The turfs and area on the new levels will default to world.turf (defaults to /turf) and world.area (defaults to /area) respectively. From here you can use block() to get a list of turfs on that z level and loop through them with for().

proc/Add_new_z()
world.maxz++
for(var/turf/T in block(locate(1,1,world.maxz), locate(world.maxx,world.maxy,world.maxz))
if(prob(50))
new /obj/tree(src)


In this example, a tree would be added to approximately fifty percent of the turfs on that z level.
In response to Dark Weasel
Thanks, that works.