Skip to content

Inside Natural Death

Natural Death is a scheme the world starts, not a player. Someone lies on a deathbed. The scheme asks who comes, what the dying person says, and who inherits, and then it kills them. It has 53 nodes and it uses loops, heirs and succession. Its Show in lists is Never, and it needs no target. In this scheme the Conspirator is the person who dies.

  • You want to see a For Each Actor loop with a Break Loop inside it.
  • You want to see a scheme that changes who inherits, and then ends a life.
  • You want to see how a system scheme is started by game code.

No dialogue starts it. The demo’s rules code does, once a month. RulesPeople.Deaths gives every living person a chance of dying that rises with age and with sickness, and as Health falls. The rates are about 11 deaths a year for 400 living people. A person at the edge, with Health below 20, adds a chance of their own. When the dice say so, the code starts Natural Death with the dying person as Conspirator and their eldest living child, or else their living spouse, as Target. At most three of any one system scheme start in a month. See The demo’s own code.

The one requirement is You live: the Conspirator must be alive.

Start
Set Objective
Your last days: set your house in order and say what must be said.
Add Modifier
Wait
Wait 5 days
Find Actor
Found
Not Found
Is AI
True
False
Chance
Success
Failure
Set Variable
Scheme: Peace + 1
Set Variable
Scheme: Absent = True
Set Variable
Scheme: Peace − 1
For Each Actor
Each
Done
Add Memory
Mourner remembers Mourned with me about Target
  • Start, output Start, goes to Set Objective.
  • Set Objective goes to Add Modifier.
  • Add Modifier goes to Wait.
  • Wait goes to Find Actor.
  • Find Actor, output Found, goes to Is AI.
  • Find Actor, output Not Found, goes to Set Variable.
  • Is AI, output True, goes to Chance.
  • Chance, output Success, goes to Set Variable.
  • Chance, output Failure, goes to Set Variable.
  • Set Variable goes to For Each Actor.
  • For Each Actor, output Each, goes to Add Memory.
The first days of Natural Death, drawn from sys-natural-death.json. The dialogue for a person's own choice and the branches after the mourning are not drawn.

The scheme sets an objective and puts a The last illness modifier on the Conspirator, which lowers Health by 25 for 20 days. It waits five days. A Find Actor node then picks the first living participant other than the Conspirator. Because the demo’s code gives the scheme a Target, that is normally the Target. With nobody, the scheme counts the death as a lonely one and subtracts 1 from a scheme variable, Peace.

For someone found, Is AI splits the road. A character nobody plays rolls the formula Bedside Odds. A person gets a dialogue instead: go at once, ride through the night for 10 marks (a roll of 65%), or stay. A visit adds 1 to Peace, and each of up to four other living children remembers Mourned with me. An absence sets Absent, subtracts 1 from Peace, and each child remembers Broke an oath.

Has Heir
Conspirator has an heir
True
False
Set Variable
Scheme: HasHeir = True
Show Dialogue
TOConspirator
The last word
The candle by the bed has burned to a stub, and nobody has been quick to change it.
Bless {target.Name} before the household, and name {target.him} heir of your seat.
Curse the one who stayed away, and take the seat out of their reach.
Say what you have hidden all your life.
Say nothing more. Close your eyes.
Is Heir Of
Attendant is the heir of Conspirator (court role)
True
False
Set Heir
Add Memory
Attendant remembers Blessed me at the last about Conspirator
Add Memory
Attendant remembers Cursed me at the last about Conspirator
Set May Inherit
Compare Variable
Scheme: Peace > 0
True
False
Succeed Scheme
Result: Success (ends when its flows end)
Fail Scheme
Result: Failure (ends when its flows end)
  • Has Heir, output True, goes to Set Variable.
  • Has Heir, output False, goes to Show Dialogue.
  • Set Variable goes to Show Dialogue.
  • Show Dialogue, output Bless {target.Name} before the household, and name {target.him} heir of your seat., goes to Is Heir Of.
  • Show Dialogue, output Curse the one who stayed away, and take the seat out of their reach., goes to Add Memory.
  • Show Dialogue, output Say nothing more. Close your eyes., goes to Compare Variable.
  • Is Heir Of, output True, goes to Add Memory.
  • Is Heir Of, output False, goes to Set Heir.
  • Set Heir goes to Add Memory.
  • Set May Inherit goes to Compare Variable.
  • Compare Variable, output True, goes to Succeed Scheme.
  • Compare Variable, output False, goes to Fail Scheme.
The last word and the verdict, drawn from sys-natural-death.json. The answer that reveals a secret leads to the loop drawn below; the blessing and the curse go on through nodes not drawn.

After two more days, Has Heir checks whether the Conspirator already has an heir to the court role. Then the dying person speaks in a dialogue called The last word. It offers four answers:

Answer When it is open What it does
Bless the target and name them heir The target is alive and Peace is above 0 Is Heir Of checks first. If they are not the heir yet, Set Heir makes them one. They remember Blessed me at the last, and Peace rises by 1.
Curse the one who stayed away The target is alive and Absent is true They remember Cursed me at the last, Peace falls by 2, and Set May Inherit says they may not inherit.
Say what you have hidden all your life The target is alive Starts the loop below.
Say nothing more Always Goes to the verdict.

The verdict is a Compare Variable node: Peace above 0 succeeds the scheme, anything else fails it. That is a good death or a bitter one. Neither result stops the dying. Both go on through the End node.

For Each Actor
Each
Done
Store Actor
Check State
Father is alive
True
False
Set Variable
Add Memory
Father remembers Told my secret about Attendant
Set Variable
Scheme: Revealed = True
Break Loop
No more rounds after this one
Compare Variable
Scheme: Revealed = True
True
False
  • For Each Actor, output Each, goes to Store Actor.
  • For Each Actor, output Done, goes to Compare Variable.
  • Store Actor goes to Check State.
  • Check State, output True, goes to Set Variable.
  • Set Variable goes to Add Memory.
  • Add Memory goes to Set Variable.
  • Set Variable goes to Break Loop.
The secret, drawn from sys-natural-death.json. Done leads to a check of the flag Revealed.

The secret goes through the children, eldest first. For each child, the scheme stores in the variable Father the actor kept in that child’s own variable True Father, and checks that the father is alive. If so, it adds 1 to the letters between the attendant and the father, makes the father remember Told my secret, sets Revealed and ends the loop with Break Loop. When Done comes, a check on Revealed decides whether the secret was told or the scheme looks for a lover or a rival to give letters to instead. See For Each Actor and Break Loop.

The End node routes the result: an announcement, A good death or A bitter death, goes to a player, then a line is written in the clan’s chronicle. After that Set State sets the Conspirator to Dead, and an announcement to every player says they are gone.

Everything that follows is the product’s and the demo’s. IM.onActorDeath fires first, before the dead person’s roles pass on. Then the roles pass on by the succession rule of each role. For a role that passes to relatives, the heir the holder chose with Set Heir comes first in the line, if that person may inherit. The demo’s DemoRules hears the death: when a clan’s head dies it waits until the clan has a head again, then starts Inheritance Proclamation at once, with the new head as Conspirator. If the dead person was played and nothing has moved the player after 90 days, the nearest living adult of the family is played. See Clans, roles and succession and Events reference.

The nodes: Find Actor, Set Heir, Set May Inherit, Set State and Is Heir Of. The next scheme is Give the Spurs, which changes roles on purpose.