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

# craft cost modifiers

Craft cost modifiers are configured per table under `craft-cost`.

They reduce recipe craft time and recipe energy cost without editing every recipe file.

## Example

```yaml
craft-cost:
  time:
    unit: "PERCENT"
    value: 30
  energy:
    unit: "PERCENT"
    value: 20
```

This example makes the table:

* Craft 30 percent faster.
* Use 20 percent less recipe energy.

## Units

| Unit      | Description                               |
| --------- | ----------------------------------------- |
| `PERCENT` | Reduces the base value by a percentage.   |
| `FLAT`    | Reduces the base value by a fixed amount. |

Aliases accepted by the plugin for `FLAT` include `AMOUNT`, `VALUE`, `UNIT`, and `FIXED`.

## Time Reduction

```yaml
craft-cost:
  time:
    unit: "PERCENT"
    value: 25
```

If a recipe has `time: 8`, the adjusted duration is:

```
8 * (100 - 25) / 100 = 6 seconds
```

The final craft time is rounded up to whole seconds. If a positive base time is reduced below 1 second, the runtime keeps it at 1 second.

## Energy Reduction

```yaml
craft-cost:
  energy:
    unit: "FLAT"
    value: 2
```

If a recipe has `energy: 5`, the adjusted energy cost is:

```
5 - 2 = 3
```

Energy cannot go below `0`.

The energy modifier also applies to the table's `energySetting.energyBase` drain where the table uses that base cost.

## Placeholders Use Adjusted Values

Recipe icon and progress tooltip placeholders use the table-adjusted values:

| Placeholder               | Value                                                               |
| ------------------------- | ------------------------------------------------------------------- |
| `%crafting_time%`         | Craft time after `craft-cost.time`.                                 |
| `%crafting_time_seconds%` | Adjusted craft time as seconds.                                     |
| `%energy_cost%`           | Recipe energy after `craft-cost.energy`.                            |
| `%energy_base%`           | Adjusted base drain when the consume mode uses base drain.          |
| `%total_energy%`          | Adjusted recipe energy plus adjusted base drain over adjusted time. |

Raw value placeholders are available when you need the recipe's original value:

```
%raw_crafting_time%
%raw_crafting_time_seconds%
%raw_energy_cost%
```

## Legacy Key Support

The plugin also reads these legacy paths:

```yaml
craftCost:
  time: {}
  energy: {}

cost-reduction:
  time: {}
  energy: {}

costReduction:
  time: {}
  energy: {}
```

Use `craft-cost` for new files.


---

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

```
GET https://star-generator.gitbook.io/star-generator-docs/features/craft-cost-modifiers.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.
