> For the complete documentation index, see [llms.txt](https://doc.lucky-cycle.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.lucky-cycle.com/games/index/millionaire.md).

# Millionaire

{% hint style="warning" %}
Demo: <https://campaigns.lucky-cycle.com/utils/games?game=millionaire>
{% endhint %}

1. [#configuration](#configuration "mention")
2. [#options](#options "mention")
3. [#assets](#assets "mention")

### Configuration

<details>

<summary>JSON</summary>

```json
{
  "options": {
    "randomize": true,
    "deadly": true,
    "levels": 3,
    "questions": {
      "en": [
        {
          "id": 1,
          "question": "What is the capital of France?",
          "answers": [
            {
              "id" : 1,
              "answer": "Paris",
              "correct": true
            },
            {
              "id" : 2,
              "answer": "London",
              "correct": false
            },
            {
              "id" : 3,
              "answer": "Berlin",
              "correct": false
            },
            {
              "id" : 4,
              "answer": "Brussels",
              "correct": false
            }
          ],
          "explanation": [
            "The capital of France is Paris."
          ],
          "text_color": "",
          "background_color": "",
          "background_image": "",
          "button_text_color": "",
          "button_background_color": ""
        },
        {
          "id": 2,
          "question": "What is the color of Napoleon's white horse?",
          "answers": [
            {
              "id" : 1,
              "answer": "White",
              "correct": true
            },
            {
              "id" : 2,
              "answer": "Black",
              "correct": false
            },
            {
              "id" : 3,
              "answer": "Brown",
              "correct": false
            },
            {
              "id" : 4,
              "answer": "Blond",
              "correct": false
            }
          ],
          "explanation": [
            "Napoleon's white horse is, as its name suggests, white."
          ],
          "text_color": "",
          "background_color": "",
          "background_image": "",
          "button_text_color": "",
          "button_background_color": ""
        },
        {
          "id": 3,
          "question": "How many days are in a leap year?",
          "answers": [
            {
              "id" : 1,
              "answer": "366",
              "correct": true
            },
            {
              "id" : 2,
              "answer": "365",
              "correct": false
            },
            {
              "id" : 3,
              "answer": "364",
              "correct": false
            },
            {
              "id" : 4,
              "answer": "367",
              "correct": false
            }
          ],
          "explanation": [
            "A leap year has 366 days."
          ],
          "text_color": "",
          "background_color": "",
          "background_image": "",
          "button_text_color": "",
          "button_background_color": ""
        },
        {
          "id": 4,
          "question": "What is the largest ocean in the world?",
          "answers": [
            {
              "id" : 1,
              "answer": "The Pacific Ocean",
              "correct": true
            },
            {
              "id" : 2,
              "answer": "The Indian Ocean",
              "correct": false
            },
            {
              "id" : 3,
              "answer": "The Atlantic Ocean",
              "correct": false
            },
            {
              "id" : 4,
              "answer": "The Arctic Ocean",
              "correct": false
            }
          ],
          "explanation": [
            "The largest ocean in the world is the Pacific Ocean."
          ],
          "text_color": "",
          "background_color": "",
          "background_image": "",
          "button_text_color": "",
          "button_background_color": ""
        }
      ],
      "fr": [
        {
          "id": 1,
          "question": "Quelle est la capitale de la France&nbsp;?",
          "answers": [
            {
              "id" : 1,
              "answer": "Paris",
              "correct": true
            },
            {
              "id" : 2,
              "answer": "Londres",
              "correct": false
            },
            {
              "id" : 3,
              "answer": "Berlin",
              "correct": false
            },
            {
              "id" : 4,
              "answer": "Bruxelles",
              "correct": false
            }
          ],
          "explanation": [
            "La capitale de la France est Paris."
          ],
          "text_color": "",
          "background_color": "",
          "background_image": "",
          "button_text_color": "",
          "button_background_color": ""
        },
        {
          "id": 2,
          "question": "Quelle est la couleur du cheval blanc de Napoléon&nbsp;?",
          "answers": [
            {
              "id" : 1,
              "answer": "Blanc",
              "correct": true
            },
            {
              "id" : 2,
              "answer": "Noir",
              "correct": false
            },
            {
              "id" : 3,
              "answer": "Marron",
              "correct": false
            },
            {
              "id" : 4,
              "answer": "Blond",
              "correct": false
            }
          ],
          "explanation": [
            "Le cheval blanc de Napoléon est, comme son nom l'indique, blanc."
          ],
          "text_color": "",
          "background_color": "",
          "background_image": "",
          "button_text_color": "",
          "button_background_color": ""
        },
        {
          "id": 3,
          "question": "Combien de jours compte une année bissextile&nbsp;?",
          "answers": [
            {
              "id" : 1,
              "answer": "366",
              "correct": true
            },
            {
              "id" : 2,
              "answer": "365",
              "correct": false
            },
            {
              "id" : 3,
              "answer": "364",
              "correct": false
            },
            {
              "id" : 4,
              "answer": "367",
              "correct": false
            }
          ],
          "explanation": [
            "Une année bissextile compte 366 jours."
          ],
          "text_color": "",
          "background_color": "",
          "background_image": "",
          "button_text_color": "",
          "button_background_color": ""
        },
        {
          "id": 4,
          "question": "Quel est le plus grand océan du monde&nbsp;?",
          "answers": [
            {
              "id" : 1,
              "answer": "L'océan Pacifique",
              "correct": true
            },
            {
              "id" : 2,
              "answer": "L'océan Indien",
              "correct": false
            },
            {
              "id" : 3,
              "answer": "L'océan Atlantique",
              "correct": false
            },
            {
              "id" : 4,
              "answer": "L'océan Arctique",
              "correct": false
            }
          ],
          "explanation": [
            "Le plus grand océan du monde est l'océan Pacifique."
          ],
          "text_color": "",
          "background_color": "",
          "background_image": "",
          "button_text_color": "",
          "button_background_color": ""
        }
      ],
      "nl": [
        {
          "id": 1,
          "question": "Wat is de hoofdstad van Frankrijk?",
          "answers": [
            {
              "id" : 1,
              "answer": "Parijs",
              "correct": true
            },
            {
              "id" : 2,
              "answer": "Londen",
              "correct": false
            },
            {
              "id" : 3,
              "answer": "Berlijn",
              "correct": false
            },
            {
              "id" : 4,
              "answer": "Brussel",
              "correct": false
            }
          ],
          "explanation": [
            "De hoofdstad van Frankrijk is Parijs."
          ],
          "text_color": "",
          "background_color": "",
          "background_image": "",
          "button_text_color": "",
          "button_background_color": ""
        },
        {
          "id": 2,
          "question": "Wat is de kleur van het witte paard van Napoleon?",
          "answers": [
            {
              "id" : 1,
              "answer": "Wit",
              "correct": true
            },
            {
              "id" : 2,
              "answer": "Zwart",
              "correct": false
            },
            {
              "id" : 3,
              "answer": "Bruin",
              "correct": false
            },
            {
              "id" : 4,
              "answer": "Blond",
              "correct": false
            }
          ],
          "explanation": [
            "Het witte paard van Napoleon is, zoals de naam al doet vermoeden, wit."
          ],
          "text_color": "",
          "background_color": "",
          "background_image": "",
          "button_text_color": "",
          "button_background_color": ""
        },
        {
          "id": 3,
          "question": "Hoeveel dagen zitten er in een schrikkeljaar?",
          "answers": [
            {
              "id" : 1,
              "answer": "366",
              "correct": true
            },
            {
              "id" : 2,
              "answer": "365",
              "correct": false
            },
            {
              "id" : 3,
              "answer": "364",
              "correct": false
            },
            {
              "id" : 4,
              "answer": "367",
              "correct": false
            }
          ],
          "explanation": [
            "Een schrikkeljaar heeft 366 dagen."
          ],
          "text_color": "",
          "background_color": "",
          "background_image": "",
          "button_text_color": "",
          "button_background_color": ""
        }
      ]
    },
    "text_color": "black",
    "background_color": "white",
    "button_text_color": "white",
    "button_background_color": "black"
  },
  "texts": {
    "en": {
      "good": "Correct!",
      "bad": "Nope!",
      "next": "Next question",
      "end": "Continue"
    },
    "fr": {
      "good": "Correct&nbsp;!",
      "bad": "Non&nbsp;!",
      "next": "Question suivante",
      "end": "Continuer"
    },
    "nl": {
      "good": "Correct!",
      "bad": "Fout!",
      "next": "Volgende vraag",
      "end": "Doorgaan"
    }
  },
  "images": {
    "background": "",
    "rewards": {}
  }
}
```

</details>

### Options

<table><thead><tr><th>Key</th><th>Type</th><th width="174">Explanation</th><th>Default</th></tr></thead><tbody><tr><td><pre><code>randomize
</code></pre></td><td>Boolean</td><td>Randomize the questions asked to the player (<strong>order</strong>, and <strong>selection</strong> if more questions available than <em><mark style="color:blue;">levels</mark></em>).</td><td>true</td></tr><tr><td><pre><code>deadly
</code></pre></td><td>Boolean</td><td>Game stops after one wrong answer.</td><td>true</td></tr><tr><td><pre><code>levels
</code></pre></td><td>Integer</td><td>Number of questions to answer. <em>If less questions than the selected amount, won't be used.</em></td><td>3</td></tr><tr><td><pre><code>questions > question
</code></pre></td><td>String</td><td>Question to be asked to the player.</td><td>"Q1, Q2..."</td></tr><tr><td><pre><code>answers > answer
</code></pre></td><td>String</td><td>Answers to the question <em>(should have <mark style="color:orange;">at least two</mark> per question)</em>.</td><td>"A1, A2, A3..."</td></tr><tr><td><pre><code>answer > correct
</code></pre></td><td>Boolean</td><td>Is the answer the right one <em>(can have more than one good answer per question)</em>.</td><td>true / false / false</td></tr><tr><td><pre><code>explanation
</code></pre></td><td>String <mark style="color:purple;">(accepts basic HTML)</mark></td><td><mark style="color:green;">Optional</mark> (screen will be skipped if no explanation). Used to give the right answer to the question, with some explanation.</td><td>"E1, E2..."</td></tr><tr><td><pre><code>text_color / background_color
</code></pre></td><td>String</td><td>Color &#x26; background of the question <mark style="color:$primary;">(or default)</mark>.</td><td>"black" / "white"</td></tr><tr><td><pre><code>button_text_color / button_background_color
</code></pre></td><td>String</td><td>Color &#x26; background of the button <mark style="color:$primary;">(or default)</mark>.</td><td>"white" / "black"</td></tr><tr><td><pre><code><strong>texts > good / bad
</strong></code></pre></td><td>String</td><td>Texts displayed as title on the explanation screen <em>(based on the answer)</em>.</td><td>"Correct!" / "Nope!"</td></tr><tr><td><pre><code>texts > next
</code></pre></td><td>String</td><td>Text of the button on the optional explanation screen <em>(if game isn't over)</em>.</td><td>"Next question"</td></tr><tr><td><pre><code>texts > end
</code></pre></td><td>String</td><td>Text of the button on the optional explanation screen <em>(if game is over)</em>.</td><td>"Continue"</td></tr></tbody></table>

### Assets

<table><thead><tr><th>Key</th><th>Size</th><th>Explanation</th><th>Default</th></tr></thead><tbody><tr><td><pre><code>question > background_image
</code></pre></td><td>String</td><td>Visual to be used as background of the question.</td><td>/</td></tr></tbody></table>
