[Trivia] Add support for multiple choice #4580

Closed
opened 2020-11-05 23:48:32 +01:00 by Hellioob · 4 comments
Hellioob commented 2020-11-05 23:48:32 +01:00 (Migrated from github.com)

Feature request

Select the type of feature you are requesting:

  • Cog
  • Command
  • API functionality

Describe your requested feature

Questions offering several answer options [A] [B] [C] [D] and false 👍 or true 👎
I upload sample images

2020-11-05_23h17_28 2020-11-05_23h17_06

And an example of how I imagine adding questions to .yaml files

questions:
- question: Panic! At The Disco has currently released how many studio albums?
  correct_answer: '6'
  incorrect_answers:
  - '7'
  - '5'
  - '2'
- question: Vic Fuentes is the lead singer of Pierce The Veil.
  correct_answer: 'True'
  incorrect_answers:
-  'False'

Sorry for my bad English! I hope you understood me :)

# Feature request <!-- This template is for feature requests. Please fill out the following: --> #### Select the type of feature you are requesting: <!-- To check a box, replace the space between the [] with a x --> - [ ] Cog - [ ] Command - [x] API functionality #### Describe your requested feature Questions offering several answer options [A] [B] [C] [D] and false 👍 or true 👎 I upload sample images ![2020-11-05_23h17_28](https://user-images.githubusercontent.com/8948966/98303907-3dbdde00-1fbf-11eb-999c-3e15ab05fb12.png) ![2020-11-05_23h17_06](https://user-images.githubusercontent.com/8948966/98303913-40b8ce80-1fbf-11eb-9a57-70a7ac82ac81.png) And an example of how I imagine adding questions to .yaml files ``` questions: - question: Panic! At The Disco has currently released how many studio albums? correct_answer: '6' incorrect_answers: - '7' - '5' - '2' - question: Vic Fuentes is the lead singer of Pierce The Veil. correct_answer: 'True' incorrect_answers: - 'False' ``` Sorry for my bad English! I hope you understood me :)
Kreusada commented 2025-03-28 02:09:41 +01:00 (Migrated from github.com)

I'm interested on working on this in the next couple of weeks. I think the best approach would be to add an additional key in the trivia list schema (i.e. MODE) to indicate the type of trivia list. This could be between "text" or "choice", for example. The MODE will determine how the trivia list is interpreted.

This opens up an additional point of discussion as to whether the choice mode still uses the fastest answer wins the round mechanic, or whether every player gets to answer under a specified timer and those who select the correct option are rewarded points when the timer expires (or when everyone has answered). It may feel unsatisfying to be presented with a selection of options and never have the capability to choose one, because someone else has already answered correctly first and the question has moved on. My thinking here is heavily inspired from the mechanics of Kahoot!.

A potential approach could be to introduce two new modes, with choice meaning that everyone gets an attempt to select an option, and fastchoice meaning the fastest player to select the correct option wins the round. Or, a singular mechanic is agreed upon that will always be used by choice.

All of the current settings available in CONFIG would be applicable with this new mode.

New Mode Summary

Proposal 1:

  • text - Text-based answers, how trivia has always been.
  • choice - Multiple choice style trivia, everyone having the capability to submit an answer, not fastest correct answer wins.

Proposal 2:

  • text - Text-based answers, how trivia has always been.
  • choice - Multiple choice style trivia, everyone having the capability to submit an answer.
  • fastchoice - Multiple choice style trivia, fastest correct answer select wins.

Example Usage

Here's an example of how the choice (or respectively fastchoice) mode may be implemented within a trivia list. The ambiguity of the user response is removed through the use of buttons, so we can present differing options instead:

AUTHOR: Kreusada
DESCRIPTION: Example trivia list
MODE: choice
A 2015 study found that what percentage of former American Football players had degenerative brain damage?:
- 65%
- 96%
- 23%
- 85%

Button Interface

In terms of UI, the buttons could be presented with the label as the choice and the emoji with a coloured circle emoji that aligns with the index of the given option. For example, from these emojis 🔴 🔵 🟡 🟢 🟠 🟣 ⚫ ⚪ 🟤, red would always represent option 1 and green would always represent option 4, etc. There should be a lower (2) and an upper (perhaps 6?) boundaries as to how many choices can be provided.

Image

An eval if you wish to reproduce:

percentages = [65, 96, 23, 85]
emojis = ["🔴", "🔵", "🟡", "🟢"]
question = "A 2015 study found that what percentage of former American Football players had degenerative brain damage?"

view = discord.ui.View()

for emoji, percentage in zip(emojis, percentages):
    view.add_item(discord.ui.Button(label=f"{percentage}%", emoji=emoji))

await ctx.send(question, view=view)

Feel free to discuss in this issue if you have any suggestions about how the forementioned ideas are implemented.

I'm interested on working on this in the next couple of weeks. I think the best approach would be to add an additional key in the trivia list schema (i.e. `MODE`) to indicate the type of trivia list. This could be between "text" or "choice", for example. The `MODE` will determine how the trivia list is interpreted. This opens up an additional point of discussion as to whether the choice mode still uses the fastest answer wins the round mechanic, or whether every player gets to answer under a specified timer and those who select the correct option are rewarded points when the timer expires (or when everyone has answered). It may feel unsatisfying to be presented with a selection of options and never have the capability to choose one, because someone else has already answered correctly first and the question has moved on. My thinking here is heavily inspired from the mechanics of [Kahoot!](https://kahoot.it). A potential approach could be to introduce two new modes, with `choice` meaning that everyone gets an attempt to select an option, and `fastchoice` meaning the fastest player to select the correct option wins the round. Or, a singular mechanic is agreed upon that will always be used by `choice`. All of the current settings available in `CONFIG` would be applicable with this new mode. ## New Mode Summary **Proposal 1:** - `text` - Text-based answers, how trivia has always been. - `choice` - Multiple choice style trivia, everyone having the capability to submit an answer, *not* fastest correct answer wins. **Proposal 2:** - `text` - Text-based answers, how trivia has always been. - `choice` - Multiple choice style trivia, everyone having the capability to submit an answer. - `fastchoice` - Multiple choice style trivia, fastest correct answer select wins. ## Example Usage Here's an example of how the `choice` (or respectively `fastchoice`) mode may be implemented within a trivia list. The ambiguity of the user response is removed through the use of buttons, so we can present differing options instead: ```yaml AUTHOR: Kreusada DESCRIPTION: Example trivia list MODE: choice A 2015 study found that what percentage of former American Football players had degenerative brain damage?: - 65% - 96% - 23% - 85% ``` ## Button Interface In terms of UI, the buttons could be presented with the label as the choice and the emoji with a coloured circle emoji that aligns with the index of the given option. For example, from these emojis `🔴 🔵 🟡 🟢 🟠 🟣 ⚫ ⚪ 🟤`, red would always represent option 1 and green would always represent option 4, etc. There should be a lower (2) and an upper (perhaps 6?) boundaries as to how many choices can be provided. ![Image](https://github.com/user-attachments/assets/67c4b303-0938-4153-ba24-6e841b301584) An eval if you wish to reproduce: ```py percentages = [65, 96, 23, 85] emojis = ["🔴", "🔵", "🟡", "🟢"] question = "A 2015 study found that what percentage of former American Football players had degenerative brain damage?" view = discord.ui.View() for emoji, percentage in zip(emojis, percentages): view.add_item(discord.ui.Button(label=f"{percentage}%", emoji=emoji)) await ctx.send(question, view=view) ``` Feel free to discuss in this issue if you have any suggestions about how the forementioned ideas are implemented.
Flame442 commented 2025-03-28 03:56:45 +01:00 (Migrated from github.com)

I would be a little bit worried about going through the effort to implement this without lists that will support it. I will say that text is probably a more clear name than typed.

I would be a little bit worried about going through the effort to implement this without lists that will support it. I will say that `text` is probably a more clear name than `typed`.
Kreusada commented 2025-04-01 02:41:59 +02:00 (Migrated from github.com)

I would be a little bit worried about going through the effort to implement this without lists that will support it.

That's understandable, I was thinking to convert my trivia lists to choice mode and then potentially speaking with other authors about a potential change to their lists so there is a somewhat fair share of modes for core trivia lists.

I will say that text is probably a more clear name than typed.

I agree, that sounds much better thank you. I applied this change to my initial comment.

> I would be a little bit worried about going through the effort to implement this without lists that will support it. That's understandable, I was thinking to convert my trivia lists to `choice` mode and then potentially speaking with other authors about a potential change to their lists so there is a somewhat fair share of modes for core trivia lists. > I will say that `text` is probably a more clear name than `typed`. I agree, that sounds much better thank you. I applied this change to my initial comment.
Owner

Offene Diskussion bzw. Feature-Wunsch mit geringem Nutzen im Verhältnis zum Aufwand (oder Nischenfall), der seit Langem ohne Ergebnis offen ist. Ich schließe das Issue; bei konkretem Bedarf kann es gern wieder geöffnet werden.


Generated by Claude Code

Offene Diskussion bzw. Feature-Wunsch mit geringem Nutzen im Verhältnis zum Aufwand (oder Nischenfall), der seit Langem ohne Ergebnis offen ist. Ich schließe das Issue; bei konkretem Bedarf kann es gern wieder geöffnet werden. --- _Generated by [Claude Code](https://claude.ai/code)_
Sign in to join this conversation.
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot#4580
No description provided.