What Is Workbench?

Workbench is a node-based visual scripting environment built into the Folk Tale Editor, democratizing modding by removing the need for programming skills, opening modding up to the creative masses. Workbench is the primary tool for bringing maps to life, adding interaction, storytelling, questing, and world events.

Workbench can be accessed and toggled on/off from within the Folk Tale Editor by pressing Y.

The following acronyms are used throughout this guide:
LMB - Left Mouse Button
MMB - Middle Mouse Button
RMB - Right Mouse Button

When you first start Workbench in a new map, you'll see an empty gray grid.

Node Context Menu

To create a new node, open the node context menu by clicking RMB. You can expand each node category by clicking on it with LMB. This can be useful to learn where the different types of node are.

Workbench Node Context Menu


As you become more experienced, you'll find it far quicker to use the search system. All scripts begin with the Start node, located in the Utilities category. The quickest way is to begin typing start into the search area above the categories. As you type, the results will be filtered. After typing star the Start node should be top of the list. Use the Down Arrow key followed by the Enter key to select it. Alternatively you can click on the Start node in the results list using LMB.

Exploring Categories Using The Keyboard

You can also explore categories using solely the keyboard arrow keys. When a category is highlighted, pressing Right Arrow on your keyboard will expand that category revealing the nodes it contains. Pressing Left Arrow will collapse an open category, hiding the nodes it contains.

Workbench Node Context Menu

Selecting Nodes

Nodes can be selected by clicking them with LMB. Selected nodes receive an orange border highlight. Multiple nodes can be selected by holding down Left Shift on your keyboard while selecting individual nodes.

Moving Nodes

With one or more nodes selected, you can drag and drop by hovering over a selected node, pressing and holding LMB, dragging your mouse, then releasing LMB to drop the nodes at their new position.

Workbench includes a handy snap to grid setting making alignment of nodes very easy.

Deleting Nodes and Wires

Selected nodes and wires can be deleted using Backspace on your keyboard.

Navigating Large Scripts

As your scripts become more elaborate, it's inevitable you'll want more workspace. Workbench has unlimited workspace in all directions. You can pan around by clicking and holding MMB, moving your mouse, and then releasing MMB.

Connecting Nodes With Wires

Create a Delay node (located in the Control Flow category) to the right of your Start node. Nodes are connected using wires. To create your first wire, click and hold LMB over the Complete output on the Start Node. With LMB still held down, drag your mouse to the right until it is over the Run input on the Delay Node. As you drag, a wire will be draw between the two nodes. Once your mouse pointer is over the Run input, releasing LMB. The wire will automatically connect.

Connecting nodes with wires

Inspecting A Node

To the right hand side of Workbench is a darker Node Inspector Window where selected node properties are displayed. Selecting the Delay node will show one property called Delay. This is a float (floating point) value in seconds. For example 1.0 means 1 second, while 2.5 means 2½ seconds.

Node inspector window

What It Does

So far we've created a Start node, and a Delay node. This script doesn't do much at the moment. What we are saying is that once the game starts, the script should wait for 2.5 seconds. Because there are no more nodes after the Delay, the script will exit.
Playing Sounds

Building on our delay script above, let's make the Village Advisor character say something. Create a Sound node to the right of the Delay node and connect both nodes together.

Sound node

After selecting the Sound node, the Inspector Window will show the Sound property. To search for a sound, start typing in Tutorial 2. To select a sound, choose it from the results list below the search box. Once selected, you can preview a sound by clicking the play icon to the right of the search box.

For a complete list of sounds that can be accessed in Workbench, please open:

Folk Tale_Data/StreamingAssets/ConfigDefault/audio_groups.json

Show Package, then...

The node will Complete as soon as the sound is queued to play, and not after it finishes.

Please note that not all sounds can be previewed, and that loop sounds will continue to play indefinitely. We will improve sound preview in future patches.
Moving Characters

Commanding characters to move somewhere in the world requires three nodes: SpawnedCharacter, Position, and OrderMove.

Character Movement

SpawnedCharacter defines who moves. To set the SpawnPoint property on it's node, you need to exit Workbench temporarily by pressing Y. This takes you back to the world view in the Editor. Select a SpawnPoint character (it will have a red cube at their feet).

Character Movement: A Selected Spawn Point

With the Spawn Point selected, press Y to jump back into Workbench. Select the SpawnedCharacter node and click the SpawnPoint property. It will say Use selected, but when clicked it will swap to the character you selected in the world.

Repeat the process for position, selecting a nearby bush in the Editor, reverting back into Workbench, and clicking on the Obj property. At the moment the Editor doesn't feature Waypoints, which we'll be adding soon. We're using bushes as an example because they can be walked through. If we used a worldobject that included a navmesh cut, the character would stop short of its intended destination.
Framing The Camera

You can draw the players attention to a specific location by framing the camera. It will fly across the world from its current location to the point of interest.

Framing the camera

WorldObject nodes can be used to reference any object or point of interest in the world. Hide Workbench using Y, select a world object in the Editor, swap back to Workbench using Y, and with the WorldObject node selected, click on the Obj property in the inspector window.

The Distance Scale property of the Camera Frame is used to alter the distance the camera is from it's Target. 1.0 is the default. To double the distance, enter 2.0. To half the distance for a close-up, enter 0.5.

If you intend to deliver dialogue once the camera has arrived, factor in the travel time of the camera to arrive at the target, and use a Delay node to delay the start of the conversation.

Delaying conversations following framing of the camera
Modifying Inventory

The village inventory can be queried and modified using InventoryAdd, InventoryRemove and InventoryCount nodes.

Adding Inventory Items

For a complete list of items, please see the Game Guide Items Database.

When adding items to the inventory, remember to set the Count property to 1 or more. It's default value is 0.
NPC Dialogue

One of the most common aspects of RPG games is interacting with NPCs. In Workbench, this can be achieved using the Conversation node:

Creating Dialogue

Conversations are overlaid on the player's screen (placeholders for now until we implement the proper UI). The Text property is the introductory line delivered by the NPC to the player, and appears at the bottom of the screen. If you want the player to choose a response, you can provide text into the Option 1..4 properties, and these will appear to the left of the player's screen. Options left blank will not be shown.

Creating Dialogue

You can chain together conversations to allow for detailed NPC interaction. If you have branching quests, you may only want to show a response option if a condition has been met. For example, Option 2: Have you heard any rumours? could be displayed if the player is running an investigation into some stolen items.
Controlling Flow: When

When nodes allow you to control the flow of a script by presenting a condition gate, only allowing progression when specified conditions are met.

When node conditions are evaluated once per frame. On higher end gaming PCs, that means 60 times per second. You should bear this in mind when scripting for performance.

Conditional nodes make use of Math category nodes, including GreaterThan, GreaterOrEquals and Equals.

When Condition

The inverse of a condition can be obtained by using the Not node. So for example, t check if a statistic is Less Than 10, we could use a GreaterOrEquals node set to 10, followed by a Not node.

Obtaining An Inverse
Controlling Flow: If

If nodes allow you to control the flow of a script by presenting a condition gate, only allowing progression when specified conditions are met.

If node conditions are evaluated once only. If you wish for them to repeat, you will need to create a loop (be sure to use a delay!).

Conditional nodes make use of Math category nodes, including GreaterThan, GreaterOrEquals and Equals.

If Condition
Controlling Flow: Sequence

Sequence nodes allow you to control the flow of a script using branching. All sequence outputs run immediately, with up to four branches supported. If you require more branches, Sequence nodes can be chained.

Sequence Node