Automapping: Starting steps but its hard to understand what is happening

I am new to automapping and am struggling to understand what the pattern logic is.
I decided to start out by making simple pathways using middles, corners, etc. but ran into too many issues.

I reduced my rules to two in the hopes that I could get a bearing.
This is the rules input layer:
autotileA
This is the rules output layer:
autotileB
This is the prototype layer:
autotileC
I would expect nothing to be drawn on the output layer because no tiles match the pattern.
There are no vertical pairs that are surrounded by nothing.
Instead, this is the output layer (The solid green squares are showing through from the prototype layer):
autotileD
Why is it seeing the vertical tiles as matching the pattern?

Now I can fix this issue by specifying all the combinations of patterns using 1, 2, 3, and 4 tiles, but by the time I get to all possible patterns of 5 tiles this is clearly not going to be doable.
In fact I did a rule set that included all possible combos of 5 tiles but then combos of 6 tiles showed problems.
So this tack is clearly wrong as I would be quickly in the thousands of combos.

1 Like

Your inputs mean “green tile with a green tile above it gets a bottom-grass tile” and “green tile with a green tile below it gets a top-grass tile”. If you will your entire prototype layer with solid green, you’ll see the whole thing will end up filled with these tiles.

If you want to also check that the green shapes are surrounded by empty, you need to explicitly specify that. The easiest way to do this is to add the Automapping Rules Tileset to your rules (via the Map menu), and to place the Empty tiles where you expect empty (you’ll need to move your existing rules to make room for these extra tiles).

I should also mention: Your tileset looks like it might be usable with the Terrains feature, you might not need Automapping for this.

What you’re expecting (to match only these two-tile shapes) should look like this with the explicit Empty tiles added:
image

Of course, to keep your rule count down, you’ll probably want to place these tiles in any scenario where you have a single-tile-wide protrusion, not just around 2-tile blocks, so you’d want to skip the extra Empty checks:
image

And then if you also want to cover the middle of a thin column…
image

With these last three rules, you should correctly Automap any one-tile-wide column or protrusion of tiles, regardless of how long it is. You’ll need additional rules/tiles for the horizontal and thicker shapes.

1 Like

Thank you.
The tileset is a cliff set so I will eventually get there. I first need to understand this better.
As follow up question, one of the things I can’t find mentioned in the documentation is the order of operations.
In a video from another post it was stated that the rules are parsed left to right and top to bottom with the higher Y axis value taking precedent. Is that true?

1 Like

Rules run concurrently, but their outputs are applied in order as you described. This is described in the docs, under “Setting Up a Rule Map”.

1 Like