# Automapping doesn't work for some reason

**URL:** <https://discourse.mapeditor.org/t/automapping-doesnt-work-for-some-reason/5658>\
**Category:** Questions\
**Created:** [June 15, 2022, 12:02pm UTC](https://discourse.mapeditor.org/t/automapping-doesnt-work-for-some-reason/5658 "2022-06-15T12:02:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![CheekySparrow](https://avatars.discourse-cdn.com/v4/letter/c/ac91a4/32.png) [@CheekySparrow](https://discourse.mapeditor.org/u/CheekySparrow)\
**Post date:** [June 15, 2022, 12:02pm UTC](https://discourse.mapeditor.org/t/automapping-doesnt-work-for-some-reason/5658/1 "2022-06-15T12:02:19Z")

</div>

Hi everyone,  
I’m following a basic shoreline example from the manual, where you place a water tile and have a “shore” tile appear right underneath it.  
I have “Automap while Drawing” enabled and I also tried clicking “Automap” manually.

Here is my rule file:

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/mapeditor/original/2X/e/ec7eb422fa8d7f8508d5e700f06456b770474b2b.jpeg)  
 ![image](https://canada1.discourse-cdn.com/flex035/uploads/mapeditor/original/2X/6/676f5994770443b2aac191a4518b6ebf297405a6.jpeg)  
 ![image](https://canada1.discourse-cdn.com/flex035/uploads/mapeditor/original/2X/5/5529dc652da5002f85bb3cf4330d189eb0ae607d.jpeg)

here’s what I have while painting water tiles (nothing…)

(I can’t attach more than three images as a new user, but I’m drawing on a correct layer (named “walls”), and it’s empty.

I’m stuck and perplexed that I can’t reproduce such an easy example.  
Any hints would be greatly appreciated, thank you in advance!

---

<div class="post-metadata">

**Author:** ![CheekySparrow](https://avatars.discourse-cdn.com/v4/letter/c/ac91a4/32.png) [@CheekySparrow](https://discourse.mapeditor.org/u/CheekySparrow)\
**Post date:** [June 15, 2022, 12:05pm UTC](https://discourse.mapeditor.org/t/automapping-doesnt-work-for-some-reason/5658/2 "2022-06-15T12:05:41Z")

</div>

here’s the screenshot where automap isn’t doing anything:  
 ![image](https://canada1.discourse-cdn.com/flex035/uploads/mapeditor/original/2X/8/829e617e13c729488bb49db4a7d0566531ed9393.jpeg)

and here are the contents of my ‘rules.txt’ file:

![image](https://canada1.discourse-cdn.com/flex035/uploads/mapeditor/original/2X/3/3a6fa5177e3b09124153cdeee4224ff12f065f5b.png)

---

<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:** [June 15, 2022, 1:54pm UTC](https://discourse.mapeditor.org/t/automapping-doesnt-work-for-some-reason/5658/3 "2022-06-15T13:54:53Z")

</div>

By default, a cell that’s empty in all your `input` layers (and you only have one) means “any other tile”, rather than empty, so your rules aren’t working because they’re looking for something other than empty and other than the base tile you’re using in your rule. Add a bool custom property `StrictEmpty` to your `input_walls` layer and set it to true, and that should help. Alternatively, you can add an empty `inputnot_walls` layer, which will also stop this automatic “any other tile” behaviour from triggering.

You can read more about this behaviour in the Note in the “Definition of inputs” section of the Automapping documentation: [Automapping — Tiled 1.8.4 documentation](https://doc.mapeditor.org/en/stable/manual/automapping/#definition-of-inputs)

In the next major Tiled version (1.9), this odd behaviour is going away, you’ll be able to specify that cells are empty tiles and “any other tile” explicitly.

---

<div class="post-metadata">

**Author:** ![CheekySparrow](https://avatars.discourse-cdn.com/v4/letter/c/ac91a4/32.png) [@CheekySparrow](https://discourse.mapeditor.org/u/CheekySparrow)\
**Post date:** [June 15, 2022, 3:15pm UTC](https://discourse.mapeditor.org/t/automapping-doesnt-work-for-some-reason/5658/4 "2022-06-15T15:15:34Z")

</div>

Thanks a lot, that solved it. Indeed, that seems like a rather quirky behavior, I’ve seen the documentation section you linked, but the wording there appeared to me to be overly confusing/complex, so I couldn’t grasp the meaning. Looking forward to 1.9 to see this feature streamlined/improved. Thanks again.
