Part 2 - Where Were You
Historic location is a kind of value. The historic locations are location 1, location 2, location 3, location 4, location 5, location 6, and death location.
The chronology location list is a list of historic locations that varies. The chronology location list is {location 1, location 2, location 3, location 4, location 5, location 6}.
A historic location has a list of people called the occupancy list.
Murder location is a historic location that varies.
Murder time is a time that varies.
Discovery location is a historic location that varies.
Discovery time is a time that varies. The discovery time is 11:59 PM.
A person has a number called the activity level.
A person has a time called the personal discovery time. The personal discovery time of a person is 11:59 PM.
Definition: A person (called the referenced person) is suspicious if the referenced person is the player or the referenced person is an NPC.
Table of Murder Chronology
Time | Person | Historic Location | Murder known |
10:00 AM | yourself | location 1 | false |
with 111 blank rows |
To choose the murder time and location:
now murder time is a random time between 11:00 AM and 10:00 PM;
sort the chronology location list in random order;
now murder location is entry 1 in the chronology location list;
if a random chance of 1 in 2 succeeds:
now discovery location is murder location;
let table-start time be murder time - 4 hours;
let table-end time be murder time + 4 hours;
choose row 1 in the Table of Murder Chronology;
blank out the whole row;
repeat with target person running through suspicious people:
now the activity level of target person is a random number between 0 and 5;
if the target person is an NPC:
now the target person is known;
let L be the table-start time;
sort the chronology location list in random order;
let the temporary location be entry 1 in the chronology location list; [This helps keep sedentary people sedentary.]
while L < the table-end time:
choose a blank row in the Table of Murder Chronology;
now time entry is L;
now person entry is target person;
if L is murder time:
if target person is the victim or target person is the murderer:
now historic location entry is the murder location;
otherwise:
sort the chronology location list in random order;
now historic location entry is entry 1 in the chronology location list;
while the historic location entry is the murder location and the target person is the player:
sort the chronology location list in random order;
now historic location entry is entry 1 in the chronology location list;
let the temporary location be entry 1 in the chronology location list;
otherwise if L > murder time and target person is the victim:
now historic location entry is death location;
otherwise if a random chance of the activity level of target person in 5 succeeds:
sort the chronology location list in random order;
now the historic location entry is entry 1 in the chronology location list;
let the temporary location be entry 1 in the chronology location list;
otherwise:
now the historic location entry is the temporary location;
let K be a random number between -1 and 1;
now the activity level of target person is the activity level of target person + K;
now L is L + 30 minutes;
DM "At [time entry], [person entry] was at [historic location entry].[line break]";
repeat with target location running through the historic locations:
now the occupancy list of the target location is { };
let the time tracker be the the table-start time;
while the time tracker <= the table-end time:
repeat with target location running through the historic locations:
repeat through the Table of Murder Chronology:
if the time tracker is the time entry and the target location is the historic location entry:
add the person entry to the occupancy list of the historic location entry;
DM "At [time tracker], ";
repeat with target location running through the historic locations:
if the occupancy list of the target location is { }:
DM "[target location] was empty.[line break]";
otherwise:
DM "[target location] contained [the occupancy list of the target location].[line break]";
repeat with target location running through the historic locations:
now the occupancy list of the target location is { };
now the time tracker is the time tracker + 30 minutes;
DM "The victim is [victim] and the murderer is [murderer]. The murder took place at [murder location] at [murder time].[line break]".