# Question about automapping

**URL:** <https://discourse.mapeditor.org/t/question-about-automapping/2174>\
**Category:** Questions\
**Created:** [March 17, 2017, 8:50am UTC](https://discourse.mapeditor.org/t/question-about-automapping/2174 "2017-03-17T08:50:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sangokushi](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@Sangokushi](https://discourse.mapeditor.org/u/Sangokushi)\
**Post date:** [March 17, 2017, 8:50am UTC](https://discourse.mapeditor.org/t/question-about-automapping/2174/1 "2017-03-17T08:50:39Z")

</div>

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

I recently worked on a tile-based map design. I draw an abstract map first and then process the detail by automapping system. Every thing worked well except the tile at edge.(look at the red arrow).How do I define the rule for that？Is there any method to detect the edge？  
I am sorry I am new in english，I dont know if I missing something from the document…

---

<div class="post-metadata">

**Author:** ![bjorn](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/bjorn/32/1599_2.png) [@bjorn](https://discourse.mapeditor.org/u/bjorn)\
**Post date:** [March 17, 2017, 10:57am UTC](https://discourse.mapeditor.org/t/question-about-automapping/2174/2 "2017-03-17T10:57:55Z")

</div>

I think one way to solve your problem is by defining smaller rules that are applied before your more specific rules. That way, you could do a replacement there that works for your edges, but it will also be applied wrongly to some non-edge cases, but that isn’t a problem because later rules can correct those cases. You can enforce rule order by listing multiple rule files in your `rules.txt`.

Btw, your transition tiles look very suitable for use with the [terrain tool](http://doc.mapeditor.org/manual/using-the-terrain-tool/). So you could consider using that instead of automapping.

---

<div class="post-metadata">

**Author:** ![Galdred](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/galdred/32/2769_2.png) [@Galdred](https://discourse.mapeditor.org/u/Galdred)\
**Post date:** [March 22, 2017, 9:55am UTC](https://discourse.mapeditor.org/t/question-about-automapping/2174/3 "2017-03-22T09:55:24Z")

</div>

When using automapping, I always make the map 1 tile larger than needed, then either shrink it before exporting, or pad the borders with impassable hexes. Having “tiles” for edges would be nice, though.
