> For the complete documentation index, see [llms.txt](https://lethium.gitbook.io/lethium-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lethium.gitbook.io/lethium-docs/gameplay/upgrades.md).

# Upgrades

The Coins shop of permanent stat upgrades, with cost curves and zone gates.

File: `plugins/ClickEmCore/modules/upgrades.yml`. Module id: `upgrades`. Commands: `/upgrades`, `/upgrade`.

Upgrades are the first thing a new player touches. They cost **Coins only** and each level permanently adds stats. They are available from the start with no requirements, except the optional zone gates.

```yaml
upgrades:
  power:
    rarity: LEGENDARY
    display-name: "clickem.upgrades.power.name"
    icon: STRING
    custom-model-data: 10007
    max-level: 500
    base-cost: 20
    cost-growth: 1.056
    effect-curve: LINEAR
    stats-per-level:
      damage-mult: 1.0
    zone-gates:
      - {zone: w2_zona1, cap: 100}
      - {zone: w3_zona1, cap: 200}
```

| Key                         | Meaning                                                                                                                                                                  |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `display-name`              | Language key (or plain text). The name and lore live in `lang/en_us.yml` under `clickem.upgrades.<id>`.                                                                  |
| `icon`, `custom-model-data` | Menu icon. The shared resource-pack model is removed when maxed and a beacon shows instead.                                                                              |
| `max-level`                 | Highest level.                                                                                                                                                           |
| `base-cost`, `cost-growth`  | The next level costs `base-cost x cost-growth^(current level)` Coins. This price is fixed and is not scaled to the player's progress.                                    |
| `effect-curve`              | `LINEAR`: effect = `stats-per-level x level`. `GEOMETRIC`: compounding, set `effect-growth` above 1. `LOGARITHMIC`: fast early, tapering, controlled by `effect-growth`. |
| `stats-per-level`           | [Stat keys](/lethium-docs/configuration/stats-and-limits.md) granted per level.                                                                                          |
| `zone-gates`                | Stops players pumping all early Coins into one upgrade. Free up to the lowest `cap`, then the listed zone must be unlocked to pass each cap.                             |
| `rarity`                    | Tooltip frame only.                                                                                                                                                      |

The shipped upgrades are Power, Crit Chance, Crit Damage, Luck and more, each with 500 levels and one world's worth (100 levels) opened per zone gate.

### How to

{% tabs %}
{% tab title="Make an upgrade cheaper or dearer" %}
Change `base-cost` (price of level 1) or `cost-growth` (how fast it climbs). `1.056` doubles the price about every 13 levels.
{% endtab %}

{% tab title="Remove a zone gate" %}
Delete the `zone-gates:` block of that upgrade. It then just costs Coins all the way.
{% endtab %}

{% tab title="Add a new upgrade" %}
Copy an existing block, give it a new id, add `clickem.upgrades.<newid>.name` (and lore) to `lang/en_us.yml`, then run `/clickem reload`.
{% endtab %}

{% tab title="Change what an upgrade gives" %}
Edit `stats-per-level`. `damage-mult: 1.0` at level 100 = +100% Power.
{% endtab %}
{% endtabs %}

### Staff commands

`/ceadmin upgrades set <player> <upgrade> <level>`, `/ceadmin upgrades reset <player> [upgrade]`.

Upgrades reset on [Rebirth](/lethium-docs/gameplay/rebirth.md).


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://lethium.gitbook.io/lethium-docs/gameplay/upgrades.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
