Automapper help

I’ve been trying to wrap my head around Automapping, but I’m having difficulties trying to figure it out. Essentially, what I would like to do is fill a map with square grass tiles, and the tiles on the border of each region of grass are then rounded out by the automapper to give a cleaner visual appearance. I’ve included some files to help illustrate my problem - unfortunately, it doesn’t seem like I’m able to upload files, so I’ve made a download link (let me know if this isn’t allowed): https://www.mediafire.com/file/05agodia2upils2/demo0.zip

Inside the file, dawnlikefloor.tsx is the tileset file (with Floor.png being the corresponding image), rules.txt is my rules file, rule.tmx is the rule tilemap, and demo.tmx is an example of what I’m trying to do with automapper. There are 3 layers to demo.tmx; floor is the original tilemap, floor 2 is what I would like to see from automapper being performed on floor, and floor 3 is what I actually get from automapper being performed on floor. What am I missing? Is automapper even the right tool for the job I’m trying to do?

Any help in clearing up my confusion would be greatly appreciated.

There are a number of problems with your rules:

  • The regions layer has only 1x1 regions, but your regions really need to cover both the input and the output area. As it is, the system is only matching that 1x1 region.

  • The input and output layer are the same. This will cause problems when you try to modify the grass later on, because your rules would not cover all the different tiles that are then used on the layer. In this case it’s better to separate the generated layer from the one you’re editing.

  • The rule in the top middle has the required grass tiles in the wrong place.

  • The rules are incomplete, in that they only specify where they want grass, whereas they should also require other relevant tiles to be dirt.

Here’s a more functional version of your rules map: rule.tmx (6.6 KB)

I also tried whether your tiles wouldn’t be more suitable for use with the Terrain or Wang tools, but unfortunately they won’t work because you’re missing “inner corners” of the grass, which confuses these tools. And the narrow patches of grass won’t work with the Terrain tool and are currently also still not workable with the Wang tool. I hope that eventually we can make the Wang tool work for such tiles as well.

Thank you very much for the help! Having a concrete example really helped me understand how automapper works. One question on my mind though - do I need to place the surrounding dirt tiles in the automapper? I would like the grass to behave this way whether I surround it with dirt, or some other tile, or even a combination of different tiles. Essentially, I would like it to match ‘every tile that isn’t grass’ as well. Is this doable?

Well, your grass tile graphic is such that it does need the dirt to be there for a nice transition, right?

I think it should be possible to achieve what you want, but I’m not sure how. Did you check whether the Automapping documentation says anything about such a case?

I’m not sure whether there’s a method in there (a lot of it is still arcane to me), but in the end, I decided to encode all of the combinations of neighbor tiles into my rule since there aren’t too many combinations and I can add edge cases as they appear. Thanks again!