> 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/scratch-nine.md).

# Scratch Nine

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

{% hint style="success" %}
***Scratch Triple*** is now based on the same, unified, config.
{% endhint %}

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

### Configuration

<details>

<summary>JSON</summary>

```json
{
  "options": {
    "scratch_percentage": 50,
    "cursor_size": 1.5,
    "slot_number": 9,
    "use_reward_image": false
  },
  "texts": {
    "en": {},
    "fr": {},
    "nl": {}
  },
  "images": {
    "background": [
      GAME_URL + "/item-1.png",
      GAME_URL + "/item-2.png",
      GAME_URL + "/item-3.png",
      GAME_URL + "/item-4.png",
      GAME_URL + "/item-5.png"
    ],
    "overlay": GAME_URL + "/overlay.png",
    "cursor": GAME_URL + "/cursor.png",
    "brush": GAME_URL + "/cursor.png",
    "rewards": {}
  }
}
```

</details>

### Options

<table><thead><tr><th>Key</th><th>Type</th><th>Explanation</th><th>Default</th></tr></thead><tbody><tr><td><pre><code>scratch_percentage
</code></pre></td><td>Integer</td><td>Part of the image to be scratched before reveal.</td><td>50</td></tr><tr><td><pre><code>cursor_size
</code></pre></td><td>Integer</td><td>Size of the cursor.</td><td>1.5</td></tr><tr><td><pre><code>slot_number
</code></pre></td><td>Integer</td><td>Number of slots <em>(between 3 and 9)</em>.</td><td>9</td></tr><tr><td><pre><code>use_reward_image
</code></pre></td><td>Boolean</td><td>Use static or dynamic visuals <em>(based on the reward)</em>.</td><td>false</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>background
</code></pre></td><td>150 x 150px</td><td>Items of the grid <mark style="color:red;">(array has to contain 5 items!)</mark>.</td><td><a href="https://statics.lucky-cycle.com/files/_games/scratch-nine/item-1.png">/item-1.png</a></td></tr><tr><td><pre><code>overlay
</code></pre></td><td>150 x 150px</td><td>Visual of the overlay (will be displayed 9 times).</td><td><a href="https://statics.lucky-cycle.com/files/_games/scratch-nine/overlay.png">/overlay.png</a></td></tr><tr><td><pre><code>cursor
</code></pre></td><td><mark style="color:red;">64 x 64px</mark></td><td>Replace the default cursor while scratching.</td><td><a href="https://statics.lucky-cycle.com/files/_games/scratch-nine/cursor.png">/cursor.png</a></td></tr><tr><td><pre><code>brush
</code></pre></td><td><em>64 x 64px</em></td><td>Shape of the scratching. <mark style="color:orange;">Use the same image as </mark><em><mark style="color:orange;">cursor</mark></em><mark style="color:orange;"> if none provided.</mark></td><td><a href="https://statics.lucky-cycle.com/files/_games/scratch-nine/cursor.png">/cursor.png</a></td></tr></tbody></table>
