Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: generate custom attributes, closes #1192 #1193

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Spyna
Copy link

@Spyna Spyna commented May 19, 2022

Generate custom random attributes

You can add custom random atributers to your collection.

Open the src/attribute.config.js file.

Uncomment the lines below and add your custom attributes, from this

        // {
        //     //the name of the attribute
        //     trait_type: "Height",
        //     //a range of values for the attribute
        //     minValue: 140,
        //     maxValue: 200,
        // },
        // {
        //     //the name of the attribute
        //     trait_type: "Music Genre",
        //     //a range of values for the attribute
        //     range: ["Pop", "Punk", "Rock", "Metal", "Disco", "Jazz", "Classical", "Hip Hop", "Reggae", "Blues", "Soul", "Electronic"],
        // },

to this

        {
            //the name of the attribute
            trait_type: "Height",
            //a range of values for the attribute
            minValue: 140,
            maxValue: 200,
        },
        {
            //the name of the attribute
            trait_type: "Music Genre",
            //a range of values for the attribute
            range: ["Pop", "Punk", "Rock", "Metal", "Disco", "Jazz", "Classical", "Hip Hop", "Reggae", "Blues", "Soul", "Electronic"],
        },

The property trait_type is the name of the custom attribute. The value of the attribute can be configured in two ways:

  • The property minValue and maxValue: are the range of values for the attribute.
  • The property range: is a list of values for the attribute.

You have to change the value of the trait_type property to the name of the attribute you want to add.

Example:

        {
            //the name of the attribute
            trait_type: "Intelligence",
            // or trait_type: "Cleanliness",
            // or trait_type: "Height",
            // or trait_type: "Music Genre",
            
           
        },

@Spyna Spyna mentioned this pull request May 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant