*** 1.3 Released ***
This plugin was designed for games that require teamwork and extensive knowledge.
In those types of games (most are MODs), there are generally two groups of people. People who are new to the game, and experienced players. Sometimes experienced players want to play somewhere with other experienced players. This plugin is basically as a filter so that servers could be created for experienced players only.
This plugin was designed for EmpiresMod, a FPS / RTS hybrid by a member of that community. A first attempt at coding a plugin was not completed. I then took over the position of lead (and only) coder and wrote this plugin from scratch.
Features
Asks a configurable number of random questions from the questions.cfg KV file.
Kicks / bans (configurable) users for failing to answer a quesiton or for failing to complete the quiz in the required amount of time (configurable).
When a user completes the quiz, their SteamIDs is stored in a SQLite or MySQL database. The current date is also stored. When they reconnect, they will not be quized again. The last connected date will be updated.
The above database is automatically pruned once a day by the plugin. All records with a last connected date older then 20 days will removed from the database.
InstallationCopy Files- addons/sourcemod/configs/quizengine/questions.cfg
- addons/sourcemod/configs/quizengine/settings.cfg
- addons/sourcemod/plugins/quizengine.smx
Edit Config Files
- questions.cfg
- settings.cfg
- Read the file for details
Database.cfg For SQLite add to addons/sourcemod/configs/databases.cfg before the last }
Code:
"quizengine"
{
"driver" "sqlite"
"database" "quizengine"
}
For MySQL create a user and database. Grant all permissions for that database to a user. Allow that user to connect to MySQL from your game server.
Add to addons/sourcemod/configs/databases.cfg before the last }
Code:
"quizengine"
{
"driver" "mysql"
"host" "mysqlserver"
"database" "databasename"
"user" "username"
"pass" "password"
//"timeout" "0"
//"port" "0"
}
Common Errors- If you forget to close a quote in one of the KV files, it will fail to parse and most likely, the plugin will not run correctly.
- If you get blank questions, make sure the value of totalQuestions (in settings.cfg) is set to the value of the last section (so if you had 30 questions, totalQuestions would be 29).
Changelog- 1.0
- 1.1
- Fixed grammar error (whoops)
- 1.2
- Connect message now configurable from settings.cfg
- The number of times connect message is sent is configurable from settings.cfg
- Quiz pass message now configurable from settings.cfg
- Quiz pass message can be configured to broadcast to all players
- The max age of a quiz pass record is now configurable from settings.cfg
- 1.3
- DB pruning can now be disabled by setting maxQuizRecordAge to -1
- CS:S radio style menus can be forced by setting forceRadioMenu to 1 (not currently working, leave the setting as is)
- v.Next
- Turn filter mode off
- Option for no punishment for failing a quiz or timing out
- Option to disable saving user info if the user passes a quiz
- Start quiz every x number of rounds
- Once one user completes the quiz, all other quizes are canceled - config option
- Reward user on completion of the quiz (reward.cfg file will allow you to define what you would like to give the user with standard server commands probably)
Credits
Special thanks to Porthos for the original idea and for being an excellent tester.
Special thanks to
MAD for letting me test on their server.