Could we please have a function on the map, in Dream Maker, that lets us insert z levels into the map? Right now you sort of have to increase the map size to get more z levels but if you want to add a z level in the middle of the map, you have to shift some of the z levels onto a new z level to make space for the middle one. The way inserting would work is that if you insert a z level onto z=5, all z levels above z=5 would go up by 1. So what was previously z=6, would become z=7. What was previously z=7, would become z=8 and so on.
This would be greatly beneficial to games that use lots of z levels as opposed to a large x-y plane with a few z levels.
ID:134165
Apr 4 2007, 11:34 am
|
|
Apr 4 2007, 12:02 pm
|
|
I agree completely with the topic creator. This would make it a lot easier for those people trying to make games.
|
Yeah, it could be handy if you're ordering your z levels specifically and whatnot.
|
Given that this is what happens if you insert a Z-level in the middle of the stack right now (You need to move everything on the other Z-levels down), this is just a wrapper around something we can already do quite easily. Just write a proc to do it.
|
Until (if) this gets implemented, could you not use a list to keep track of the Z levels (and move their order about, etc.)? Then just use a getZ() proc to get the right Z level when you're moving things about and such.
|
In response to Elation
|
|
Elation wrote:
Until (if) this gets implemented, could you not use a list to keep track of the Z levels (and move their order about, etc.)? Then just use a getZ() proc to get the right Z level when you're moving things about and such. Yeah, this is how I'd manage the situation, except using tags; you make a special invisible object, and place one on every Z level, giving each one unique tag like "zlevel_sewers". Then you have a proc like this: proc/getZ(mapname) I usually only have one Z level per map though. I find that it's easier to organise that way, since you don't have to remember which Z level corresponds to which area; you just name the map file appropriately. (And then I use the method above to find them in-game.) There's one problem with this method: Saving Z coords in savefiles means that people will occasionally teleport to different maps if they save their character, you add a new map, and then they load their character again. I should note that the requested feature (inserting Z levels) will cause this problem too. You can work around this by saving map names instead of the Z coordinates. For example, save the result of following procedure, and then use getZ() upon loading the character. (Make sure to relocate the character to a neutral area - like a spawn zone - if getZ() returns 0.) proc/getMapNameForZ(zlevel) |
In response to Jp
|
|
Is that really something you can expect a newbie to do? I don't see a reason for it to not come with Dream Maker. There are a lot functions there that we can do by creating a program.
|
Thankfully the map format for BYOND is really simple. Until another solution comes about the easiest way to insert a Z level is to make a new one in the map editor save the map. Close the project. Now open up the map in notepad(or simple text editor of choice).
First thing you'll see in the file are a lot of lines like "aj" = (/turf/dirt,/area) defining the text representations of tiles for the map followed by (1,1,1) = {" then the map data and then }" The (1,1,1) is the cordinate for this block of the map that is contained in {""}. Never tried placing blocks at arbitrary x,y positions so I don't know if that works however for what you need to do only the last number is important. It is the Z coordinate for the block. Just change the Z order of your current maps by changing this number to reorder anyway you want. |