Tutorial 5: A court and its succession
What you will build
Section titled “What you will build”A court is a clan’s government. Its seats are court roles, and a role says who takes the seat when its holder dies. In this lesson you give the clan its seats, read the rule for the throne, and put House of Erik in the court. Then you write a scheme in which a prince is made Marshal, the king dies, and the scheme asks who holds the crown.
The idea is in Clans, roles and succession.
Before you start
Section titled “Before you start”You need Erik, Astrid, Runa and Ulf, with Runa and Ulf drawn as the children of Erik and Astrid. Tutorial 4 draws that family. Who counts as a relative comes from the family tree, so a court with no tree has nobody in line.
Part 1: roles and the rule
Section titled “Part 1: roles and the rule”1. Add a ready set of roles
Section titled “1. Add a ready set of roles”- In the page menu, choose Clans, then the Roles tab.
- Click Add Roles and choose Kingdom court (6 court roles).
A line under the table says how many roles were added. You should see Leader, Chancellor, Marshal, Steward, Spymaster and Councillor. Leader is rank 100 and has the titles King and Queen. A role whose name exists already is skipped. See Clans: Roles.
2. Read the rule for the throne
Section titled “2. Read the rule for the throne”Select Leader. It passes To relatives with the preset Eldest child and Gender Anyone. Under Succession, read the rows.
| Row | What it decides |
|---|---|
| Passes on | Not inherited, To relatives, or Decided in code. |
| Preset | The order of the groups: Eldest child, Youngest child, Oldest in the family, Highest rank in the clan, or Custom order. |
| Gender | Anyone, Men first, Women first, Men only, Women only. |
| Age | Oldest first or Youngest first among people of one group. |
| Who may inherit | Anyone, Members of the clan, or Members of the holder’s family. |
The Order list sits under Preset. If tied, Follow family lines, Minimum age and Chance of an upset sit between Age and Who may inherit. The line Reads as writes the whole rule as a sentence. Read it. It is your answer to who comes first, and the rest of this lesson checks your run against it.
To feel how a row works, change Gender to Women first and watch the sentence change. Then change it back. The first person in the line who may inherit is the heir. A heir the holder chose with Set Heir comes before the order. See Clans, roles and succession.
3. Seat the family in a clan
Section titled “3. Seat the family in a clan”- Open the Court tab. In the item picker, choose All clans, then click + New Clan. Name it
The Crown. - Open the Actors panel. Drag Erik onto the Leader band.
- Double-click Astrid, Runa and Ulf to add them with no role.
Roles nobody holds fold under a line such as 3 roles without holders. A card in a band is a member holding that role. See Clans: Court and overview.
Read the Leader band again. It shows the rule as a sentence, and No heir with a warning icon when nobody is in line. If it warns, check the family tree and the row Who may inherit.
Part 2: the scheme
Section titled “Part 2: the scheme”Create a scheme named The Crown Passes.
4. Give a role
Section titled “4. Give a role”- Drag from Start and add
Set Role. Actor is Conspirator. - In Role, pick Marshal. Leave If the seat is taken at Nothing changes.
- Drag from Not Given and add
Fail Scheme.
The card should read Conspirator becomes Marshal. Not Given runs when the role could not be given. See Set Role.
5. Let the king die
Section titled “5. Let the king die”Drag from Out and add Set State. Set Actor to Target. State is already Dead. It folds under Out and reads Target dies. See Set State.
6. Ask who holds the crown
Section titled “6. Ask who holds the crown”- Drag from Out again and add
Get Role Holder. - Leave Clan at its default, Conspirator’s clan. Set Role to Leader.
- In Store In, pick + New actor variable… and name it
Successor. - Drag from Found and add
Show Announcement. Title:The crown passes. Text:{target.Name} is dead. {scheme.Successor.Name} wears the crown.Then addSucceed Scheme. - Drag from Vacant and add
Show Announcement. Title:An empty throne. Text:{target.Name} is dead, and nobody is in line.Then addFail Scheme.
The card should read Who is Leader of Conspirator’s clan → Successor. Vacant leaves the variable empty. See Get Role Holder. Save with Cmd+S (Ctrl+S on Windows).
- Start, output Start, goes to Set Role.
- Set Role goes to Get Role Holder.
Check that it works
Section titled “Check that it works”- Click the arrow beside Run and choose Run with setup…. Set Conspirator to Ulf and Target to Erik. Under You play, choose Conspirator.
- Click Run.
The Log should show Set Role leaving through Out, then Get Role Holder leaving through Found or Vacant. The announcement card names the successor. Compare that name with the sentence under Reads as from step 2. The two should agree. If they do not, look for someone the sentence skips: a person who is dead, who may not inherit, who is outside the clan or family the rule asks for, or who already holds an equal or higher role.
A test run uses a copy, so Erik is alive in your database afterwards.
Then change the rule and run again. In the Leader’s Preset, choose Youngest child, run, and read the new sentence first. Set it back when you are done.
To ask the same question without killing anyone, use the checks Has Heir and Is Heir Of. They read the same rule. Choose who inherits shows them in use.
Mistakes and messages
Section titled “Mistakes and messages”- A band says No heir. Nobody in line passes the rule. Check the family tree and the Who may inherit row.
- Get Role Holder always leaves through Vacant. The seat is empty. Check that a card sits in the Leader band.
- A role is refused when you drop a card. The court says why: no seats for the role, or the role is full.
- The announcement shows braces. The scheme variable is empty or misspelled. Compare its name with the one in Store In.
Where to go next
Section titled “Where to go next”- Hand Over Role makes a holder step down and passes the seat at once.
- Tutorial 6: A plot with accomplices gathers people around a plot.
- Clans, roles and succession from code covers a rule decided in code.
- Loop over members walks through a court in a scheme.