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

Adds a feature to specify incompatible traits. #1559

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

two-pack
Copy link

Description

The generated image may be corrupted because some traits combinations in layers do not match.
This feature allows you to specify combinations to exclude in config.js to eliminate this problem.
An example would be to specify the following:

const layerConfigurations = [
  {
    growEditionSizeTo: 50,
    layersOrder: [
      { name: "Background" },
      { name: "Eyeball" },
      { name: "Eye color" },
      { name: "Iris" },
      { name: "Shine" },
      { name: "Bottom lid" },
      { name: "Top lid" },
    ],
    incompatibleTraits: [
      { "Eye color": "Red", Eyeball: "Red" },
      { "Bottom lid": "High", "Top lid": "High" },
      { "Eye color": "Purple", "Bottom lid": "Low", "Top lid": "Low" },
    ],
  },
];

In the first example above, combinations containing Eye color is Red and Eyeball is Red are excluded.

Related issues and PR

#1319, #1522, #585

@1hibijibi1
Copy link

How do you format multiple exclusions from the same category? For example Eye Color Purple is not compatible with any of the traits in Bottom Lid.

@two-pack
Copy link
Author

There is no way to specify them all together, so all combinations must be specified.

@1hibijibi1
Copy link

There is no way to specify them all together, so all combinations must be specified.

When I define more than one exclusion it doesn't exclude either option and both combinations end up in the collection. If I define one it excludes it as expected. I think I just have the format wrong. Can you confirm? @two-pack

Working
{ "Eyes": "Flip Shades", "Head": "Icy Horns"}
Non- working
{ "Eyes": "Flip Shades", "Head": "Wif" },
{ "Eyes": "Flip Shades", "Head": "Icy Horns"}

@two-pack
Copy link
Author

@1hibijibi1
I check following configulation in config.js. It works.

const layerConfigurations = [
  {
    growEditionSizeTo: 50,
    layersOrder: [
      { name: "Background" },
      { name: "Eyeball" },
      { name: "Eye color" },
      { name: "Iris" },
      { name: "Shine" },
      { name: "Bottom lid" },
      { name: "Top lid" },
    ], incompatibleTraits: [
      { "Eyeball": "White", "Eye color": "Cyan" },
      { "Eyeball": "White", "Eye color": "Green"},
      { "Eyeball": "White", "Eye color": "Pink"},
      { "Eyeball": "White", "Eye color": "Purple"},
      { "Eyeball": "White", "Eye color": "Red"},
    ],
  },
];

@1hibijibi1
Copy link

@two-pack thanks, I copied this over and reran doing tests along the way. I believe my error came from having a file missing from /layers folder, it was the first name specified in the incompatible traits list. Working now. Thanks for the response.

@bmutahhar
Copy link

Why isn't this merged yet? I would like to use this feature. Can someone please explain if it still has any issues?

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.

3 participants