Skip to content

Configuration

Simon_Flash edited this page Aug 27, 2017 · 3 revisions

TriviaQuest - Developed by Simon_Flash (mcsimonflash@gmail.com)
Current Version: 2.0.1
Status: Active -> New features and updates are in development


Overview

Configuration is divided into two sections: The triviaquest.core file in the root directory, and all of the .pack files in the packs folder. Both of these may be found in the triviaquest folder within the config directory of your server.


Core

"-legacy"=boolean

Attempts to convert previous config versions. This node in only available in versions appended with -legacy.

-v2.0.0-legacy: Converts v1.3.0 configs, stored in triviaquest.conf.

config -> enable-on-startup=boolean

If true, enables the integrated runner on startup.

config -> enable-rewards-count=int

The number of players that must be online for all trivia questions to give rewards. Does not check for AFK players.

config -> enable-trivia-count=int

The number of players that must be online for the runner to post trivia questions. Does not check for AFK players.

config -> show-answers=boolean

Whether or not to display answers after the trivia question.

config -> trivia-interval=int

The interval between trivia questions using the integrating runner.

config -> trivia-length=int

The length of trivia questions. If the trivia-length passes, the question will end automatically.

config -> trivia-prefix=String

The prefix shown before trivia questions.

enabled-packs=List

A list of packs to be included in trivia questions. The name correlates directly to a file in the packs directory named name.pack.

rewards{}

A map of rewards that contain a command and chance, as shown below.

diamond-reward { //Opens up a diamond reward builder (inside the rewards{} map)
    chance=int //the chance, in the form chance/chance-sum. If the chance-sum is 100, the chance is equal to the percentage
    command=String //the command to be executed, without the preceding "/"
}

Packs

trivia -> completions{}

A map of completion trivia, which uses the following format. An automated method to add blanks is in progress.

simple-completion {
    choices=["s_mp_e"]
    word="simple"
}

trivia -> questions{}

A map of question trivia, which matches this example.

simple-question {
    choices=["simple", "Not simple, but I needed a second answer."]
    question="What word is identical to simple?"
}

trivia -> scrambles{}

A map of scramble trivia, as shown below. A method to auto-scramble will be added Soon™

simple-scramble {
    choices=["ilmesp"]
    word="simple"
}

Example Configs

Config Disclaimer

All default configs start with the following message. It has been removed from the default examples to avoid repetition.

# TriviaQuest - Developed by Simon_Flash
# Config Version - 2.0.0
#
# For reference, check out the TriviaQuest Wiki
# https://github.com/SimonFlash/TriviaQuest/wiki
#
# For support, check out my Discord server
# https://discordapp.com/invite/4wayq37

Default Config - triviaquest.core

# To convert questions from a previous config, set to true. Will not convert config settings or rewards.
"-legacy"=false
config {
    # Enable runner on startup.
    enable-on-startup=true
    # Number of players online for trivia to give rewards.
    enable-rewards-count=4
    # Number of players online for trivia to run automatically.
    enable-trivia-count=2
    # Interval between trivia questions by the runner, in seconds.
    trivia-interval=300
    # Length of each trivia question, in seconds.
    trivia-length=30
    # Prefix before trivia messages.
    trivia-prefix="&8&l[&5TriviaQuest&8&l]&f "
}
# List of enabled Trivia Packs #
enabled-packs=[
    "trivia"
]
# Rewards to be used in trivia. Follows a simple chance/chance-sum formula. Use <player> for the players name.
rewards {
    Diamond {
        chance=8
        command="give <player> minecraft:diamond"
    }
    Emerald {
        chance=2
        command="give <player> minecraft:emerald"
    }
}

Default Config - trivia.pack

trivia {
    completions {
        GoodLuck {
            choices=["_nt_d__es_abl_s___nt_ria_i_m"]
            word="Antidisestablishmentarianism"
        }
    }
    questions {
        Developer {
            answers=["Simon_Flash", "Simon"]
            question="Who is the developer of TriviaQuest?"
        }
        Psyduck {
            answers=["AnDwHaT5", "Avery"]
            question="Who is the greatest Psyduck in the world?"
        }
    }
    scrambles {
        Sponge {
            choices=["neoSgp erwePdo"]
            word="Sponge Powered"
        }
    }
}