tiled icon indicating copy to clipboard operation
tiled copied to clipboard

Large-tiles aware tools

Open huwpascoe opened this issue 1 year ago • 5 comments

It would be useful if the stamp, shape and fill tool had an option to account for the size of larger tiles.

issue

huwpascoe avatar Aug 07 '22 16:08 huwpascoe

Every tile, no matter its size, occupies one cell, and that's the cell you see highlighted in your second screenshot. This is the "proper" behaviour. All orthographic maps render tiles with bottom left origin. Consider the common scenario where a larger tile is just a simple prop that sticks out of its tile, like a tree - you wouldn't want that to occupy 4x4 cells - if you did, you'd place it as 4x4 tiles. Consider also that in many cases, larger tiles aren't a perfect multiple of the map's tile size.

Since you marked this as a feature, are you looking for some sort of tile-size-aware mode on the various painting tools that will skip filling cells that are overlapped by a previously placed tile? If so, please be clearer about that. Right now, it sounds like you're reporting a bug that isn't actually a bug xP

eishiya avatar Aug 07 '22 18:08 eishiya

Yes, that's what I'm asking for essentially, I had difficulty describing! And the ability to choose which corner the large tile aligns with.

huwpascoe avatar Aug 08 '22 16:08 huwpascoe

For now, that could be scripted with custom tools, if you're so inclined.

You can change the way the larger tiles align by changing the Drawing Offset in the Tileset Properties.

eishiya avatar Aug 08 '22 19:08 eishiya

That'd be great but there's no drawing offset, just the "Image Rect" property that changes the source rectangle of the image.

huwpascoe avatar Aug 08 '22 22:08 huwpascoe

As I said, the drawing offset is in the Tileset Properties, not the Tile properties. it's tileset-wide.

eishiya avatar Aug 09 '22 00:08 eishiya

Until large-tile modes can be added to existing tools, maybe this scripted tool can be of use for some: https://github.com/eishiya/tiled-scripts/tree/main/Large%20Tile%20Stamp%20Tool It works similarly to the Stamp Brush, but spreads the tiles out so that large tiles don't overlap each other. Here's an example of placing some 16x16 tiles on a 4x4 grid: image

It lacks a lot of the regular Stamp Brush's convenience features such as letting you flip/rotate your brush, line mode, and Random Mode. Flips/rotations can be achieved by switching back to the Stamp Brush and performing them with that, at least. All of these can be added via scripting and PRs are welcome - I'm just too lazy to put the work in for a tool I don't need myself :'D

eishiya avatar Dec 21 '22 17:12 eishiya