Easy way to create a "border" of objects?

(Note that this is on an isometric map) I want to create a border of trees on my map. It seems necessary to put trees next to each other on separate layers so that they overlap correctly (to avoid z-fighting or tile-fighting, if you can call it that in isometric).

In my case, based on the size of my trees, I need to create 3 layers to place my trees to help with overlapping. So at the moment, I select a layer, plop a tree, then select another layer, plop another tree, etc. But in order to produce a nicely sized border (i.e. user cannot see beyond trees within view window) I need it to be at least 3 rows deep, surrounding my entire map. That’s a lot of switching layers and plopping! I tried copy/paste, but that seemed very difficult.

Is there some way to automatically generate a border? It would be cool if I could use the Commands editor, or something similar, to input something like [-foreach tile in row[0].tiles] [-if tile.index % 3 == 0] [-stampFromSelectedTiles layer[0]] and so on.

At the moment, realistically speaking, if I needed to create a border like this on a 500x500 map, I’d need to write some C# code to modify the .tmx file with the border tiles to save myself some pain.

First of all I do not entirely understand the problem with the overlap. Maybe a screenshot would help here. Normally, on an isometric map I would use a single image for the entire tree. This makes it easy to place them in large numbers and it generally works fine regarding the drawing order since tiles are rendered top to bottom, left to right (so in Tiled, there should never be “z-fighting”).

If you can’t simplify the operation you should definitely consider automating it, but unfortunately Tiled is not yet scriptable, so you’d have to pick your language of choice with a TMX library that can both read and write. I will eventually add support for scripting such operations, and this is covered by the following issue on github:

If you want to help me get around to it sooner, please consider supporting me on Patreon so I can afford to spend more time on Tiled. Thanks!

Thanks. Re #1, I think the issue was related to my tileset. Using a tileset with a single image for the entire tree made it look perfect.

Glad to see there is already an Issue for scripting. Hope to see it and other cool things added in to further polish Tiled. Keep up the great work!