1TMX Changelog 2============= 3 4Below are described the changes/additions that were made to the 5:doc:`tmx-map-format` for recent versions of Tiled. 6 7Tiled 1.7 8--------- 9 10- The :ref:`tmx-tileset-tile` elements in a tileset are no longer always saved 11 with increasing IDs. They are now saved in the display order, which can be 12 changed in Tiled. 13 14Tiled 1.5 15--------- 16 17- The colors that are part of a :ref:`tmx-wangset` are no longer separated in 18 corner colors and edge colors. Instead, there is now a single 19 :ref:`tmx-wangcolor` element to define a Wang color. This new element also 20 stores :ref:`tmx-properties`. 21 22- The ``wangid`` attribute on the :ref:`tmx-wangtile` element is now stored as 23 a comma-separated list of values, instead of a 32-bit unsigned integer in 24 hex format. This is because the number of colors supported in a Wang set was 25 increased from 15 to 255. 26 27- Valid transformations of tiles in a set (flipping, rotation) are specified 28 in a :ref:`tmx-tileset-transformations` element. The partial support for the 29 ``vflip``, ``hflip`` and ``dflip`` attributes on the :ref:`tmx-wangtile` 30 element has been removed. 31 32- The :ref:`tmx-wangset` element has replaced the now deprecated 33 :ref:`tmx-terraintypes` element. 34 35Tiled 1.4 36--------- 37 38- Added the ``objectalignment`` attribute to the :ref:`tmx-tileset` element, 39 allowing the tileset to control the alignment used for tile objects. 40 41- Added the ``tintcolor`` attribute to the :ref:`tmx-layer`, 42 :ref:`tmx-objectgroup`, :ref:`tmx-imagelayer` and :ref:`tmx-group` elements, 43 allowing for a number of graphical effects like darkening or coloring a 44 layer. 45 46Tiled 1.3 47--------- 48 49- Added an :ref:`tmx-editorsettings` element, which is used to store editor 50 specific settings that are generally not relevant when loading a map. 51 52- Added support for Zstandard compression for tile layer data 53 (``compression="zstd"`` on :ref:`tmx-data` elements). 54 55- Added the ``compressionlevel`` attribute to the :ref:`tmx-map` element, 56 which stores the compression level to use for compressed tile layer data. 57 58Tiled 1.2.1 59----------- 60 61- Text objects can now get their horizontal alignment saved as ``justify``. 62 This option existed in the UI before but wasn't saved properly. 63 64Tiled 1.2 65--------- 66 67- Added an ``id`` attribute to the :ref:`tmx-layer`, :ref:`tmx-objectgroup`, 68 :ref:`tmx-imagelayer` and :ref:`tmx-group` elements, which stores a 69 map-unique ID of the layer. 70 71- Added a ``nextlayerid`` attribute to the :ref:`tmx-map` element, which 72 stores the next available ID for new layers. This number is stored 73 to prevent reuse of the same ID after layers have been removed. 74 75Tiled 1.1 76--------- 77 78- Added a :ref:`map.infinite <tmx-map>` attribute, which indicates whether 79 the map is considered unbounded. Tile layer data for infinite maps is 80 stored in chunks. 81 82- A new :ref:`tmx-chunk` element was added for infinite maps which 83 contains the similar content as :ref:`tmx-data`, except it stores 84 the data of the area specified by its ``x``, ``y``, ``width`` and 85 ``height`` attributes. 86 87- :doc:`Templates </manual/using-templates>` were added, a 88 template is an :ref:`external file <tmx-template-files>` referenced 89 by template instance objects: 90 91 .. code:: xml 92 93 <object id="3" template="diamond.tx" x="200" y="100"/> 94 95- Tilesets can now contain :doc:`Terrain Sets </manual/terrain>`. 96 They are saved in the new :ref:`tmx-wangsets` element. 97 98- A new :ref:`tmx-point` child element was added to :ref:`tmx-object`, which 99 marks point objects. Point objects do not have a size or rotation. 100 101Tiled 1.0 102--------- 103 104- A new :ref:`tmx-group` element was added which is a group layer that can 105 have other layers as child elements. This means layers now form a hierarchy. 106- Added Text objects, identified by a new :ref:`tmx-text` element which is 107 used as a child of the :ref:`tmx-object` element. 108- Added a :ref:`tile.type <tmx-tileset-tile>` attribute for supporting 109 :ref:`typed-tiles`. 110 111Tiled 0.18 112---------- 113 114*No file format changes.* 115 116Tiled 0.17 117---------- 118 119- Added ``color`` and ``file`` as possible values for the 120 :ref:`property.type <tmx-property>` attribute. 121- Added support for editing multi-line string properties, which are 122 written out differently. 123 124Tiled 0.16 125---------- 126 127- The :ref:`tmx-property` element gained a ``type`` attribute, storing the 128 type of the value. Currently supported types are ``string`` (the default), 129 ``int``, ``float`` and ``bool``. 130 131Tiled 0.15 132---------- 133 134- The ``offsetx`` and ``offsety`` attributes are now also used for 135 :ref:`tmx-imagelayer` elements, replacing the ``x`` and ``y`` attributes 136 previously used. This change was made for consistency with the other layer 137 types. 138- The tiles in an image collection tileset are no longer guaranteed to 139 be consecutive, because removing tiles from the collection will no 140 longer change the IDs of other tiles. 141- The pure XML and Gzip-compressed tile layer data formats were 142 deprecated, since they didn't have any advantage over other formats. 143 Remaining formats are CSV, base64 and Zlib-compressed layer data. 144- Added ``columns`` attribute to the 145 :ref:`tmx-tileset` element, which specifies the number of tile columns in 146 the tileset. For image collection tilesets it is editable and is used when 147 displaying the tileset. 148- The ``backgroundcolor`` attribute of the 149 :ref:`tmx-map` element will now take the format ``#AARRGGBB`` when its alpha 150 value differs from 255. Previously the alpha value was silently discarded. 151 152Tiled 0.14 153---------- 154 155- Added optional ``offsetx`` and ``offsety`` attributes to the 156 ``layer`` and ``objectgroup`` elements. These specify an offset in 157 pixels that is to be applied when rendering the layer. The default 158 values are 0. 159 160Tiled 0.13 161---------- 162 163- Added an optional ``tilecount`` attribute to the ``tileset`` element, 164 which is written by Tiled to help parsers determine the amount of 165 memory to allocate for tile data. 166 167Tiled 0.12 168---------- 169 170- Previously tile objects never had ``width`` and ``height`` 171 properties, though the format technically allowed this. Now these 172 properties are used to store the size the image should be rendered 173 at. The default values for these attributes are the dimensions of the 174 tile image. 175 176Tiled 0.11 177---------- 178 179- Added ``hexagonal`` to the supported values for the ``orientation`` 180 attribute on the ``map`` element. This also adds ``staggerindex`` 181 (``even`` or ``odd``) and ``staggeraxis`` (``x`` or ``y``) and 182 ``hexsidelength`` (integer value) attributes to the ``map`` element, 183 in order to support the many variations of staggered hexagonal. The 184 new ``staggerindex`` and ``staggeraxis`` attributes are also 185 supported when using the ``staggered`` map orientation. 186- Added an ``id`` attribute to the ``object`` element, which stores a 187 map-unique ID of the object. 188- Added a ``nextobjectid`` attribute to the ``map`` element, which 189 stores the next available ID for new objects. This number is stored 190 to prevent reuse of the same ID after objects have been removed. 191 192Tiled 0.10 193---------- 194 195- Tile objects can now be horizontally or vertically flipped. This is 196 stored in the ``gid`` attribute using the same mechanism as for 197 regular tiles. The image is expected to be flipped without affecting 198 its position, same way as flipped tiles. 199 200- Objects can be rotated freely. The rotation is stored in degrees as a 201 ``rotation`` attribute, with positive rotation going clockwise. 202 203- The render order of the tiles on tile layers can be configured in a 204 number of ways through a new ``renderorder`` property on the ``map`` 205 element. Valid values are ``right-down`` (the default), ``right-up``, 206 ``left-down`` and ``left-up``. In all cases, the map is drawn 207 row-by-row. This is only supported for orthogonal maps at the moment. 208 209- The render order of objects on object layers can be configured to be 210 either sorted by their y-coordinate (previous behavior and still the 211 default) or simply the order of appearance in the map file. The 212 latter enables manual control over the drawing order with actions 213 that "Raise" and "Lower" selected objects. It is controlled by the 214 ``draworder`` property on the ``objectgroup`` element, which can be 215 either ``topdown`` (default) or ``index``. 216 217- Tiles can have an ``objectgroup`` child element, which can contain 218 objects that define the collision shape to use for that tile. This 219 information can be edited in the new Tile Collision Editor. 220 221- Tiles can have a single looping animation associated with them using 222 an ``animation`` child element. Each frame of the animation refers to 223 a local tile ID from this tileset and defines the frame duration in 224 milliseconds. Example: 225 226 .. code:: xml 227 228 <tileset ...> 229 ... 230 <tile id="[n]"> 231 <animation> 232 <frame tileid="0" duration="100"/> 233 <frame tileid="1" duration="100"/> 234 <frame tileid="2" duration="100"/> 235 </animation> 236 </tile> 237 </tileset> 238 239Tiled 0.9 240--------- 241 242- Per-object visibility flag is saved (defaults to 1): 243 244 .. code:: xml 245 246 <object visible="0|1"> 247 248- Terrain information was added to tileset definitions (this is 249 generally not very relevant for games): 250 251 .. code:: xml 252 253 <tileset ...> 254 ... 255 <terraintypes> 256 <terrain name="Name" tile="local_id"/> 257 </terraintypes> 258 <tile id="local_id" terrain="[n],[n],[n],[n]" probability="percentage"/> 259 ... 260 </tileset> 261 262- There is preliminary support for a "staggered" (isometric) projection 263 (new value for the ``orientation`` attribute of the ``map`` element). 264 265- A basic image layer type was added: 266 267 .. code:: xml 268 269 <imagelayer ...> 270 <image source="..."/> 271 </imagelayer> 272 273- Added ellipse object shape. Same parameters as rectangular objects, 274 but marked as ellipse with a child element: 275 276 .. code:: xml 277 278 <object ...> 279 <ellipse/> 280 </object> 281 282- Added map property for specifying the background color: 283 284 .. code:: xml 285 286 <map ... backgroundcolor="#RRGGBB"> 287 288- Added initial (non-GUI) support for individual and/or embedded tile 289 images (since there is no way to set this up in Tiled Qt but only in 290 Tiled Java or with 291 `pytmxlib <https://github.com/encukou/pytmxlib>`__, this is not very 292 important to support at the moment): 293 294 .. code:: xml 295 296 <tileset ...> 297 <tile id="[n]"> 298 <!-- an embedded image --> 299 <image format="png"> 300 <data encoding="base64"> 301 ... 302 </data> 303 </image> 304 </tile> 305 <tile id="[n]"> 306 <!-- an individually referenced image for a single tile --> 307 <image source="file.png"/> 308 </tile> 309 ... 310 </tileset> 311 312Tiled 0.8 313--------- 314 315- Tilesets can now have custom properties (using the ``properties`` 316 child element, just like everything else). 317 318- Tilesets now support defining a drawing offset in pixels, which is to 319 be used when drawing any tiles from that tileset. Example: 320 321 .. code:: xml 322 323 <tileset name="perspective_walls" tilewidth="64" tileheight="64"> 324 <tileoffset x="-32" y="0"/> 325 ... 326 </tileset> 327 328- Support for tile rotation in 90-degree increments was added by using 329 the third most significant bit in the global tile id. This new bit 330 means "anti-diagonal flip", which swaps the x and y axis when 331 rendering a tile. 332