Help with setting up Terrain Set

Hey there all! I really can’t seem to wrap my head around how to set up ruling for terrains sets. I’m trying to draw a cliff, but it draws very weird and I really don’t know what I’m doing wrong.
Could someone ELI5?


I think the main problem you’re likely to be running into is that this terrain is technically incomplete - you’re using a 3-colour mixed terrain (“empty” is practically colour, since empty labels only connect to other empty labels), but you don’t have tiles for every possible combination of these colours. The result is that, while your labels overall make sense, when you draw using this Terrain, you end up with intermediate scenarios that don’t have suitable tiles for Tiled to use, so it gives up and gives you garbage before you get the chance to fill in the full shape you want.

Simplifying this terrain would help Tiled make correct decisions by making the Terrain more complete. Also, this doesn’t need to be a Mixed Terrain, Corner-based does just fine :]
Keeping your terrains as simple as possible for a given set of tiles is generally a good idea, since it gives Tiled fewer chances to make mistakes if the Terrain is incomplete.

This works fairly well for me, this is probably the most minimal way to uniquely define the relationships between the tiles:
image

However, keep in mind that this is still an incomplete Terrain Set, so Tiled will sometimes make mistakes:
image

But, as long as you watch out for such mistakes, it’s overall pretty smooth.

A completely different option, one that won’t make mistakes but will require quite a bit of set-up is to use just the cliff-top part of my terrain (the green part) and leave the cliff-sides (red parts) unlabelled, so the Terrain only paints the cliff-top, and add the sides via Automapping.

Edit: I just realised that technically my labels above aren’t correct, they don’t distinguish between the tips of concave corner at the base of the cliff and the top end of the cliff from the convex corners, whoops. Mixed terrains could disambiguate that, but that would bring back the complexity causing TIled to mess up more frequently. I think automapping to fix the incorrect corners would be better.

1 Like

I don’t understand how I would setup the automap part. I didn’t know you can use terrain sets with automapping?

edit:

Alright so I got automapping set up but there’s still some weird stuff going on

tiled_VfcTAoQExs
tiled_63Wj5Yqthh

The mistakes you’re seeing with the wrong corner tiles being used are what I described in my post above - in the corner-based labels, there’s no distinction between the convex corner tips and the concave corners. You’d either need to use Mixed Terrains that distinguish between these, or fix them with Automapping before you apply the cliffs. Because mixed terrains cause other issues as I previously described, I recommend using Automapping instead. Look for scenarios where the wrong tile is placed, and place the correct tile instead:

Automap fixes:


Here, the faded tile are the input, the incorrect scenarios the simple corner Terrain will sometimes make, such as the inner corner being placed directly below a side. The brighter tiles are the output.

Your automap rules are too specific and are going to miss some scenarios as a result. You only need to look at the specific 5 tiles that have extra cliff tiles below them:
image
These rules should run after the mistake-fixing rules above. In this screenshot, the faded tiles are input, the brighter tiles are output. I used separate regions_input and regions_output for these rules, to restrict the Automapping to looking at one tile at a time. Using a unified regions layer in this case will make the rules less flexible, so I don’t recommend it.

Both sets of rules running with Ctrl+M:
whyherroautomap

Both sets with Automap While Drawing and drawing with the simple clifftop Terrain:
whyherroautomap2

Also, note:

  1. In my testing, I output to the same layer that was the input. It looks like you’re outputting to different layers, which is overcomplicating things I feel xP
  2. Because this tileset can’t handle things like small holes in the cliff or narrow horizontal cuts into the cliff, you will still run into problems if you try to paint such shapes. There’s nothing Tiled can do to help you here, you’d have to add more tiles if you want to draw such scenarios. I bring this up because your example image above has some of these scenarios.
    Here’s an example which is just not possible (without using multiple layers) with this tileset because it doesn’t have the right tiles for it:
    image
1 Like

Thank you so much for taking the time to do all of this!! I really appreciate it!
I’m not currently at my computer but I understand what you’re saying now! Thank you thank you thank you!

1 Like

What am I doing wrong here? I have everything the same as you showed
Is this one of the situations you were talking about in note 2?

faded is input full opacity is output and will reflect to the other image as well
the only difference is that the regionoutput tile is textured in the second ruleset

My terrain set is
tiled_g9QAkTyzBq

and the result is
5OalgOZFjc

Your terrains look correct in the gif, and it’s your automap fixing rules that are somehow messed up. Notice how you’re getting corner tiles replacing side tiles.

In my rules, there are input tiles underneath the output tiles too - we’re looking at pairs of tiles in the input, and replacing one of the tiles in the output. I think you perhaps missed that in your rules, so you’re placing corner above every side tile, instead of just replacing the incorrect corners. Possibly ditto for all the other rules - they’re meant to fix mistakes, not just add tiles.

Here’s one example, the full rule, and just the input layer for it:
image
Notice how it’s replacing the incorrect corner tile here, rather than just adding the corner above the other tile.

1 Like

Ahhhh I get it, thank you :smiley:

1 Like