# Diagonal tiles in Terrain Tool?

I’m trying to get my terrain brush to place diagonal tiles so that my environment isn’t all zig-zaggy. I thought the below image would work but it doesn’t. Am I missing something, or is this not supported?

I don’t see how those diagonals could work, because they don’t have a well defined terrain type on two of their corners. Can you show an example of how you’d place those tiles manually?

I think you could shift the edge a little either way, to make sure the terrain type of the corners is well defined. But that of course means adjusting all your other tiles so that they connect at the right spot. Also, it will mean those diagonals are randomized along with the corners (chosen based on tile probability property).

[quote=“bjorn, post:2, topic:1378”]
I don’t see how those diagonals could work, because they don’t have a well defined terrain type on two of their corners. Can you show an example of how you’d place those tiles manually?
[/quote] Sure. See the attached image. It’s possible I’m just not in the right headspace; I’m still learning how to use Tiled.

Alright, then you’ll need to mark the corners in which the diagonal ends as “Worn Path” (rather than leaving them empty, like in your first screenshot). When you do that Tiled will randomly choose between the above two variations, based on the tile probability property of each corner type.

Ah! Amazing. Thank you so much!

Hi Bjorn

After 3+ years of tiled, I was amazed to stumble on this thread and find that you can specify probability on transistion tiles, and have Tiled randomly pick them.

Is there a really quick primer on this? I searched and didnt get any specifics

1. Can you specify the probablity in the editor?
2. So you need to manually edit the TSX (another thread mentioned this). If so, what exactly do you add? ie what is the name of the property? Is it a float from 0->1.0, etc?

Thanks!

-rich

NM I found this with some searching, which I missed originally. Sorry.

For anyone else:

–Rich

Part of the reason for this is of course that the Probability property was not visible in Tiled until version 0.12 came out, a little over one year ago. I also still need to mention it in the tutorial.

Yes. Right-click the tile in the Tilesets view and choose “Properties…”, then you can find the Probability property in the Properties view. If you’re using external tilesets, you’ll currently need to temporarily import them in order to be able to make changes to it.

And as you found out, the probability is not an absolute percentage or ratio, but rather works relative to the values of the probability of other matching tiles.

Yup, I saw your CL that switches this from a percentage to be relative to other tiles. Perfect; exactly how I’ve done things like this in the past

I was planning on doing this randomness in game too, so having it be editor side is great! Appreciated!

Hi Bjorn, I’m trying to do diagonal tiles too but I don’t understand how it should work

what is the right combination for this? Thank you!