I have tried loading a dungeon with a house using just front and back layers modified it works like a charm, but as soon as I put into any objects into the objects layer I cannot load the dungeon with warp command. Is this a bug from Tiles or from the game??
Check what version of Tiled you are using. Versions above 0.15.2 omit the empty 'properties' key on objects when they have no parameters. Downgrading to version 0.15.2 re-enables said key to not be trimmed from the resulting, exported .json. For more information, here's a thread of prior struggles with what I'm assuming is the same issue you have encountered: http://community.playstarbound.com/threads/unable-to-place-objects-in-tiled.117806/#post-2959782
This patch works for (at least) 0.17.0: Code: diff --git a/src/libtiled/maptovariantconverter.cpp b/src/libtiled/maptovariantconverter.cpp index 1621f82..c875a55 100644 --- a/src/libtiled/maptovariantconverter.cpp +++ b/src/libtiled/maptovariantconverter.cpp @@ -308,7 +308,7 @@ QVariant MapToVariantConverter::toVariant(const ObjectGroup *objectGroup) const const QString &name = object->name(); const QString &type = object->type(); - addProperties(objectVariant, object->properties()); + addProperties(objectVariant, object->properties(), true); objectVariant[QLatin1String("id")] = object->id(); objectVariant[QLatin1String("name")] = name; @@ -396,9 +396,9 @@ void MapToVariantConverter::addLayerAttributes(QVariantMap &layerVariant, } void MapToVariantConverter::addProperties(QVariantMap &variantMap, - const Properties &properties) const + const Properties &properties, bool force) const { - if (properties.isEmpty()) + if (!force && properties.isEmpty()) return; QVariantMap propertiesMap; @@ -418,5 +418,6 @@ void MapToVariantConverter::addProperties(QVariantMap &variantMap, } variantMap[QLatin1String("properties")] = propertiesMap; + if (!properties.isEmpty()) variantMap[QLatin1String("propertytypes")] = propertyTypesMap; } diff --git a/src/libtiled/maptovariantconverter.h b/src/libtiled/maptovariantconverter.h index 8270248..5f758ae 100644 --- a/src/libtiled/maptovariantconverter.h +++ b/src/libtiled/maptovariantconverter.h @@ -63,7 +63,7 @@ private: const Layer *layer) const; void addProperties(QVariantMap &variantMap, - const Properties &properties) const; + const Properties &properties, bool force = false) const; QDir mMapDir; GidMapper mGidMapper;