# Default Shop

{% hint style="success" %}
The Default Shop config file is located in:

`[Minecraft files (usually: /.minecraft)]/config/cobbledollars/default_shop.json`
{% endhint %}

## The base file with an empty shop

{% code title="Empty Shop" lineNumbers="true" %}

```json
{
  "defaultShop": []
}
```

{% endcode %}

{% hint style="danger" %} <mark style="color:blue;">"defaultShop"</mark> should nerver be renamed
{% endhint %}

***

## Category

{% code title="Empty Category" lineNumbers="true" %}

```json
{
  "defaultShop": [
    {
      "Category Name": []
    }
  ]
}
```

{% endcode %}

{% hint style="success" %} <mark style="color:blue;">`"Category Name"`</mark>  can be any renamed to anything and will define the name of the category
{% endhint %}

{% code title="Multiple Categories" lineNumbers="true" %}

```json
{
  "defaultShop": [
    {
      "Category Name": []
    },
    {
      "Other Category": []
    },
    {
      "3rd Category": []
    }
  ]
}
```

{% endcode %}

{% hint style="danger" %}

* Use commas to separate the categories
* The last category doesn't need a comma
  {% endhint %}

***

## Offer

### Item

{% code title="Simple Item Offer" lineNumbers="true" %}

```json
{
  "defaultShop": [
    {
      "Category Name": [
        {
          "item": "minecraft:stick",
          "price": 50
        }
      ]
    }
  ]
}
```

{% endcode %}

{% hint style="info" %}

* <mark style="color:blue;">`"item":`</mark> can be any item [Resource Location](https://minecraft.wiki/w/Resource_location) (vanilla & modded items) (see: [Data Values](https://minecraft.wiki/w/Java_Edition_data_values))
* Example of modded item: <mark style="color:blue;">`"item": "cobblemon:poke_ball"`</mark>
  {% endhint %}

{% hint style="info" %}

* <mark style="color:blue;">`"price":`</mark> can be any number
* <mark style="color:blue;">`"price": "2k"`</mark> = <mark style="color:blue;">`"price": 2000`</mark>
* If the number value contains letters, it must be in <mark style="color:blue;">`"`</mark>
  {% endhint %}

***

### Tag

{% code title="Simple Tag Offer" lineNumbers="true" %}

```json
{
  "defaultShop": [
    {
      "Category Name": [
        {
          "tag": "#minecraft:logs",
          "price": 50
        }
      ]
    }
  ]
}
```

{% endcode %}

{% hint style="info" %}

* <mark style="color:blue;">`"tag":`</mark> can be any [Item Tag](https://minecraft.wiki/w/Item_tag_\(Java_Edition\)) (vanilla & modded tags)
* Example of modded tag: <mark style="color:blue;">`"#cobblemon:apricorns"`</mark>
* The prefix <mark style="color:blue;">`#`</mark> is optional
  {% endhint %}

***

### Component

{% code title="Item with Components" lineNumbers="true" %}

```json
{
  "defaultShop": [
    {
      "Category Name": [
        {
          "item": "minecraft:stick",
          "price": 50,
          "components": {
            "minecraft:rarity": "rare",
            "minecraft:max_stack_size": 1,
            "minecraft:enchantments": {
              "minecraft:knockback": 10
            }
          }
        }
      ]
    }
  ]
}
```

{% endcode %}

{% hint style="info" %}

* <mark style="color:blue;">`"components":`</mark> can contain any [Component](https://minecraft.wiki/w/Data_component_format) (vanilla & modded)
* In this example, the shop sells a <mark style="color:blue;">`Stick`</mark> with ->
  * Rarity of <mark style="color:blue;">`Rare`</mark>
  * Stackable to a max of <mark style="color:blue;">`1`</mark>
  * The enchantment <mark style="color:blue;">`Knockback`</mark> level <mark style="color:blue;">`10`</mark>
    {% endhint %}


---

# 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://harmex.gitbook.io/cobbledollars/configuration/default-shop.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.
