Skip to content
Snippets Groups Projects
Commit c7dad814 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Merge remote-tracking branch 'origin/master' into v320a_dev

parents 4bc1b68d ae29bb57
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
...@@ -64,6 +64,8 @@ ...@@ -64,6 +64,8 @@
* also checks to make sure the sender is a sysop. Also, used putmsg() in * also checks to make sure the sender is a sysop. Also, used putmsg() in
* place of this script's own @-message parsing when displaying some of the * place of this script's own @-message parsing when displaying some of the
* configured text strings. * configured text strings.
* 2022-12-12 Eric Oulashin Fix for "assignment to undeclared variable" error in GetMsgSubBrdLine();
* appeared when changing to a different message area from the reader
*/ */
   
"use strict"; "use strict";
...@@ -168,8 +170,8 @@ var ansiterm = require("ansiterm_lib.js", 'expand_ctrl_a'); ...@@ -168,8 +170,8 @@ var ansiterm = require("ansiterm_lib.js", 'expand_ctrl_a');
   
   
// Reader version information // Reader version information
var READER_VERSION = "1.57"; var READER_VERSION = "1.57.1";
var READER_DATE = "2022-12-02"; var READER_DATE = "2022-12-12";
   
// Keyboard key codes for displaying on the screen // Keyboard key codes for displaying on the screen
var UP_ARROW = ascii(24); var UP_ARROW = ascii(24);
...@@ -11940,7 +11942,7 @@ function DigDistMsgReader_GetMsgSubBrdLine(pGrpIndex, pSubIndex, pHighlight) ...@@ -11940,7 +11942,7 @@ function DigDistMsgReader_GetMsgSubBrdLine(pGrpIndex, pSubIndex, pHighlight)
if (numMsgs > 0) if (numMsgs > 0)
{ {
// Get the header of the last message in the sub-board // Get the header of the last message in the sub-board
msgHeader = null; var msgHeader = null;
var msgOffset = msgBase.total_msgs - 1; var msgOffset = msgBase.total_msgs - 1;
while (!isReadableMsgHdr(msgHeader, msg_area.grp_list[pGrpIndex].sub_list[pSubIndex].code) && (msgOffset >= 0)) while (!isReadableMsgHdr(msgHeader, msg_area.grp_list[pGrpIndex].sub_list[pSubIndex].code) && (msgOffset >= 0))
msgHeader = msgBase.get_msg_header(true, --msgOffset, true); msgHeader = msgBase.get_msg_header(true, --msgOffset, true);
......
Digital Distortion Message Reader Digital Distortion Message Reader
Version 1.57 Version 1.57.1
Release date: 2022-12-02 Release date: 2022-12-12
by by
......
...@@ -5,6 +5,7 @@ Revision History (change log) ...@@ -5,6 +5,7 @@ Revision History (change log)
============================= =============================
Version Date Description Version Date Description
------- ---- ----------- ------- ---- -----------
1.57.1 2022-12-12 Fix for "assignment to undeclared variable" error
1.57 2022-12-02 @-codes were only expanded when reading personal mail; 1.57 2022-12-02 @-codes were only expanded when reading personal mail;
now, DDMsgReader also checks to make sure the sender is a now, DDMsgReader also checks to make sure the sender is a
sysop. sysop.
......
...@@ -2,6 +2,10 @@ ...@@ -2,6 +2,10 @@
numQuestionsPerPlay=30 numQuestionsPerPlay=30
numTriesPerQuestion=4 numTriesPerQuestion=4
maxNumPlayerScoresToDisplay=10 maxNumPlayerScoresToDisplay=10
; scoresMsgSubBoardsForPosting specifies a comma-separated list of internal sub-board
; codes for sub-boards to post user scores in, as a backup in case the server
; specified in the REMOTE_SERVER section can't be reached
scoresMsgSubBoardsForPosting=
[COLORS] [COLORS]
error=YH error=YH
...@@ -31,5 +35,11 @@ dirty_minds=AGE 18 ...@@ -31,5 +35,11 @@ dirty_minds=AGE 18
server=digitaldistortionbbs.com server=digitaldistortionbbs.com
port=10088 port=10088
; The SERVER section is for hosting game scores only
[SERVER] [SERVER]
deleteScoresOlderThanDays=182 deleteScoresOlderThanDays=182
; scoresMsgSubBoardsForReading specifies a comma-separated list of internal sub-board
; codes for sub-boards to read user scores from. To use this, set up an event in
; SCFG > External Programs > Timed Events to run gttrivia.js with the command-line
; parameter -read_scores_from_subboard
scoresMsgSubBoardsForReading=
This diff is collapsed.
require("sbbsdefs.js", "K_NOCRLF"); require("sbbsdefs.js", "K_NOCRLF");
var inputFilename = "/mnt/data/SharedMedia/triviaQuestions/music_and_movies.txt"; var opts = parseCmdLine(argv);
var outputFilename = inputFilename + "-converted.txt";
print(""); print("");
print("Converting " + inputFilename);
if (opts.inputFilename.length == 0)
{
print("No input filename was specified.");
print("");
exit(1);
}
if (!file_exists(opts.inputFilename))
{
print("Specified file does not exist:");
print(opts.inputFilename);
print("");
exit(2);
}
print("Input filename:" + opts.inputFilename + ":");
print("");
var outputFilename = opts.inputFilename + "-converted.txt";
print("");
print("Converting " + opts.inputFilename);
print("Output: " + outputFilename); print("Output: " + outputFilename);
print(""); print("");
var inFile = new File(inputFilename); var inFile = new File(opts.inputFilename);
var outFile = new File(outputFilename); var outFile = new File(outputFilename);
if (inFile.open("r")) if (inFile.open("r"))
{ {
...@@ -112,7 +133,10 @@ if (inFile.open("r")) ...@@ -112,7 +133,10 @@ if (inFile.open("r"))
inFile.close(); inFile.close();
} }
else else
print("* Failed to open " + inputFilename + " for reading!"); {
print("* Failed to open " + opts.inputFilename + " for reading!");
exit(3);
}
...@@ -128,3 +152,34 @@ function QA(pQuestion, pAnswer, pNumPoints) ...@@ -128,3 +152,34 @@ function QA(pQuestion, pAnswer, pNumPoints)
this.answer = pAnswer; this.answer = pAnswer;
this.numPoints = pNumPoints; this.numPoints = pNumPoints;
} }
// Parses command line options
function parseCmdLine(argv)
{
var retObj = {
inputFilename: ""
};
if (!Array.isArray(argv))
return retObj;
for (var i = 0; i < argv.length; ++i)
{
if (argv[i].length == 0) continue;
if (argv[i].charAt(0) == "-")
{
if (i >= argv.length - 1) continue;
var paramNameUpper = argv[i].substr(1).toUpperCase();
if (paramNameUpper == "INPUTFILENAME" || paramNameUpper == "INPUT_FILENAME")
retObj.inputFilename = argv[i+1];
++i; // To avoid analyzing the next parameter, since the next one is the value for this one
}
else
{
if (i == 0)
retObj.inputFilename = argv[i];
}
}
return retObj;
}
\ No newline at end of file
...@@ -174,7 +174,7 @@ What is often seen as the smallest unit of memory? ...@@ -174,7 +174,7 @@ What is often seen as the smallest unit of memory?
Kilobyte Kilobyte
10 10
Which planet is the hottest in the solar system? Which planet is the hottest in Earth's solar system?
Venus Venus
10 10
...@@ -614,10 +614,6 @@ What was the first Disney animated film based on the life of a real person? ...@@ -614,10 +614,6 @@ What was the first Disney animated film based on the life of a real person?
Pocahontas Pocahontas
10 10
What character did Michael J. Fox play in 'Back to the Future'?
Marty McFly
10
What was the predecessor to the United Nations? What was the predecessor to the United Nations?
League of Nations League of Nations
10 10
...@@ -842,10 +838,6 @@ What grows from an acorn? ...@@ -842,10 +838,6 @@ What grows from an acorn?
Oak Tree Oak Tree
10 10
What prison film starring Tim Robbins was based on a story by Stephen King?
The Shawshank Redemption
10
Which U.S. state has "Garden State" as its nickname? Which U.S. state has "Garden State" as its nickname?
New Jersey New Jersey
10 10
...@@ -966,10 +958,6 @@ Rihanna banned fans from bringing what items to her U.K. concerts in 2008? ...@@ -966,10 +958,6 @@ Rihanna banned fans from bringing what items to her U.K. concerts in 2008?
Umbrellas Umbrellas
10 10
Who created the alien rock superstar Ziggy Stardust?
David Bowie
10
Which young girl helped drive the English from French soil in the 15th century? Which young girl helped drive the English from French soil in the 15th century?
Joan of Arc Joan of Arc
10 10
...@@ -979,7 +967,7 @@ Theodore Roosevelt ...@@ -979,7 +967,7 @@ Theodore Roosevelt
10 10
What is the biggest supermarket chain in the U.S.? What is the biggest supermarket chain in the U.S.?
Kroger Co. Kroger
10 10
On every continent there is a city named what? On every continent there is a city named what?
...@@ -1511,7 +1499,7 @@ Sense and Sensibility ...@@ -1511,7 +1499,7 @@ Sense and Sensibility
10 10
Which two countries have the longest shared international border? Which two countries have the longest shared international border?
Canada and the U.S. Canada and the US
10 10
What city hosted the 2014 Winter Olympics? What city hosted the 2014 Winter Olympics?
...@@ -1535,7 +1523,7 @@ Three ...@@ -1535,7 +1523,7 @@ Three
10 10
How many bones do sharks have? How many bones do sharks have?
Zero! 0
10 10
What is the deadliest mammal? What is the deadliest mammal?
...@@ -1612,7 +1600,7 @@ Des Moines ...@@ -1612,7 +1600,7 @@ Des Moines
What is the most commonly spoken language in Brazil? What is the most commonly spoken language in Brazil?
Portuguese Portuguese
10 5
In what country do more than half of people believe in elves? In what country do more than half of people believe in elves?
Iceland Iceland
...@@ -1706,8 +1694,8 @@ Where is Harvard University located? ...@@ -1706,8 +1694,8 @@ Where is Harvard University located?
Cambridge, Massachusetts Cambridge, Massachusetts
10 10
Which marine animals hold hands in their sleep to prevent drifting apart? Which marine animal species hold hands in their sleep to prevent drifting apart?
Sea otters, and my system is unable to process that level of cuteness. Sea otter
10 10
What famous document begins: "When in the course of human events..."? What famous document begins: "When in the course of human events..."?
...@@ -1853,3 +1841,183 @@ Washington Monument ...@@ -1853,3 +1841,183 @@ Washington Monument
Where is Mount Rushmore (City, State)? Where is Mount Rushmore (City, State)?
Keystone, South Dakota Keystone, South Dakota
5 5
What country has the highest life expectancy?
Hong Kong
10
Where would you be if you were standing on the Spanish Steps?
Rome
10
Which language has the more native speakers: English or Spanish?
Spanish
10
What is the most common surname in the United States?
Smith
10
What disease commonly spread on pirate ships?
Scurvy
10
Who was the Ancient Greek God of the Sun?
Apollo
10
What was the name of the crime boss who was head of the feared Chicago Outfit?
Al Capone
10
What year was the United Nations established?
1945
10
Who has won the most total Academy Awards?
Walt Disney
10
What artist has the most streams on Spotify?
Drake
10
How many minutes are in a full week?
10080
10
What car manufacturer had the highest revenue in 2020?
Volkswagen
10
How many elements are in the periodic table?
118
10
What company was originally called "Cadabra"?
Amazon
10
How many faces does a Dodecahedron have?
12
10
Queen guitarist Brian May is also an expert in what scientific field?
Astrophysics
10
Aureolin is a shade of what color?
Yellow
10
How many ghosts chase Pac-Man at the start of each game?
4
10
What Renaissance artist is buried in Rome's Pantheon?
Raphael
10
What shoe brand makes the "Mexico 66"?
Onitsuka Tiger
15
What game studio makes the Red Dead Redemption series?
Rockstar Games
10
Who was the last Tsar of Russia?
Nicholas II
10
What country drinks the most coffee per capita?
Finland
10
What is the 4th letter of the Greek alphabet?
Delta
5
What sports car company manufactures the 911?
Porsche
2
What city is known as "The Eternal City"?
Rome
10
The first person to reach the South Pole was Roald Amundsen. Where was he from?
Norway
10
Who discovered that the earth revolves around the sun (last name)?
Copernicus
10
What company was initially known as "Blue Ribbon Sports"?
Nike
10
What art form is described as "decorative handwriting or handwritten lettering"?
Calligraphy
10
Which planet in Earth's solar system has the most moons?
Saturn
10
What country has won the most World Cups?
Brazil
10
Kratos is the main character of what video game series?
God of War
10
In what country would you find Mount Kilimanjaro?
Tanzania
10
A group of pandas is known as a what?
Embarrassment
10
What European country experienced the highest rate of population decline from 2015 - 2020?
Lithuania
10
How many bones do we have in an ear?
3
10
Who famously crossed the Alps with elephants on the way to war with the Romans?
Hannibal
10
True or False: Halloween originated as an ancient Irish festival.
True
5
What Netflix show had the most streaming views in 2021?
Squid Game
10
What software company is headquartered in Redmond, Washington?
Microsoft
2
What is the largest Spanish-speaking city in the world?
Mexico City
10
What is the world's fastest bird?
Peregrine Falcon
10
In what country is the Chernobyl nuclear plant located?
Ukraine
10
The Parthenon Marbles are controversially located in what museum?
British Museum
10
...@@ -510,7 +510,7 @@ What prominent American director won an Oscar for helming Forrest Gump? ...@@ -510,7 +510,7 @@ What prominent American director won an Oscar for helming Forrest Gump?
Robert Zemeckis Robert Zemeckis
10 10
Three of Jim Carrey's blockbusters¿The Mask, Dumb and Dumber and Ace Ventura: Pet Detective¿were all released in what year? Three of Jim Carrey's blockbusters The Mask, Dumb and Dumber and Ace Ventura: Pet Detective were all released in what year?
1994 1994
10 10
...@@ -630,7 +630,7 @@ What was the first pandemic era movie to gross over $1 billion at the box office ...@@ -630,7 +630,7 @@ What was the first pandemic era movie to gross over $1 billion at the box office
Spider-Man: No Way Home Spider-Man: No Way Home
10 10
Who is the only actor to appear in Robert Wise¿s 1961 West Side Story movie and the 2021 remake? Who is the only actor to appear in Robert Wise's 1961 West Side Story movie and the 2021 remake?
Rita Moreno Rita Moreno
10 10
...@@ -642,7 +642,7 @@ What internationally esteemed Malaysian actress has starred in a Bond film, Crou ...@@ -642,7 +642,7 @@ What internationally esteemed Malaysian actress has starred in a Bond film, Crou
Michelle Yeoh Michelle Yeoh
10 10
Who won his second Best Actor Oscar in 2021, in the ceremony¿s biggest upset? Who won his second Best Actor Oscar in 2021, in the ceremony's biggest upset?
Anthony Hopkins Anthony Hopkins
10 10
...@@ -650,11 +650,11 @@ What indie horror movie boogeyman became an unexpected LGBTQ+ icon of the 21st c ...@@ -650,11 +650,11 @@ What indie horror movie boogeyman became an unexpected LGBTQ+ icon of the 21st c
The Babadook The Babadook
10 10
What kind of bug is on the back of Ryan Gosling¿s silk jacket in Drive? What kind of bug is on the back of Ryan Gosling's silk jacket in Drive?
Scorpion Scorpion
10 10
What actress was the queen of 1970s ¿Blaxploitation¿ cinema? What actress was the queen of 1970s "Blaxploitation" cinema?
Pam Grier Pam Grier
10 10
...@@ -666,15 +666,15 @@ What is the second (and last) fantasy movie to win Best Picture at the Oscars? ...@@ -666,15 +666,15 @@ What is the second (and last) fantasy movie to win Best Picture at the Oscars?
The Shape of Water The Shape of Water
10 10
What famous heartthrob is unrecognizable under layers of makeup as The Penguin in 2021¿s The Batman? What famous heartthrob is unrecognizable under layers of makeup as The Penguin in 2021s The Batman?
Colin Farrell Colin Farrell
10 10
In Clueless, what character said, ¿You¿re a virgin who can¿t drive?¿ In Clueless, what character said, "You're a virgin who can't drive"?
Tai Tai
10 10
What is the name of the love interest whose ¿hair looks sexy pushed back¿ in Mean Girls? What is the name of the love interest whose hair looks sexy pushed back in Mean Girls?
Aaron Samuels Aaron Samuels
10 10
...@@ -682,7 +682,7 @@ What highly acclaimed Richard Linklater drama was filmed over and produced over ...@@ -682,7 +682,7 @@ What highly acclaimed Richard Linklater drama was filmed over and produced over
Boyhood Boyhood
10 10
What is the name of Humperdinck¿s kingdom in The Princess Bride? What is the name of Humperdinck's kingdom in The Princess Bride?
Florin Florin
10 10
...@@ -704,7 +704,7 @@ What critically maligned 2004 superhero film co-stars Sharon Stone as an evil co ...@@ -704,7 +704,7 @@ What critically maligned 2004 superhero film co-stars Sharon Stone as an evil co
Catwoman Catwoman
10 10
Which actress replaced Rachel Weisz as Evelyn O¿Connor in The Mummy: Tomb of the Dragon Emperor? Which actress replaced Rachel Weisz as Evelyn O'Connor in The Mummy: Tomb of the Dragon Emperor?
Maria Bello Maria Bello
10 10
...@@ -716,11 +716,11 @@ Who plays Duncan Idaho in Dune (2021)? ...@@ -716,11 +716,11 @@ Who plays Duncan Idaho in Dune (2021)?
Jason Momoa Jason Momoa
10 10
Dakota Johnson dropped out of Olivia Wilde¿s sophomore feature Don¿t Worry Darling to appear in what critically acclaimed 2021 drama? Dakota Johnson dropped out of Olivia Wilde's sophomore feature Don't Worry Darling to appear in what critically acclaimed 2021 drama?
The Lost Daughter The Lost Daughter
10 10
What legendary pop star judges a fashion ¿walk-off¿ between Ben Stiller and Owen Wilson in Zoolander? What legendary pop star judges a fashion "walk-off" between Ben Stiller and Owen Wilson in Zoolander?
David Bowie David Bowie
10 10
...@@ -1182,3 +1182,27 @@ Lady Gaga ...@@ -1182,3 +1182,27 @@ Lady Gaga
What type of music has been shown to help plants grow better and faster? What type of music has been shown to help plants grow better and faster?
Classical Classical
10 10
What character has both Robert Downey Jr. and Benedict Cumberbatch played?
Sherlock Holmes
10
What prison film starring Tim Robbins was based on a story by Stephen King?
The Shawshank Redemption
10
What is the highest-rated film on IMDb as of January 1st, 2022?
The Shawshank Redemption
10
Which grammy-nominated New York rapper died in April of 2021?
DMX
10
Who created the alien rock superstar Ziggy Stardust?
David Bowie
10
What character did Michael J. Fox play in 'Back to the Future'?
Marty McFly
10
Good Time Trivia Good Time Trivia
Version 1.01 Version 1.02
Release date: 2022-11-25 Release date: 2022-12-08
by by
...@@ -57,10 +57,6 @@ scores. This will delete the scores.json file. ...@@ -57,10 +57,6 @@ scores. This will delete the scores.json file.
This is currently a single-player game, but multiple users on different nodes This is currently a single-player game, but multiple users on different nodes
can play it simultaneously. can play it simultaneously.
Currently, this trivia game is local to the current BBS only. In the future,
I think it would be good to add a feature for networked/inter-BBS games.
Answer matching: When a user answers a question, the game can allow non-exact Answer matching: When a user answers a question, the game can allow non-exact
answer matching in some circumstances, to account for typos and spelling answer matching in some circumstances, to account for typos and spelling
mistakes. If the answer is a single word up to 12 characters, the game will mistakes. If the answer is a single word up to 12 characters, the game will
...@@ -74,6 +70,48 @@ For more information on Levenshtein distances: ...@@ -74,6 +70,48 @@ For more information on Levenshtein distances:
https://www.cuelogic.com/blog/the-levenshtein-algorithm https://www.cuelogic.com/blog/the-levenshtein-algorithm
Shared game scores on a server BBS
----------------------------------
The game can be configured to share its local game scores, to be stored on a
remote BBS. The scores can be shared either by directly contacting the remote
BBS (via the JSON DB service) and/or by posting the local game scores in one or
more (networked) message sub-boards (both configurable in gttrivia.ini). The
option to post scores in a message sub-board is a backup in case the remote BBS
is down and cannot be contacted directly. You may also opt to just have Good
Time Trivia post scores in a message sub-board and not configure a remote BBS
server.
Digital Distortion (BBS) is set up to host scores for this game, and the
default settings in the REMOTE_SERVER section of gttrivia.ini point to
Digital Distortion, to use the direct-connect JSON DB method to update remote
scores.
Digital Distortion is also set up to look for scores for this game in the
Dove-Net Synchronet Data message area, as well as FSXNet Inter-BBS Data.
If your BBS has the Dove-Net message sub-boards, you could configure Good Time
Trivia to post scores in the Dove-Net Synchronet Data sub-board (using the
internal code configured on your BBS). If there are other BBSes besides Digital
Distortion hosting scores, the host BBS would also need to have Dove-Net and
have an event configured to periodically run Good Time Trivia to poll Dove-Net
Synchronet Data and read the game scores.
By default, the game is set up to post scores to Digital Distortion, so you may
choose to view the scores there or host scores yourself. See section 4
(Configuration file) for more information on the options to send scores to a
remote BBS.
When configured to send user scores to a remote BBS and to write scores to a
message sub-board, that happens whenever a user stops playing a game. The logic
for sending the scores is as follows:
- Try to post the scores to the remote BBS
- If that fails, then post the scores in the configured message sub-board, if
there is one configured.
That logic should ensure that the scores get posted. The remote BBS should then
be configured to have their JSON-DB service running and/or have Good Time Trivia
periodically scan the same (networked) message sub-board to read the scores.
3. Installation & Setup 3. Installation & Setup
======================= =======================
Aside from readme.txt and revision_history.txt, Good Time Trivia is comprised Aside from readme.txt and revision_history.txt, Good Time Trivia is comprised
...@@ -178,6 +216,20 @@ scripts): ...@@ -178,6 +216,20 @@ scripts):
╚══════════════════════════════════════════════════════════╝ ╚══════════════════════════════════════════════════════════╝
That is all you need to do to get Good Time Trivia running.
Optional
--------
As mentioned in the introduction, server scores can be sent to a remote BBS so
that scores from players on multiple BBSes can be viewed. Normally, if Good Time
Trivia is unable to connect to the remote BBS directly, it will fall back to
posting scores in a networked message sub-board (if configured) as a backup
option. That happens automatically after a user finishes playing a game, but
Good Time Trivia can also (optionally) be configured to post game scores in a
sub-board as a timed event by running gttrivia.js with the
-post_scores_to_subboard command-line argument.
4. Configuration File 4. Configuration File
===================== =====================
...@@ -200,6 +252,27 @@ numTriesPerQuestion The maximum number of times a user is ...@@ -200,6 +252,27 @@ numTriesPerQuestion The maximum number of times a user is
maxNumPlayerScoresToDisplay The maximum number of player scores to display maxNumPlayerScoresToDisplay The maximum number of player scores to display
in the list of high scores in the list of high scores
scoresMsgSubBoardsForPosting This can be used to specify a comma-separated
list of internal sub-board codes for the game
to post user scores in, if you want your user
scores to be shared. In case the remote BBS
in the REMOTE_SERVER setting can't be reached
or there is no remote BBS configured, the game
will post scores in the sub-board(s) specified
here. You can specify more than one sub-board
code in case there are multiple BBSes that
host scores for this game.
Note that this setting is empty by default,
because internal sub-board codes are probably
different on each BBS. Digital Distortion is
set up to host scores for this game, and if
your BBS is connected to Dove-Net, it is
recommended to use your BBS's internal code
code for the Dove-Net Synchronet Data
sub-board here. FSXNet also has an InterBBS
Data area that might be used for conveying
game scores to a host BBS.
[COLORS] section [COLORS] section
---------------- ----------------
In this section, the color codes are simply specified by a string of color In this section, the color codes are simply specified by a string of color
...@@ -270,6 +343,19 @@ deleteScoresOlderThanDays The number of days to keep old player scores. ...@@ -270,6 +343,19 @@ deleteScoresOlderThanDays The number of days to keep old player scores.
The background service will remove player The background service will remove player
scores older than this number of days. scores older than this number of days.
scoresMsgSubBoardsForReading This can be used to specify a comma-separated
list of internal sub-board codes for the game
to read user scores from, for client BBSes
that post their game scores there. See section
5 (Optional: Configuring your BBS to host
player scores) for information on adding an
event in SCFG to periodically read scores
from the sub-board(s) if you want to host game
scores on your BBS. By default, the game is
set up to post scores to Digital Distortion,
so you may choose to view the scores there or
host scores yourself.
5. Optional: Configuring your BBS to host player scores 5. Optional: Configuring your BBS to host player scores
======================================================= =======================================================
...@@ -297,3 +383,51 @@ dir=../xtrn/gttrivia/server/ ...@@ -297,3 +383,51 @@ dir=../xtrn/gttrivia/server/
It would then probably be a good idea to stop and re-start your Synchronet BBS It would then probably be a good idea to stop and re-start your Synchronet BBS
in order for it to recognize that you have a new JSON database configured. in order for it to recognize that you have a new JSON database configured.
Periodic reading of scores from a message sub-board
---------------------------------------------------
BBSes with the game installed could configure their game to post scores in a
(networked) message sub-board. If you decide to host game scores on your BBS,
it's also a good idea to configure your BBS to read scores from a networked
message sub-board (which would need to be the same one that BBSes post in). For
instance, you could set it up to read scores from Dove-Net Synchronet Data,
FSXNet InterBBS Data, or perhaps another networked sub-board that is meant to
carry BBS data.
To specify which sub-board(s) to read scores from, you can specify those as a
comma-separated list of internal sub-board codes using the
scoresMsgSubBoardsForReading setting under the [SERVER] section of
gttrivia.ini.
Then, in SCFG, you will need to configure an event to run periodically to run
gttrivia.js to read those message sub-boards for game scores. You can do that
in SCFG > External Programs > Timed Events. Set it up to run gttrivia.js with
the command-line parameter -read_scores_from_subboard
Add an event as follows (internal code can be what you want; GTRIVSIM is short
for Good Time Trivia scores import):
╔═══════════════════════════════════════════════════════════════[< >]╗
║ GTRIVSIM Timed Event ║
╠════════════════════════════════════════════════════════════════════╣
║ │Internal Code GTRIVSIM ║
║ │Start-up Directory ../xtrn/gttrivia ║
║ │Command Line ?gttrivia.js -read_scores_from_subboard
║ │Enabled Yes ║
║ │Execution Node 12 ║
║ │Execution Months Any ║
║ │Execution Days of Month Any ║
║ │Execution Days of Week All ║
║ │Execution Frequency 96 times a day ║
║ │Requires Exclusive Execution No ║
║ │Force Users Off-line For Event No ║
║ │Native Executable/Script Yes ║
║ │Use Shell or New Context No ║
║ │Background Execution No ║
║ │Always Run After Init/Re-init No ║
║ │Error Log Level Error ║
╚════════════════════════════════════════════════════════════════════╝
The number of times per day is up to you, but it would probably be beneficial
for this to happen frequently so that scores are kept up to date. In the above
example, 96 times per day would mean it would run every 15 minutes.
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment