151 lines
5.0 KiB
JavaScript
151 lines
5.0 KiB
JavaScript
// MASTER - Needed to do pretty much everything.
|
|
export const MASTER_BEARER_TOKEN = '';
|
|
|
|
// SERVER - Trivia server and default header settings.
|
|
export const SERVER_URL = 'api-quiz.hype.space';
|
|
export const HEADERS = {
|
|
'x-hq-client': 'Android/1.12.2',
|
|
'content-type': 'application/json; charset=UTF-8',
|
|
'user-agent': 'okhttp/3.8.0',
|
|
};
|
|
|
|
// TESTING - When true, uses the test server.
|
|
export const TEST_MODE = false;
|
|
export const TEST_SERVER = 'wss://hqecho.herokuapp.com/';
|
|
export const MAX_TEST_PLAYERS = 5;
|
|
export const MAX_TEST_QUESTIONS = 1;
|
|
|
|
// LOGGING - When enabled, writes each session to the specified directory.
|
|
export const ENABLE_LOGGING = true;
|
|
export const LOG_DIR = './logs/'
|
|
|
|
// Set AUTOPLAY to true if you wish to have the game wait and play automatically next game.
|
|
// Time buffer in ms to wait after end of previous game to check for new game.
|
|
// 1000 * 60 * 10 would be 10 minutes.
|
|
export const AUTOPLAY = true;
|
|
export const NEXT_GAME_TIME_BUFFER = 1000 * 60 * 5;
|
|
|
|
// Time buffer in ms before time is up when the game will choose for you.
|
|
// 1000 * 1 would be 1 second.
|
|
export const TIME_EXPIRE_BUFFER = 1000 * 1;
|
|
|
|
// Uses extra lives automatically if player has them if prize is > threshold set below.
|
|
export const USE_EXTRA_LIFE_MIN_PRIZE = 10000;
|
|
|
|
// If nothing is chosen before time expires, answers will send via the following choices.
|
|
export const SPLIT_MODES = {
|
|
// 33% of players will be allocated all 3 choices.
|
|
EVENLY: 'evenly',
|
|
// Players will split all 3 choices proportionally by weights.
|
|
// ** Requires Discord and/or Google Module enabled.
|
|
WEIGHTS: 'weights',
|
|
// Players will split all 3 choices proportionally by what Google recommends.
|
|
// ** Requires Google Module enabled.
|
|
GOOGLE: 'google',
|
|
// Players will either split or choose best answer based on suggestion algorithm.
|
|
// ** Requires Discord Module enabled.
|
|
SUGGESTION: 'suggestion',
|
|
};
|
|
export const SPLIT_MODE = SPLIT_MODES.SUGGESTION;
|
|
// If true, the SUGGESTION split modes will utilize the trend in answers over time to give
|
|
// suggestion instead of raw normalized weights. Useful for certain savage questions where
|
|
// people at the last second tend to have the correct answer but majority of the weights
|
|
// have already gone with a different answer.
|
|
export const SUGGEST_USING_DELTAS = false;
|
|
|
|
// If true, game will always split 1/2/3 before time expires if % of remaining players is
|
|
// greater than certain threshold of all remaining players below.
|
|
export const DISCRETE_MODE = true;
|
|
export const MAX_PERCENTAGE_OF_REMAINING = 5;
|
|
|
|
// If true, game will always split 1/2/3 before time expires if potential pot is > threshold.
|
|
export const SAFE_WINNINGS_MODE = true;
|
|
export const MIN_AMOUNT_THRESHOLD = 50;
|
|
|
|
// Start sending suggestions after this many seconds
|
|
// ** Requires Discord and/or Google Module enabled.
|
|
export const SEND_SUGGESTION_SECONDS = 4;
|
|
// Start sending suggestions after this many seconds
|
|
// ** Requires Discord and/or Google Module enabled with Pushover module enabled.
|
|
export const PUSH_SUGGESTION_SECONDS = 7;
|
|
|
|
// If true, game will call send answers on x amount of players evenly for each second after the
|
|
// interval set below.
|
|
export const STAGGER_ANSWERS = false;
|
|
export const STAGGER_AT_INTERVAL = 4;
|
|
|
|
// If true, game will try to predict savage questions and reserve a portion of your players
|
|
// to allow automatic win.
|
|
export const PREDICT_SAVAGE = true;
|
|
|
|
// If true, in autoplay last answer will always split evenly to ensure at least 1 win.
|
|
export const SPLIT_LAST_ROUND = true;
|
|
|
|
|
|
/***********************************/
|
|
/* EXTRA MODULES */
|
|
/***********************************/
|
|
|
|
// DISCORD
|
|
export const ENABLE_DISCORD = false;
|
|
export const DISCORD_SETTINGS = {
|
|
// This is the token that allows you to read community answers
|
|
SCRAPER_TOKEN: '',
|
|
// This is the token that allows you to post results if you wish. Leave null to disable.
|
|
PUBLISH_TOKEN: null,
|
|
// Ids of channels to push to (make sure your bot has permissions in each channel);
|
|
PUBLISH_CHANNELS: [''],
|
|
};
|
|
export const DISCORD_SOURCES = [
|
|
/*
|
|
{
|
|
name: 'Main Source',
|
|
id: '1234567890987654321',
|
|
channels: [
|
|
{
|
|
name: 'trivia-channel',
|
|
id: '12345123451234512345',
|
|
weightModifier: 30,
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: 'Testing Source',
|
|
id: '112233445566778899',
|
|
channels: [
|
|
{
|
|
name: 'testing-channel',
|
|
id: '998877665544332211',
|
|
weightModifier: 1,
|
|
},
|
|
],
|
|
isTestChannel: true,
|
|
},
|
|
*/
|
|
];
|
|
export const DISCORD_WEIGHTS = {
|
|
'standard': 10,
|
|
'apg': 30,
|
|
'not': -10,
|
|
'w': 1,
|
|
'?': 3,
|
|
'apb': 2,
|
|
'its': 30,
|
|
};
|
|
|
|
// PUSHOVER - Push notifications via pushover.net
|
|
export const ENABLE_PUSH = false;
|
|
export const PUSH_SETTINGS = {
|
|
PUSHOVER_USER: '',
|
|
PUSHOVER_TOKEN: '',
|
|
};
|
|
|
|
// GOOGLE
|
|
export const ENABLE_GOOGLE = false;
|
|
export const GOOGLE_SETTINGS = {
|
|
// The below two correspond exactly to what they're called in your Google Custom Search.
|
|
// See Google Custom Search API to get started.
|
|
// You'll want to make sure your site searches all www.google.com and not just a custom domain.
|
|
API_KEY: '',
|
|
CX: '',
|
|
}; |