🆘
Documentation
  • 👋Welcome to T3 Dev
  • Resources
    • 🪄t3_lib
      • Installation
    • 🎴t3_tradingcards
      • Installation
      • Snippets
      • Adding new packs
      • Common Issues
    • 💯t3_grading
      • Installation
      • Snippets
    • 💰t3_comicrobbery
      • Installation
      • Snippets
    • 🚴‍♂️t3_deliveroo
      • Installation
    • 🛤️t3_trainjob
      • Installation
  • External Links
    • Tebex
    • Discord
    • GitHub
Powered by GitBook
On this page
  • Images
  • Config
  • Shops
  1. Resources
  2. t3_tradingcards

Adding new packs

Last updated 1 year ago

Follow this guide for adding more packs to the resource. You can download pre-created packs from our 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:

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:

{ 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' } },
    [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,
    },
    [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,
    },
	{
		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",
		}
	},
🎴
repo