With Intro Part 1 and Part 2 complete, let’s check out a mechanism!

## You are a Muffin

Inspired by Arnie the Doughnut by Laurie Keller, **You are a Muffin** is a solo journaling game.

You are a pastry in a cozy café, watching customers come and go. Each customer will place an order. There’s a chance that they might choose you as their snack, but that’s fine. After all, that’s why you were made.

As the hours pass, you’ll become a bit more stale.

The game continues until either you are consumed or the café closes.

## The Design

My goal for this game was to make a very light-hearted solo RPG that could be played in less than an hour. Nothing too complex, and no heavy decisions. Just a relaxing activity while listening to some lo-fi chill or jazz and drinking a latte.

At the same time, I wanted an ever-increasing threat of being eaten. There are many ways to do this, including Jenga stacking-block towers, drawing from a deck of cards, or changing the size of a dice pool.

The method I decided to use compares a simple 2d6 roll vs. an increasing target called Risk Value (RV). If both dice are less than the RV, you are eaten. Pretty simple!

## The Questions

The question is: **How many rounds will this game last on average?**

It’s meant to be a short game. We certainly wouldn’t want it dragging out for thirty rounds, and yet we don’t want it to finish in just a few rounds either.

There’s also a secondary question: **How stale will you be at the end of the game?**

This impacts the character sheet design, as players will be marking off a box for each incremental bit of staleness. I’d like to include just the right number of boxes on the sheet. Too many, and I’m wasting space. Too few, and everyone will be fully stale too early in the game.

Sure, we could do some probability math or use online dice rollers to calculate this. Having watched Jake Vanderplas’ Statistics for Hackers, my preferred method is to just simulate it!

## The Simulation

In the game each turn is one in-game hour. The Risk Value (RV) increases as the hour increases, starting at RV=1 at hour six (i.e. 6 am) and increasing by one every three hours. If the hour goes past twenty-three (i.e. 11 pm), the store closes and the game ends.

There are more elegant ways of writing this in Python, but this one works. If you have other suggestions, please leave them in the comments below!

```
while have_been_eaten == False and store_open == True:
if hour <= 8:
RV = 1
elif hour > 8 and hour <= 11:
RV = 2
elif hour > 11 and hour <= 14:
RV = 3
elif hour > 14 and hour <= 17:
RV = 4
elif hour > 17 and hour <= 20:
RV = 5
elif hour > 20 and hour <= 23:
RV = 6
elif hour > 23:
store_open = False
```

After the RV is set, we’ll roll 2d6 and compare both of them to the RV. If **both are less than the RV** then you are eaten by a hungry customer. Otherwise, continue and increase your staleness by 1d6.

```
# Roll 2d6
d1 = random.randint(1, 6)
d2 = random.randint(1, 6)
# Check for being eaten
if d1 < RV and d2 < RV:
have_been_eaten = True
times_eaten += 1
else:
# Increase staleness by 1d6
staleness += random.randint(1,6)
if staleness > 50:
staleness = 50
```

Here’s a single game iteration:

```
Iteration 0
6:00 d1=1, d2=3 vs. RV 1
7:00 d1=6, d2=1 vs. RV 1
8:00 d1=4, d2=5 vs. RV 1
9:00 d1=3, d2=5 vs. RV 2
10:00 d1=5, d2=6 vs. RV 2
11:00 d1=5, d2=6 vs. RV 2
12:00 d1=2, d2=1 vs. RV 3
You have been eaten. Both 2 and 1 are less than 3.
Completed 1 iterations.
Rounds Played: Min: 7, Max: 7, Avg: 7
Ending Staleness: Min: 23, Max: 23, Avg: 23.
```

The game started at 6 am and continued for seven rounds, ending at 12 pm. The RV at 12 pm is 3, and the 2d6 rolls were a 1 and a 2. Both were less than the RV, so you have been eaten and the game ends.

Now all we need to do is run that 10,000 times instead of just once:

```
Completed 10000 iterations.
Rounds Played: Min: 4, Max: 19, Avg: 10.3856
Ending Staleness: Min: 5, Max: 50, Avg: 35.6008.
Total times eaten: 9995
```

## Sim Results

So this tells us that a typical game of You Are A Muffin has anywhere from 4 - 19 rounds, with an average of about 10 rounds.

At the end of the game, your staleness will usually be anywhere between 5 and 50 with an average of 35. Note that there’s a hard limit of 50 for staleness.

It’s worth noting that 1uprpg’s playthrough ended after 13 turns and 31 staleness. Right in the expected range!

It’s also notable that the chance of the store closing before you are eaten is extremely small. This happened only 5 times out of 10,000 during this simulation run.

## Alternative methods

Ten rounds seems like a good place for the game, but what if we wanted something shorter?

We could change the mechanism so that if **either** of the 2d6 is less than RV, you are eaten. That’s an easy change, and then re-run the sim.

```
Completed 10000 iterations.
Rounds Played: Min: 4, Max: 7, Avg: 5.4996
Ending Staleness: Min: 3, Max: 35, Avg: 15.7519.
Total times eaten: 10000
```

That small change drops the average rounds to about 5 vs. 10. In the case of You Are A Muffin, this would mean you would (on average) rarely make it past 10 am in the coffee shop, which seemed too short.

We could also adjust it so if both of the 2d6 are **equal to or less than** the RV, you are eaten. This is a middle result, with an average number of rounds of 6. The problem is that this allows for failure in the very first round(s) of the game, even when the RV is 1. That’s not something I wanted.

## Other uses for RV

You might recognize the same RV mechanism in **Exclusion Zone Botanist**, with some small changes. The core idea of rolling 2d6 and comparing vs. an increasing target value is still there. In Exclusion Zone Botanist, however, it’s not a binary “eaten” vs. “not eaten”. Instead, you begin to accumulate “corruption” while being in the EZ forest.

If you’d like a printed copy of Exclusion Zone Botanist along with ten other awesome horror supplements from indie RPG designers, check out The Lost Bay Studio Fear Bundle! Pre-orders are open now!

What other progressive risk mechanisms are out there? Leave a comment with some of your favorites!

See you next week!

— E.P. 💀