> 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/random-placeholders.md).

# Random Placeholders

Randomization refers to the ability to create custom placeholders (in the "randoms.yml" file) where you specify a numerical range from which a random number will be selected during command execution.

Let's consider this example configuration:

```yaml
placeholders:
   exampleRandom: 16-64 # Will return random number between 16 - 64
   anotherRandom: 10-10000 # Will return random number between 10 - 10,000
```

Now we can use the specified placeholders in the actions of any reward. Here's a demonstration example:

Suppose we have a reward called "Welcome Bonus" which gives the player a certain amount of apples. We want the amount of apples to be randomized within a certain range using the `exampleRandom` placeholder we defined earlier.

```yaml
enabled: true
type: one_time_reward
disappear: false
use-firework: true
permission: ultimaterewards.welcomeBonus
available-item: CHEST_MINECART
available-display-name: '&a&lWELCOME BONUS'
available-lore:
  - ' '
  - '&7Contains:'
  - '&e ➪ 16 - 64x Apple'
  - ' '
  - '&b► Click to claim'
unavailable-display-name: "&7&lWELCOME BONUS"
unavailable-lore:
  - '&7Welcome bonus was already'
  - '&7claimed.'
unavailable-item: MINECART
no-permission-item: BARRIER
no-permission-display-name: "&c&l&mWELCOME BONUS"
no-permission-lore:
  - "&c ✕ Locked, requires"
  - "&c   %permission% permission"
actions:
  - '[console] give %player% apple %exampleRandom%'
  - '[message] &aWelcome to the server, %player%! I hope these items will assist you in getting started.'
```

You can define as many custom placeholders as you need in the "randoms.yml" file, and use them in your commands to add some variability to your server gameplay.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ultimaterewards.athelion.eu/configuration/rewards/reward-features/randomization/random-placeholders.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
