Hello and welcome to the articy:draft X Basics tutorial series. This lesson covers Templates, one of articy’s core features.
Why use templates?
What are the benefits of using templates? We have a widely varied range of game genres spread across PC, console and mobile. And even within any one genre games are not simply copies of the same old mold; every developer brings in unique ideas and tries to find new ways of telling stories. A one-fits-all solution to approach game projects is not really an option – it might work for some projects, but for others it would be far too constraining, and for some it would not even be possible at all.
These are the reasons that lead to articy’s Template feature. With custom templates you can add your own project specific properties to any kind of object. Templates enable you to structure your game data in just the way you need it. And this is by no means limited to elements like characters or items, you can assign templates to almost all object types within articy.
Template Building Blocks
Let’s begin by looking at the building blocks of a template. Templates are structured in a modular approach which consists of three levels. The first level are single properties, for example text fields, like we use for our characters to store Background
, Appearance
, or Motivation
. The next level are Features. A feature is a set of properties, and one feature can be used in multiple templates. Here, we grouped the three text properties into a feature called CharacterInfo
. The third level are the Templates themselves. They consist of one or more Features. Our Character
template consists of the CharacterInfo
feature. Templates are assigned to objects. It is important to note that each object can only have one template assigned to it.
So why this distinction between Feature and Template? If there is only one feature in the template why the extra step? For this exact example it does not seem to make a lot of sense, but let’s say a bit further down the road we want to introduce some merchant characters. We could of course just add the extra properties we need for the merchants to the CharacterInfo
feature, but that would clutter the other characters with unnecessary data. It is better to group the needed properties like the money the merchants have and their stock into a second feature, and then create a new merchant template that consists of both CharacterInfo
and MerchantInfo
features.
It might also be worth to note that Features are object-independent, whereas Templates are tied to a specific object type. That means we cannot assign the Character
template to a Location as it is an Entity template, but we could reuse the MerchantInfo
feature for a Location template for example, if these specific properties are needed there as well.
It might take a bit of effort to set it up initially, but once your structure is established, it makes things easier down the road and produces a much cleaner output when exporting the project. But don’t worry, nothing is set in stone at this point. We know that a lot of projects undergo some changes during development, so of course you can edit features and templates at a later stage to adapt to that.
Feature editor
Now that we have seen how templates are structured, let’s go to the “Template Design” section in articy and get hands on. From the Jumpstart page select Template Design (1), alternatively select the entry in the Navigator (2), then go to Features (3).
Now, we can create a new feature by using the button in the toolbar (1) or the right-click context menu. Double click the tile (2) to open the new, empty feature.
Select Edit to open the Feature Editor, which will pop-up in a new window.
The Feature Editor is divided into three parts. On the left side you can find the property list (1), with all basic property types. For a detailed description of all property types please check out Templates lesson two.
In the middle, the layout area is located (2), where the current state of the feature is shown. On the right side a list of parameters is displayed (3), divided between feature and property parameters. An important side note here: For “Technical Names” you need to adhere to a special naming convention. You cannot use spaces or special characters, but you will be informed right away if the name is not meeting the specifications.
Similar to dragging objects to the Flow from the toolbar we can drag the properties we need from the left side to the layout area. If you select a feature in the layout area by left clicking all its corresponding parameters will be displayed on the right side.
I mentioned a MerchantInfo
feature earlier, let’s create this now. In case you haven’t updated the name right after creation you can do that in the Feature editor as well, in the top right under Feature parameters.
Property wise let’s keep it simple, a number property (1) for the cash the merchant has initially, a Boolean (2) – which is a property type that holds a true or false value – to determine if they also buy from the player or only sell stuff, and last but not least a strip (3), where we can add the items they have in stock.
When finished click Apply and confirm to save the changes made to the feature.
Template editor
We have the MerchantInfo
feature, now we can create another entity template which we then can use for shopkeepers, shady street corner dealers, basically everyone in our project who has anything to sell to our player.
Go to “Template Design” (1) again, but this time select the Templates folder (2).
Here we see all object types listed that can have a template, we are looking for Entity.
We already have a couple of templates for entities, if we want we can create additional subfolders (1), like for characters and items, to improve our overview. Create a new template by using the button in the toolbar (2) or the right-click context menu.
You can name the template right away, then double click the tile to open the new template.
Select Edit to open the Template Editor, which will pop-up in a new window.
The layout of the template editor is similar to the feature editor. In the middle is the layout area (1) and on the right side the parameters are located (2). In addition to display and technical name, you can assign an icon to a template and a default color (3). This makes it easier to recognize objects with a certain template at a glance. Let’s choose a different icon and give the template a nice money green color.
On the left side, we now have a list of all existing features (4), which we can drag to the layout area and in this way construct the template.
For a merchant I’d like to have the general CharacterInfo
feature, as well as the new MerchantInfo
feature.
If you select a property you can edit its parameters. As there might be UI restrictions for merchant characters, which also have to display the whole trading UI, it might make sense to reduce the max length of the text fields (1), so we don’t run into issues with truncated text later. Editing parameters here, has no effect on the feature itself, and other instances where it is used in Templates, it is just this template where the textboxes now have a smaller max size. When finished click Apply and confirm to save the changes made to the template (2).
Assigning a template
Now all that is left to do is to assign the template to the desired object or objects. Currently, I have only one entity that is supposed to be a merchant, the apple girl. Double click the entity tile or press F8 on the selected tile to open the object’s property view.
Switch to the Template tab (1) and select Choose template (2).
We can now choose from a list displaying all applicable entity templates. I select Merchant
and confirm with OK.
Icon and Color of the template are applied and we can fill out the information we need. Let’s say that the apple girl is willing to buy stuff, but she isn’t very wealthy when we first meet her. And she is going to sell apples, which shouldn’t be any surprise.
Property definitions
Last but not least I’d like to mention a template building block, we haven’t yet touched upon and those are Property Definitions. If you want to use a specific parameter set for a property more than once, you can create a property definition. Property definitions are always based on basic property types, but come with pre-defined parameters. If you created a certain list of values for a drop-down, for example, you can save it as property definition to reuse that drop-down property in multiple features.
There are two ways to create a property definition. Create a property in the feature editor as usual and save it as property definition afterwards. That can be done either via right-click on the property (1) or by dragging the defined property from the layout-area to the drop-area in the lower left of the feature editor (2).
The second way is to create the property as a property definition in the first place. Navigate to the “Property Definitions” folder (1) and choose a basic property type on which the property definition will be based. Now create a new property definition via the toolbar-button (2) or via the right-click context menu.
Property definitions appear in the Feature editor, below the basic property types, and can be dragged to the layout area same as any other property.
If you make any changes to a property based on a property definition in the feature editor, the changes will only affect this local instance, not the property definition overall.
If you edit the property definition itself, changes will propagate to its instances, but will not overwrite any custom values you might have set.
Useful links:
Don’t have articy:draft X yet? Get the free version now!
Get articy:draft X FREE
*No Payment information required
Follow us on Twitter, Facebook and LinkedIn to keep yourself up to date and informed. To exchange ideas and interact with other articy:draft users, join our communities on reddit and discord.