File: editing-tile-layers.rst

package info (click to toggle)
tiled-qt 1.11.90-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 40,304 kB
  • sloc: cpp: 125,078; java: 4,174; python: 1,634; xml: 1,524; sh: 427; makefile: 67; ruby: 15
file content (193 lines) | stat: -rw-r--r-- 6,979 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
Editing Tile Layers
===================

:ref:`tile-layer-introduction` are what makes Tiled a *tile map editor*.
Although not as flexible as :ref:`object-layer-introduction`, they provide
efficient data storage and good rendering performance as well as efficient
content creation. Every new map gets one by default, though feel free to delete
it when you're not going to use it.

.. _stamp-tool:

Stamp Brush
-----------

Shortcut: ``B`` |stock-tool-clone|

The primary tool for editing tile layers is the Stamp Brush. It can be
used to paint single tiles as well as larger "stamps", which is where it
gets its name from. Using the right mouse button, it can also quickly
capture tile stamps from the currently active layer. A tile stamp is
commonly created by selecting one or more tiles in the Tilesets view.

The Stamp Brush has some extra features:

-  While holding ``Shift``, click any two points to draw a line between
   them.

-  While holding ``Ctrl+Shift``, click any two points two draw a circle
   or ellipse centered on the first point.

-  Activate the *Random Mode* using the dice button on the Tool Options
   toolbar to have the Stamp Brush paint with random tiles from the tile
   stamp. The probability of each tile depends on how often it occurred
   on the tile stamp, as well as the probability set on each tile in the
   *Tileset Editor*.

-  Activate the *Terrain Fill Mode* using the Terrain tile |terrain| button on
   the tool bar to have the Stamp Brush paint using random terrain tiles. This makes
   adjacent tiles match edge and corner terrains to be placed. Terrain tiles are
   described in detail in :doc:`terrain`.

-  In combination with the *Tile Stamps* view, it can also place
   randomly from a set of predefined tile stamps. This can be more
   useful than the *Random Mode*, which randomly places individual
   tiles.

-  You can flip the current tile stamp horizontally/vertically by using
   ``X`` and ``Y`` respectively. You can also rotate left/right by
   using ``Z`` and ``Shift+Z`` respectively. These actions can also be
   triggered from the Tool Options tool bar.

.. _terrain-tool:

Terrain Brush
-------------

Shortcut: ``T`` |terrain-edit|

The Terrain Brush allows for efficient editing with certain types of terrain
transitions (corner-based, edge-based or a combination). Setting it up
requires associating terrain information with your tiles, which is described
in detail in :doc:`terrain`.

Similarly to the :ref:`stamp-tool`, you can draw lines by holding ``Shift``.
When holding ``Ctrl``, the size of the edited area is increased to cover an
entire tile rather than just one corner or edge.

.. raw:: html

   <div class="new new-prev">Since Tiled 1.0</div>

When holding ``Alt``, the editing operations are also applied at a 180
degree rotation. This is especially useful when editing strategic maps
where two sides need to have equal opportunities. The modifier works
well in combination with either ``Shift`` for drawing lines or ``Ctrl``
for increasing the edited area.

.. raw:: html

   <div class="new new-prev">Since Tiled 1.1</div>

.. _bucket-fill-tool:

Bucket Fill Tool
----------------

Shortcut: ``F`` |stock-tool-bucket-fill|

The Bucket Fill Tool provides a quick way of filling empty areas or
areas covered with the same tiles. The currently active tile stamp will
be repeated in the filled area. It can also be used in combination with
the *Random Mode*, or *Terrain Fill Mode*.

When holding ``Shift``, the tool fills the currently selected area
regardless of its contents. This is useful for filling custom areas that
have been selected previously using one or more :ref:`tile-selection-tools`.

You can also flip and rotate the current stamp as described for the
:ref:`stamp-tool`.

.. raw:: html

   <div class="new new-prev">Since Tiled 1.1</div>

.. _shape-fill-tool:

Shape Fill Tool
---------------

Shortcut: ``P`` |rectangle-fill|

This tool provides a quick way to fill rectangles or ellipses with a certain
tile or pattern.

- Holding ``Shift`` fills an exact square or circle.

.. raw:: html

   <div class="new">Since Tiled 1.10.2</div>

- Holding ``Alt`` draws the rectangle or ellipse centered around the starting
  location.

You can also flip and rotate the current stamp as described for the
:ref:`stamp-tool`.

.. _eraser-tool:

Eraser
------

Shortcut: ``E`` |stock-tool-eraser|

A simple eraser tool. Left click erases single tiles and right click can
be used to quickly erase rectangular areas.

.. raw:: html

   <div class="new new-prev">Since Tiled 1.5</div>

-  Holding ``Shift`` erases on all layers.

.. _tile-selection-tools:

Selection Tools
---------------

There are various tile selection tools that all work in similar fashion:

-  |stock-tool-rect-select| **Rectangular Select** allows selection of
   rectangular areas (shortcut: ``R``)

-  |stock-tool-fuzzy-select-22| **Magic Wand** allows selection of connected
   areas filled with the same tile (shortcut: ``W``)

-  |stock-tool-by-color-select| **Select Same Tile** allows selection of
   same-tiles across the entire layer (shortcut: ``S``)

By default, each of these tools replaces the currently selected area.
The following modifiers can be used to change this behavior:

-  Holding ``Shift`` expands the current selection with the new area
-  Holding ``Ctrl`` subtracts the new area from the current selection
-  Holding ``Ctrl`` and ``Shift`` selects the intersection of the new
   area with the current selection

You can also lock into one of these modes (Add, Subtract or Intersect)
by clicking on one of the tool buttons in the Tool Options toolbar.

Managing Tile Stamps
--------------------

It can often be useful to store the current tile stamp somewhere to use
it again later. The following shortcuts work for this purpose:

-  ``Ctrl + 1-9`` - Store current tile stamp. When no tile drawing tool is
   selected, tries to capture the current tile selection (similar to
   ``Ctrl + C``).
-  ``1-9`` - Recall the stamp stored at this location (similar to
   ``Ctrl + V``)

Tile stamps can also be stored by name and extended with variations
using the *Tile Stamps* view.

.. |rectangle-fill| image:: ../../src/tiled/resources/images/22/rectangle-fill.png
.. |stock-tool-bucket-fill| image:: ../../src/tiled/resources/images/22/stock-tool-bucket-fill.png
.. |stock-tool-clone| image:: ../../src/tiled/resources/images/22/stock-tool-clone.png
.. |stock-tool-eraser| image:: ../../src/tiled/resources/images/22/stock-tool-eraser.png
.. |stock-tool-rect-select| image:: ../../src/tiled/resources/images/22/stock-tool-rect-select.png
.. |stock-tool-by-color-select| image:: ../../src/tiled/resources/images/22/stock-tool-by-color-select.png
.. |stock-tool-fuzzy-select-22| image:: ../../src/tiled/resources/images/22/stock-tool-fuzzy-select-22.png
.. |terrain-edit| image:: ../../src/tiled/resources/images/24/terrain-edit.png
.. |terrain| image:: ../../src/tiled/resources/images/24/terrain.png