# Don't understand automapping

**URL:** <https://discourse.mapeditor.org/t/dont-understand-automapping/6111>\
**Category:** Questions\
**Created:** [April 11, 2023, 5:12pm UTC](https://discourse.mapeditor.org/t/dont-understand-automapping/6111 "2023-04-11T17:12:34Z")\
**Posts on this page:** 13\
**Page:** 2

<div class="post-metadata">

**Author:** ![IndieG4m3L0v3r](https://avatars.discourse-cdn.com/v4/letter/i/858c86/32.png) [@IndieG4m3L0v3r](https://discourse.mapeditor.org/u/IndieG4m3L0v3r)\
**Post date:** [April 12, 2023, 3:08pm UTC](https://discourse.mapeditor.org/t/dont-understand-automapping/6111/21 "2023-04-12T15:08:28Z")

</div>

I stand by my statement: _The documentation is **not** suitable for beginners!_  
The author is not able to put himself in the shoes of a beginner.

automapExample.zip:  
I’ve tried to change it so that each _brown tile_ will be a _green tile_ (on left site there a brown tiles after ctrl+m), but it doesn’t work.  
And if i don’t get it working on this little example files…

This Automapping is trash! 🤬  
Sorry! 💀

---

<div class="post-metadata">

**Author:** ![SEO\_Bot](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/seo_bot/32/4120_2.png) [@SEO\_Bot](https://discourse.mapeditor.org/u/SEO_Bot)\
**Post date:** [April 13, 2023, 12:49am UTC](https://discourse.mapeditor.org/t/dont-understand-automapping/6111/22 "2023-04-13T00:49:12Z")

</div>

Hello!  
I am new to this software as well, and it was quite a headache for me to figure it out, though my issue was realizing the Ctrl + M and Automap checkmark lol.

I’ve made a small working example here!  
[Automap Example](https://sendgb.com/I2BcMrZ5bUP)

I used the tilemap from here as well to give credit!  
[Tileset](https://opengameart.org/content/stunning-pixel-art-rpg-tileset)

I hope this helps!

---

<div class="post-metadata">

**Author:** ![IndieG4m3L0v3r](https://avatars.discourse-cdn.com/v4/letter/i/858c86/32.png) [@IndieG4m3L0v3r](https://discourse.mapeditor.org/u/IndieG4m3L0v3r)\
**Post date:** [April 13, 2023, 9:38am UTC](https://discourse.mapeditor.org/t/dont-understand-automapping/6111/23 "2023-04-13T09:38:19Z")

</div>

@SEO_Bot  
Lol, **sorry** 😊, but this is even more amateurish than what I have already managed - with help.  
Don’t take it personally, but there’s really a lot less you can do with that now.

@All  
Back to _automapExample.zip_:

> I’ve tried to change it so that **each _brown tile_** will **be a _green tile_** (on left site there a brown tiles after ctrl+m), but it doesn’t work.  
> And if i don’t get it working on this little example files…

What i’ve to do that it works like i want it?  
It shouldn’t matter how height the tiles are!

---

<div class="post-metadata">

**Author:** ![eishiya](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/eishiya/32/2534_2.png) [@eishiya](https://discourse.mapeditor.org/u/eishiya)\
**Post date:** [April 13, 2023, 11:09am UTC](https://discourse.mapeditor.org/t/dont-understand-automapping/6111/24 "2023-04-13T11:09:39Z")

</div>

I don’t understand what the quoted text means or what you’re doing, sorry. Perhaps screenshots of your input, output, and working map would help?

---

<div class="post-metadata">

**Author:** ![IndieG4m3L0v3r](https://avatars.discourse-cdn.com/v4/letter/i/858c86/32.png) [@IndieG4m3L0v3r](https://discourse.mapeditor.org/u/IndieG4m3L0v3r)\
**Post date:** [April 13, 2023, 11:33am UTC](https://discourse.mapeditor.org/t/dont-understand-automapping/6111/25 "2023-04-13T11:33:12Z")

</div>

@eishiya  
Hope this screenshot with above text will help.

 ![brown tiles should be green -how looks the rule](https://canada1.discourse-cdn.com/flex035/uploads/mapeditor/original/2X/0/09e7f49d996bd8f69201056b5a4d8d91c118e7e0.jpeg)  
This is from your upload.

---

<div class="post-metadata">

**Author:** ![eishiya](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/eishiya/32/2534_2.png) [@eishiya](https://discourse.mapeditor.org/u/eishiya)\
**Post date:** [April 13, 2023, 11:43am UTC](https://discourse.mapeditor.org/t/dont-understand-automapping/6111/26 "2023-04-13T11:43:30Z")

</div>

Ah. You’d just want a rule that has a single brown as input, a single green as output.

To avoid that rule clashing with the corner rules (a plain brown tile as input would match corners too, but we need to make sure the corner tiles are output in that case!), you’ll want to make the rule more specific, however.  
Here’s a complete set of rules that will turn all the brown tiles green, but will also affect corners correctly (the green output layer is just barely visible at low opacity; I wanted to make it clear where all the input brown tiles are):  
 ![image](https://canada1.discourse-cdn.com/flex035/uploads/mapeditor/original/2X/1/16e3cceb7a7bed131a48eea12eb464f840a42559.png)

The corner rules check that the tile is brown, and has empty above and to the side, similar to before, except now they output just the one corner tile and no solid greens - because the other rules will take care of that.  
The “top of cliff” rule in the middle checks that the tile is brown and is empty above, and has other brown tiles next to it. Checking the tiles next to it makes sure this rule never takes effect on a corner.  
Lastly, the bottom rule checks for a brown tile, and also checks that the tile above is a brown tile - this prevents the rule from taking effect at the top of a cliff, so it’ll never overwrite the corners.

Edit: It’s also possible to do this with just three less specific rules if you use `MatchInOrder` and can therefore guarantee which rules will apply first. You can have the 1 brown input → 1 green output rule run first, and then do the corners. But this will be slower, and I think learning to understand rule conflicts like this will help you avoid a lot of problems down the line.

---

<div class="post-metadata">

**Author:** ![IndieG4m3L0v3r](https://avatars.discourse-cdn.com/v4/letter/i/858c86/32.png) [@IndieG4m3L0v3r](https://discourse.mapeditor.org/u/IndieG4m3L0v3r)\
**Post date:** [April 14, 2023, 11:48am UTC](https://discourse.mapeditor.org/t/dont-understand-automapping/6111/27 "2023-04-14T11:48:15Z")

</div>

I think now i know a little bit of how it works. 🤔

If my tileset is 3 tiles high it only can show maximum of this 3 tiles.  
The _yellow squares_ are in the tileset 3 tiles high, but only 2 tiles high is using.

 ![tiles high](https://canada1.discourse-cdn.com/flex035/uploads/mapeditor/original/2X/d/d8507c8f6789061c21b7572eed81e5e1a097ee97.jpeg)

So, when i want it higher (where grey squares and red squares are together) it must be tileable otherwise the texture will not fit.

Unfortunately I can not explain it better. 😊

I’ll give it a try. 😉

---

<div class="post-metadata">

**Author:** ![IndieG4m3L0v3r](https://avatars.discourse-cdn.com/v4/letter/i/858c86/32.png) [@IndieG4m3L0v3r](https://discourse.mapeditor.org/u/IndieG4m3L0v3r)\
**Post date:** [April 15, 2023, 7:45am UTC](https://discourse.mapeditor.org/t/dont-understand-automapping/6111/28 "2023-04-15T07:45:48Z")

</div>

Hmm, there I was probably too fast! 🙄  
No idea where my mistake is now…

 ![trash](https://canada1.discourse-cdn.com/flex035/uploads/mapeditor/original/2X/f/f0a3e05670901414612699ec356e90ea972ed530.jpeg)

---

<div class="post-metadata">

**Author:** ![eishiya](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/eishiya/32/2534_2.png) [@eishiya](https://discourse.mapeditor.org/u/eishiya)\
**Post date:** [April 15, 2023, 12:34pm UTC](https://discourse.mapeditor.org/t/dont-understand-automapping/6111/29 "2023-04-15T12:34:46Z")

</div>

The rules look alright, but I can’t be sure since I can’t see the input tiles underneath the output tiles.

Make sure that you’re using the correct prototype tiles and that they’re not _flipped_ in the rule and in your working map. Since your tiles are a solid colour, it’s very easy to miss when things get flipped.

---

<div class="post-metadata">

**Author:** ![IndieG4m3L0v3r](https://avatars.discourse-cdn.com/v4/letter/i/858c86/32.png) [@IndieG4m3L0v3r](https://discourse.mapeditor.org/u/IndieG4m3L0v3r)\
**Post date:** [April 15, 2023, 12:48pm UTC](https://discourse.mapeditor.org/t/dont-understand-automapping/6111/30 "2023-04-15T12:48:49Z")

</div>

It’s the same tileset as before!  
Please see pictures above.

I use only the red tile for prototype and rule.  
Like you see in **last** picture _down_ it’s correct, in _top_ is only left and right okay and not the middle of the output (“terrain”).

Edit:  
wait…  
I deleted the red tiles in my map.tmx on layer prototype and created the same again, now it works. 🙃  
What could be the mistake or can in be a bug?

---

<div class="post-metadata">

**Author:** ![eishiya](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/eishiya/32/2534_2.png) [@eishiya](https://discourse.mapeditor.org/u/eishiya)\
**Post date:** [April 15, 2023, 12:50pm UTC](https://discourse.mapeditor.org/t/dont-understand-automapping/6111/31 "2023-04-15T12:50:58Z")

</div>

Did you check the tile ID and **flips**? Since your tiles are a solid colour, it is impossible to see whether it’s flipped by looking at it.

You can see whether the tile is flipped by selecting the layer it’s in, and hovering over it, and the status bar will show you the tile’s ID and any flip flags it has.

> [@IndieG4m3L0v3r](#):
>
> What could be the mistake or can in be a bug?

You probably had some flipped tiles.

---

<div class="post-metadata">

**Author:** ![IndieG4m3L0v3r](https://avatars.discourse-cdn.com/v4/letter/i/858c86/32.png) [@IndieG4m3L0v3r](https://discourse.mapeditor.org/u/IndieG4m3L0v3r)\
**Post date:** [April 15, 2023, 12:54pm UTC](https://discourse.mapeditor.org/t/dont-understand-automapping/6111/32 "2023-04-15T12:54:02Z")

</div>

Ahh, okay… but see my **edit** above - solved. 😉  
A little bit to late… Next time if this happens again i’ll check if a tile is flipped.

Man… this is complicated. 😁

---

<div class="post-metadata">

**Author:** ![eishiya](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/eishiya/32/2534_2.png) [@eishiya](https://discourse.mapeditor.org/u/eishiya)\
**Post date:** [April 15, 2023, 12:59pm UTC](https://discourse.mapeditor.org/t/dont-understand-automapping/6111/33 "2023-04-15T12:59:56Z")

</div>

Automapping is all about pattern-matching, and the patterns have to be _exact_.

I personally prefer to use asymmetrical schematic tiles like the green and brown ones in my examples above precisely because it’s clear when they’re flipped/rotated, and in which way. Just adding that little bit of light and shadow on the edges is enough.

However, most of my automapping doesn’t involve “prototype” tiles at all, I usually draw using the final cosmetic tiles directly, and on the same layer. This requires more complicated rules, though.

[Previous page](https://discourse.mapeditor.org/t/dont-understand-automapping/6111.md?page=1)
