I have a tileset that has a few terrain types. One of these types is only tile-able in groups of two tiles. The central tiles as a 2x2 grid of tiles, and the ‘edge’ tiles can tile with each other or have one of the 2 tile wide sets between them.
With this setup a 2x2 patch of the terrain is possible, but a 3x3 is not. The dimensions will need to be even.
Setting this up is proving difficult. If I map all the tiles to the same terrain type the terrain tool will randomly select one of the 4 tiles (2 options on edges) randomly, and that won’t work.
The only way I can think to ensure that they are all together was to make several terrain types, so that only the tiles that could be together could connect to each other, and I found a way to do it, with 9 terrain types, but the tool won’t let me draw any of them, because none of the tiles are all one type.
This approach does work in that a manually placed valid chunk of terrain was moved around as a solid chunk that wouldn’t break up, and would completely vanish when edited within.
Is there a way to set this up or do I just need to manually deal with this type of terrain?
I’m new to Tiled, so maybe later somewone will give you more professiona answer, but maybe my guess will be useful right now. I think you need to look into “automap rules” feature, it’s kind of auto find and replace with logic.
I also will be need in the near future similiar taks to be done, so we are in the same boat))
Yeah, I found that feature after posting this question, and it will probably work, but it’s not as tidy as doing it with terrains, I’m still hoping for a terrain-based solution.
I am using automap to populate invisible collision layers. Although I may switch to tile properties and in-engine collisions.
The terrain tool does not support a tileset with such added restrictions. I think indeed either you have to rely on automapping rules, or you need to expand your tileset to cover all the combinations with larger tiles, which could then be used with the terrain tool. However, currently Tiled does not support setting the tile size per layer so this is not feasible if you need the smaller tile size in other situations.
I have a follow up question about automapping rules, If I have ‘input_Ground’ and ‘input_Bridges’ (for example) are they and-ed or or-ed by default when determining if a region is matched?
Different input layers are AND-ed, while adding the same input layer multiple times will make an OR. This isn’t really a “default” since there is no way to do anything else currently.
However, currently Tiled does not support setting the tile size per layer so this is not feasible if you need the smaller tile size in other situations.
This would be really great! Because too large tiles aren’t preciese enough for terrain borders and smaller ones aren’t big enough for some large elements like high bordering cliffs.