-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
GSoC 2017: Reusable Object Templates
This project aims to create a template system in Tiled. Any created object can be saved as a template. These templates can be instantiated elsewhere as objects that inherit the template’s properties.
These are the pull requests created and merged during the project period
- #1587 Reusable object templates.
- #1612 Templates dock.
- #1623 Template instances.
- #1652 Creating template instances.
- #1663 Editing templates.
- #1666 Templates dock enhancements.
- #1667 Add JSON support for reusable object templates.
- #1703 Add templates docs.
- #1698 Various improvements for templates.
The project required creating a way for Tiled to store templates. Templates are stored as template groups, Template Group Format .tgx, standing for template group XML. You can read more about the format here here.
Consequently, the map reader and writer were updated to be able to read the new file format so that templates are displayed properly. The templates dock was created to list the available templates and allow browsing, previewing and editing. Here is a demonstration of instantiating templates, by using the templates dock
And this is a demonstration of changing the template and having all instances updated
Introduction and discussion about the project on the forum.
Detailed description of the project as well as a the description of all the features is available at the official documentation.
The core functionality of the project is done but there are still many improvements that could be added:
- Resetting overridden properties.
- Locking template properties.
- Handling wrong file paths.
- Managing template groups, e.g. removing a template or a template group.
Quick Links: Download on itch.io • Tiled Manual • Support Tiled Development