Skip to content

Commit fb1839b

Browse files
committed
docs: TMX format documentation updates
* Updated TMX changelog and docs with "color" and "file" property types * Updated docs about multi-line strings, and noted this in the changelog * Added note about embedded image data
1 parent dab4f29 commit fb1839b

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

docs/reference/tmx-changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ source: reference/tmx-changelog.md
44

55
Below are described the changes/additions that were made to the [TMX format](tmx-map-format.md) for recent versions of Tiled.
66

7+
## Tiled 0.17 ##
8+
9+
* Added `color` and `file` as possible values for the [`property.type`](tmx-map-format.md#property) attribute.
10+
* Added support for editing multi-line string properties, which are written out differently.
11+
712
## Tiled 0.16 ##
813

914
* The [`property`](tmx-map-format.md#property) element gained a `type` attribute, storing the type of the value. Currently supported types are `string` (the default), `int`, `float` and `bool`.

docs/reference/tmx-map-format.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ This element is used to specify an offset in pixels, to be applied when drawing
6565
* <b>width:</b> The image width in pixels (optional, used for tile index correction when the image changes)
6666
* <b>height:</b> The image height in pixels (optional)
6767

68+
Note that it is not currently possible to use Tiled to create maps with embedded image data, even though the TMX format supports this. It is possible to create such maps using `libtiled` (Qt/C++) or [tmxlib](https://pypi.python.org/pypi/tmxlib) (Python).
69+
6870
Can contain: [data](#data) (since 0.9)
6971

7072
### &lt;terraintypes> ###
@@ -272,14 +274,16 @@ Wraps any number of custom properties. Can be used as a child of the `map`, `til
272274
### &lt;property> ###
273275

274276
* <b>name:</b> The name of the property.
275-
* <b>type:</b> The type of the property. Can be `string` (default), `int`, `float` or `bool`. (since 0.16)
277+
* <b>type:</b> The type of the property. Can be `string` (default), `int`, `float`, `bool`, `color` or `file` (since 0.16, with `color` and `file` added in 0.17).
276278
* <b>value:</b> The value of the property.
277279

278280
Boolean properties have a value of either "true" or "false".
279281

280-
When a string property spans contains newlines, the current versions of Tiled Java and Tiled Qt will write out the value as characters contained inside the `property` element rather than as the `value` attribute. However, it is at the moment not really possible to edit properties consisting of multiple lines with Tiled.
282+
Color properties are stored in the format `#AARRGGBB`.
283+
284+
File properties are stored as paths relative from the location of the map file.
281285

282-
It is possible that a future version of the TMX format will switch to always saving property values inside the element rather than as an attribute.
286+
When a string property contains newlines, the current version of Tiled will write out the value as characters contained inside the `property` element rather than as the `value` attribute. It is possible that a future version of the TMX format will switch to always saving property values inside the element rather than as an attribute.
283287

284288
---
285289
![Creative Commons License](CC-BY-SA.png)

0 commit comments

Comments
 (0)