Conducttr Engine Smartwords

You can achieve a lot with Conducttr engine smartwords and functions but it's usually for pro-users and often those using Colibri where you can add calculations.

While the {} smartwords make life easier for commonly-used data, there's a lot more you can do by directly accessing the Conducttr Engine. These smartwords use the || delimiters instead of {}. Please note that you can't use the two together. The rest of this article might get a bit complicated for some but even if you don't understand it completely, you might still be able to use the recipes.

Audience Responses

To capture the player's response to the last question, you can use: |audience.response| Note that this only survives the immediate use after the question. If you want to store the response, you'll need to save it in a variable using a calculation.

Arrays

Arrays are like tables with two columns: the left column is the index and the right column is the data. You use the index to access to data.

Symbols

[ ] denotes an array

( ) denotes a function

| | denotes a smartword

{ } a short form for some smartwords

Indexes

Most indexes are in quotes " " because we want Conducttr to use that actually text. Without the quotes Conducttr will try to find a variable of that name.

The exercise Smartwords table is actually an array that internally is called the "custom_data" array. If you're writing content to use the custom_data array, writing something like {data.stadium} is the easiest approach but you could also write |partition.custom_data["stadium"]| - they both mean the same. Conducttr maintains the following arrays:

ArrayDescription

custom_data

Holds the data you've added to personalise this scenario. See exercise smartwords

audience.responses

Holds all the question answers for a the current player. The index is in the format campaign code.card number The campaign code can be configured by going to Setup>Essential configuration>Campaign code Assuming a campaign code of "panda", then to get the player's response to the question asked on card 56, the smartword would be |audience.responses["panda.56"]|

partition.decisions

Holds a count of players clicking on a data point (see the article on data points to understand what these are). This is also indexed using the campaign code but it has two types of index:

  • campaign_code.card_number

  • campaign_code.card_number.choice

As an example, if the campaign code is "mr" and the card number is 3 and you want to know how many players have click the first choice, the smartword would be |partition.decisions["mr.3.1"]| If you wanted to print this as a percentage you could write |partition.decisions["mr.3.1"]| other person(s) took this decision which is |INT((partition.decisions["mr.3.1"]/partition.decisions["mr.3"])*100)|% of the total

partition.variables

Holds the values of all the variables you've created in calculations. To access a partition variable you're usually better off to use the {} notation but if you have to use || then this is how it looks... the array holds three types of variable: audience, team and session. And these are identified in the index by a suffix - a. for audience, t. for team and s. for session. To access the value of the variable, use |partition.variables[CONCAT("{entity suffix}.",{entity it},".{variable name}")]| The entity id for each entity is:

  • audience.hash

  • audience.participant_team_id

  • audience.session_id

So, putting this altogether, to access the audience attribute "my_score" the formula is |partition.variables[CONCAT("a.",audience.hash,".my_score")]| To access the team attribute "team_decision" the formula is |partition.variables[CONCAT("a.", audience.participant_team_id,".team_decision")]|

partition.the_chart_index

Holds the button text for any data point you create. The array is indexed by campaign_code.card_number.button_number In the image below, of he campaign code is "defsc" then |partition.the_chart_index["defsc.3.1"]| = "stay INSIDE"

Nested Smartwords

Note that this is an advanced feature and not for the fainthearted ;)

Nested smartwords allows authors to create more dynamic experiences by using variables to access the data in other variables. Example Let's say you ask the player to choose a song and store the answer in a player variable called "music". Normally to access this variable we would use {music}. To nest the smartword you need to use the || notation. Hence the player variable "music" will become |partition.variables[CONCAT("a.",audience.hash,".music")]| But lets say we want to use the the value in "music" to access some data in the custom data table. To do this we will use this expression:

|partition.custom_data[partition.variables[CONCAT("a.",audience.hash,".music")]]|

Last updated