Jon-Becker / nft-generator-py

This tool allows users to generate sets of unique images and metadata using weighted layer collections.
MIT License
304 stars 127 forks source link

Feature Request: Calculate "amount" number #30

Closed michaelzero00 closed 2 years ago

michaelzero00 commented 2 years ago

Right now it's a bit of trial and error trying to get the right amount files to generate based on the input layers.

It would be great to calculate this figure based on the config.

Jon-Becker commented 2 years ago

Lets say you have 3 layers with 5 traits each.

3**5 == 243 possible combinations

I'm no mathematician so this is probably not gonna work for all edge cases but thats the basic logic.

michaelzero00 commented 2 years ago

But that only works when all traits are set to 100% rarity right?

Jon-Becker commented 2 years ago

No. If there's one layer with 2 possibilities with weights [99, 1], there's still 2 possible combinations and the program will run until it gets both if editions is set to 2.