Skip to content

Distributing a trait like Gender #144

Description

@beamercola

I have a pretty simple build that's generating a collection of 2222 pfps split by gender

const layerConfigurations = [
  {
    growEditionSizeTo: 1111,
    layersOrder: [
      { name: "MaleGender", trait: "Gender" },
      { name: "MaleBackground", trait: "Background" },
      { name: "MaleBody", trait: "Body" },
      { name: "MaleClothing", trait: "Clothing" },
      { name: "MaleHead", trait: "Head" },
      { name: "MaleEyes", trait: "Eyes" },
      { name: "MaleGlasses", trait: "Glasses" },
      { name: "MaleMouth", trait: "Mouth" },
      { name: "MaleJewelry", trait: "Jewelry" },
    ],
  },
  {
    growEditionSizeTo: 2222,
    namePrefix: "Female",
    layersOrder: [
      { name: "FemaleGender", trait: "Gender" },
      { name: "FemaleBackground", trait: "Background" },
      { name: "FemaleBody", trait: "Body" },
      { name: "FemaleHead", trait: "Head" },
      { name: "FemaleEyes", trait: "Eyes" },
      { name: "FemaleClothing", trait: "Clothing" },
      { name: "FemaleMouth", trait: "Mouth" },
      { name: "FemaleJewelry", trait: "Jewelry" },
      { name: "FemaleHand", trait: "Hand" },
    ],
  },
]

But I'd like the genders to be shuffled at random.

  1. At first, I was hoping I could this, but doesn't seem like how it's supposed to work
layers
  - Male#50
  - - Background
  - - Body
  - Female#50
  - - Background
  - - Body
  1. I considered doing 2 separate builds, then running a 3rd build using them all with "Randomly Insert Rare items". Seems doable but a little funky.

  2. Using js to randomly create a massive 2222 item layerConfigurations array, and _.shuffle() it with lodash 😅

Is there a way to do this that I'm missing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions