Tutorial 1: A cup for the king
What you will build
Section titled “What you will build”King Erik dines alone tonight, and Torsten carries his cup. You are the conspirator and you choose how the poison gets in. You can pay Torsten, if you have the coins. Or you can do it yourself and trust to luck.
That is one dialogue, one check on a number, one roll of chance, and two endings. It is a smaller cousin of the scheme on the home page. When you finish, you will have played every branch of it inside the Studio.
- Start, output Start, goes to Show Dialogue.
- Show Dialogue, output Bribe Torsten, goes to Compare Variable.
- Show Dialogue, output Do it myself, goes to Chance.
Before you start
Section titled “Before you start”- Finish Make your first scheme. This lesson takes folding for granted.
- You need a database with two actors: one to be the conspirator and one to be the king. Set up your first scene makes two. A test run reads the actors of your database.
- Start from an empty database or from the demo’s. You do not need the demo’s schemes.
1. Make the scheme
Section titled “1. Make the scheme”- Open the Studio. In the page menu, choose Schemes.
- Click + in the toolbar. Name the scheme
A Cup for the Kingand press Return.
You should see a Start node and an End node on an empty canvas. Leave End alone.
2. Give the scheme a number to keep
Section titled “2. Give the scheme a number to keep”Torsten takes coins. The scheme needs somewhere to keep how many you have.
- In the Library, at the bottom of the left side, open the Scheme tab.
- Type
Coinsin the field that reads (New Variable Name). - Open the menu Add Variable and choose Integer.
- In the row that appears, set the starting value to
20.
You should see a row Coins, with the type Integer and the value 20. The row Accomplices is above it and says built in. Every run of the scheme starts with 20 coins. See Library.
3. Ask how the poison gets in
Section titled “3. Ask how the poison gets in”- Drag from the output of Start onto empty canvas. Type
Show Dialogueand press Return. - Select the node. In Title, write
A Cup for the King. - In Text, write
King Erik dines alone tonight, and Torsten carries his cup. How does the poison get in? - Under Choices, click the choice Ok. In its Text field, write
Bribe Torsten. - Click Add Choice. The new choice reads New choice. Change its Text to
Do it myself.
Show To is already Conspirator, so the dialogue is yours to answer. You should see two outputs on the node, named after the two choices. Link every choice: a choice with nothing behind it ends the flow without a word. See Show Dialogue.
4. Check the coins
Section titled “4. Check the coins”- Drag from the Bribe Torsten output onto empty canvas. Type
Compare Variableand press Return. - In the inspector, click the button of Variable. It reads Select…. A window titled Which variable? opens.
- Under THIS SCHEME, click Coins.
- Set Comparison to ≥ Greater or Equal and Value to
15.
The card should read Scheme: Coins ≥ 15. A scheme variable is always written with the word Scheme in front. The node has two outputs, True and False. See Compare Variable.
5. Pay him and succeed
Section titled “5. Pay him and succeed”- Drag from True onto empty canvas. Type
Set Variableand press Return. - Click its Variable button, then Coins under THIS SCHEME.
- Set Operation to Subtract and Value to
15. - Drag from True again. Type
Succeed Schemeand press Return.
Both new nodes should fold into lines under True. If they show as cards, the setting Fold new changes is off. See Folding: Then also.
A new line goes under the last one, and the lines run from top to bottom, so the payment comes before the result. The first line should read Scheme: Coins − 15 and the second ■ The scheme succeeds.
6. Fail when he is not paid
Section titled “6. Fail when he is not paid”Drag from False onto empty canvas. Type Fail Scheme and press Return. It folds under False and reads ■ The scheme fails.
7. Do it yourself
Section titled “7. Do it yourself”- Drag from the Do it myself output onto empty canvas. Type
Chanceand press Return. - Set Chance (%) to
35. - Drag from Success and add
Succeed Scheme. Drag from Failure and addFail Scheme.
The card should read 35% chance. The default is 50, so you changed it. See Chance.
8. Save
Section titled “8. Save”Press Cmd+S (Ctrl+S on Windows).
Check that it works
Section titled “Check that it works”A test run plays the scheme in a copy of your world, so nothing in your database changes. The full list of controls is in Test run.
- Click the small arrow beside Run and pick Run with setup….
- Under Cast, choose a Conspirator and a Target. Under You play, choose Conspirator.
- Click Run.
The dialogue should open as a card beside its node. Press 1 or click Bribe Torsten.
What you should see: the run bar ends with Success, and the Log in the Run tab lists the nodes the flow took. In the Values section, Coins should show 5, with 20 struck through.
Now try the other ways.
| Try | What should happen |
|---|---|
Change the starting value of Coins to 10, then run and bribe again. |
The check is False, and the run ends in Failed. |
Change it back to 20. Run again and pick Do it myself. |
The dice decide. About a third of the runs end in Success. |
| In the setup window, set the row for the Chance node to Always take Success, then Failure. | The run ends the same way every time. |
| After a few runs, read Paths in the Run tab. | It counts the branches you have seen. Each unseen branch has Run to here. |
Keep running until every branch has been seen. Shift+F5 stops a run.
If something does not work
Section titled “If something does not work”- The check says Missing variable. The variable was renamed or deleted. Pick Coins again in Which variable?.
- Compare Variable shows an error on its card. You have not chosen a variable yet. Its text reads No variable until you do.
- The Chance node never fails. Its Chance (%) is 100, or a bonus raises it. Check the card line.
- A card shows a warning or an error. Read the line it gives. Problems, notes and validation lists the messages.
Where to go next
Section titled “Where to go next”- Tutorial 2: Who may start it adds rules about who may begin this scheme at all.
- Tutorial 3: Gold and words moves the coins from the scheme to the actor and writes them into the text.
- Dialogues and announcements explains the window you used.
- Chance, dice and seeds says how the dice behave.
- Odds and random branches and Conditional choices are the same ideas as short recipes.