Template Scripts: An Overview
Deep Learning on Scripts is found in Motive Academy. Click here to see the course this lesson is in.
Quick Links
Overview
Template Scripts provide a common Script structure that can be reused in different ways. They use Variables for the pertinent fields instead of specific content. When authoring without template Scripts, it is normal to see many repetitive structures in your Scripts.
For example, I could create a Script that displayed a screen message and when the message is closed, an asset highlights and the learner is prompted to grab it. Perhaps I have five assets for which this needs to happen. I would need to author that same pattern five times, one for each custom message, asset and prompt.
Instead I could author a template Script and use input Variables for the message, the asset and prompt. I could then launch the template Script five times and simply supply the correct values for the Variables.
A template Script is simply a Script that uses input Variables. It is not a distinctly different type of Script. A Script becomes a template because of the way it is authored and used.
Template Scripts have a number of advantages.
Simplifies Authoring for Others
There are a number of complex structures in Storyflow. Variables, Enums, Behaviour Models, etc.… Template Scripts can be created which set these up in a usable and understandable way for non-technical users.
For example, perhaps you have a machine that has several different possible states. Once this machine is configured in Unity, Behaviour Models will be used to control those states in Storyflow. Each state will have a Variable and each Variable will need to be assigned to the instance of the machine before it can be used.
In reality, this is a simple task if you have the skillset to be an Assembler. However, this can be challenging task for most Authors. A template Script that sets up the Behavior Model which can be run at the beginning of a Scenario makes authoring much easier. It lets the Author focus on creating the training instead of setting up machine states.
Reduces the Amount of Authoring
Many training Scenarios contain repeated actions. Often, these actions are the same or only slightly different. Template Scripts allow you to author once and reuse the structure with different values and content. In essence, they act as a Custom Resource for the Authors.
Reduces Errors in Authoring
Without template Scripts, one would need to reauthor the same structures and consistent content many, many times. This introduces the possibility of error with each iteration.
Template Scripts can be reused. While they contain Variables which can have different values, their structure and any specific content added to them remains the same. Once the template Script is tested, you can have confidence using it over and over again.
Standardizes Common Interactions and Sequences
Since template Scripts can be reused, this helps to maintain a consistency of experience for the learner. UX for training modules has a big impact on their success. Template Scripts can be used to enforce elements of UX in the training.