It looks like pytmx can't load templates.
When an object with a template is loaded, I see a TiledObject.template attribute which corresponds to the path of the template's .tx file (relative to the path of the map), but there does not seem to be a way to get any meaningful data out of it without parsing the file separately, which (a) could generate a mess, and (b) really seems like it should be part of pytmx, since it takes care of everything else.
The desired behavior would either be replacing the TiledObject.template attribute with a TiledTemplate object or similar, or straight up overriding the object's attributes (most intuitive, in my opinion).
Theoretically, adding support would not be too difficult. I'd be willing to try an implement it myself if necessary, but this seems to be a pretty simple feature to not have around. Am I missing something?
Here's my current tiled project as a test case. The assets are from here (CC0).
It looks like pytmx can't load templates.
When an object with a template is loaded, I see a
TiledObject.templateattribute which corresponds to the path of the template's.txfile (relative to the path of the map), but there does not seem to be a way to get any meaningful data out of it without parsing the file separately, which (a) could generate a mess, and (b) really seems like it should be part of pytmx, since it takes care of everything else.The desired behavior would either be replacing the
TiledObject.templateattribute with aTiledTemplateobject or similar, or straight up overriding the object's attributes (most intuitive, in my opinion).Theoretically, adding support would not be too difficult. I'd be willing to try an implement it myself if necessary, but this seems to be a pretty simple feature to not have around. Am I missing something?
Here's my current tiled project as a test case. The assets are from here (CC0).