AlexandreArcil / QuestionsTime

Ask questions and gain prize for the winner !
Mozilla Public License 2.0
0 stars 0 forks source link

Improved Question Storage #7

Closed mrdeadlocked closed 5 years ago

mrdeadlocked commented 5 years ago

It would be great to be able to more easily import mass questions into the plugin. Having them outside of the main conf and in a more modular fashion (could then share them around). Here's kind of an example it wouldn't directly work for this but something similar.

https://github.com/Cog-Creators/Red-Trivia/tree/master/redbot/ext/trivia <--this is nice because it allows multiple iterations of correct answers (spelling/typos). https://github.com/sushant10/HQ_Bot/blob/master/Data/questions.json

https://github.com/rawsonj/triviabot/tree/master/questions <--this example is nice it would be really easy to mass format/import questions

AlexandreArcil commented 5 years ago

Ok I see, a simpler format for simple questions (One question -> One or Multiple Answer), and the possibility to have multiple files that's contains questions (can be useful to sort by theme).

I think something like this :

question1|answer1|answer2|...
question2|answer1|answer2|...

in a file with the extension .sqt (simple question time) can be good. What do think of it ?

mrdeadlocked commented 5 years ago

That would be great. What were you thinking for malus/prizes? Did you still want to have prize tied to each question? or just a pool of prizes with weights?

AlexandreArcil commented 5 years ago

I didn't imagine this format with the possibility to add a prize or a malus per question. But a pool of prizes and malus with weights is a good idea. And in addition of that, we can add a children-parent system :

{
prize1|...
prize2|...
malus2|...
question1|...
question2|...
}
{
prize3|...
question3|...
{
prize4|...
question4|...
question5|...
}
}
malus1|...
question6|...

•Every question in this file will have the malus1 •question1 and 2 will have the prize1, prize2 and malus2 •question3 will have the prize3 •question4 and 5 will have the prize3 and 4 •question6 will only have the malus1.

Do you have something to add ?

mrdeadlocked commented 5 years ago

That sounds great. Can prizes/malus be commands running?

AlexandreArcil commented 5 years ago

Yes, it will be in the next version, I just need to check if a command exist and do some tests.

mrdeadlocked commented 5 years ago

Let me know if you'd like any testing done.

AlexandreArcil commented 5 years ago

No thanks, the added functionalities isn't big, so testing isn't long. For the "command check" problem, it seems to be a Sponge bug : https://forums.spongepowered.org/t/get-minecraft-commands/33575/4.