Giter Site home page Giter Site logo

pokesplashdev / trivia Goto Github PK

View Code? Open in Web Editor NEW

This project forked from roanokedevelopment/trivia

0.0 0.0 0.0 356 KB

A server side Fabric mod that posts quizzes at set intervals with item rewards

License: GNU Affero General Public License v3.0

Java 100.00%

trivia's Introduction

Trivia - A Fabric 1.19.2 Question & Reward Plugin

Originally created for the Roanoke Cobblemon Server to make Cobblemon items more obtainable

On first run, the plugin will generate a Trivia folder with both questions & rewards JSON files.

Questions/Rewards are added under "pools", which could be treated as categories or "difficulty ranges".

A quiz question will be put in chat every 10 minutes, and will time out if not answered in 2 minutes.

If a player's inventory is full, or inserting the item goes wrong for some other reason, it is dropped in front of them.

img.png

Upcoming Features

  • Configuration - chat formatting will be made configurable /w MiniMessage & Placeholder support
  • Probability - probabilities will be configurable both on pools & individual questions/rewards
  • Cobblemon Integration - use Cobblemon API to auto generate questions like "What type is this Pokemon", "What's the ability from this description" etc
  • Command Rewards - with player name placeholders, so crates/pokemon/claim blocks can be given as rewards
  • Commands

  • /trivia reload [trivia.reload] - reload questions & rewards files
  • /trivia interval (seconds) [trivia.interval] - set the amount of time that should pass between questions
  • /trivia timeout (seconds) [trivia.timeout] - after this many seconds, the question is "timed out" and not answerable
  • /trivia start [trivia.startt] - force start a quiz, useful for testing questions/rewards
  • Questions & Rewards Files

    On first run, these should be generated automatically, you can change them under /config/Trivia/

    Both questions & rewards are under "pools", think of these as categories or difficulty types. Questions under the "easy" pool will give rewards from the "easy" pool, but the same could be done for Pokemon vs Minecraft trivia.

    Example questions.json

    ```json { "easy": [ { "question": "What type is Bulbasaur?", "answers": [ "Grass", "Poison" ] } ], "medium": [ { "question": "What ability does Bulbasaur have?", "answers": [ "Overgrow", "Chlorophyll" ] }, { "question": "What ability does Ivysaur have?", "answers": [ "Overgrow", "Chlorophyll" ] } ] } ```

    Example rewards.json

    ```json { "easy": [ { "item_name": "cobblemon:dawn_stone", "display_name": "Dawn Stone", "quantity": 1 } ], "medium": [ { "item_name": "cobblemon:link_cable", "display_name": "Link Cable", "quantity": 1 }, { "item_name": "cobblemon:dragon_scale", "display_name": "Dragon Scale", "quantity": 1 } ] } ```

    trivia's People

    Contributors

    bencrow11 avatar xanderforrest avatar

    Recommend Projects

    • React photo React

      A declarative, efficient, and flexible JavaScript library for building user interfaces.

    • Vue.js photo Vue.js

      ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

    • Typescript photo Typescript

      TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

    • TensorFlow photo TensorFlow

      An Open Source Machine Learning Framework for Everyone

    • Django photo Django

      The Web framework for perfectionists with deadlines.

    • D3 photo D3

      Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

    Recommend Topics

    • javascript

      JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

    • web

      Some thing interesting about web. New door for the world.

    • server

      A server is a program made to process requests and deliver data to clients.

    • Machine learning

      Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

    • Game

      Some thing interesting about game, make everyone happy.

    Recommend Org

    • Facebook photo Facebook

      We are working to build community through open source technology. NB: members must have two-factor auth.

    • Microsoft photo Microsoft

      Open source projects and samples from Microsoft.

    • Google photo Google

      Google โค๏ธ Open Source for everyone.

    • D3 photo D3

      Data-Driven Documents codes.