ID:2025088
 
(See the best response by Lummox JR.)
So I have Turf_layer set on several different turf items. I am clicking ctrl while clicking on where I put these second layer of turfs. However I notice, that for certain combination of icons, I have to have one of them being added second, and then in some area it doesn't matter which is added second. Why is this happening?
Best response
I don't follow.
Turf
wall
icon=[icon]
doors
icon=[icon]
slopes
icon=[icon]
layer=TURF_LAYER+0.01
WallBlocker
icon=[stuff]
density=1
layer=TURF_LAYER+5.06
Entered(mob/M)
[codes]
doorarchOver
icon=[icon]
layer=TURF_LAYER+5.01
DiagTurf
icon=[icon]
layer=TURF_Layer+5.05

These are some of the turf icons included. So when I go to my map and put in the tiles,I might put in something like a wall icon, then put down a slopes, a WallBlocker, or a doorarchOver put on the same tile. They would be two turf there, a slopes underneath since it's a low enough number, and the other two above since they're a high enough number. However DiagTurf just replace the wall rather than be above it. I'm not seeing a reason that it should be since it has a number in between doorarchOver and WallBlocker.
If the topmost item is a turf and has no transparent pixels at all in its icon state on compile, it will fully replace whatever is in that location beneath it.

I would strongly recommend against turf stacking to achieve what you are doing with WallBlocker, and instead would advise using a dense area

area
blockage
density = 1

Enter(atom/movable/o)
. = density
I'm taking it by replace you mean everything except the aesthetic value? I figured that it would be easier to just make a second one. Since not every tile of that turf would need to block a player and the tile underneath is just aesthetic. I'm still curious about the DiagTurf not working as the other would.
I understood all of those words, but again am at quite the loss for what you are saying.
I'm not sure what you're confused about. Maybe you can ask a question?
Actually I could probably just change certain tile names and have that name have the density that you mentioned. I'm still curious about my original question though.
I can't ask you questions about what I didn't understand.

I have literally zero idea what you are talking about here:

I'm taking it by replace you mean everything except the aesthetic value? I figured that it would be easier to just make a second one. Since not every tile of that turf would need to block a player and the tile underneath is just aesthetic. I'm still curious about the DiagTurf not working as the other would.

And here:

I could probably just change certain tile names and have that name have the density that you mentioned.

Names and density have nothing to do with one another. I... Just literally don't even.

Not trying to be a dick, BTW. I'd really like to help you understand, but I just don't really know what you are getting at.
For the first box, you mentioned about how the second turf would replace the first turf if there was no pixel involved.

If the topmost item is a turf and has no transparent >pixels at all in its icon state on compile, it will fully >replace whatever is in that location beneath it.

I can see by my game that the visual of the bottom turf is still there. Which made me think that you meant everything except the aesthetic value of the bottom turf is available in the game.

I could probably just change certain tile names and have >that name have the density that you mentioned.

I haven't actually done any coding for it yet, but basically it would be like

turf
wall
icon=[icon]
icon_state="Dense"
density=1
icon_state="NotDense"
density=0

Or something in that sense or with icon.name instead. I haven't decided yet so I don't have anything to show.
That code snippet you just showed won't compile because icon_states/names are variables, not objects. They don't have a density value because they aren't atoms.

Which made me think that you meant everything except the aesthetic value of the bottom turf is available in the game.

No. I mean literally, the map editor will delete any underlying turfs if the tile you lay over it has no transparent pixels in the compile time icon.

Only one turf can occupy any position at a time. Any additional turfs are just underlays to the topmost turf (This has nothing to do with layers. Just placement order).

The reason I recommended that you use a dense area in this case is that layering turfs like this is generally speaking a sign of not understanding how 2D games are structured.

Good tileset design should generally remove the need to layer lots of turfs on top of one another.
Hmm, what make turf so unique? I would imagine that with the layer var, there would be an exception.
When you put down a new turf in the editor, it doesn't care what layer the old turf and the new one were on. All it does is take the old turf, and its underlays, and add them to the underlays of the new turf.
Hmm, so I thought that doorarchOver and DiagTurf were the only ones that had no blank pixel. It turned outs that the doorarchOver had one blank pixel, just neatly hidden.