Skip to content

Tutorial 4: A wedding and an heir

Runa, the king’s daughter, is to marry Halfdan, and nine months later they have a daughter. You will draw Runa’s house, tell the world how marriages work in it, and write a scheme that checks the match, makes the wedding and brings the child into the world.

Families are blood: the people born into a house and the partners who marry in. A clan, which is about government, comes in Tutorial 5. The ideas are in Families and marriage.

You need a database with five actors. Make them on the People tab of the Actors page, as in Set up your first scene.

Name Age Gender
Erik 60 Male
Astrid 55 Female
Runa 24 Female
Ulf 20 Male
Halfdan 26 Male
  1. In the page menu, choose Families. Click + in the toolbar and name the family House of Erik.
  2. Open the Actors panel on the left. Drag Erik, Astrid, Runa and Ulf onto the canvas. Do not add Halfdan.
  3. Drag Astrid’s card onto Erik’s. In the menu, choose Marry Erik…, then confirm the Marry window.
  4. Drag Runa’s card onto Erik’s and choose Child of Erik. Drag it onto Astrid’s and choose Child of Astrid. Do the same for Ulf.

You should see Erik and Astrid as a couple, with Runa and Ulf under them. Every edit is one undo step. A tree you draw is never refused, whatever the world’s rules say. See Families page.

With no card selected, the Element Inspector shows the family. Find Marriage and children. In In this family, choose The family passes through mothers.

The row says whose line carries the family when one of its members marries. The other choices are As the world does and The family passes through fathers. With this choice, a child of Runa should be born into House of Erik, whatever house Halfdan comes from.

  1. Open Home, then Settings. Find the card Marriage and families.
  2. In Marriage age, choose From an age and type 16.

World customs, such as Children belong to, have defaults that tell the usual story. Restrictions are off until you switch one on, and this is one. See Families and marriage.

  1. Open Schemes and click +. Name the scheme A Wedding and an Heir.
  2. Drag from Start and add Check Marriage.
  3. Set Check to Can marry. Set Actor to Conspirator and Other Actor to Target.
  4. Drag from False and add Fail Scheme. It folds under False.

The card should read Conspirator can marry Target. The defaults are the other way round, so you do swap them.

  1. Drag from True and add Marry. Its Actor is Conspirator and its Spouse is Target. Leave Lives with and Clan at their defaults, which follow the world’s custom.
  2. Drag from Refused and add Fail Scheme.

The card should read Conspirator marries Target. Refused runs when a wedding is not allowed. The check above asks the same question first, so that you hear no before the vows. See Marry.

  1. Drag from Married and add Wait. Set Length to 270 and keep Unit at Days.
  2. Drag from Out of the wait and add Create Actor.
  3. Set Create to A child of. Turn on Second Parent. Parent is Conspirator and Other Parent is Target.
  4. Set Name to Sigrid and Gender to Female.
  5. In Store In, pick + New actor variable… and name it Child.

The card should read New child of Conspirator and Target, Named “Sigrid” and → Child. Born into stays As the marriage says, so the child follows the home family of the marriage. See Create Actor.

  1. Drag from the output of Create Actor and add Show Announcement. Give it the title A child is born.
  2. In Text, write {scheme.Child.Name} is born to {conspirator.Name} and {target.Name}.
  3. Drag from the same output again and add Succeed Scheme.

Both fold under Out. The announcement should come first, because lines run from top to bottom. Save with Cmd+S (Ctrl+S on Windows).

Start
Check Marriage
Conspirator can marry Target
True
False
■ The scheme fails
Marry
Conspirator marries Target
Married
Refused
■ The scheme fails
Wait
Wait 270 days
Create Actor
New child of Conspirator and Target
Named "Sigrid"
→ Child
Announcement “A child is born”
■ The scheme succeeds
  • Start, output Start, goes to Check Marriage.
  • Check Marriage, output True, goes to Marry.
  • Marry, output Married, goes to Wait.
  • Wait goes to Create Actor.
The finished scheme. Each fold line is a change drawn as a line under an output.
  1. Click the arrow beside Run and choose Run with setup…. Set Conspirator to Runa and Target to Halfdan. Turn on Skip waits. Under You play, choose Conspirator.
  2. Click Run.

The Log in the Run tab should list the check, Marry leaving through Married, the wait, and Create Actor. An announcement card opens for you, and the run should end in Success. In Values, look for Child.

Now try the refusal. Change Ulf’s age to 14 on the People tab. Run with Ulf as Conspirator and Halfdan as Target. The marriage age rule should send the flow out of False, and the run should end in Failed. Set Ulf back to 20.

A test run works on a copy, so Sigrid is not in your database afterwards, and the family tree does not change. To see the child on the tree, play the scheme in the game.

The demo scheme Propose a Match uses the same pair: Check Marriage with the question can marry, then Marry with Married and Refused. It adds the head of the family, a dowry and a tie between two clans around them.

  • The wedding is always refused. Another restriction is on. Check Marriage and families in the settings.
  • The child is born into the other house. Read In this family on both families, and the world custom Children belong to. The partner with the higher role decides when two family customs disagree.
  • A card on the tree shows a rule chip. It is information. The tree allows what the world forbids.