Launch a Generative PFP Project on FXHash With No Coding

If you've ever wanted to mint your own generative project but didn't have the resources, this is what you want to read.

Launch a Generative PFP Project on FXHash With No Coding
Elisian #14, by Vectris x WideawakeBeets

NOTE: a more recent rule change on fxhash says that you must explicitly label your work as a layered PNG, as that is technically procedural rather than generative. Please mark your content accordingly to avoid moderation. Updated March 17.

fxhash rules. It's a marketplace that offers a unique minting experience that only works with generative types of NFTs. Unfortunately, this means that most people lack the skills to take advantage of such a great platform. The bottleneck for most people is the coding knowledge required, but thanks to @PureSpider and his template we can actually launch an entire generative PFP project for the cost of a single mint on fxhash. Let me show you how.

Please also reference the README.md file for more notes and clarifications. Between the readme file and this guide you should have no problems following along.

Prerequisites

  1. Get Node.js installed
  2. Download the template from GitHub, unzip it
  3. The layers (images/traits) for your project, organized into the appropriate folders and named correctly
  4. fxhash needs to be open for minting. Check the status and schedule here: opening schedule

Step 1

Installing Node.js installed is pretty straightforward. What is Node.js? It's a package manager for Javascript libraries and tries to make lives easier for developers. If you want to learn more I'd just check the about page.

Step 2

We can't go any further without saying thanks to @PureSpider for creating such an easy way to participate on fxhash. I recommend buying them a coffee.

the only things we need to worry about are inside the layers folder

Download this .zip file and extract it somewhere convenient for you. Inside there's several folders, all of which we can ignore, except for the one called 'public'. Inside ย of there is a 'layers' folder. This is where the image files will reside.

Step 3

If you need help on preparing your layers then you're probably better off looking at at an article like this, since that's just a little too far outside of my range to offer up actual advice on it. I will talk about how the rarity percentages work.

Inside the layers folder you should have 1 folder for each category of trait. In our example we have 9 different ones: background, capes, body, dots, eyes, mouth, hair, and two different accessories. The numbers determine the order, so double zero is first, 01 is second, and so on. That's all there is to that.

the trait for capes is hidden from the features below

The other thing to note is that the folder for Dots is actually named "03-hide-Dots" - hide is a keyword that will exclude those traits from showing up on the list, but still want to include it. You know the hide function is working if you don't see it listed as an attribute on fxhash, like how the capes feature is excluded in the above photo.

Rarities are handled with the names of the files.

How do we determine the rarities of individual traits? We do that by naming the individual files with a number at the beginning. The numbers themselves don't have to add up to anything specific as they're all relative to each other. If you have two traits, 1-White.png and 100-Blue.png, the Blue version will show up (on average) 100 times more often than the White version. The larger the number, the more often it will show up compared to a smaller number. Adjust accordingly. ย 

Step 4

So now we need to generate the .zip file to upload to fxhash and test it. This is where the magic happens. All we need to do is run the 'generate.sh' (Mac/Linux) or 'generate.bat' (Windows) script and it should generate you a zipped file in the 'dist-zipped' folder. The whole process should only take a few seconds to have your .zip ready.

You should be able to simply open the .sh file and run it, but I would sometimes run into problems getting it to work. @PureSpider has the fix for that too though, and we just need to run a simple chmod command.

chmod +x generate.sh
Try this if your generate.sh file is giving you trouble.

If that's too intimidating you can try downloading my generate.sh that I've chmod'd already and uploaded to IPFS. Delete generate.sh, download the linked file, and put it in the same spot.

If you find yourself unable to use the generate.sh file, it's a very simple fix to run the command ourselves. We just need to navigate to the correct folder in our terminal and run a couple commands.

1. npm install
2. npm run build
We can ignore the warnings that may appear when running the install command. It's okay for our purposes.

[I've clarified this section a little bit more after some feedback. Please let me know if it requires further tweaks.]

Step 5

Now you can head over to the sandbox on fxhash and try it out! Upload your .zip file and you can select the "try new hash" button to have it reload with a new iteration. If everything looks good, you're now ready to mint.

Going through the minting process is pretty similar to a non-fxhash platform outside of a couple things that may throw you off. I would just check the docs on fxhash, specifically the 'How to publish (mint) a GT' section. That whole page is filled with well written information.

Summary

I hope this helped remove some of the mystery surrounding fxhash mints. It's exciting to level the playing field a little bit and allow someone who knows zero code at all to participate on a platform that requires it. Will we see an influx of PFP projects originating on fxhash now? All I can say with absolute certainty is that myself and @Breez_Blox were able to sell out of our small test drop of 33 and it was a lot of fun. I will continue to explore and plan on releasing another drop soon.

Wabbits Hunting #25 by myself & Breez_Blox

If any of these directions need to be clarified, please let me know so I can tune it. This will be revised as we continue to move through the space and I'll try to keep it current. Please send some love to @PureSpider for making all of this possible!

I'd love to hear your thoughts/criticisms/compliments/improvements so please let me know with a tweet to @klickdotdev. ๐Ÿ™