> For the complete documentation index, see [llms.txt](https://ultimaterewards.athelion.eu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ultimaterewards.athelion.eu/configuration/rewards/reward-features/randomization/execution-chances.md).

# Execution Chances

### Individual chances

Each action line can be assigned a chance (0 - 100 represented as a percentage) at which the line will be executed. The chance is written directly after the action tag and followed by a colon.

#### Example

{% code fullWidth="false" %}

```yaml
actions:
 - "[console] 20:give %player% obsidian 2" # 20%  chance
 - "[console] 60:give %player% coal 1"     # 60%  chance
 - "[console] give %player% apple 16"      # 100% chance (no value = always)
```

{% endcode %}

{% hint style="info" %}
Individual chances are independent of each other — every line is rolled separately, so several of them (or none) can run in the same claim.
{% endhint %}

### Group chances

Each action section can be separated by percentages, where each percentage represents the probability that the corresponding section will be executed. The percentages determine how likely it is for a particular block of actions to run. When these sections are defined, the system will randomly select **exactly one** of the sections based on their assigned probabilities.

{% hint style="info" %}
The numbers are weights, so they work best when they add up to 100 — that way each one reads directly as a percentage.
{% endhint %}

#### Example

{% code fullWidth="false" %}

```yaml
actions:
  80: # 80% chance for execution
    - '[console] give %player% diamond 1'
    - '[console] give %player% iron_ingot %exampleRandom%'
    - '[console] give %player% gold_ingot 3'
    - '[console] say %player% claimed his %type% reward!'
    - '[actionbar] &aSuccessfully claimed!'
    - '[title] &aClaimed'
    - '[subtitle] &aReward %type%'
  20: # 20% chance for execution
    - '[console] give %player% diamond 1'
    - '[console] give %player% iron_ingot %exampleRandom%'
    - '[console] give %player% gold_ingot 3'
    - '[console] say %player% claimed his %type% reward!'
    - '[actionbar] &aSuccessfully claimed!'
    - '[title] &aClaimed'
    - '[subtitle] &aReward %type%'
    - '[message] &a&lYou have been extra lucky today! Received 5 more diamonds!'
    - '[console] give %player% diamond 5'
    - '[console] 10:give %player% netherite_ingot 1' # Individual chances can be used aswell
```

{% endcode %}
