nftchef / art-engine

An advanced fork of the HashLips Art Engine with additional features to generate complex art from provided layers using the familiar Hashlips setup.
MIT License
427 stars 203 forks source link

Incompatibile Ignored #254

Closed advra closed 1 year ago

advra commented 2 years ago

I am trying to use the incompatibility dictionaries. I added an incompatibility set (in both directions where A and B have matching rules for A to B and B to A) however the generation seems to ignore this rule. Is this a bug or am I doing something incorrectly in the setup? Note: I am using nested folders in parts of my setup like armor and armor accessories.

My File Structure:

- layers                                
    - facewear
        - None#50           
        - Full Face Mask#10         
        - Another Full Face Mask#10
        - White Half Mask#20
        - Black Half Mask#20
    -eyewear
        - None#50
        - Green Circle Glasses#20
        - Transparent Glasses#20

Note: I could put these all in one layer category but Black and White are half masks which only cover the mouth while eyes are exposed. That means we can have eyewear with these masks. However, full face masks cover the full face so we must state eyewear as incompatible with these.

// defined in config.js

const incompatible = {
  // masks
  "Full Face Mask": ["Green Circle Glasses", "Transparent Glasses" ],
  "Another Full Face Mask": ["Green Circle Glasses", "Transparent Glasses" ],
  // eyewear
  "Green Circle Glasses": ["Full Face Mask", "Another Full Face Mask" ],
  "Transparent Glasses": ["Full Face Mask", "Another Full Face Mask" ],
};
advra commented 1 year ago

nevermind. I've went back to the sample code and the following worked. The cause was a slight typo Facemask (without a space) instead of Face Mask

I discovered this by backtesting the default project code with the following which worked:

const incompatible = {
   "gold chain": ["MetallicShades"],
   "MetallicShades": ["gold chain"],
};