Trivia Question Pack – 4
$9.95
Sold by: Zombie LandDOES NOT INCLUDE Trivia 2.0 plugin. This is a booster pack and requires the Trivia 2.0 plugin. Do not purchase this if you do not already own Trivia 2.0 as this does not include the actual plugin.
Collection of 500 questions/answers for use with the Trivia 2.0 plugin. These questions span all categories, difficulties, and question type (multiple choice or true/false).
Trivia offers two methods of retrieving questions/answers: Local and Remote. Remote uses an open database API. Local pulls straight from your Questions.json file in the Trivia data directory.
It’s always a good idea to have a nice collection of local questions. While you can enable “remote” only, there’s always a risk of failure when calling on an API from another source. If you enable both remote and local, the plugin flips a coin each time and decides where to pull the questions from. It also has a redundancy backup system where 3 API call failures will automatically pull a local question as a backup source.
So it is always wise to have a collection of local questions to be used as a backup. Most server owners do not have the time, nor the desire, to assemble large quantities of varying questions/answers.
NOTE: Be sure to read the instructions below. Purchasing more than one pack, or trying to combine a pack with your current local questions, will require some JSON editing which I will explain below in great detail.
- Description
- Reviews (0)
- Version History
- Discussions (0)
- Product Enquiry
Description
Description
Flat Installation:
(overwriting the default file with this Questions pack)
- Always unload a plugin before altering it’s files. In the server console type o.unload Trivia
- Extract the Questions.json file into your Trivia data directory which will be located at oxide/data/Trivia
- Reload the plugin with o.reload Trivia
Appending Installation:
(If you already have questions you want to keep, but want to add this pack to it)
You will need a text editor such as Notepad++
- Make a backup of your current Questions.json file. It is very easy to break the structure of a JSON if you are not familiar with editing them. It is highly advised you make a backup copy before proceeding.
- Open your current Questions.json file that you wish to append more questions to in Notepad++
- In another Notepad++ tab open the JSON file from this Questions pack
- In that document (the JSON from this Questions pack) highlight everything from the quotation mark in front of the first question ID number all the way to the end of the file including the final } bracket for the final question (which would be the third } bracket from the end of the file).
This screen shot shows this selection. The red zig-zag in the center just cuts out most of the file so it can fit in one screen shot. The green arrows show the start and finish of what you need to select. - With all of that selected, press [Ctrl]-[C] on your keyboard to copy that data to your clipboard.
- Now go to the Notepad++ tab where you have your original Questions.json file opened.
- Scroll to the very bottom of the file where the last questions is and place your cursor right after the final question closing } bracket (which should be the third from the end of file). This screen shot shows where to place your cursor.
- After that } bracket you need to put a single comma ( , ) and then a line break. And leave your cursor exactly where it ends up when you add that line break. The result should look like this screen shot. The upper arrow shows the comma you should have added. The lower arrow is showing where your cursor should be for the next step after adding the line break.
- Now press [Ctrl]-[V] to paste the questions currently stored in your clipboard from this questions pack.
- Each question must have a unique ID number. Pasting this questions pack as an append to your existing questions will mean your ID numbers are repeating now. You can either fix this manually by altering each ID number, or for more advanced users you can use Find/Replace. I will include instructions for that method below. This is a screen shot of how it will look before you alter the ID numbers. The number that the red arrow is pointing to is the ID number. They have to be unique for each question. See below for instructions on using Find/Replace to fix this, be warned that doing it the faster more automated way is very delicate and you could break your JSON file so be sure to back it up first.
- Now that you have fixed the unique ID numbers your file is ready to go live. Be sure to save it first. And always unload a plugin before altering it’s files. In the server console type o.unload Trivia
- Take the new Questions.json file that you appended this question pack to and upload it to your Trivia data directory located at oxide/data/Trivia
- Reload the plugin with o.reload Trivia
Using Find/Replace:
(This is for more advanced users that wish to quickly fix their question ID numbers when combining more than one questions pack)
Tips:
- It would be wise to make a copy of this file first. If you break your JSON structure at least you can revert back and try again. I cannot emphasize this enough. Even as the plugin developer I have broken these JSONs working on my own servers questions file. It happens to all of us. Always take backups first.
- Be sure to user your Find/Replace in “In Selection” mode so that you can control where it is finding and replacing things. For example if you go to replace numbers in the 100’s with 600’s (because you combined two question packs) and in doing so you are simply replacing the “1” with a “6”. If you did this for the entire file it would break question #1 by making it #6 and it would break #10 by making it #60 etc. If you use “In Selection” you can highlight the parts you want it to scan and replace and prevent those mistakes.
- Pay attention to the results (ie. “Replaced 10 items”) at the bottom of the Find/Replace window. If you are fixing a block of ten numbers but see a result like “Replaced 76 items” then you know something messed up and you can immediately click inside the document and then press [Ctrl]-[Z] to undo what you just did, and try again.
Instructions:
First, you need to be patient and do this replacement in blocks that make sense. In my example here I am simply appending one 500 question pack into another 500 question pack. So my questions go from 1 to 500 but then they start over at 1 again all the way to 500. We cannot have duplicate IDs so we need to get those fixed.
- First we will do questions 1-9 because they are only single digit. This is real simple. I personally just manually do these by adding the previous number (500) to them. So I just put a “50” in front of each like so (screen shot). The blue arrows show the items I already edited, the red shows the next one I need to add “50” to.
- Now for the complex part, using Find/Replace. When doing this I try to keep things in blocks that make sense. This means I usually do 100 at a time to make it easier. When using Find/Replace in large complex files you need to make sure the “find” part is something VERY unique that will not give false results. For example I am about to just append a “5” in front of numbers 10-99 so that they become 510-599. I have to “Find” something unique so it knows where to place the “5”. Here is how I do that:
- First I highlight everything I can proceeding where I want the “5” to go, but only things I know will not change (in other words if I included the entire line where it says “Type”: “multiple” this find/replace would fail when it came across a True/False questions. This is a screen shot of what I chose to highlight. Notice I went as far back as I could without selecting something that might change (so I had to stop at the quotation mark since the word “multiple” could change. And the end of my selection is right where I want to insert the number “5”.
- Now, in Notepad++ just press [Ctrl]+[C] to copy the selection, and then press [Cltr]+[F] to open the Find window and automatically place your highlighted snippet into the find box. In that Find window, click the “Replace” tab. Here is a screen shot of how that should look.
- Now, in the replace box, be sure to press [Ctrl]+[V] to get the exact same snippet that you have placed into the find box because you do not want to alter your JSON structure you simply want to insert a number. After pasting the exact same snippet into the replace box, add the number you wish to insert (in our example it is a “5”). Here is a screen shot of how that looks.
- Finally, you need to highlight all of the JSON parts you wish for it to find and replace (in this case, insert a “5”) and be sure the “In Selection” box is checked. The accuracy of what you highlight does not matter so long as you include the parts you wish to find and replace. So in my example I am going to highlight from before question #10. It is ok if I am a little sloppy with where I start this highlight, as long as I an highlighting all of the relevant parts of question #10. The same goes for where my highlight ends, as long as I have the ID number area of the final question. Here is a screen shot of my highlight (trunctuated in the middle so it will fit on one screen).
- Now simply click “Replace All” in the Find/Replace window. Make sure “In Selection” is checked! The result should look like this.
- Next, I just move on to the next block of 100 and repeat the process. So in this example we would scroll down to where the ID numbers go from “599” to “100”.
- Same as before, we find a selection to copy for our find and replace. For the 3 digit numbers we don’t just insert a digit, we replace the first digit. In our example we are replacing the “1” in the 100’s with a “6” to make it 600’s. Here is a screen shot of how I would select that and [Ctrl]+[C] and [Ctrl]-[F].
- Notice my selection is very similar to the first 100 we did, but this time I am including the first digit “1”.
- Then notice in my replace box I changed that “1” to a “6”. And this is how we will replace all of the 100’s with equivalent 600’s.
- Now we do as we did before and highlight the area we want to replace the 100’s with 600’s. And as before we go a little beyond that selection so we make sure we get it all in there. Here is a screen shot of how that would look (again, middle is trunctuated so it fits on the screen).
- Now click replace all just as we did before. Here is the result from my example. Notice the results matches our expectation (replaced 100 occurrences). And notice we now end at 699 where it used to be 199. We would now need to do the same for the 200’s but this time replace them with 700’s. Then do the 300’s and replace them with 800’s, etc.
Reviews (0)
Only logged in customers who have purchased this product may leave a review.
Version History
- Added Initial release
Discussions (0)
Discussions
There are no discussions yet.
Reviews
There are no reviews yet.