Skip to content
Snippets Groups Projects
Commit ae954bea authored by Eric Oulashin's avatar Eric Oulashin Committed by Rob Swindell
Browse files

Good Time Trivia 1.03: Fixes to score reading & parsing. Q&A files can have...

Good Time Trivia 1.03: Fixes to score reading & parsing. Q&A files can have more flexible metadata. Added more questions.
parent 528fe0b2
Branches
Tags
No related merge requests found
...@@ -27,6 +27,7 @@ scoreSoFarText=C ...@@ -27,6 +27,7 @@ scoreSoFarText=C
clueHdr=RH clueHdr=RH
clue=GH clue=GH
answerAfterIncorrect=G answerAfterIncorrect=G
answerFact=G
[CATEGORY_ARS] [CATEGORY_ARS]
dirty_minds=AGE 18 dirty_minds=AGE 18
......
...@@ -15,9 +15,24 @@ Date Author Description ...@@ -15,9 +15,24 @@ Date Author Description
The game can now post scores in (networked) message sub-boards as The game can now post scores in (networked) message sub-boards as
a backup to using a JSON DB server in case the server can't be a backup to using a JSON DB server in case the server can't be
contacted. contacted.
2023-01-03 Eric Oulashin Version 1.03 beta
Started working on allowing Q&A files to have a section of JSON
metadata, and also for its answers to possibly be a section of
JSON containing multiple possible answers. JSON metadata in
a QA file may have the following properties (all optional):
category_name: The name of the category
ARS: An ARS string that can restrict usage of the category
"-- Answer metadata begin"/"-- Answer metadata end" sections
need to have an "answers" property, which is an array of
acceptable answers (as strings). It can also optionally have an
"answerFact" property, to specify an interesting fact about
the answer.
Fixed a bug in reading local scores and parsing them, which
affected saving local scores and showing local scores.
2023-01-14 Eric Oulashin Version 1.03
Releasing this version
*/ */
"use strict"; "use strict";
...@@ -41,8 +56,8 @@ if (system.version_num < 31500) ...@@ -41,8 +56,8 @@ if (system.version_num < 31500)
} }
// Version information // Version information
var GAME_VERSION = "1.02"; var GAME_VERSION = "1.03";
var GAME_VER_DATE = "2022-12-08"; var GAME_VER_DATE = "2023-01-14";
// Determine the location of this script (its startup directory). // Determine the location of this script (its startup directory).
// The code for figuring this out is a trick that was created by Deuce, // The code for figuring this out is a trick that was created by Deuce,
...@@ -259,7 +274,7 @@ while (continueOn) ...@@ -259,7 +274,7 @@ while (continueOn)
console.print("\x01n\x01cReturning to \x01y\x01h" + system.name + "\x01n\x01c...\x01n"); console.print("\x01n\x01cReturning to \x01y\x01h" + system.name + "\x01n\x01c...\x01n");
mswait(1000); mswait(500);
// End of script execution. // End of script execution.
...@@ -320,15 +335,15 @@ function playTrivia() ...@@ -320,15 +335,15 @@ function playTrivia()
console.crlf(); console.crlf();
// Load and parse the section filename into questions, answers, and points // Load and parse the section filename into questions, answers, and points
var QAArray = parseQAFilename(qaFilenameInfo[chosenSectionIdx].filename); var QAArray = parseQAFile(qaFilenameInfo[chosenSectionIdx].filename);
shuffle(QAArray); shuffle(QAArray);
console.print("There are " + QAArray.length + " questions in total."); console.print("There are " + add_commas(QAArray.length, 0) + " questions in total.");
console.crlf(); console.crlf();
// Each element in QAArray is an object with the following properties: // Each element in QAArray is an object with the following properties:
// question // question
// answer // answer
// numPoints // numPoints
console.print("\x01n\x01gWill ask \x01h" + gSettings.behavior.numQuestionsPerPlay + "\x01n\x01g questions.\x01n"); console.print("\x01n\x01gWill ask up to \x01h" + gSettings.behavior.numQuestionsPerPlay + "\x01n\x01g questions.\x01n");
console.crlf(); console.crlf();
console.print("\x01n\x01gYou can answer \x01hQ\x01n\x01g at any time to quit.\x01n"); console.print("\x01n\x01gYou can answer \x01hQ\x01n\x01g at any time to quit.\x01n");
console.crlf(); console.crlf();
...@@ -368,7 +383,12 @@ function playTrivia() ...@@ -368,7 +383,12 @@ function playTrivia()
console.print("Clue:"); console.print("Clue:");
console.crlf(); console.crlf();
console.attributes = "N" + gSettings.colors.clue; console.attributes = "N" + gSettings.colors.clue;
console.print(partiallyHiddenStr(QAArray[i].answer, tryI-1) + "\x01n"); var clueAnswer = "";
if (typeof(QAArray[i].answer) === "string")
clueAnswer = QAArray[i].answer;
else if (Array.isArray(QAArray[i].answer))
clueAnswer = QAArray[i].answer[0];
console.print(partiallyHiddenStr(clueAnswer, tryI-1) + "\x01n");
console.crlf(); console.crlf();
} }
// Prompt for an answer // Prompt for an answer
...@@ -410,9 +430,23 @@ function playTrivia() ...@@ -410,9 +430,23 @@ function playTrivia()
console.print("The answer was:"); console.print("The answer was:");
console.crlf(); console.crlf();
console.attributes = "N"; console.attributes = "N";
printWithWordWrap(answerWhenIncorrectColor, QAArray[i].answer); var theCorrectAnswer = "";
if (typeof(QAArray[i].answer) === "string")
theCorrectAnswer = QAArray[i].answer;
else if (Array.isArray(QAArray[i].answer))
theCorrectAnswer = QAArray[i].answer[0];
printWithWordWrap(answerWhenIncorrectColor, theCorrectAnswer);
console.attributes = "N"; console.attributes = "N";
} }
if (QAArray[i].hasOwnProperty("answerFact") && typeof(QAArray[i].answerFact) === "string" && QAArray[i].answerFact.length > 0)
{
console.crlf();
console.attributes = "N" + gSettings.colors.questionHdr;
console.print("Fact:");
console.crlf();
printWithWordWrap(attrCodeStr("N" + gSettings.colors.answerFact), QAArray[i].answerFact, true);
console.crlf();
}
// Print the user's score so far // Print the user's score so far
console.crlf(); console.crlf();
...@@ -733,15 +767,75 @@ function getQACategoriesAndFilenames() ...@@ -733,15 +767,75 @@ function getQACategoriesAndFilenames()
{ {
// Get the section name - Start by removing the .qa filename extension // Get the section name - Start by removing the .qa filename extension
var filenameExtension = file_getext(QAFilenames[i]); var filenameExtension = file_getext(QAFilenames[i]);
// sectionName is the filename without the extension, but the section name can also be specified by
// JSON metadata in the Q&A file
var sectionName = file_getname(QAFilenames[i]); var sectionName = file_getname(QAFilenames[i]);
var charIdx = sectionName.lastIndexOf("."); var charIdx = sectionName.lastIndexOf(".");
if (charIdx > -1) if (charIdx > -1)
sectionName = sectionName.substring(0, charIdx); sectionName = sectionName.substring(0, charIdx);
// Currently, sectionName is the filename without the extension.
// Open the file to see if it has a JSON metadata section specifying a section name, etc.
// Note: If its metadata has an "ars" setting, then we'll use that instead of
// any ARS setting that may be in gttrivia.ini for this section.
var sectionARS = null;
var QAFile = new File(QAFilenames[i]);
if (QAFile.open("r"))
{
var fileMetadataStr = "";
var readingFileMetadata = false;
var haveSeenAllFileMetadata = false;
while (!QAFile.eof && !haveSeenAllFileMetadata)
{
var fileLine = QAFile.readln(2048);
// I've seen some cases where readln() doesn't return a string
if (typeof(fileLine) !== "string")
continue;
fileLine = fileLine.trim();
if (fileLine.length == 0)
continue;
//-- QA metadata begin" and "-- QA metadata end"
if (fileLine === "-- QA metadata begin")
{
fileMetadataStr = "";
readingFileMetadata = true;
continue;
}
else if (fileLine === "-- QA metadata end")
{
readingFileMetadata = false;
haveSeenAllFileMetadata = true;
continue;
}
else if (readingFileMetadata)
fileMetadataStr += fileLine + " ";
}
QAFile.close();
// If we've read all the file metadata lines, then parse it & use the metadata.
if (haveSeenAllFileMetadata && fileMetadataStr.length > 0)
{
try
{
var fileMetadataObj = JSON.parse(fileMetadataStr);
if (typeof(fileMetadataObj) === "object")
{
if (fileMetadataObj.hasOwnProperty("category_name") && typeof(fileMetadataObj.category_name) === "string")
sectionName = fileMetadataObj.category_name;
if (fileMetadataObj.hasOwnProperty("ARS") && typeof(fileMetadataObj.ARS) === "string")
sectionARS = fileMetadataObj.ARS;
}
}
catch (error) {}
}
}
// See if there is an ARS string for this in the configuration, and if so, // See if there is an ARS string for this in the configuration, and if so,
// only add it if the ARS string passes for the user. // only add it if the ARS string passes for the user.
var addThisSection = true; var addThisSection = true;
if (gSettings.category_ars.hasOwnProperty(sectionName)) if (typeof(sectionARS) === "string")
addThisSection = bbs.compare_ars(sectionARS);
else if (gSettings.category_ars.hasOwnProperty(sectionName))
addThisSection = bbs.compare_ars(gSettings.category_ars[sectionName]); addThisSection = bbs.compare_ars(gSettings.category_ars[sectionName]);
// Add this section/category, if allowed // Add this section/category, if allowed
if (addThisSection) if (addThisSection)
...@@ -760,13 +854,16 @@ function getQACategoriesAndFilenames() ...@@ -760,13 +854,16 @@ function getQACategoriesAndFilenames()
return sectionsAndFilenames; return sectionsAndFilenames;
} }
// Parses a Q&A filename // Parses a Q&A file with questions and answers
//
// Parameters:
// pQAFilenameFullPath: The full path & filename of the trivia Q&A file to read
// //
// Return value: An array of objects containing the following properties: // Return value: An array of objects containing the following properties:
// question: The trivia question // question: The trivia question
// answer: The answer to the trivia question // answer: The answer to the trivia question
// numPoints: The number of points to award for the correct answer // numPoints: The number of points to award for the correct answer
function parseQAFilename(pQAFilenameFullPath) function parseQAFile(pQAFilenameFullPath)
{ {
if (!file_exists(pQAFilenameFullPath)) if (!file_exists(pQAFilenameFullPath))
return []; return [];
...@@ -777,9 +874,14 @@ function parseQAFilename(pQAFilenameFullPath) ...@@ -777,9 +874,14 @@ function parseQAFilename(pQAFilenameFullPath)
var QAFile = new File(pQAFilenameFullPath); var QAFile = new File(pQAFilenameFullPath);
if (QAFile.open("r")) if (QAFile.open("r"))
{ {
var inFileMetadata = false; // Whether or not we're in the file metadata question (we'll skip all of this for the questions & answers)
var theQuestion = ""; var theQuestion = "";
var theAnswer = ""; var theAnswer = "";
var theNumPoints = -1; var theNumPoints = -1;
var readingAnswerMetadata = false;
var doneReadintAnswerMetadata = false; // For immediately after done reading answer JSON
var answerIsJSON = false;
var component = "Q"; // Q/A/P for question, answer, points
while (!QAFile.eof) while (!QAFile.eof)
{ {
var fileLine = QAFile.readln(2048); var fileLine = QAFile.readln(2048);
...@@ -790,23 +892,69 @@ function parseQAFilename(pQAFilenameFullPath) ...@@ -790,23 +892,69 @@ function parseQAFilename(pQAFilenameFullPath)
if (fileLine.length == 0) if (fileLine.length == 0)
continue; continue;
// Skip any file metadata lines (those are read in getQACategoriesAndFilenames())
if (fileLine === "-- QA metadata begin")
{
inFileMetadata = true;
continue;
}
else if (fileLine === "-- QA metadata end")
{
inFileMetadata = false;
continue;
}
if (inFileMetadata)
continue;
if (theQuestion.length > 0 && theAnswer.length > 0 && theNumPoints > -1) if (theQuestion.length > 0 && theAnswer.length > 0 && theNumPoints > -1)
{ {
QA_Array.push(new QA(theQuestion, theAnswer, +theNumPoints)); addQAToArray(QA_Array, theQuestion, theAnswer, theNumPoints, answerIsJSON);
theQuestion = ""; theQuestion = "";
theAnswer = ""; theAnswer = "";
theNumPoints = -1; theNumPoints = -1;
readingAnswerMetadata = false;
doneReadintAnswerMetadata = false;
answerIsJSON = false;
component = "Q";
} }
if (theQuestion.length == 0) if (component === "Q")
{
theQuestion = fileLine; theQuestion = fileLine;
else if (theAnswer.length == 0) component = "A"; // Next, set answer
}
else if (component === "A")
{
// Possible JSON for multiple answers
if (fileLine === "-- Answer metadata begin")
{
readingAnswerMetadata = true;
answerIsJSON = true;
theAnswer = "";
continue;
}
else if (fileLine === "-- Answer metadata end")
{
readingAnswerMetadata = false;
doneReadintAnswerMetadata = true;
}
if (readingAnswerMetadata)
theAnswer += fileLine + " ";
else
{
if (doneReadintAnswerMetadata)
doneReadintAnswerMetadata = false;
else
theAnswer = fileLine; theAnswer = fileLine;
else if (theNumPoints < 1) component = "P"; // Next, set points
}
}
else if (component === "P")
{ {
theNumPoints = +(fileLine); theNumPoints = +(fileLine);
if (theNumPoints < 1) if (theNumPoints < 1)
theNumPoints = 10; theNumPoints = 10;
component = "Q"; // Next, set question
} }
// Older: Each line in the format question,answer,numPoints // Older: Each line in the format question,answer,numPoints
...@@ -829,18 +977,71 @@ function parseQAFilename(pQAFilenameFullPath) ...@@ -829,18 +977,71 @@ function parseQAFilename(pQAFilenameFullPath)
QAFile.close(); QAFile.close();
// Ensure we've added the last question & answer, if there is one // Ensure we've added the last question & answer, if there is one
if (theQuestion.length > 0 && theAnswer.length > 0 && theNumPoints > -1) if (theQuestion.length > 0 && theAnswer.length > 0 && theNumPoints > -1)
QA_Array.push(new QA(theQuestion, theAnswer, +theNumPoints)); addQAToArray(QA_Array, theQuestion, theAnswer, theNumPoints, answerIsJSON);
} }
return QA_Array; return QA_Array;
} }
// QA object constructor // QA object constructor
function QA(pQuestion, pAnswer, pNumPoints) function QA(pQuestion, pAnswer, pNumPoints, pAnswerFact)
{ {
this.question = pQuestion; this.question = pQuestion;
this.answer = pAnswer; this.answer = pAnswer;
this.numPoints = pNumPoints; this.numPoints = pNumPoints;
if (this.numPoints < 1) if (this.numPoints < 1)
this.numPoints = 10; this.numPoints = 10;
if (typeof(pAnswerFact) === "string" && pAnswerFact.length > 0)
this.answerFact = pAnswerFact;
}
// Helper for parseQAFile(): Adds a question, answer, and # points to the Q&A array
//
// Parameters:
// QA_Array (INOUT): The array to add the Q/A/Point sets to
// theQuestion: The question (string)
// theAnswer: The answer (string)
// theNumPoints: The number of points to award (number)
// answerIsJSON: Boolean - Whether or not theAnswer is in JSON format or not (if JSON, it contains
// multiple possible answers)
function addQAToArray(QA_Array, theQuestion, theAnswer, theNumPoints, answerIsJSON)
{
// If the answer is a JSON object, then there may be multiple acceptable answers specified
var addAnswer = true;
var answerFact = null;
if (answerIsJSON)
{
try
{
var answerObj = JSON.parse(theAnswer);
if (typeof(answerObj) === "object")
{
if (answerObj.hasOwnProperty("answers") && Array.isArray(answerObj.answers) && answerObj.answers.length > 0)
{
// Make sure all answers in the array are non-zero length
theAnswer = [];
for (var i = 0; i < answerObj.answers.length; ++i)
{
if (answerObj.answers[i].length > 0)
theAnswer.push(answerObj.answers[i]);
}
// theAnswer is an array
addAnswer = (theAnswer.length > 0);
}
else if (answerObj.hasOwnProperty("answer") && typeof(answerObj.answer) === "string" && answerObj.answer.length > 0)
theAnswer = answerObj.answer;
else
addAnswer = false;
if (answerObj.hasOwnProperty("answerFact") && answerObj.answerFact.length > 0)
answerFact = answerObj.answerFact;
}
else
addAnswer = false;
}
catch (error)
{
addAnswer = false;
}
}
if (addAnswer) // Note: theAnswer is converted to an object if it's JSON
QA_Array.push(new QA(theQuestion, theAnswer, +theNumPoints, answerFact));
} }
// Shuffles an array // Shuffles an array
...@@ -871,6 +1072,11 @@ function shuffle(pArray) ...@@ -871,6 +1072,11 @@ function shuffle(pArray)
// Match is case-insensitive. If it's a 1-word answer, then it should match exactly. Otherwise, // Match is case-insensitive. If it's a 1-word answer, then it should match exactly. Otherwise,
// a Levenshtein distance is used. // a Levenshtein distance is used.
// //
// Properties:
// pAnswer: The answer to the question. This can either be a string (for a single answer) or an array of
// strings (if multiple answers are acceptable)
// pUserInput: The user's response to the question (string)
//
// Return value: An object with the following properties: // Return value: An object with the following properties:
// userChoseQuit: Boolean: Whether or not the user chose to quit // userChoseQuit: Boolean: Whether or not the user chose to quit
// userInputMatchedAnswer: Boolean: Whether or not the user's answer matches the given answer to the question // userInputMatchedAnswer: Boolean: Whether or not the user's answer matches the given answer to the question
...@@ -881,14 +1087,13 @@ function checkUserResponse(pAnswer, pUserInput) ...@@ -881,14 +1087,13 @@ function checkUserResponse(pAnswer, pUserInput)
userInputMatchedAnswer: false userInputMatchedAnswer: false
}; };
if (typeof(pAnswer) !== "string" || typeof(pUserInput) !== "string") // pAnswer should be a string or an array, and pUserInput should be a string
if (!(typeof(pAnswer) === "string" || Array.isArray(pAnswer))|| typeof(pUserInput) !== "string")
return retObj; return retObj;
if (pUserInput.length == 0) if (pUserInput.length == 0)
return retObj; return retObj;
// Convert both to uppercase for case-insensitive matching var userInputUpper = pUserInput.toUpperCase(); // For case-insensitive matching
var answerUpper = pAnswer.toUpperCase();
var userInputUpper = pUserInput.toUpperCase();
if (userInputUpper == "Q") if (userInputUpper == "Q")
{ {
...@@ -896,6 +1101,23 @@ function checkUserResponse(pAnswer, pUserInput) ...@@ -896,6 +1101,23 @@ function checkUserResponse(pAnswer, pUserInput)
return retObj; return retObj;
} }
// In case there are multiple acceptable answers, make an array (or copy it) so
// we can check the user's response against all acceptable answers
var acceptableAnswers = null;
if (typeof(pAnswer) === "string")
acceptableAnswers = [ pAnswer.toUpperCase() ];
else if (Array.isArray(pAnswer))
{
acceptableAnswers = [];
for (var i = 0; i < pAnswer.length; ++i)
acceptableAnswers.push(pAnswer[i].toUpperCase());
}
else
return retObj; // pAnswer isn't valid here, so just return with a 'false' response
// Check the user's response against the acceptable answers
for (var i = 0; i < acceptableAnswers.length && !retObj.userInputMatchedAnswer; ++i)
{
var answerUpper = acceptableAnswers[i].toUpperCase();
// If there are spaces in the answer, then do a Levenshtein comparison. Otherwise, // If there are spaces in the answer, then do a Levenshtein comparison. Otherwise,
// do an exact match. // do an exact match.
if (answerUpper.indexOf(" ") > -1) if (answerUpper.indexOf(" ") > -1)
...@@ -915,6 +1137,7 @@ function checkUserResponse(pAnswer, pUserInput) ...@@ -915,6 +1137,7 @@ function checkUserResponse(pAnswer, pUserInput)
retObj.userInputMatchedAnswer = (levDist <= MAX_LEVENSHTEIN_DISTANCE); retObj.userInputMatchedAnswer = (levDist <= MAX_LEVENSHTEIN_DISTANCE);
} }
} }
}
return retObj; return retObj;
} }
...@@ -998,11 +1221,8 @@ function updateScoresFile(pUserCurrentGameScore, pLastSectionName) ...@@ -998,11 +1221,8 @@ function updateScoresFile(pUserCurrentGameScore, pLastSectionName)
{ {
if (scoresFile.open("r")) if (scoresFile.open("r"))
{ {
var scoreFileArray = scoresFile.readAll(); var scoreFileContents = scoresFile.read(scoresFile.length);
scoresFile.close(); scoresFile.close();
var scoreFileContents = "";
for (var i = 0; i < scoreFileArray.length; ++i)
scoreFileContents += (scoreFileArray[i] + "\n");
try try
{ {
scoresObj = JSON.parse(scoreFileContents); scoresObj = JSON.parse(scoreFileContents);
...@@ -1207,11 +1427,10 @@ function showLocalScores() ...@@ -1207,11 +1427,10 @@ function showLocalScores()
var scoresFile = new File(SCORES_FILENAME); var scoresFile = new File(SCORES_FILENAME);
if (scoresFile.open("r")) if (scoresFile.open("r"))
{ {
var scoreFileArray = scoresFile.readAll(); var scoreFileContents = scoresFile.read(scoresFile.length);
scoresFile.close(); scoresFile.close();
var scoreFileContents = ""; try
for (var i = 0; i < scoreFileArray.length; ++i) {
scoreFileContents += (scoreFileArray[i] + "\n");
var scoresObj = JSON.parse(scoreFileContents); var scoresObj = JSON.parse(scoreFileContents);
for (var prop in scoresObj) for (var prop in scoresObj)
{ {
...@@ -1219,6 +1438,15 @@ function showLocalScores() ...@@ -1219,6 +1438,15 @@ function showLocalScores()
scoresObj[prop].last_trivia_category, scoresObj[prop].last_time)); scoresObj[prop].last_trivia_category, scoresObj[prop].last_time));
} }
} }
catch (error)
{
log(LOG_ERR, GAME_NAME + " - Parsing local scores: Line " + error.lineNumber + ": " + error);
bbs.log_str(GAME_NAME + " - Parsing local scores scores: Line " + error.lineNumber + ": " + error);
console.attributes = "N" + gSettings.colors.error;
console.print("* Line: " + error.lineNumber + ": " + error);
console.crlf();
}
}
// Sort the array: High total score first // Sort the array: High total score first
sortedScores.sort(userScoresSortTotalScoreHighest); sortedScores.sort(userScoresSortTotalScoreHighest);
} }
...@@ -1774,11 +2002,8 @@ function postGTTriviaScoresToSubBoard(pSubCode) ...@@ -1774,11 +2002,8 @@ function postGTTriviaScoresToSubBoard(pSubCode)
{ {
if (scoresFile.open("r")) if (scoresFile.open("r"))
{ {
var scoreFileArray = scoresFile.readAll(); var scoreFileContents = scoresFile.read(scoresFile.length);
scoresFile.close(); scoresFile.close();
var scoreFileContents = "";
for (var i = 0; i < scoreFileArray.length; ++i)
scoreFileContents += (scoreFileArray[i] + "\n");
try try
{ {
scoresForThisBBS[BBS_ID].user_scores = JSON.parse(scoreFileContents); scoresForThisBBS[BBS_ID].user_scores = JSON.parse(scoreFileContents);
...@@ -1990,6 +2215,17 @@ function readGTTriviaScoresFromSubBoard(pSubCode) ...@@ -1990,6 +2215,17 @@ function readGTTriviaScoresFromSubBoard(pSubCode)
return scoreUpdateSucceeded; return scoreUpdateSucceeded;
} }
function add_commas(val, pad)
{
var s = val.toString();
s = s.replace(/([0-9]+)([0-9]{3})$/,"$1,$2");
while (s.search(/[0-9]{4}/)!=-1)
s = s.replace(/([0-9]+)([0-9]{3}),/g,"$1,$2,");
while (s.length < pad)
s = " " + s;
return(s);
}
// Parses command-line arguments. Returns an object with settings/actions specified. // Parses command-line arguments. Returns an object with settings/actions specified.
// //
// Parameters: // Parameters:
......
-- QA metadata begin
{
"category_name": "Dirty Minds",
"ARS": "AGE 18"
}
-- QA metadata end
I can be used for stroking. You hold me by my hard end. If I'm too stiff, I can make you raw. I can be used for stroking. You hold me by my hard end. If I'm too stiff, I can make you raw.
Hair brush Hair brush
10 10
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
Source diff could not be displayed: it is too large. Options to address this: view the blob.
Source diff could not be displayed: it is too large. Options to address this: view the blob.
-- QA metadata begin
{
"category_name": "Star Trek (general)"
}
-- QA metadata end
In Gene Roddenberry's original treatment for Star Trek, what was the name of the Starship?
-- Answer metadata begin
{
"answers": ["Yorktown", "Starship Yorktown"]
}
-- Answer metadata end
10
Who was the first actor to play a member of all three of the major alien races in Star Trek?
Mark Lenard
10
What two stars of Star Trek: Deep Space Nine were married in real life in 1997?
-- Answer metadata begin
{
"answers": ["Alexander Siddig and Nana Visitor", "Nana Visitor and Alexander Siddig", "Alexander Siddig Nana Visitor", "Nana Visitor Alexander Siddig", "Alexander Siddig, Nana Visitor", "Nana Visitor, Alexander Siddig"]
}
-- Answer metadata end
10
What is Sulu's primary position on the U.S.S. Enterprise?
Helmsman
10
Which Star Trek captain has an artificial heart?
-- Answer metadata begin
{
"answers": ["Jean-Luc Picard", "Picard"]
}
-- Answer metadata end
10
Captain Picard has an artificial heart because a member of what species stabbed him?
Nausicaan
10
Who was the first real astronaut to appear in any Star Trek episode?
-- Answer metadata begin
{
"answers": ["Mae C Jemison", "Mae C. Jemison"]
}
-- Answer metadata end
10
NBC rejected the pilot for "Star Trek." What famous comedian got them to take another look?
Lucille Ball
10
What is Deanna Troi's favorite food?
Chocolate
10
What weapon did Kirk and Spock use when they fought for possession of T'Pring during Spock's Pon farr ritual in "Amok Time"?
A lirpa
10
Who was originally cast as Captain Janeway?
Genevieve Bujold
10
Which character serves as the head of security for the space station Deep Space Nine?
Odo
10
Who created the Bajoran wormhole?
-- Answer metadata begin
{
"answers": ["Prophets", "The Prophets"]
}
-- Answer metadata end
10
What type of weapons technology does a phaser use?
Particle-beam weapons
10
In which Star Trek series did writer Larry Niven introduce the cat-like alien race, the Kzinti, into the Star Trek universe?
-- Answer metadata begin
{
"answers": ["Animated Series", "The Animated Series", "Star Trek: The Animated Series", "TAS"]
}
-- Answer metadata end
10
What species, known to the Borg as "species 329", were deemed unworthy of assimilation?
-- Answer metadata begin
{
"answers": ["Kazon", "The Kazon"]
}
-- Answer metadata end
10
In the Mirror universe, what has replaced the United Federation of Planets?
Terran Empire
10
What was the name of Data's cat?
Spot
10
Even though Klingon is a real language you can speak now, what Trek actor help create it?
James Doohan
10
What is Lieutenant Uhura's first name?
Nyota
15
What was Seven of Nine's name before she was assimilated by the Borg?
Annika Hansen
10
Who was the first Vulcan science officer aboard the starship Enterprise?
T'Pol
10
Who was the first Star Trek actor to write a Star Trek story?
Walter Koenig
10
What future Starfleet captain survived the Battle of Wolf 359?
-- Answer metadata begin
{
"answers": ["Sisko", "Benjamin Sisko", "Ben Sisko"]
}
-- Answer metadata end
10
Who serves as the communications officer in the final episode of Star Trek: The Original Series?
-- Answer metadata begin
{
"answers": ["Lisa", "Lt. Lisa", "Lt Lisa", "Lieutenant Lisa"]
}
-- Answer metadata end
10
Which of the following was not a founding species of the United Federation of Planets? Andorians, Tellarites, Bajorans, or Vulcans?
-- Answer metadata begin
{
"answers": ["Bajorans", "The Bajorans"]
}
-- Answer metadata end
10
Which alien race did Ronald Reagan say reminded him of Congress?
Klingons
10
Who played Captain Pike's first officer in "The Cage?"
-- Answer metadata begin
{
"answers": ["Majel Barrett"],
"answerFact": "Majel Barrett was Star Trek creator Gene Roddenberry's wife in real life"
}
-- Answer metadata end
10
Whose voice was the voice of the computer in most of the Original Series and in The Animated Series, The Next Gneration, Deep Space 9, Voyager, and Enterprise?
-- Answer metadata begin
{
"answers": ["Majel Barrett"],
"answerFact": "Majel Barrett, Gene Roddenberry's wife, made phonetic recordings of her voice in 2016 so that her voice could continue to be used. Rod Roddenberry (her and Gene's son) made the recordings with her."
}
-- Answer metadata end
10
Before Kirk, who was Captain of the Enterprise in the pilot episode of the original Star Trek series?
-- Answer metadata begin
{
"answers": ["Christopher Pike", "Captain Pike", "Captain Christopher Pike"]
}
-- Answer metadata end
10
Which comedian had a role written for them in "Star Trek IV" that they ultimately turned down?
Eddie Murphy
10
Which Star Trek captain suffers from androgenic alopecia?
Captain Picard
10
What character dies in the series finale of Star Trek: Enterprise?
-- Answer metadata begin
{
"answers": ["Trip Tucker", "Charles Trip Tucker III", "Charles Trip Tucker the third", "Trip"]
}
-- Answer metadata end
10
Who is the youngest captain in Starfleet history?
-- Answer metadata begin
{
"answers": ["James Kirk", "James T Kirk", "James T. Kirk", "James Tiberius Kirk", "Jim Kirk", "Captain Kirk", "Kirk"]
}
-- Answer metadata end
10
What actress turned down the role of Seven of Nine four times?
Jeri Ryan
10
Who is captain Jonathan Archer (of the NX-01 in "Star Trek: Enterprise") played by?
Scott Bakula
10
What famous character was named after a pilot Gene Roddenberry had met during WWII?
-- Answer metadata begin
{
"answers": ["Khan", "Khan Noonien Singh"]
}
-- Answer metadata end
10
Which Trek movie featured the first entirely CG sequence in film history?
-- Answer metadata begin
{
"answers": ["Wrath of Khan", "The Wrath of Khan"]
}
-- Answer metadata end
10
What was Majel Barrett's first role on Star Trek?
-- Answer metadata begin
{
"answers": ["First officer", "1st officer", "Number One, Captain Pike's first officer", "Number One", "Number 1", "Captain Pike's first officer", "Pike's first officer", "Pike's 1st officer"]
}
-- Answer metadata end
10
What is the Klingon homeworld?
-- Answer metadata begin
{
"answers": ["Kronos", "Q'onoS", "Qo'noS"]
}
-- Answer metadata end
10
What type of fish does Captain Picard keep in his ready room?
Lionfish
10
Which Star Trek character was trapped in a transporter buffer for 75 years?
-- Answer metadata begin
{
"answers": ["Montgomery Scott", "Scotty"]
}
-- Answer metadata end
10
What is Mr. Chekhov's first name?
Pavel
10
What is Mr. Chekov's full name?
Pavel Andreievich Chekov
10
What is Captain Kirk's middle name?
Tiberius
5
Which Star Trek captain loves baseball?
-- Answer metadata begin
{
"answers": ["Sisko", "Benjamin Sisko", "Ben Sisko", "Captain Sisko"]
}
-- Answer metadata end
10
What medical condition did William Shatner and Leonard Nimoy both suffer as a result of standing too close to a special effect explosion?
Tinnitus
10
Who was Spock's mother?
Amanda Grayson
10
Which Star Trek series has a female Chief Engineer?
Voyager
10
Which Chief Medical Officer is a Denobulan?
Phlox
10
Which Star Trek captain was forced to impersonate a historical figure to preserve the timeline?
-- Answer metadata begin
{
"answers": ["Sisko", "Benjamin Sisko", "Ben Sisko", "Captain Sisko"]
}
-- Answer metadata end
10
What character asks Data if he is "fully functional"?
Tasha Yar
10
Who was the first Kelpien to enter Starfleet?
Saru
10
What were the last words of the last episode of Star Trek: The Original Series?
If only
10
Who was originally offered the role of Spock?
Martin Landau
10
Which species was the first to discover warp drive?
Vulcans
10
According to Klingon mythology, what is the place where all life began?
QI'tu'
10
Thanks to Trek fans, NASA named a space shuttle "Enterprise." What was it going to be called before?
Constitution
10
Which Trek actor was shot six times on D-Day?
-- Answer metadata begin
{
"answers": ["James Doohan"],
"answerFact": "James Doohan came up with the basic sounds of the Vulcan and Klingon languages for The Motion Picture"
}
-- Answer metadata end
10
Which Next Generation species was meant to be introduced as a replacement for Klingons as a major enemy?
Ferengi
10
What Star Trek character was labeled "unknown sample" when discovered by Bajoran scientists?
Odo
10
According to results from the 2013 Star Trek Convention, what was the 7th best "Star Trek " film ever?
Galaxy Quest
10
What was the first ship James T. Kirk served on?
-- Answer metadata begin
{
"answers": ["Farragut", "U.S.S. Farragut", "USS Farragut"]
}
-- Answer metadata end
10
What ship is Sulu assigned when he's promoted to captain?
-- Answer metadata begin
{
"answers": ["Excelsior", "U.S.S. Excelsior", "USS Excelsior"]
}
-- Answer metadata end
10
Which infamous episode of "The Next Generation" is considered the series' worst?
Shades of Grey
10
What type of pet does Captain Archer have on Enterprise?
Beagle
10
Which character has appeared in more episodes than any other in all of Trek history?
Worf
10
In what year was Star Trek: The Motion Picture released?
1979
10
What actor from Star Trek: The Original Series lost his right middle finger during World War II?
James Doohan
10
Which TNG actor was so convinced the show would fail they never bothered to unpack their bags for over a month?
Patrick Stewart
10
Trek famously reuses actors in many alien roles. Who was the first to play a Vulcan, a Romulan, and a Klingon?
Mark Lenard
10
Captain Picard played a flute in an episode of "The Next Generation" that went up for auction in 2006. How much money did it go for?
-- Answer metadata begin
{
"answers": ["48,000 dollars", "48000 dollars", "$48,000", "$48000", "48000"]
}
-- Answer metadata end
10
How many different characters has actor Jeffrey Combs played in the "Star Trek" universe?
-- Answer metadata begin
{
"answers": ["Eight", "8"]
}
-- Answer metadata end
10
What character was adopted by the Vulcan ambassador Sarek?
Michael Burnham
10
What is the name of the Klingon Commander who ordered the death of Kirk's son David?
Commander Kruge
10
What species' motto is 'Victory is life'?
-- Answer metadata begin
{
"answers": ["Jem'Hadar", "Jem Hadar"]
}
-- Answer metadata end
10
Chief O'Brien's wife, Keiko, is the station's schoolteacher, but what is her trained profession?
Botanist
10
What mentor to Benjamin Sisko was the host of the Dax symbiote before Jadzia?
Curzon
10
What ship was Picard on before the Enterprise?
-- Answer metadata begin
{
"answers": ["Stargazer", "The Stargazer"]
}
-- Answer metadata end
10
Ziyal is the daughter of which evil mastermind?
Gul Dukat
10
What does Deanna love almost as much as life itself?
-- Answer metadata begin
{
"answers": ["Chocolate", "Chocolates"]
}
-- Answer metadata end
10
What is the name of the first "Star Trek" movie?
-- Answer metadata begin
{
"answers": ["The Motion Picture", "Star Trek: The Motion Picture"]
}
-- Answer metadata end
10
What is the name of the vessel that makes first contact with the Vulcans in "Star Trek: First Contact"?
-- Answer metadata begin
{
"answers": ["Phoenix", "The Phoenix"]
}
-- Answer metadata end
10
Under the Treaty of Armens established between the Federation and the Sheliak Corporate, what planet does the Federation cede?
-- Answer metadata begin
{
"answers": ["Tau Cygna V", "Tau Cygna 5"]
}
-- Answer metadata end
10
What influential member of the Duras family does Mogh suspect has conspired with the Romulans to overthrow the Klingon emperor?
Ja'rod
10
Who was the first Starfleet captain to encounter the Borg after the events in "Star Trek: First Contact" slightly altered linear history?
-- Answer metadata begin
{
"answers": ["Archer", "Jonathan Archer", "Jon Archer"]
}
-- Answer metadata end
10
Which is the only crew member of the Enterprise-D ever to attempt suicide and succeed?
Dan Kwan
10
Which of the following is related to Guinan, the El-Aurian Enterprisde-D bartender?
Terkim
10
Which "Deep Space Nine" crew member goes MIA during the course of the series?
-- Answer metadata begin
{
"answers": ["Sisko", "Benjamin Sisko", "Ben Sisko", "Captain Sisko"]
}
-- Answer metadata end
10
What was the unusual property of the drink known as a Samarian sunset?
-- Answer metadata begin
{
"answers": ["Changed color", "It changed color", "Changes color", "It changes color"]
}
-- Answer metadata end
10
In "Star Trek: Voyager", Captain Janeway is well known for drinking coffee. She wasn't the only one though. Who had a two pot limit per day of a type of coffee called Landras blend?
-- Answer metadata begin
{
"answers": ["Torres", "Lt. Torres", "Lt Torres", "Lieutenant Torres", "B'Elanna Torres"]
}
-- Answer metadata end
10
Who is the engineer aboard the U.S.S Enterprise-E?
Geordi La Forge
10
Naomi Wildman appears aboard which starship?
Voyager
10
We all know Deanna's mother made several appearances and other mothers appeared from time to time. Whose mother did we never see played by an actress?
-- Answer metadata begin
{
"answers": ["Beverly's", "Beverly", "Beverly Crusher's", "Beverly Crusher"]
}
-- Answer metadata end
10
Worf hadn't always worn a gold uniform. What color did he wear in the first season?
Red
10
In what season of The Next Generation did Riker first appear with his beard?
-- Answer metadata begin
{
"answers": ["Second", "2nd", "2"]
}
-- Answer metadata end
10
Which crewmember was it implied that Data became intimate with?
-- Answer metadata begin
{
"answers": ["Tasha Yar", "Yar"]
}
-- Answer metadata end
10
Who did Data serve as 'father of the bride' for?
Keiko
10
In the episode where Data was having dreams, who did he dream was a cake?
-- Answer metadata begin
{
"answers": ["Troi", "Deanna Troi"]
}
-- Answer metadata end
10
Which famous mystery character does Data like to be in the holodeck?
Sherlock Holmes
10
Which of the following body parts is the oldest on Data's body?
-- Answer metadata begin
{
"answers": ["Head", "His head"]
}
-- Answer metadata end
10
Q was responsible for introducing the crew of the Enterprise D to which race?
-- Answer metadata begin
{
"answers": ["Borg", "The Borg"]
}
-- Answer metadata end
10
Where is the Borg's native territory?
-- Answer metadata begin
{
"answers": ["Delta Quadrant", "The Delta Quadrant"]
}
-- Answer metadata end
10
What gift did Chakotay present to the Captain in 'Year of Hell' as a birthday present?
Pocket watch
10
What is the given name of the Bajoran liaison officer of Deep Space Nine?
Nerys
10
What is the military rank of Doctor Julian Bashir?
Lieutenant
10
Who invented the duotronic computer system used on the USS Enterprise?
Richard Daystrom
10
What is the Vulcan marriage ritual called?
Koon-ut-kal-if-fee
15
What was the name of the wheat like grain in the episode 'The Trouble with Tribbles'?
Quadrotriticale
10
What was Max's nickname for B'Elanna in 'Equinox'?
BLT
15
What is the name of the race that the Kazon hate?
Trabe
10
In the episode 'Author, Author,' what is the name of the ship the Doc uses in his holonovel?
Vortex
10
What were the name for the people that inhabited the water world?
Monean
10
What was the name of the device used to circumvent the memories of the Voyager crew in the episode 'The Killing Game'?
Neural Interface
10
What name does the Q, who is granted asylum aboard 'Voyager', adopt once he becomes human in the episode 'Death Wish'?
Quinn
10
Who is the quote on 'Voyager's' registration plaque by?
Alfred Lord Tennyson
15
What was the name of Chakotay's father?
Kolopak
10
-- QA metadata begin
{
"category_name": "The Office (2005 US TV show)"
}
-- QA metadata end
Where does Michael Scott move to start his new life with Holly?
Boulder, Colorado
10
What are the names of Jim and Pam Halpert's kids?
-- Answer metadata begin
{
"answers": ["Cecelia and Phillip", "Cecelia \"Cece\" and Phillip", "Phillip and Cecilia", "Cecilia, Phillip", "Phillip, Cecilia"]
}
-- Answer metadata end
10
Which of Angela's cats did Dwight kill?
-- Answer metadata begin
{
"answers": ["Sprinkles"],
"answerFact": "The casting team originally wanted John Krasinskito audition for the role of Dwight, and he ended up convincing them he would be better off as Jim Halpert."
}
-- Answer metadata end
10
Who was Pam engaged to before Jim?
Roy
5
At Phyllis' wedding, Michael revealed that her nickname in high school was what?
Easy Rider
10
Which Grammy nominee played Andy's brother Walter?
Josh Groban
10
Who was hired as Michael Scott's replacement before he moved?
Deangelo Vickers
10
What was the name of Jan Levinson's assistant at corporate?
Hunter
10
How many minutes did Michael Scott work at the office?
-- Answer metadata begin
{
"answers": ["9,986,000", "9,986,000 minutes", "9,986,000", "9986000"],
"answerFact": "Steve Carell almost didn't get to play Michael Scott because he was committed to another NBC show called Come to Papa. When that didn't work out, he was able to commit to The Office."
}
-- Answer metadata end
10
Who won "Hottest in the Office" at Michael's last Dundies?
Danny Cordray
10
Who came up with Suck It?
David Wallace
10
Michael and Dwight tried to steal clients from which local competing business?
Prince Family Paper
10
How many brothers does Jim Halpert have?
-- Answer metadata begin
{
"answers": ["Two", "2"],
"answerFact": "When John Krasinski auditioned for Jim, he accidentally told the executive producer that he was worried they were going to mess up the show since he liked the British version so much."
}
-- Answer metadata end
10
What was the name of Stanley Hudson's mistress?
Cynthia
10
Kelly gave out what as party favors at her America's Got Talent finale party?
Coffee mugs
10
How much does Bob Vance bid on a hug from his wife Phyllis?
-- Answer metadata begin
{
"answers": ["$1000", "$1,000", "1000", "One thousand dollars", "A thousand dollars"]
}
-- Answer metadata end
10
Schrute boys must learn how many rules before the age of 5?
-- Answer metadata begin
{
"answers": ["Forty", "40"]
}
-- Answer metadata end
10
What was Plop's actual name?
Pete
10
Who did Michael end up taking to Jamaica?
Jan
10
Ryan caused the fire at the office warming up what?
-- Answer metadata begin
{
"answers": ["Cheese pita", "A cheese pita"],
"answerFact": "B.J. Novak (Ryan Howard) went to the same high school as John Krasinski (Jim), Brian Baumgartner (Kevin), and Ed Helms (Andy Bernard)."
}
-- Answer metadata end
10
What was the name of Andy's a cappella group at Cornell?
Here Comes Treble
10
Who came in first place in the Michael Scott's Dunder-Mifflin Scranton Meredith Palmer Memorial Celebrity Rabies Awareness Pro-Am Fun Run Race for the Cure?
-- Answer metadata begin
{
"answers": ["Toby Flenderson", "Toby"]
}
-- Answer metadata end
10
Finish Dwight's security code: "The tea in Nepal is very hot..."
But the coffee in Peru is much hotter
10
What is the name of the building security guard?
Hank
10
What does Dwight always keep an extra set of in his car for special occasions?
-- Answer metadata begin
{
"answers": ["Birkenstocks"],
"answerFact": "The casting team originally wanted John Krasinskito audition for the role of Dwight, and he ended up convincing them he would be better off as Jim Halpert."
}
-- Answer metadata end
10
Pam and Jim's first kiss took place where?
-- Answer metadata begin
{
"answers": ["Chili's"],
"answerFact": "Jenna Fischer (Pam Beesly) kept the engagement ring that Jim gave Pam. She admitted on Twitter that it's just a silver ring that isn't worth anything, but she has held onto it anyway."
}
-- Answer metadata end
10
What is the title of Michael Scott's spy movie?
Threat Level Midnight
10
What is the name of Kevin, Kelly, Erin and Meredith's trivia team?
The Einsteins
10
What is Erin Hannon's real name?
Kelly
10
Who did Kevin get for Secret Santa?
-- Answer metadata begin
{
"answers": ["Himself", "Kevin"]
}
-- Answer metadata end
10
What is Pam's favorite yogurt flavor?
Mixed berry
10
What is the name of Pam, Oscar and Toby's club?
The Finer Things Club
10
Ryan's son Drake Howard is allergic to what fruit?
Strawberries
10
What is the name of Dwight's porcupine?
Henrietta
10
Who was on the jury for the Scranton Strangler case?
Toby
10
What username does Michael pick for an online dating service?
Little Kid Lover
10
Which Harry Potter book did Dwight say he'd take to a desert island?
Harry Potter and the Prisoner of Azkaban
10
What season did Michael leave The Office?
-- Answer metadata begin
{
"answers": ["Seven", "7", "Season 7", "7th season", "Seventh season", "The seventh season", "The 7th season", "7th"]
}
-- Answer metadata end
10
Dwight brought who as his date to Michael and Jan's dinner party?
-- Answer metadata begin
{
"answers": ["His former babysitter", "Former babysitter", "Babysitter"],
"answerFact": "The casting team originally wanted John Krasinskito audition for the role of Dwight, and he ended up convincing them he would be better off as Jim Halpert."
}
-- Answer metadata end
10
What nickname does Andy give Jim?
-- Answer metadata begin
{
"answers": ["Big Tuna", "Tuna"],
"answerFact": "John Krasinski (Jim) did a lot of research on Scranton and paper companies after getting the role of Jim. He shot footage of Scranton that ended up appearing in the opening credits of the show."
}
-- Answer metadata end
10
While playing Who Would You Do in the office, Michael says he'd have sex with which coworker?
Ryan
10
Michael likes waking up to the smell of what in the morning?
Bacon
10
What is the name of Kevin Malone's band?
Scrantonicity
10
Jim bought Pam's engagement ring how long after they started dating?
-- Answer metadata begin
{
"answers": ["One week", "1 week", "A week"],
"answerFact": "The episode when Jim proposed to Pam included the most expensive shot ever at $250,000. The crew had to build a replica of a gas station and rest stop for the proposal scene, since filming it at an actual gas station would have cost $100,000."
}
-- Answer metadata end
10
Since Michael can't pay for his tots' college education, what does he offer them instead?
-- Answer metadata begin
{
"answers": ["Laptop batteries", "Lithium batteries", "Lithium laptop batteries", "Laptop lithium batteries"]
}
-- Answer metadata end
10
What is the worst thing about prison, according to Prison Mike?
-- Answer metadata begin
{
"answers": ["Dementors", "The Dementors"]
}
-- Answer metadata end
10
Meredith has a Ph.D. in what?
School Psychology
10
What is Dwight's all-time favorite movie?
The Crow
10
What was the name of Michael's former boss who was decapitated?
Ed Truck
10
Who was the regional manager of the Stamford branch?
Josh Porter
10
Who would rather work for an "upturned broom" than work for somebody else in the office besides themselves?
Phyllis
10
Who refers to Michael, Dwight, and Andy as "that jackass, that other jackass, and that new jackass"?
-- Answer metadata begin
{
"answers": ["Bob Vance", "Bob Vance (of Vance Refrigeration)", "Bob Vance of Vance Refrigeration"]
}
-- Answer metadata end
10
Who sneezed in Pam's tea and then asid, "Don't worry, it's just allergies"?
-- Answer metadata begin
{
"answers": ["Michael", "Michael Scott"]
}
-- Answer metadata end
10
Who actually thought up the idea for WUPHF, Ryan's social media platform?
Kelly
10
Who told Michael to "start over" after Michael called him an idiot?
Darryl
10
Who referred to golf betting games as "Skins, Acee Deucee, Bingo Bango Bongo, Sandies, Barkies" and "Wolf"?
Kevin
10
Who wanted people to be afraid of how much they love him?
-- Answer metadata begin
{
"answers": ["Michael", "Michael Scott"]
}
-- Answer metadata end
5
Who did Michael refer to as "booster seat" when he wanted her to stop talking?
Angela
10
Who got lost in Dwight's corn maze?
Kevin
10
Who thought the phrase was "not to be truffled with" instead of "not to be trifled with"?
-- Answer metadata begin
{
"answers": ["Michael", "Michael Scott"]
}
-- Answer metadata end
5
When trying to prove his foot dexterity, who dumped a mug of hot coffee into his lap?
Dwight
10
Who did Michael think was the smartest person in the office?
Oscar
10
Who kept a list of everyone who wronged him?
Ryan
10
Who was finally able to don the Santa suit, thoroughly pissing Michael off?
Phyllis
10
Who said to Andy, "Talk to me that way again, and I'll cut your face off"?
Erin
10
Who hit Dwight in the face with a snowball during a "dusting"?
Jim
10
Who has been trying to get on jury duty every year since he was 18 years old so he can sit in "an air-conditioned room, downtown, judging people, with paid lunch"?
Stanley
10
Who thanked the Scranton Strangler for taking "one more person's breath away"?
-- Answer metadata begin
{
"answers": ["Michael", "Michael Scott"]
}
-- Answer metadata end
10
Who dressed up as a sexy nurse for the Halloween contest?
Angela
10
Who was Dwight dressed like when he started attacking Jim in the office with snowballs?
Pam
10
Who was obsessed with a capella and was a member of Here Comes Treble?
-- Answer metadata begin
{
"answers": ["Andy", "Andy Bernard", "The Nard-Dog", "The Nard Dog"]
}
-- Answer metadata end
10
Who couldn't deal with how "coddled the modern anus" was?
Darryl
10
Who started the fire, prompting Dwight to rewrite the Billy Joel song?
Ryan
10
Who was the secretary of Knights of the Night?
Dwight
10
Who wanted Cheez Whis to put on his broccoli?
Kevin
10
Who got strangled by the Scranton Strangler when he visited him in jail?
Toby
10
Who stole Meredith's painkillers in the hospital?
Creed
10
On the wall of Mr. Choo's Chinese Restaurant, who was in a photo holding up a sign that said "THIEF"?
Creed
10
Who called the bedroom her gym?
Phyllis
10
Who told Angela that the only premature baby in the room was the one her baby ate?
Oscar
10
Who was only a little "stitious"?
-- Answer metadata begin
{
"answers": ["Michael", "Michael Scott"]
}
-- Answer metadata end
5
When interviewing for the manager position, who said she was "not easy to manager"?
Kelly
10
Whom did Dwight want to give a post-apocalypse "knapsack filled with canned goods, chainsaw, gasoline, and emergency radio" in case they woke up?
Deangelo
10
As Stonewall Alliance Trivia night, who wrote "The California Raisins" instead of "The Grapes of Wrath" as an answer?
Kevin
10
Who did Dwight think takes 50 minutes to style his hair?
Jim
10
Who became the receptionist, and loved it, while most of the office was in FLorida at Sabre for training?
Andy
10
Aside from Michael, who else had a World's Best Boss mug on his desk?
David
10
Who was planking on top of the cabinet in Andy's office?
Kelly
10
Which character was fired in the second season during downsizing and rehired in the last episode?
Devon
10
Who played Voodoo Mama Juju, the witch doctor, in the murder game played at the office?
Angela
10
At the Scranton Humane Society Fundraiser, who ended up adopting 12 dogs in a fit to upstage Robert, the senator?
-- Answer metadata begin
{
"answers": ["Andy", "Andy Bernard", "The Nard-Dog", "The Nard Dog"]
}
-- Answer metadata end
10
Who pretended to be Lloyd Gross, a fictional salesman who was invented to get around the sales commission cap, when an angry Syracuse branch employee confronted Scranton?
Toby
10
Who created a chore wheel that had no chores when the custodian went on vacation for a month?
Pam
10
Who thought the phrase "euthenize this place" meant adding youthful energy into the office?
-- Answer metadata begin
{
"answers": ["Michael", "Michael Scott"]
}
-- Answer metadata end
5
Who wanted to own a decommissioned lighthouse that would launch into space?
Stanley
10
Who was nicknamed "Plop" by Andy?
Pete
10
Who wore a fake moustache and said, "Bye, Stanley. I love you" during a series of pranks that proved Stanley never noticed anything?
Pam
10
Who kidnapped Angela during her bachelorette party?
Mose
10
Who thought Dunder-Mifflin was a dog food company?
Creed
10
When Dwight claimed that he embraced germs because they made him stronger, who sneezed on his toast, which he then ate reluctantly? - Phyllis, Jim or Andy?
Andy
5
What job did Creed think he had at the office? - Perceptionist, Inequality Manager, or "Quabity Assurance"?
Quabity Assurance
5
What dish did Kevin spend all weekend cooking only to spill it all over the carpet when he brought it in to share? - Kevin's Famous Chili, Kevin's Famous Frank 'n' Beans, or Kevin's Famous Buffalo Wings?
-- Answer metadata begin
{
"answers": ["Chili", "Kevin's Famous Chili"]
}
-- Answer metadata end
5
What was the title of Michael Scott's spy movie? - "I'm Scarn, Michael Scarn", "Threat Level Midnight", or "Nightfall Atomic"?
Threat Level Midnight
5
What did Dwight do to catch people in the act of doing something wrong? - Whip open doors, yell "GOTCHA" every time he walked into a room, or hide under tables?
Whip open doors
5
Whta nickname did Packer give Gabe? - Yo Game-a Gabe-a, Gabewad, or Gabey Baby?
Gabewad
5
What present did Pam make Jim for Christmas? - Bounded book of his Dwight pranks, a comic book titled "The Adventures of Jimmy Halpert", or a portrait of CeCe?
-- Answer metadata begin
{
"answers": ["Comic book", "A comic book titled The Adventures of Jimmy Halpert"]
}
-- Answer metadata end
5
What did the yellow sticker at Dwight's desk say? - FROGGY 101, EAT BRATS, or GOJU RU KARATE?
FROGGY 101
5
What was Kevin's '80s cover band called? - Paper Pirates, Dunder Shred, or Scrantonicity?
Scrantonicity
5
Which of the following resolutions did Creed want to accomplish: A cartwheel, meet a loose woman, or floss?
-- Answer metadata begin
{
"answers": ["Cartwheel", "A cartwheel"]
}
-- Answer metadata end
5
Which type of bed did Michael sleep on, as revealed to Pam? - A bunk ped, a futon, or a California king?
-- Answer metadata begin
{
"answers": ["Futon", "A futon"]
}
-- Answer metadata end
5
Which holiday did Meredith beg Ryan and Kelly to stop fighting on because she wanted "one perfect day a yaer" with "no hassles, no problems, no kids"? - Halloween, St. Patrick's Day, or Pretzel Day?
St. Patrick's Day
5
"Michael Scott's Dunder-Mifflin Scranton Meredith Palmer Memorial Celebrity (blank) Awareness Pro-Am Fun Run Race for the Cure" was for which disease? - Rabies, nymphomania, or pica?
Rabies
5
Which Dundie did Angela NOT win? - Kind of a Bitch Award, Tight-Ass Award, or Most Cats Award?
Most Cats Award
5
Other than Pam and Holly, who was the only female to have said, "That's what she said"? - Jan, Meredith, or Phyllis?
Jan
5
What sound did Dwight play after Erin broke up with Gabe during her Dundie acceptance speech? - Car horn, applause, or crickets?
Crickets
5
Which was NOT one of Angela's cats? - Tinkie, Cornstock, or Meowsus?
Meowsus
10
Which fruit did PHyillis use to describe Angela's "little head"? - Grape, kiwi, or blueberry?
Grape
5
When Kevin tried to convince his coworkers that he's also had sex in the office, which phrase did he use to convince them she was real? - She lives in Canada, she's from another school, or you don't know her?
She's from another school
5
What was the brand name of the ladies' suit Michael found in a bin people were frantically going through and wore to the office? - MISSterious, Sassafras, or Modern Womyn?
MISSterious
5
After Michael and Deangelo caught Meredith in a walk of shame home, what did she offer as incentive to get them to stay for breakfast? - Saucers, napkins, or chairs?
Napkins
5
Where did Phyllis take Kevin before they went out as a team to go on sales calls? - Bar for liquid courage, grocery store for snacks, or beauty salon for a makeover?
-- Answer metadata begin
{
"answers": ["Beauty salon for a makeover", "Beauty salon"]
}
-- Answer metadata end
5
What did Dwight want to be done with his body after he dies? - Massive funeral pyre, freeze it, or be made into a skeleton?
Freeze it
5
What last name did Jim use for his parody book "The Ultimate Guide to Throwing a Garden Party"? - Trickington, Fauxbert, or Ployman?
Scranton Strangler
10
What did Michael's GPS "make" him do? - Drive into a lake, run into a phone pole, or drive the wrong way on a one-way street?
Drive into a lake
5
What did Meredith do to Michael after accepting her Dundie for Best Mother? - Kiss him, punch him in the face, or flash him?
-- Answer metadata begin
{
"answers": ["Kiss him", "Kissed him"]
}
-- Answer metadata end
5
What phrase did Stanley start adding to the end of his sentences becaues he thought it was hilarious? - "Go straight to hell", "You can suck it", or "Shove it up your butt"?
Shove it up your butt
5
What did Pam call the day that occurred once a year when Michael had to sign the paychecks, approve the purchase orders, and initial the expense reports? - Free-for-all Friday, Perfect Storm, or Mayhem Dayhem?
Perfect Storm
5
What did Dwight name his coffee shop after he bought the building? - Dwight's Espresso Express, Dwight's Java Jolt, or Dwight's Caffeine Corner?
-- Answer metadata begin
{
"answers": ["Caffeine Corner", "Dwight's Caffeine Corner"]
}
-- Answer metadata end
5
What did Jim claim he gets when he drinks? - Pranky, handsy, or angry?
Pranky
5
What did Andy define as the proper attire for the garden party? - Pennsylvania Preppy, Connecticuit Casual, or Newport Nautical?
Connecticuit Casual
5
After Dwight went behind Michael's back to Jan and tried to take his job, what did Michael make him do as punishment? - Wash his car, do his laundry, or clean his house?
-- Answer metadata begin
{
"answers": ["Laundry", "Do his laundry"]
}
-- Answer metadata end
5
What number did the speed gun register as Dwight ran by it? - 13, 20, or 8?
-- Answer metadata begin
{
"answers": ["Thirteen", "13"]
}
-- Answer metadata end
5
What reminder did Kevin have tacked to his wall? - Don't eat the yellow snow, don't eat food you find on the floor, or don't eat pocket lint?
-- Answer metadata begin
{
"answers": ["Don't eat the yellow snow", "Don't eat yellow snow", "Yellow snow"]
}
-- Answer metadata end
5
What do Schrutes traditionally stand in when they get married? - Bucket of beets, corn maze, or their own graves?
Their own graves
5
What did Ryan guess Todd Packer's middle initial F represented? - Fool, fudge, or fart?
Fudge
5
What did Jim train Dwight to eat by restarting his computer? - Mints, sour balls, or gummy bears?
Mints
5
Which season was Kevin's favorite? - Cookie season, chili season, or pool season?
-- Answer metadata begin
{
"answers": ["Cookie season", "Cookie"]
}
-- Answer metadata end
5
What profession did Meredith's son have? - Bouncer, stripper, or pimp?
Stripper
5
Why didn't Danny Cordray call Pam back? - Pam was in love with Jim, he lost her number, or she was too dorky?
-- Answer metadata begin
{
"answers": ["Too dorky", "She was too dorky"]
}
-- Answer metadata end
5
What did Nellie think Kevin's name was? - Creed, Chumbo, or Gavin?
Chumbo
5
Which accessory of Stanley's caused a hot debate of whether he had one or not? - Glasses, mustahce, or bow tie?
Mustache
5
What did Dwight name his recycling alien character who lived on Polluticorn? - Recyclobot, Recyclops, or Reclyclone?
Recyclops
5
Which of these was NOT a cliché about rain used by Phillis? - The plants are gonna love this, it's raining men, or nobody knows how to drive in the rain?
It's raining men
5
What did Kevin do during Dwight's impromptu fire drill? - Try to climb into the ceiling, have a heart attack, or break into thevending machine to steal candy?
-- Answer metadata begin
{
"answers": ["Break into the vending machine to steal candy", "Vending machine", "Break into the vending machine"]
}
-- Answer metadata end
5
What was warehouse worker Hidetoshi Hasagawa's profession when he lived in Japan? - Yakuza boss, heart surgeon, or mercenary?
Heart surgeon
5
What breed of dogs did Jo Bennett bring with her to the Scranton office?
Great Dane
10
Who invented dunderball?
Toby
10
Which person, who also acted in the show, wrote the most episodes?
Mindy Kaling
10
How many seasons of The Office were made?
-- Answer metadata begin
{
"answers": ["Nine", "9"]
}
-- Answer metadata end
10
Steve Carrell's wife, Nancy, plays which minor character on the show?
-- Answer metadata begin
{
"answers": ["Carol Stills"],
"answerFact": "Carol Stills was his real estate agent"
}
-- Answer metadata end
10
What is Creed Bratton's real name?
William Charles Schneider
10
How many Halloween episodes of The Office are there?
-- Answer metadata begin
{
"answers": ["Six", "6"]
}
-- Answer metadata end
10
In which season did Michael Scott leave to go live with Holly in Colorado?
-- Answer metadata begin
{
"answers": ["Seventh", "7th", "7", "Season 7"]
}
-- Answer metadata end
10
Which "The Office" actor wrote a published children's book that has no pictures in it?
-- Answer metadata begin
{
"answers": ["BJ Novak", "B.J. Novak"]
}
-- Answer metadata end
10
Which expression of Michael Scott's does Ricky Gervais as David Brent say to him, bonding them instantly?
That's what she said
10
How many different regional managers were there, including acting managers?
-- Answer metadata begin
{
"answers": ["Nine", "9"],
"answerFact": "The managers were Michael Scott, Jim Halpert, Andy Bernard, Dwight Schrute, Deangelo Vickers, Robert California, Nellie Bertram, Charles Miner (acting), and Creed Bratton (acting)"
}
-- Answer metadata end
10
In which month did THe Office premier in 2005?
March
10
Which small-town mockumentary did The Office co-creator Greg Daniels also create?
-- Answer metadata begin
{
"answers": ["Parks & Recreation", "Parks and Recreation"]
}
-- Answer metadata end
10
Who was the last character to speak in the series finale of The Office?
Pam
10
What is the real-life name of Poor Richard's Pub in Scranton, PA?
Pickwick's Pub
10
Which Pennsylvanian county in Scranton is located in, as seen on Dwight's Volunteer Shariff's Deputy mug?
Lackawanna
10
What is the significance of having the Scranton office on "Slough" street?
-- Answer metadata begin
{
"answers": ["It's the town in the UK show", "Slough is the town in the UK show", "Slough is the town in the UK version of the show", "It's the town in the UK version of the show"]
}
-- Answer metadata end
15
What is Scranton's nickname, mentioned a few times in the series?
-- Answer metadata begin
{
"answers": ["Electric City", "The Electric City"]
}
-- Answer metadata end
10
In the 2018 online auction of The Office props, which item was the top seller at $29,000?
-- Answer metadata begin
{
"answers": ["Dunder-Mifflin sign", "Dunder Mifflin sign", "Dunder-Mifflin, Inc. sign", "Dunder Mifflin, Inc. sign", "Dunder-Mifflin Inc. Sign", "Dunder Miffling Inc. sign", "Dunder-Mifflin Inc Sign", "Dunder Mifflin Inc sign"]
}
-- Answer metadata end
15
How many accountants are there on The Office?
-- Answer metadata begin
{
"answers": ["Three", "3"]
}
-- Answer metadata end
5
How many sales people are there in the Scranton office in season 3?
-- Answer metadata begin
{
"answers": ["Seven", "7"],
"answerFact": "The sales people in season 3 are Dwight, Jim, Ryan, Stanley, Phyllis, Andy, and Karen"
}
-- Answer metadata end
10
Which actor sings the 'Threat Level Midnight' theme song?
Ed Helms
10
Which cast member shot the original opening credit footage while researching Scranton, PA?
John Krasinski
10
How many awards did Steve Carrell win for portraying Michael Scott?
-- Answer metadata begin
{
"answers": ["Twenty-nine", "Twenty nine", "29"]
}
-- Answer metadata end
10
Jenna Fischer is godmother of which cast member's daughter?
Angela Kinsey
10
Which castmate was on John Krasinski's little league team?
-- Answer metadata begin
{
"answers": ["BJ Novak", "B.J. Novak"]
}
-- Answer metadata end
10
What type of king does Rainn Wilson claim he is, as seen in the title of his memoir?
Bassoon
10
Which main cast member didn't watch the UK version in fear they'd base their character off the UK one?
Steve Carell
10
In which city was the official "Office" wrap party held on May 4th, 2013?
Scranton, PA
5
Which cast member left a $69.69 tip at Iowa City's Bo-James bar in April 2019?
Brian Baumgartner
10
With 22.9 million viewers, which 5th season episode was most watched of the entire series?
Stress Relief
10
Which recurring character does The Office writer and producer Michael Schur play on the show?
Mose
10
In which year was Dunder-Mifflin founded?
1949
10
Whose real niece is Jim and Pam's daughter Cecilia named after?
Jenna Fischer
10
Which camera setup was used to film the show?
Single
10
What is Jan's candle company named?
Serenity by Jan
10
Which accountant directed the "After Hours" episode?
Brian Baumgartner
10
How many episodes of The Office are there?
-- Answer metadata begin
{
"answers": ["Two Hundred One", "201"]
}
-- Answer metadata end
10
Which actor wore a wig during season 3 after shaving his head for a movie role?
John Krasinski
10
In which year did The Office season finale premier?
2013
10
What iconic sign was relocated to the Steamtown Mall in Scranton, PA after its original location caused congestion because too many people took photos with it?
Scranton Welcomes You
10
In which California neighborhood were most of the interior shots of the office filmed?
Van Nuys
10
Who wrote the scripts for the "Survivor Man" and "Casino Night" episodes?
Steve Carell
10
Which HR rep wrote 16 episodes of the show?
Toby
10
Which main cast member is the only one who was born in Pennsylvania?
Kate Flannery
10
Which actress was a casting associate for the show when they created a character specifically for her?
Phyllis Smith
10
How many times does Michael fake fire Pam?
-- Answer metadata begin
{
"answers": ["Two", "Twice", "2"]
}
-- Answer metadata end
10
Which cast member went to high school with Brian Baumgartner?
Ed Helms
10
On which Scranton avenue is the brick building in the opening credits located?
Mifflin
10
What is the name of the band who plays the theme song and appears in the "Booze Cruise" episode?
The Scrantones
10
How many Christmas episodes of The Office are there?
-- Answer metadata begin
{
"answers": ["Seven", "7"]
}
-- Answer metadata end
10
Which mega-fan runs the website Office Tally and was a guest star on the series' finale?
Jennie Tan
10
Source diff could not be displayed: it is too large. Options to address this: view the blob.
Good Time Trivia Good Time Trivia
Version 1.02 Version 1.03
Release date: 2022-12-08 Release date: 2023-01-05
by by
...@@ -150,8 +150,33 @@ of the following files and directories: ...@@ -150,8 +150,33 @@ of the following files and directories:
The trivia category files (in the qa directory, with filenames ending in .qa) The trivia category files (in the qa directory, with filenames ending in .qa)
are plain text files and contain questions, their answers, and their number of are plain text files.
points. For eqch question in a category file, there are 3 lines: Optionally, a QA file may have a section of metadata specified in JSON
(JavaScript Object Notation) format that can contain some information about the
question category. The information can have the following properties:
category_name: The name of the category (if different from simple parsing of
the filename)
ARS: Optional - An ARS security string to restrict access to the question set.
This overrides any setting for the question set in the [CATEGORY_ARS]
section in gttrivia.ini.
This JSON must be between two lines:
-- QA metadata begin
-- QA metadata end
For example, for a test category you might want to restrict to only the sysop:
-- QA metadata begin
{
"category_name": "Test category (not meant for use)",
"ARS": "SYSOP"
}
-- QA metadata end
The questions and answers inside the QA files contain questions, their answers,
and their number of points. For eqch question in a category file, the main
format is 3 lines:
Question Question
Answer Answer
Number of points Number of points
...@@ -162,6 +187,40 @@ What color is the sky? ...@@ -162,6 +187,40 @@ What color is the sky?
Blue Blue
5 5
Alternately, the answer can be specified via JSON (JavaScript Object Notation)
with multiple acceptable answers, and optionally a fact about the answer. When
JSON is specified for the answer, there need to be two text lines to specify
that the answer is JSON:
-- Answer metadata begin
-- Answer metadata end
One example where this can be used is to specify an answer that is a number and
you want to allow both spelling out the number and the number itself. Also, in
some cases it can be good to specify the spelled-out version first (if it's
short) since that will be used for the clue. For example:
How many sides does a square have?
-- Answer metadata begin
{
"answers": ["Four", "4"]
}
-- Answer metadata end
5
An example of a question specifying an answer with a fact specified:
Who's picture is on the US $50 bill?
-- Answer metadata begin
{
"answers": ["Ulysses Grant", "Ulysses S. Grant", "Ulysses S Grant"],
"answerFact": "The US capitol building is on the other side of the $50 bill"
}
-- Answer metadata end
5
NOTE: The questions and answers must be specified in exactly either of the two
above formats, or else the questions and answers will not be read correctly.
Also, there is a script in the qa directory called converter.js. This is a Also, there is a script in the qa directory called converter.js. This is a
rough script that can be modified to convert a list of trivia questions into rough script that can be modified to convert a list of trivia questions into
the format that can be used by this door. It is not a generic script; if you the format that can be used by this door. It is not a generic script; if you
...@@ -304,6 +363,8 @@ scoreSoFarText "Your score so far" text ...@@ -304,6 +363,8 @@ scoreSoFarText "Your score so far" text
clueHdr Header text for clues clueHdr Header text for clues
clue Clue text clue Clue text
answerAfterIncorrect The answer printed after incorrect response answerAfterIncorrect The answer printed after incorrect response
answerFact Fact displayed after an answer (not all
questions will have one)
[CATEGORY_ARS] section [CATEGORY_ARS] section
---------------------- ----------------------
......
...@@ -4,6 +4,17 @@ Revision History (change log) ...@@ -4,6 +4,17 @@ Revision History (change log)
============================= =============================
Version Date Description Version Date Description
------- ---- ----------- ------- ---- -----------
1.03 2023-01-05 Question sets (in the .qa files) may now have a section
of JSON metadata to specify the name of the category (if
different from simple filename parsing) and optionally
an ARS security string (overrides gttrivia.ini). Also,
answers can be specified as a JSON section to specify
multiple acceptable answers, and optionally a fact about
the answer/question. A new color setting, answerFact,
specifies the color to use to output the answer fact.
1.02 2022-12-08 The game can now post scores in (networked) message sub-
boards as a backup to using a JSON DB server in case the
server can't be contacted.
1.01 2022-11-25 Added the ability to store & retrieve scores to/from a 1.01 2022-11-25 Added the ability to store & retrieve scores to/from a
server, so that scores from multiple BBSes can be server, so that scores from multiple BBSes can be
displayed. By default, it's configured to use Digital displayed. By default, it's configured to use Digital
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment