Comments (10)
As written by arnaugm (Thank you very much for the work done here)
If for any reason the artist doesn't want two specific traits to appear together, they can be defined as incompatible.
Let's consider an example where we are creating a character with a hat and a background among other layers. And we don't want to generate the character with a white hat if the background is also wait because we don't like how they look together. We can exclude this combination in the configuration.
These incompatibilities can be configured at a layer configuration level with the option incompatibleTraits which is an object where the keys are traits in the format / and the value is an array of all the traits that are incompatible with this one using the same / format.
Example:
const layerConfigurations = [
{
growEditionSizeTo: 5,
layersOrder: [
{ name: "Background" },
{ name: "Eyeball" },
{ name: "Eye color" },
{ name: "Iris" },
{ name: "Shine" },
{ name: "Bottom lid" },
{ name: "Top lid" },
],
incompatibleTraits: {
"Eye color/Cyan": [
"Eyeball/Red",
],
"Iris/Large": [
"Bottom lid/High",
"Top lid/High",
],
}
},
];
If the art engine generates a new artwork that contains 2 incompatible traits, this new piece will be discarded and a notification will be displayed in the console with the message:
Combination of traits excluded because of exclusion rules!
The creation of artworks will continue generating new combinations as usual.
This option will reduce the number of possible combinations and could be possible that the collection can not reach the requested number of elements. In this case reduce the number of incompatibilities or provide more traits in the layers that has less options to increase the probability of selecting different traits.
If the option is not defined the restriction is not applied.
from create-and-mint-nft-collection.
I have introduced this functionality into my repo and have slightly modified the error that gets returned to the screen to "Combination of traits excluded because of incompatible layers exclusion rule!"
from create-and-mint-nft-collection.
Users can now make use of the incompatibleTraits configuration within their layer configuration to excluded or force certain trait combinations.
incompatibleTraits: {
"Eye color/Cyan": [
"Eyeball/Red",
],
"Iris/Large": [
"Bottom lid/High",
"Top lid/High",
],
}
from create-and-mint-nft-collection.
I'm doing a simple test, I want the spider body and spider head to just go together. But this didn't work. What am I doing wrong?
from create-and-mint-nft-collection.
@cesar4design uou are 50% there. You have set that when Corpo Spider is chosen, then Head Spider should also be chosen. You also need to say that when Head Spider is chosen, only Corpo Spider can be chosen.
from create-and-mint-nft-collection.
@cesar4design you do not have any rarities specified, so first add the correct naming convention for your files as per the sample files provided in the code repo.
from create-and-mint-nft-collection.
Hi! I am using this configuration to exclude the layer, when specific layer item generates. But it doesn't work as expected.
I expect that if Iris/Large
generates, then no item from Bottom lid
and Top lid
layers will be generated
const layerConfigurations = [ { growEditionSizeTo: 20, maxRepeatedTraits: 10, layersOrder: [ { name: "Background" }, { name: "Eyeball" }, { name: "Eye color" }, { name: "Iris" }, { name: "Shine" }, { name: "Bottom lid"}, { name: "Top lid" }, ], incompatibleTraits: { "Iris/Large": [ "Bottom lid/*", "Top lid/*", ], }, }, ];
from create-and-mint-nft-collection.
from create-and-mint-nft-collection.
Hi! I am using this configuration to exclude the layer, when specific layer item generates. But it doesn't work as expected. I expect that if
Iris/Large
generates, then no item fromBottom lid
andTop lid
layers will be generated
const layerConfigurations = [ { growEditionSizeTo: 20, maxRepeatedTraits: 10, layersOrder: [ { name: "Background" }, { name: "Eyeball" }, { name: "Eye color" }, { name: "Iris" }, { name: "Shine" }, { name: "Bottom lid"}, { name: "Top lid" }, ], incompatibleTraits: { "Iris/Large": [ "Bottom lid/*", "Top lid/*", ], }, }, ];
Apologies, the * setting does not actually work. A few other users tested as well. I will be removing it from the comments.
from create-and-mint-nft-collection.
![]()
i wanted to have dependentTrait function such that petals on ground should match color of flower. dependentTraits: { "ACC/PAT/ACC_PAT_BLACK-METAL":["FLO/FLO_BLACKMETAL",], "ACC/PAT/ACC_PAT_CARBON":["FLO/FLO_CARBON",], "ACC/PAT/ACC_PAT_CD":["FLO/FLO_CD",], "ACC/PAT/ACC_PAT_COLA":["FLO/FLO_COLA",], "ACC/PAT/ACC_PAT_DOLLAR":["FLO/FLO_DOLLAR",], "ACC/PAT/ACC_PAT_fabric":["FLO/FLO_FABRIC",], "ACC/PAT/ACC_PAT_GLASS":["FLO/FLO_GLASS",], "ACC/PAT/ACC_PAT_GOLD":["FLO/FLO_GOLD",], "ACC/PAT/ACC_PAT_JEANS":["FLO/FLO_JEANS",], "ACC/PAT/ACC_PAT_MARBLE":["FLO/FLO_MARBLE",], "ACC/PAT/ACC_PAT_METALIC":["FLO/FLO_METALIC",], "ACC/PAT/ACC_PAT_OVO":["FLO/FLO_OVO",], "ACC/PAT/ACC_PAT_PAINTEDMETAL":["FLO/FLO_PAINTEDMETAL",], "ACC/PAT/ACC_PAT_SELVER":["FLO/FLO_SELVER",], "ACC/PAT/ACC_PAT_VELVET_BLACK":["FLO/FLO_VELVET_BLACK",], "ACC/PAT/ACC_PAT_VELVET_BLOOD":["FLO/FLO_VELVET_BLOOD",], "ACC/PAT/ACC_PAT_VELVET_BROWN":["FLO/FLO_VELVET_BROWN",], "ACC/PAT/ACC_PAT_VELVET_CYAN":["FLO/FLO_VELVET_CYAN",], "ACC/PAT/ACC_PAT_VELVET_GREEN":["FLO/FLO_VELVET_GREEN",], "ACC/PAT/ACC_PAT_VELVET_LAVANDER1":["FLO/FLO_VELVET_LAVANDER1",], "ACC/PAT/ACC_PAT_VELVET_LAVANDER2":["FLO/FLO_VELVET_LAVANDER2",], "ACC/PAT/ACC_PAT_VELVET_ORANGE":["FLO/FLO_VELVET_ORANGE",], "ACC/PAT/ACC_PAT_VELVET_PASTELRED":["FLO/FLO_VELVET_PASTELRED",], "ACC/PAT/ACC_PAT_VELVET_PASTELRED":["FLO/FLO_VELVET_PINK",], "ACC/PAT/ACC_PAT_VELVET_RED":["FLO/FLO_VELVET_RED",], "ACC/PAT/ACC_PAT_VELVET_SKY":["FLO/FLO_VELVET_SKY",], "ACC/PAT/ACC_PAT_VELVET_TIFFANYBLUE":["FLO/FLO_VELVET_TIFFANYBLUE",], "ACC/PAT/ACC_PAT_VELVET_VIOLET":["FLO/FLO_VELVET_VIOLET",], "ACC/PAT/ACC_PAT_VELVET_VIOLET1":["FLO/FLO_VELVET_VIOLET1",], "ACC/PAT/ACC_PAT_VELVET_WHITE-":["FLO/FLO_VELVET_WHITE",], "ACC/PAT/ACC_PAT_VELVET_YELLOW":["FLO/FLO_VELVET_YELLOW",], } what am i doing wrong
The code base unfortunately does not allow for sub folders within layers, this is why its not working.
from create-and-mint-nft-collection.
Related Issues (20)
- [FEATURE] Opensea Polygon Script To Auto Sell NFTs Added Metamask Account Number HOT 3
- [QUESTION] Sell NFTs Script Not Showing All Wallets HOT 1
- [FEATURE] Cancel NFTs On Sale On Opensea HOT 1
- [FEATURE] Opensea Selling Scripts To Use Wallet PrivateKey HOT 1
- [BUG] MODULE_NOT_FOUND HOT 2
- [BUG] Error: No node found for selector: div[aria-hidden="false"] HOT 4
- [QUESTION] Why 'layerItemsMaxRepeatedTraits' don't work? HOT 2
- [FEATURE] SVG Support HOT 1
- [FEATURE] Opensea Sell Script Support Different Currency Selection
- [FEATURE] Opensea Unhide NFTs Script HOT 2
- layerItemsMaxRepeatedTraits still returns duplicates HOT 10
- [FEATURE] Add Maximum Repeatability For All Items In A Layer In A Single Configuration HOT 2
- Excluding layers in the combination HOT 3
- [BUG]Error: No node found for selector: div[aria-hidden="false"] when attempting to put edition on sale: 9995 HOT 11
- [FEATURE] Update package.json with latest versions for sell_nfts script
- [FEATURE] Generate based on metadata HOT 1
- I have a folder with two subfolders. HOT 1
- [QUESTION] Generate characters with one item in different places HOT 1
- [QUESTION] How to create multiple template types in a single collection? HOT 1
- [QUESTION] Incompotible traits settings not working HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from create-and-mint-nft-collection.