# 🧮 Price Generator

> **Info:**
The last 10 runs are saved in pricing.yml, so they can be undone.

## Price Generator

Pricing hundreds of items by hand is slow and easy to get wrong. The price generator prices a shop, or one of its categories, for the kind of economy you want. Raw items such as logs, ores and mob drops have a built-in value, and everything crafted from them is worked out from its recipe. The prices it writes are built so no craft can be bought, made and sold back at a profit.

<figure><img src="../.gitbook/assets/price-generator/price-generator.png" alt="" width="563"><figcaption><p>Editor (Price Generator)</p></figcaption></figure>

Open it from **Editor > Price Generator**, or with `/pshop prices`.

| Command | Permission | Description |
| --- | --- | --- |
| `/pshop prices` | phoenixshop.command.prices | Opens the price generator. |

## Shop and Category

Pick the shop, then either **Whole Shop** or a single category. Only the items there are priced.

<figure><img src="../.gitbook/assets/price-generator/shop-and-category.png" alt="" width="563"><figcaption><p>Price Generator (Whole Shop)</p></figcaption></figure>

## Economy

How easy it is to make money on your server. Each choice shows what a diamond would cost and sell for.

<figure><img src="../.gitbook/assets/price-generator/economy.png" alt="" width="563"><figcaption><p>Price Generator (Balanced)</p></figcaption></figure>

| Economy | Prices | Selling pays |
| --- | --- | --- |
| OP | 20 times Balanced | 80% of the buy price |
| Easy | Twice Balanced | 50% of the buy price |
| Balanced | Diamond 250, iron ingot 21 | 25% of the buy price |
| Hard | Same as Balanced | 10% of the buy price |

Prices are rounded to a sensible step for their size, buy prices up and sell prices down, so rounding never opens a loop.

## Preview

Lists every item that would change, with its current and new buy and sell price in the item's currency. Nothing is written until you apply.

<figure><img src="../.gitbook/assets/price-generator/preview.png" alt="" width="563"><figcaption><p>Price Generator (Iron Ingot)</p></figcaption></figure>

## Apply

Overrides the current prices with the ones in the preview, after a confirmation. Every changed price is posted to the price change [Discord webhook](discord-webhooks.md) ⭐.

<figure><img src="../.gitbook/assets/price-generator/apply.png" alt="" width="563"><figcaption><p>Price Generator (Apply)</p></figcaption></figure>

## Undo

Puts back the prices from the last run, and each press goes one run further back. A price changed by hand since that run is kept.

<figure><img src="../.gitbook/assets/price-generator/undo.png" alt="" width="563"><figcaption><p>Price Generator (Undo)</p></figcaption></figure>

## What Is Priced

- A price that is off stays off, so an item that is only sold keeps no buy price. An item with neither price gets both.
- Items are priced by what they are, so a custom name, lore or model does not matter. Enchanted items, items from item plugins, items with purchase or sell commands, and items with more than one purchase item keep their price.
- Items with no recipe and no built-in value, such as spawners and spawn eggs, keep their price.

> **Info:**
Run the [Price Audit](price-audit.md) after applying. A price you set by hand elsewhere can still leave a loop the generator did not create.

Source: https://www.phoenixplugins.com/docs/phoenix-shop/features/price-generator