ID:1970656
 
(See the best response by Ter13.)
Problem description:

I am using a 47-state autojoin for my project. I've got Click Behavior in the map editor set to "Insert" instead of "Replace".

I'm wondering if there is a way to have the map editor ALWAYS insert turfs, even when the turf is fully opaque.

For example, here is how I lay my turfs in the map editor:


Here is how they wind up joined after starting the game:


In the second image you can see that my cursor is near a map "error". This is where the turf is ONLY a dirt image, without the grass underlay. This is because the default icon for dirt is fully opaque and covers the grass fully.

Is there any way to get around this limitation and be able to place dirt in this scenario without holding the CTRL key?

~Polatrite~
Best response
A workaround that I like to use for autotiles is to name the states by number (0 being no joins, 255 being all sides joined). But there should be a null state where the outside edges of the tiles are transparent. When the tile initializes, set the icon_state to a numbered state, otherwise, leave the icon_state null. This will ensure that the "full tile" issue doesn't destroy the underlapping tile.
Arbitrarily, here is another scenario where the "Insert" option just doesn't work at all - trying to place this fully opaque grass on top of fully opaque water.



This could be related - not sure why I can't layer these?
In response to Ter13
Ter13 wrote:
A workaround that I like to use for autotiles is to name the states by number (0 being no joins, 255 being all sides joined). But there should be a null state where the outside edges of the tiles are transparent. When the tile initializes, set the icon_state to a numbered state, otherwise, leave the icon_state null. This will ensure that the "full tile" issue doesn't destroy the underlapping tile.

Just to be clear - when you refer to the tile initializing, are you referring to a turf/New() call at runtime?

The reason I'm using fully opaque tiles is because my autojoin system is a multi-layer joining mechanism, so turfs at lower layers need to be fully opaque so that they will underlay properly (e.g. covering the full tile) when higher layers are placed on top of them.


Edit: just in case, the layering is as follows

* GROUND_TOP_LAYER = dense things like walls or mountains
* GROUND_MID_LAYER = usually considered manmade floors like pavement, walkways, carpet, or dirt paths (which isn't teeechnically scientific :P)
* GROUND_LAYER = general base turfs like grass, sand, cavern floors, etc.
* GROUND_LIQUID_LAYER = dense turfs at the bottom, currently just water, lava, and impassable swamp