backIndex

Trivia Bot

In May 1998, HamFon released his first TriviaBot, which has been widely used. Xelagot version 3.419 introduces a built-in Trivia Bot, inspired on HamFon's great bot. HamFon's trivia question files may be used unmodified by Xelagot.

Question Files

Two types can be used:

Download here a sample Trivia Question file made by HamFon.

And if you really want to get going, download a whole bunch of Trivia Question files sent to me by HamFon: they were made by him and others for his TriviaBot and may be used freely! CAUTION: some of the questions or answers in these files may not be suitable for children, please revise them first before using them.


 

Xelagot Trivia Editor

Trivia Question files can be created and edited using the Xelagot Trivia Editor, that can be downloaded on the Links page. This is much easier than using Notepad!


 

Where to put the Trivia Question File?

The best place is somewhere in your bot's USBD (or User) folder. You could make a subfolder for your Trivia Question files.


 

How to start the Trivia Bot

Make sure you have Xelagot version 3.419 or higher. Open the menu Uni | Trivia.

Click the button marked load a question file, search for your file and load it.

The bot will be busy a few seconds, while it reads your question file line by line, validates the questions, and makes a database in a folder called 'Reserved'. This process is in a separate thread, so your bot will not 'freeze' while making the database. The total capacity of the database is 65535 questions. The database is never loaded to memory, only one record (question line) is loaded at a time.

Once the bot has finished making the database, you will see how many questions there are and the filename at the bottom of the Trivia screen.

You do not need to hit the button shuffle order to make the order of the questions random, the bot takes care of this when loading a question file, by creating a random reference file for the database. Note: to create a random reference file, the bot needs memory. This is = TotalNumberOfQuestions x 2 bytes. This memory is released as soon as the reference file is made. So if you have 10 thousand questions, the bot will temporarily need 20 thousand bytes of memory. Not much, the size of an average texture JPG :)

If you want, adjust the parameters in Trivia settings.

Your bot must be in a world. Hit the button play. That's all :)


 

The Trivia INI file: parameters and language

Download a commented sample INI file here.

The bot has its own default parameters and language strings (those are the ones shown in the sample INI file you downloaded), so unless you want to change them, you do not need to make or load a Trivia ini file. If you do use Trivia ini files, keep them together with your Trivia Question files.

You will need a Trivia ini file if you want to change the default parameters, or wish to change the language strings. The ini file must have the extension '.ini'. It is divided in sections.

The first section, [Game], contains the parameters used by the Trivia Bot.

The next sections contain the language strings. Read the comments in the sample INI file.

Hier is de nederlandse inifile versie.


 

Automating Question and INI file loading.

It is possible to automate the loading of a Trivia Question file and of a Trivia INI file. In x1, the Trivia screen has buttons to do this. The other bots (av99bot and srvcXlgBot) need to have their bot inifile edited manually. In the corresponding bot section, you will see the following items:
TriviaQuestionFile=
TriviaIniFile=
Put the filename of the question file or ini file after the = sign. The filename must include the path relative to the bot's USBD (normally the 'User' folder) (i.e. the former 'Script' folder). For example:
TriviaQuestionFile=trivia01.txt
means the file trivia01.txt is directly inside the 'User' folder, and
TriviaQuestionFile=Games\trivia01.txt
means that this file is in a subfolder of the 'User' folder, called 'Games'.
In all cases, the files MUST be somewhere inside the USBD folder for the bot to find them.


 

Verbal Commands

Please click here.


 

Action Script

Please click here.



backIndex