Tiled 0.16.0 not save custom properties?

The new feature, which allows you to predefine a set of properties for each type of object is not saving.

Tmx file

`<?xml version="1.0" encoding="UTF-8"?>

`

The object types are not stored in each map file, but in a Tiled settings location. You can change the location of the object types file using the “File” menu in the Object Types Editor.

You can find this and more in the Custom Properties documentation.

example:

  1. I add the “File” menu in the Object Types Editor. the my custom properties.
  2. I add one ellipse
  3. In the ellipse property “Type Properties” I insert the name “Brick”, a custom property appear as in the image.
    4.Save of Tmx.

In tmx file not errs to be so:

<object id="2" type="Brick" x="51" y="59" width="113" height="109"> <properties> <property name="SourceImg" value="brick.png"/> </properties> <ellipse/>

instead of

<object id="2" type="Brick" x="51" y="59" width="113" height="109"> <ellipse/>

This is intensional. There is no point in saving properties with their default values, since this would result in needlessly verbose files. Imagine all your objects would have all their default properties stored, when you have many possible properties and many objects on your map.

The idea is that generally the properties and their default values are already implicitly present in your engine. If not, then you could still just read the object types XML file stored by Tiled in your game to get these values. For this you would change the location of the object types XML file to somewhere inside your project directory.

Btw, in your particular case you’re using a custom property to refer to an image. Instead, why not add this image to an Image Collection tileset and place it as a tile object?