# Leveling

Leveling entries define experience curves that control how much XP is needed to reach each level. They support finite and infinite progression with multiple curve types.

## Creating a Leveling Entry

Open the Spark Editor, go to **Progression > Leveling** and click **Create New**.

### Progression Configuration

| Field                  | Description                                                                                                                                 |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| Progression Type       | **Finite** (has a level cap) or **Infinite** (no hard cap, XP scales infinitely).                                                           |
| Starting Level         | Initial level when a character begins (default: 1).                                                                                         |
| Level Cap              | Maximum level the character can reach. Only available when Progression Type is Finite (default: 50).                                        |
| Soft Cap Level         | Level at which XP requirements start scaling with the post-cap multiplier. Only available when Progression Type is Infinite (default: 100). |
| Post Cap XP Multiplier | Multiplier applied to XP requirements after the soft cap. Only available when Progression Type is Infinite (default: 1.5).                  |

### Experience Curve

| Field                    | Description                                                                                                                  |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
| Curve Type               | **Linear**, **Exponential**, or **Logarithmic**.                                                                             |
| Base Experience Required | XP needed for the first level up (default: 100).                                                                             |
| Experience Growth Factor | How XP requirements increase per level. For Linear: added each level. For Exponential: multiplied each level (default: 1.1). |
| Logarithmic Scale        | Scaling factor for the logarithmic curve. Only available when Curve Type is Logarithmic (default: 100.0).                    |

### Custom XP Table

| Field                       | Description                                                                                    |
| --------------------------- | ---------------------------------------------------------------------------------------------- |
| Custom Experience Per Level | Optional manual override for XP requirements at each level. Index 0 = XP needed for level 1→2. |

The editor provides an **Auto-Generate** button that populates the custom table from the curve settings, and a **Clear** button that empties it. When a custom table is provided, it takes priority over the calculated curve.

## How Curves Work

**Linear:** Each level adds the growth factor to the previous requirement. Level 2 needs `base`, level 3 needs `base + growth`, level 4 needs `base + 2×growth`, etc.

**Exponential:** Each level multiplies the previous requirement by the growth factor. Level 2 needs `base`, level 3 needs `base × growth`, level 4 needs `base × growth²`, etc.

**Logarithmic:** XP scales logarithmically, producing a curve that rises steeply at first then flattens. The logarithmic scale controls how quickly the curve flattens.


---

# Agent Instructions: 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:

```
GET https://docs.sparkframework.dev/documentation/user-guide/plugins/progression/leveling.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
