> For the complete documentation index, see [llms.txt](https://edseries-plugins.gitbook.io/p/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://edseries-plugins.gitbook.io/p/eddungeons/extra/cost-types.md).

# Cost Types

### Cost Types

#### 1. Arithmetic Cost (Linear Growth)

**Formula:** `STARTING_COST + LEVEL * INCREASE_COST_BY`

Arithmetic cost increases by a fixed amount each level, creating a linear progression. This results in predictable, steady cost increases.

**Example:**

* Starting Cost: 100
* Increase Cost By: 50
* Level 1: 100 + 1 × 50 = 150
* Level 2: 100 + 2 × 50 = 200
* Level 3: 100 + 3 × 50 = 250

#### 2. Exponential Cost (Exponential Growth)

**Formula:** `STARTING_COST * EXPONENTIAL_GROWTH^LEVEL`

Exponential cost multiplies by a growth factor each level, creating rapid cost acceleration. This creates increasingly expensive upgrades at higher levels.

**Example:**

* Starting Cost: 100
* Exponential Growth: 1.5
* Level 1: 100 × 1.5¹ = 150
* Level 2: 100 × 1.5² = 225
* Level 3: 100 × 1.5³ = 337.5

### Configuration

#### Arithmetic Cost Configuration

```yaml
currency: "coins"           # Currency type to use
starting-cost: 100.0       # Base cost at level 0
increase-cost-by: 50.0     # Amount to add per level
remove-currency: true      # Whether to deduct currency from player
```

#### Exponential Cost Configuration

```yaml
currency: "gems"           # Currency type to use
starting-cost: 100.0       # Base cost at level 0
exponential-growth: 1.5    # Multiplier per level (must be > 1.0)
remove-currency: true      # Whether to deduct currency from player
is-exponential: true       # Set to true for exponential cost
```


---

# 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://edseries-plugins.gitbook.io/p/eddungeons/extra/cost-types.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.
