# Having a Bash at Travel in BIND

They say you have to playtest, but they forget that I'm a lazy man, so when it came to travel rules, I didn't feel like simulating a bunch of journeys. So it's time to get the computer to do the work for me.

## Setup

An encounter roll occurs every 1D6 intervals in BIND (where an interval = 'one quarter of the day' = '6 hours').

Travel rates are around 10 miles per day for a caravan on a road, so to travel 50 miles, the troupe will need 5 days (i.e. 20 intervals). In bash, we can represent these rules as so:

```
1roll_an_encounter(){
2 encounters=0
3 miles=$1
4 intervals_required="$(calc $miles / 2.5 )"
5 while [ "$intervals_required" -gt 0 ]
6 do
7 encounter_time=$(( RANDOM %6 +1))
8 encounters=$(( encounters + 1 ))
9 intervals_required=$(calc $intervals_required - $encounter_time )
10 done
11 echo "Encounters: $encounters"
12}
```

Now we can plot a full journey of 30 miles with one command:

```
1roll_an_encounter 30
```

Some of the first or last encounters are sometimes replaced with traders, but the longer the journey, the less 'beginning' and 'end' there is.

```
1Time remaining: 8 intervals
2Time remaining: 6 intervals
3Time remaining: 3 intervals
4Time remaining: 2 intervals
5Time remaining: -2 intervals
6Encounters: 5
```

Currently, a good deal of journeys will be 30 miles, and 5 encounter rolls just seems too much!

The longest of journeys could go up to 80 miles (i.e. 8 days of travel).

```
1roll_an_encounter 80
```

This looks much worse...

```
1Time remaining: 26 intervals
2Time remaining: 22 intervals
3Time remaining: 20 intervals
4Time remaining: 19 intervals
5Time remaining: 17 intervals
6Time remaining: 12 intervals
7Time remaining: 9 intervals
8Time remaining: 6 intervals
9Time remaining: 3 intervals
10Time remaining: 0 intervals
11Encounters: 10
```

In fact, it's unplayable. This entire session would be a series of fights with various beasties - hardly 'background noise'!

## Halving Distance

Repeating that with half the usual distance, we can ask the computer for lots-and-lots of rolls, and get the following:

Journey | Min. | Max | Average |
---|---|---|---|

10 | 1 | 3 | 1.4 |

40 | 3 | 8 | 5 |

That looks rather more workable; perhaps a touch on the high side, but that's a burden for the rest of the system to bear. The best remedy here is keeping the encounters snappy, and fun.