My automapping doesn't work but I don't know the problem

I have a map which is a forest with trees. Due to layer problem, I cut the tree into two layers which is bottom layer and top layer. The tree bottom part is smaller than top part. Normally I should set input_bottom to be the tree bottom part and keep other tile to be empty. However this won’t work because the bottom layer consists of other objects such as grass and fallen leaves.

Therefore I set up two rules files. First rule is to search for the tree bottom part, then output overlapped tree top part into the top layer, then second rule is to search for the incomplete tree top part on top layer and add the remaining tree top part. So that I should get a complete tree.

The problem is that the second rule file doesn’t work but the first one work. I checked carefully that the input_top in the second rule file only consists of tree top part and nothing else. I also checked that the region is correct size in second rule file. I also checked the rules.txt file to make sure it works.

Can anyone tell me what the problem is?? The first rule file works but second one with same method doesn’t work.

I think I solved the problem. I thought empty tile in input means that region must be empty. It turns out it must be filled with a tile instead of empty. I solved the problem by setting regions_input and regions_output so now my rule is working.

This must be another confusion coming from the logic I commented about here:

I don’t fully understand your solution, though. What do you mean with setting both regions_input and regions_output? Did you still have an empty tile in your input?

I checked the document about automapping again and find out if I use a layer named regions, it will assume input and output to be same region size, which is not my case since my tree bottom part is smaller than top part. So I defined regions_input for input and regions_output for output and now it works. I didn’t even need 2 rules now because I can directly output the complete tree top part by searching tree bottom part.

There is no empty tile in my input now because it is all filled with my tree bottom part.

1 Like