# Adding new packs

Follow this guide for adding more packs to the resource.\
You can download pre-created packs from our [repo](https://cards.t3dev.tech/) or create your own custom packs.

### Images

Create a new folder inside `html/images` and call it the same name as you will do in the config.\
Place all of your pack's images in this folder.

The 3 images you must have in each pack are:

* `back.png`
* `foldercover.png`
* `[packname]boosterpack.png`

Please keep card images to 336px x 479px, especially if you are using the grading addon.\
Remember that your booster pack images should be slightly larger to cover the cards during the animation.

### Config

If you have downloaded a pack from the repo and a config snippet is available, you can copy and paste this into your config.\
The structure for this is as follows:

```lua
Config.Packs = {
    ['pack1'] = {
        ['sellable'] = {enabled = true, amount = 100, item = 'money', label = ''},
        ['cardsPerPack'] = {main = 5, fill = 1}, --The amount of cards in this pack per section
        ['main'] = {
            {name = 'card1', chance = 800, shiny = false, slot = 1}, --Divide chance by 10, so 650 = 65% chance
            {name = 'card2', chance = 200, shiny = false, slot = 2},
            {name = 'card3', chance = 200, shiny = false, slot = 3},
            {name = 'card4', chance = 200, shiny = false, slot = 4},
            {name = 'card5', chance = 200, shiny = false, slot = 5},
            {name = 'card6', chance = 10, shiny = true, slot = 6},
            {name = 'card7', chance = 10, shiny = true, slot = 7},
        },
        ['fill'] = {
            {name = 'fillcard1', chance = 100, shiny = true, slot = 8},
        }
    },
    ['pack2'] = {
        ['sellable'] = {enabled = true, amount = 100, item = 'money', label = ''},
        ['cardsPerPack'] = {main = 5, fill = 1}, --The amount of cards in this pack per section
        ['main'] = {
            {name = 'card1', chance = 800, shiny = false, slot = 1}, --Divide chance by 10, so 650 = 65% chance
            {name = 'card2', chance = 200, shiny = false, slot = 2},
            {name = 'card3', chance = 200, shiny = false, slot = 3},
            {name = 'card4', chance = 200, shiny = false, slot = 4},
            {name = 'card5', chance = 200, shiny = false, slot = 5},
            {name = 'card6', chance = 10, shiny = true, slot = 6},
            {name = 'card7', chance = 10, shiny = true, slot = 7},
        },
        ['fill'] = {
            {name = 'fillcard1', chance = 100, shiny = true, slot = 8},
        }
    }
}
```

### Shops

When adding new booster packs to a shop, copy the item you already have and change the pack metadata.

Example:

{% tabs %}
{% tab title="ox" %}

```lua
{ name = 'boosterpack', price = 10, metadata = { pack = 'pack1', image = 'pack1boosterpack' } },
{ name = 'album', price = 100, metadata = { pack = 'pack1', image = 'pack1album' } },
{ name = 'boosterpack', price = 10, metadata = { pack = 'pack2', image = 'pack2boosterpack' } },
{ name = 'album', price = 100, metadata = { pack = 'pack2', image = 'pack2album' } },
```

{% endtab %}

{% tab title="qb" %}

```lua
    [1] = {
        name = "boosterpack",
        price = 10,
        amount = 100,
        info = {pack="pack1",image="pack1boosterpack.png",label="pack1boosterpack"},
        type = "item",
        slot = 1,
    },
    [2] = {
        name = "album",
        price = 100,
        amount = 20,
        info = {pack="pack1",image="pack1album.png",label="pack1album"},
        type = "item",
        slot = 2,
    },
    [3] = {
        name = "boosterpack",
        price = 10,
        amount = 100,
        info = {pack="pack2",image="pack2boosterpack.png",label="pack2boosterpack"},
        type = "item",
        slot = 3,
    },
    [4] = {
        name = "album",
        price = 100,
        amount = 20,
        info = {pack="pack2",image="pack2album.png",label="pack2album"},
        type = "item",
        slot = 4,
    },
```

{% endtab %}

{% tab title="qs" %}

```lua
    [4] = {
        name = "boosterpack",
        label = 'Booster Pack',
        price = 250,
        amount = 100,
        info = {pack="pack1", image="pack1boosterpack", label="Pack1 Booster Pack"},
        type = "item",
        slot = 4,
    },
    [5] = {
        name = "album",
        label = 'Album',
        price = 250,
        amount = 100,
        info = {pack="pack1", image="pack1album", label="Pack1 Album"},
        type = "item",
        slot = 5,
    },
    [6] = {
        name = "boosterpack",
        label = 'Booster Pack',
        price = 250,
        amount = 100,
        info = {pack="pack2", image="pack2boosterpack", label="Pack2 Booster Pack"},
        type = "item",
        slot = 6,
    },
    [7] = {
        name = "album",
        label = 'Album',
        price = 250,
        amount = 100,
        info = {pack="pack2", image="pack2album", label="Pack2 Album"},
        type = "item",
        slot = 7,
    },
```

{% endtab %}

{% tab title="mf" %}

```lua
	{
		name = "boosterpack",
		label = "Pack1 Booster Pack",
		price = 100,
		weight = 2.0,
		mdGenerators = {
			MDGenerators.Img("pack1boosterpack"),
			MDGenerators.Desc("Pack1 Booster Pack"),
			MDGenerators.Pack("pack1"),
		},
		metadata = {
			["pack"] = "pack1",
			["ImageUrl"] = "pack1boosterpack",
			["OverwriteDesc"] = "Pack1 Booster Pack",
		}
	},
	{
		name = "album",
		label = "Pack1 Album",
		price = 200,
		weight = 2.0,
		mdGenerators = {
			MDGenerators.Img("pack1album"),
			MDGenerators.Desc("Pack1 Album"),
			MDGenerators.Pack("pack1"),
		},
		metadata = {
			["pack"] = "pack1",
			["ImageUrl"] = "pack1album",
			["OverwriteDesc"] = "Pack1 Album",
		}
	},
	{
		name = "boosterpack",
		label = "Pack2 Booster Pack",
		price = 100,
		weight = 2.0,
		mdGenerators = {
			MDGenerators.Img("pack2boosterpack"),
			MDGenerators.Desc("Pack2 Booster Pack"),
			MDGenerators.Pack("pack2"),
		},
		metadata = {
			["pack"] = "pack2",
			["ImageUrl"] = "pack2boosterpack",
			["OverwriteDesc"] = "Pack2 Booster Pack",
		}
	},
	{
		name = "album",
		label = "Pack2 Album",
		price = 200,
		weight = 2.0,
		mdGenerators = {
			MDGenerators.Img("pack2album"),
			MDGenerators.Desc("Pack2 Album"),
			MDGenerators.Pack("pack2"),
		},
		metadata = {
			["pack"] = "pack2",
			["ImageUrl"] = "pack2album",
			["OverwriteDesc"] = "Pack2 Album",
		}
	},
```

{% endtab %}
{% endtabs %}


---

# 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.t3dev.tech/resources/t3_tradingcards/adding-new-packs.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.
