How results are parsed
Scoring is a straight tally — deliberately simple so it is predictable for quiz authors:
- Start every result’s tally at 0.
- For each answer the player picks, add the option’s
scores[resultId]to each result’s tally. - The result with the highest tally wins.
- Ties break in favour of the result that appears first in the
resultsarray. That makes outcomes deterministic: identical answers always produce the identical result.
Example
"results": [
{ "id": "air", "title": "Air" },
{ "id": "fire", "title": "Fire" }
] Answers scored { "fire": 2 } and { "air": 2 } produce a 2–2 tie. Air is
listed first, so the player gets Air. If you want Fire to win that
combination, either list Fire first or give the fire-scoring option 3 points.
Two styles, one mechanism
- Tag quizzes: every option gives 1 point to exactly one result. The tally is “how many times did each result get picked”.
- Weighted quizzes: options spread points across results
(
{ "air": 2, "fire": 1 }) for more nuanced mapping.
Both are the same tally underneath — pick whichever fits your quiz.