Creating Packs on NFTHive.io

Hive Digital
9 min readApr 18, 2023

--

Editors Note: An update to our pack editor is in the works and will be released in the coming weeks. This guide will be updated alongside the editor.

Packs are a great way to add some sense of chance and excitement to your NFT distribution process. A pack is a digital clone of actual packs of trading cards you can buy in the store. You only know how many NFTs are in them, and which NFTs could be in them, but not which NFTs exactly. This guide will show you how to set up packs of varying sizes and how to manage the outcome possibilities.

Some prerequisites: A pack (basically the “wrapper” that holds the NFTs) is represented by its own NFT. You will need to create a template for this NFT first.

(An in-depth guide from setting up your collection to minting your own NFTs can be found here, for this guide we assume that you already have a collection and some experience in managing your NFTs on WAX)

To start with, we’ll create a new schema called “secondpack” (as our first pack has been created in this now slightly outdated article)

The schema is very basic, and as soon as our editor detects the word “pack” in the schema name, it will auto-suggest the attribute “unpack_url”, which will come in handy later on.

The pack itself is not spectacular. You can add other attributes like “description” or rarity, but it’s not required.

No need to mint this Template at this stage, the template is all we need. We can now go back to the overview, and dive into the actual pack creation.

Packs are grouped into what we call “Releases”. All packs within a release share the same pool(s) of NFTs that can be included in them, and the only thing that differentiates packs (apart from their name and image), is their total available amount, and the number of “Slots” they have (the amount of NFTs the user gets from a single pack). To start us off, we create a new release by hitting the corresponding button.

After we confirm the release creation in a popup, a new row in the table appears.

The most important columns here are “Packs” (by which NFTs are packs represented and how many slots do they have) and “Pools” (which NFTs can be in those packs. We’ll start by adding a new entry to the “Packs” section:

We are taken to a new screen and are immediately prompted to select the template that represents this pack. We select the template we just created from the simple schema/template dropdowns:

The pack name gets auto-populated with the name of the template. This is usually what you would want, but you can alter the name of the pack as well.

If you are feeling fancy, you can add an unpack animation. Provide an IPFS hash that links to a video file, and it will be played to the user in fullscreen when they open that pack:

Make sure to test the animation by hitting the preview button, some video files cause problems. We had good luck with the .mp4 file format in the past so that’s what we would recommend.

This pack is supposed to be a pretty basic pack. We only want it to contain a single NFT. Generally speaking, the more slots a pack has, the more valuable it is.

The last option you have is an optional start date. Before this date, unpacking won’t work.

Once that’s configured, we click “Create Pack” and are done with this step.

For this example, we will create a second pack template (the process is the same as above and not shown here), which will represent a bigger pack holding more NFTs. From the overview, we create another pack, with 3 slots instead of one.

Both of these packs now show up in the packs section in the overview (after hitting the corresponding “Show” button).

We can now switch to the “Pools” section by hitting the “Show” button beneath it. The Pack details disappear, and we are being presented with a (still empty) list of pools for this release.

As we mentioned above, pools define the NFTs that can be inside the packs — but why would we need to create and manage more than one pool then? Why can’t we just dump all of our NFTs into a single pool and be done with it? Well, you could! But pools are our way of managing statistical chances and distributions of NFTs to pack slots. Let’s look at it via an example.

The first thing you should know is that the order in which you create pools, matters. Why is that?

Let us assume we create two pools, one with 15 common NFTs, one with 5 epic NFTs (in that order), and two packs, one with one slot, and one with three slots (like in our example case above). Then we get something that looks a bit like this:

Represented in these three rows are both packs (top and bottom) and the pools (in the middle). The cheap pack with 1 slot covers the entire range of both pools. This represents 1 random pick from the available range upon unpacking. Meaning the user has a 15/20 chance of getting a common NFT, and a 5/20 chance of getting an epic NFT. The expensive three slots pack from the third row works differently. As you can see, both Slots 1 and 2 only cover most of the common pool, but nothing from Pool 3. This means, that upon unpacking, slots 1 and 2 will be guaranteed to be NFTs from the common pool. The third slot covers all of the epic pool and just a small fraction of the common pool. That means, that there is a very high chance of getting an Epic NFT in the third slot. So for the user, buying an expensive pack means that there’s a near-guaranteed chance of getting one epic NFT (plus two guaranteed common ones).

You can come up with all kinds of distribution this way. Splitting pools up into distinct rarities is just one approach. You could also set up multiple pools with custom mixtures of rarities within individual pools.

Back to our example, we’ll set it up just like in the diagram above. First, we’ll create the common pool:

After the pool itself has been created, it shows up in the UI along with the option to add NFTs to it.

At this point, the NFTs themselves don’t exist yet, so we’ll assume we have two templates already and want to mint those NFTs. Here’s a neat trick that will help us:

Back in the common collection — schema — template manager, we’ll now mint the epic NFTs first. Clicking the “View / Mint” button takes us to the familiar view:

We will mint 5 NFTs. The trick comes up in the next step:

We can select “Mint to nfthivepacks”, which makes the NFT directly available back in the packs editor, and the transaction history of those NFTs remains “clean”. We’ll also mint the 15 common ones, go back to the pack editor, click on “Add / Remove Assets” on the common pool, and select them there:

Hitting the “Edit” button loads up the available data from the blockchain, we can see that there are 15 “unassigned” assets which we’ll add to the pool by selecting “Add” and “15”, then confirming our selection on the bottom of the screen.

Once we’ve done this for both pools, we can check back in the overview if everything seems to be in order:

Looking good! Once we’re sure that our numbers add up (5 packs with one slot, 5 packs with 3 slots, which makes for a total of 20 NFTs, which matches the 15 + 5 assets in the pools), we can hit the “Finish” button.

The same consistency check is performed by the contract, and we would get an error message at this point if our numbers wouldn’t be lining up.

Our pack is done! It’s marked as finished in the editor and can no longer be edited or deleted

At this point some people get confused. Where are the packs, exactly? If you remember, we created two templates, the “wrappers” which are the NFTs that represent the packs themselves. However, we did not mint those yet. So what we did so far was create the concept or the rules of the packs but the NFTs themselves don’t exist on the blockchain yet.

Once the NFTs have been minted, they will be recognized by NFTHive.io as packs. You could just mint them directly, but the far more common practice is to create drops (one for each pack).

To do that, create a drop as usual, just pay attention to two things:

Make sure to only create as many NFTs (or drops) as there are packs available. If you remember, we set up 5 common and 5 epic packs, so the drops for each pack should reflect that.

Make sure to select the correct template per drop (and not both at the same time, for example).

Once the drop is created, your packs can be bought!

The NFTs contain the unpack link within the attribute unpack_url. If the user follows that link, they will see the packs they own, and the NFTs will have an “Unpack” button (also when the users look at the NFTs in their inventory).

That’s all there is on packs! We’ll keep you updated on the next big update, which should greatly simplify pool management and will bring instant drop creation. We hope you’ll enjoy it!

--

--